include "my_lib.php"; $sessid = check_session(); $url = "main.php?" . session_name() . "=" . session_id(); $modify = $_GET[modify]; if (!empty($_POST[submit])) { $goto = $_POST[goto]; if (empty($goto)) { print_header(); print_menu(); print "
\n"; print "You didn't enter anything at To:.\n"; print_footer(); exit; } $array = preg_split('/,/', $goto); for ($i = 0 ; $i < sizeof($array) ; $i++) { if (!check_email($array[$i])) { print_header(); print_menu(); print "
\n"; print "The email address $array[$i] is not a valid email address, please go back.\n"; print_footer(); exit; } } $result = db_query ("UPDATE alias SET goto='$goto', change_date=NOW() WHERE address='$modify' AND domain='$sessid[domain]'"); if ($result[rows] == 1) { header("Location: $url"); } else { print_header(); print_menu(); print "
\n"; print "Unable to update: $address -> $goto in the alias table!\n"; print_footer(); exit; } } $query = "SELECT * FROM alias WHERE address='$modify' AND domain='$sessid[domain]'"; $result = db_query ("$query"); if ($result[rows] == 1) { $row = mysql_fetch_array ($result[result]); } else { print_header(); print_menu(); print "
\n"; print "Unable to find the alias!\n"; print_footer(); exit; } print_header(); print_menu(); print "
print_footer(); ?>