"; } elseif (!check_alias_owner ($SESSID_USERNAME, $fAddress)) { $error = 1; $tGoto = $fGoto; $tMessage = $PALANG['pEdit_alias_result_error']; } $goto = preg_replace ('/\\\r\\\n/', ',', $fGoto); $goto = preg_replace ('/\r\n/', ',', $goto); $goto = preg_replace ('/[\s]+/i', '', $goto); $goto = preg_replace ('/,*$|^,*/', '', $goto); $goto = preg_replace ('/,,*/', ',', $goto); if (empty ($goto)) { $error = 1; $tGoto = $_POST['fGoto']; $tMessage = $PALANG['pEdit_alias_goto_text_error1']; } if ($error != 1) { $array = preg_split ('/,/', $goto); } else { $array = array(); } for ($i = 0; $i < sizeof ($array); $i++) { if (in_array ("$array[$i]", $CONF['default_aliases'])) continue; if (empty ($array[$i])) continue; # TODO: should never happen - remove after 2.2 release 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 $table_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: list-virtual.php?domain=$fDomain"); exit; } } } $fAddress = htmlentities($fAddress, ENT_QUOTES); $fDomain = htmlentities($fDomain, ENT_QUOTES); include ("templates/header.php"); include ("templates/menu.php"); include ("templates/edit-alias.php"); include ("templates/footer.php"); /* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>