get(); $tStoreAndForward = $ah->hasStoreAndForward(); include ("../templates/header.php"); include ("../templates/users_menu.php"); include ("../templates/users_edit-alias.php"); include ("../templates/footer.php"); } if ($_SERVER['REQUEST_METHOD'] == "POST") { // user clicked on cancel button if(isset($_POST['fCancel'])) { header("Location: main.php"); exit(0); } $pEdit_alias_goto = $PALANG['pEdit_alias_goto']; if (isset($_POST['fVacation'])) $fVacation = $_POST['fVacation']; if (isset($_POST['fGoto'])) $fGoto = escape_string (trim($_POST['fGoto'])); if (isset($_POST['fForward_and_store'])) $fForward_and_store = escape_string ($_POST['fForward_and_store']); $goto = strtolower ($fGoto); $goto = preg_replace ('/\\\r\\\n/', ',', $goto); $goto = preg_replace ('/\r\n/', ',', $goto); $goto = preg_replace ('/[\s]+/i', '', $goto); $goto = preg_replace ('/\,*$/', '', $goto); $goto = explode(",",$goto); $goto = array_merge(array_unique($goto)); $good_goto = array(); foreach($goto as $address) { if(!check_email($address)) { $error += 1; $tMessage = $PALANG['pEdit_alias_goto_text_error1'] . "$address"; } else { $good_goto[] = $address; } } $goto = $good_goto; if ($error == 0) { $flags = 'remote_only'; if($fForward_and_store == "YES" ) { $flags = 'forward_and_store'; } $updated = $ah->update($goto, $flags); if($updated) { header ("Location: main.php"); exit; } $tMessage = $PALANG['pEdit_alias_result_error']; } include ("../templates/header.php"); include ("../templates/users_menu.php"); include ("../templates/users_edit-alias.php"); include ("../templates/footer.php"); } /* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ ?>