Project

General

Profile

« Previous | Next » 

Revision 95

Added by stefan about 19 years ago

Moved settings from config.php into database.
NOT FULLY WORKING!!!

View differences:

index.php
44 44
$results = $database->query($query);
45 45
while($setting = $results->fetchRow()) {
46 46
	$setting_name = $setting['name'];
47
	$setting_value = htmlspecialchars($admin->strip_slashes_dummy($setting['value']));
48
	switch($setting_name) {
49
		// Website title
50
		case 'title':
51
			$template->set_var('TITLE', $setting_value);
52
		break;
53
		// Website description
54
		case 'description':
55
			$template->set_var('DESCRIPTION', $setting_value);
56
		break;
57
		// Website keywords
58
		case 'keywords':
59
			$template->set_var('KEYWORDS', $setting_value);
60
		break;
61
		// Website header
62
		case 'header':
63
			$template->set_var('HEADER', $setting_value);
64
		break;
65
		// Website header
66
		case 'header':
67
			$template->set_var('HEADER', $setting_value);
68
		break;
69
		// Website footer
70
		case 'footer':
71
			$template->set_var('FOOTER', $setting_value);
72
		break;
73
		// WYSIWYG style
74
		case 'wysiwyg_style':
75
			$template->set_var('WYSIWYG_STYLE', $setting_value);
76
		break;
77
		case 'rename_files_on_upload':
78
			$template->set_var('RENAME_FILES_ON_UPLOAD', $setting_value);
79
		break;
80
	}
47
	$setting_value = htmlspecialchars($setting['value']);
48
	/*if ($setting_value=='false')
49
		$setting_value=false;
50
	if ($setting_value=='true')
51
		$setting_value=true;*/
52
	echo strtoupper($setting_name).'-'.$setting_value.'-'.($setting_value=="false").'<br />';
53
	$template->set_var(strtoupper($setting_name),$setting_value);
81 54
}
82 55

  
83 56
// Query current settings in the db, then loop through them and print them

Also available in: Unified diff