Project

General

Profile

« Previous | Next » 

Revision 1301

Added by Dietmar over 14 years ago

Tickets #932 change deprecated eregi functions
Tickets #948 fixed Multiple use of same parametrised droplet - parameter handling
Upgrade Droplets to Version 1.0.3
update some headerinfos
non existing pages, will be created if clicking save in page settings

View differences:

save.php
25 25
// Print admin header
26 26
require('../../config.php');
27 27
require_once(WB_PATH.'/framework/class.admin.php');
28
if($advanced == '') {
28
if($advanced == '')
29
{
29 30
	$admin = new admin('Settings', 'settings_basic');
30 31
	$_POST['database_password'] = DB_PASSWORD;
31 32
} else {
......
39 40
if(isset($_POST['server_email']))
40 41
{
41 42
	$_POST['server_email'] = strip_tags($_POST['server_email']);
42
	if(!eregi("^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$", $_POST['server_email'])) {
43
    $pattern = '/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9]([-a-z0-9_]?[a-z0-9])*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z]{2})|([1]?\d{1,2}|2[0-4]{1}\d{1}|25[0-5]{1})(\.([1]?\d{1,2}|2[0-4]{1}\d{1}|25[0-5]{1})){3})(:[0-9]{1,5})?\r/im';
44
    // $pattern = '/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,6}))$/';
45
    if(false == preg_match($pattern, $_POST['server_email']))
46
    {
43 47
		$admin->print_error($MESSAGE['USERS']['INVALID_EMAIL'].
44 48
			'<br /><strong>Email: '.htmlentities($_POST['server_email']).'</strong>', $js_back);
45 49
	}

Also available in: Unified diff