"; } if (empty ($fGoto)) { $error = 1; $tGoto = $fGoto; $tMessage = $PALANG['pEdit_alias_goto_text_error1']; } $goto = preg_replace ('/\r\n/', ',', $fGoto); $goto = preg_replace ('/[\s]+/i', '', $goto); $goto = preg_replace ('/\,*$/', '', $goto); $array = preg_split ('/,/', $goto); for ($i = 0; $i < sizeof ($array); $i++) { if (in_array ("$array[$i]", $CONF['default_aliases'])) continue; if (empty ($array[$i])) continue; if (!check_email ($array[$i])) { $error = 1; $tGoto = $goto; $tMessage = $PALANG['pEdit_alias_goto_text_error2'] . "$array[$i]"; } } if ($error != 1) { $result = db_query ("UPDATE alias SET goto='$goto',modified=NOW() WHERE address='$fAddress' AND domain='$fDomain'"); if ($result['rows'] != 1) { $tMessage = $PALANG['pEdit_alias_result_error']; } else { db_log ($SESSID_USERNAME, $fDomain, "edit alias", "$fAddress -> $goto"); header ("Location: overview.php?domain=$fDomain"); exit; } } include ("./templates/header.tpl"); include ("./templates/menu.tpl"); include ("./templates/edit-alias.tpl"); include ("./templates/footer.tpl"); } ?>