Location: PHPKode > projects > Exero CMS > upload/admin/settings.php
<?
/*========================================*\
| Exero CMS                                |
|==========================================|
|          http://ecms.getox.net           |
|https://sourceforge.net/projects/exerocms/|
|==========================================|
|     Exero CMS is released under the      |
|     GNU General Public License (GPL)     |
| opensource.org/licenses/gpl-license.php  |
\*========================================*/

require("global.php");
if(!checkadminsession()) {
	print_login();
	exit;
}

if(!adminpermissions("globalsettings")) {
	print_no_permission();
	exit;
}

if($_REQUEST['do'] == "") {
	print_cp_header("Global Settings");
	
	print_form_header("settings.php","settings");
	print_form_hiddenfield("do","save");
	// Forum Settings
	print_table_header("Site Settings","2");
	print_table_optiontitle("Site Name",'$ecms->settings[sitetitle]','2');
	print_form_textbox("Site Title","sitetitle",htmlspecialchars($ecms->settings['sitetitle']));
	print_table_optiontitle("Search Engine Optimization",'','2');
	print_form_yesno("SEO Friendly URLs","mod_rewrite",$ecms->settings['mod_rewrite']);
	print_table_optiontitle("Maintenance Mode",'','2');
	print_form_yesno("Site Active","siteactive",$ecms->settings['siteactive']);
	print_form_textarea("Maintenance message","maintmessage",$ecms->settings['maintmessage']);
	print_table_optiontitle("Appearance",'','2');
	print_themeselect("Theme","defaulttheme","",$ecms->settings['defaulttheme']);
	print_defaultmoduleselect("Default Module","defaultmod","",$ecms->settings['defaultmod']);
	print_form_submit("Save",2);
	print_table_footer();

	// Cookie Settings
	print_table_header("Cookies","2");
	print_table_optiontitle("Cookie Domain",'$ecms->settings[cookiedomain]','2');
	print_form_textbox("The domain on which you want the cookie to have effect.<br>If you want this to affect all of example.com rather than just <strong>portal.example.com</strong>, enter <strong>.example.com</strong> here <strong>(note the 2 dots!!)</strong>. You can leave this setting blank.","cookiedomain",$ecms->settings['cookiedomain']);
	print_table_optiontitle("Cookie Path",'$ecms->settings[cookiepath]','2');
	print_form_textbox("The path that the cookie is saved to.<br>If you run more than one copy of ecms on the same domain, it will be necessary to set this to the directory this copy is installed in. Otherwise, just leave it as / .<br><strong>Note: This must ALWAYS end with a forward slash.</strong>","cookiepath",$ecms->settings['cookiepath']);
	print_form_submit("Save",2);
	print_table_footer();
	
	// Time & Date Settings
	print_table_header("Time & Date Settings","2");
	print_table_optiontitle("Time Format",'$ecms->settings[timeformat]','2');
	print_form_textbox("Format in which the time is presented in<br>See: <a href=\"http://www.php.net/manual-lookup.php?function=date\" target=\"blank\">http://www.php.net/manual-lookup.php?function=date</a>","timeformat",$ecms->settings['timeformat']);
	print_table_optiontitle("Date Format",'$ecms->settings[dateformat]','2');
	print_form_textbox("Format in which the date is presented in<br>See: <a href=\"http://www.php.net/manual-lookup.php?function=date\" target=\"blank\">http://www.php.net/manual-lookup.php?function=date</a>","dateformat",$ecms->settings['dateformat']);
	print_form_submit("Save",2);
	print_table_footer();
	
	// Misc Settings
	/*print_table_header("Misc Settings","2");
	print_table_optiontitle("Show Server info",'','2');
	print_form_yesno("Show Server info<br>This will show the Serverload & PHP Version.<br><b>Note: Everyone can see this.</b>","showserverinfo",$bboptions['showserverinfo']);
	print_form_submit("Save",2);
	print_table_footer();*/
	print_form_footer();
		
	print_cp_footer();
} else if($_POST['do'] == "save") {
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['sitetitle'])."' WHERE setting='sitetitle'");
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['cookiepath'])."' WHERE setting='cookiepath'");
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['cookiedomain'])."' WHERE setting='cookiedomain'");
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['timeformat'])."' WHERE setting='timeformat'");
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['dateformat'])."' WHERE setting='dateformat'");
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['mod_rewrite'])."' WHERE setting='mod_rewrite'");
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['siteactive'])."' WHERE setting='siteactive'");
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['maintmessage'])."' WHERE setting='maintmessage'");
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['defaulttheme'])."' WHERE setting='defaulttheme'");
	$db->query("UPDATE settings SET value='".$db->real_escape_string($_POST['defaultmod'])."' WHERE setting='defaultmod'");
	print_redirect("settings.php","Settings Saved.","Settings Saved.");
}
?>
Return current item: Exero CMS