"; $tMessage .= $PALANG['pEdit_alias_goto_text_error2'] . "$address"; } } $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($fAddress, $orig_alias_list)) { $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; } } } $array = preg_split ('/,/', $tGoto); $smarty->assign ('fAddress', $fAddress); $smarty->assign ('tGoto', $tGoto); $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: */ ?>