Project

General

Profile

« Previous | Next » 

Revision 568

Added by doc almost 17 years ago

Added support to configure the mailer settings via the backend

View differences:

save.php
39 39
	$admin = new admin('Settings', 'settings_advanced');
40 40
}
41 41

  
42
// Create a javascript back link
43
$js_back = "javascript: history.go(-1);";
44

  
45
// Ensure that the specified default email is formally valid
46
if(isset($_POST['server_email'])) {
47
	$_POST['server_email'] = strip_tags($_POST['server_email']);
48
	if(!eregi("^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$", $_POST['server_email'])) {
49
		$admin->print_error($MESSAGE['USERS']['INVALID_EMAIL'].
50
			'<br /><strong>Email: '.htmlentities($_POST['server_email']).'</strong>', $js_back);
51
	}
52
}
53

  
42 54
// Work-out file mode
43 55
if($advanced == '') {
44 56
	// Check if should be set to 777 or left alone
......
126 138
	$setting_name = $setting['name'];
127 139
	$value = $admin->get_post($setting_name);
128 140
	if ($setting_name!='wb_version') {
129
		$value = $admin->add_slashes($value);
141
		$value = strip_tags($admin->add_slashes($value));
130 142
		switch ($setting_name) {
131 143
			case 'default_timezone':
132 144
				$value=$value*60*60;

Also available in: Unified diff