"; } } $result = db_query ("SELECT * FROM $table_mailbox WHERE username='$fAddress' AND domain='$fDomain'"); if ($result['rows'] == 1) { if($CONF['alias_control_admin'] == 'NO' && !authentication_has_role('global-admin')) { // if original record had a mailbox alias, so ensure the updated one does too. if(in_array($orig_alias_list, $fAddress)) { $new_aliases[] = $fAddress; } } } // duplicates suck, mmkay.. $new_aliases = array_unique($new_aliases); $goto = implode(',', $new_aliases); if ($error != 1) { $goto = escape_string($goto); $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); $array = preg_split ('/,/', $tGoto); // TOCHECK $array = $alias_list; $smarty->assign ('fAddress', $fAddress, false); $smarty->assign ('array', $array, false); $smarty->assign ('tMessage', $tMessage, false); $smarty->assign ('smarty_template', 'edit-alias'); $smarty->display ('index.tpl'); /* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>