function DnsMasqMxMove() { $cf = new dnsmasq(); $newarrar = array_move_element($cf->array_mxhost, $cf->array_mxhost[$_GET["DnsMasqMxMove"]], $_GET["move"]); $cf->array_mxhost = $newarrar; $cf->SaveConf(); }
function TreeSmtpd_client_restrictions_moverule() { $mny = new usersMenus(); $tpl = new templates(); $main = new smtpd_restrictions(); $pages = new HtmlPages(); if ($mny->AsPostfixAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges'); exit; } switch ($_GET["Sender"]) { case 1: $main->SenderArray = array_move_element($main->SenderArray, $main->SenderArray[$_GET["TreeSmtpd_client_restrictions_moverule"]], $_GET["array_direction"]); $main->save_smtpd_sender_restrictions(); break; case 2: $main->RecipientArray = array_move_element($main->RecipientArray, $main->RecipientArray[$_GET["TreeSmtpd_client_restrictions_moverule"]], $_GET["array_direction"]); $main->save_smtpd_recipient_restrictions(); case 3: $main->HelloArray = array_move_element($main->HelloArray, $main->HelloArray[$_GET["TreeSmtpd_client_restrictions_moverule"]], $_GET["array_direction"]); $main->save_smtpd_helo_restrictions(); default: $main->ClientArray = array_move_element($main->ClientArray, $main->ClientArray[$_GET["TreeSmtpd_client_restrictions_moverule"]], $_GET["array_direction"]); $main->save_smtpd_client_restrictions(); break; } if ($pages->AutomaticConfig == true) { $main = new main_cf(); $main->save_conf_to_server(); } echo DIV_SHADOW($pages->PagePostfixsmtpd_client_restrictions_table(0, $_GET["Sender"]), 'windows'); }
function blocker_move() { $ou = $_GET["ou"]; $bl = new htmlblocker($ou); $newarray = array_move_element($bl->ruleslist, $bl->ruleslist[$_GET["Blockermove"]], $_GET["move"]); while (list($num, $ligne) = each($newarray)) { $up["BigMailHtmlRules"][] = $ligne; } $ldap = new clladp(); $ldap->Ldap_modify($bl->dn, $up); }
function manage_icon_move() { $tab = $_GET["icon-page"]; $uid = $_SESSION["uid"]; $ini = new Bs_IniHandler("ressources/profiles/{$uid}.tabs"); $icons = explode(",", $ini->_params[$tab]["icons"]); $icons2 = array_move_element($icons, $icons[$_GET["move-widget"]], $_GET["move"]); if (count($icons2) == 0) { echo manage_icons_list($tab); exit; } reset($icons2); while (list($num, $ligne) = each($icons2)) { if ($ligne == null) { continue; } $icon_s[$ligne] = $ligne; } while (list($num, $ligne) = each($icon_s)) { if ($ligne == null) { continue; } $icon_t[] = $ligne; } $ini->_params[$tab]["icons"] = implode(',', $icon_t); $ini->saveFile("ressources/profiles/{$uid}.tabs"); echo manage_icons_list($tab); }
function SieveMoveMasterRule() { $ruleid = $_GET["ruleid"]; $userid = $_GET["userid"]; $sieve = new clSieve($userid); $array = array_move_element($sieve->_params, $sieve->_params[$ruleid], $_GET["move"]); $sieve->_params = $array; $sieve->SaveToLDap(); }
function main_rules_group_move() { $kav = new kav4proxy(); $number = $_GET["Kav4ProxyMoveGroup"]; $move = $_GET["move"]; $ldap = new clladp(); $res = @ldap_read($ldap->ldap_connection, $kav->dn, "(objectClass=*)", array()); if ($res) { $hash = ldap_get_entries($ldap->ldap_connection, $res); for ($i = 0; $i < $hash[0][strtolower('kav4proxygroupsconf')]["count"]; $i++) { $array[$i] = $hash[0][strtolower('kav4proxygroupsconf')][$i]; } } $new = array_move_element($array, $array[$number], $move); while (list($num, $ligne) = each($new)) { $upd["Kav4ProxyGroupsConf"][] = $ligne; } $ldap->Ldap_modify($kav->dn, $upd); $kav = new kav4proxy(); $kav->SaveToLdap(); }
function ntpdservermove() { $ntp = new ntpd(); $ntp->servers = array_move_element($ntp->servers, $ntp->servers[$_GET["ntpdservermove"]], $_GET["direction"]); $ntp->SaveToLdap(); }
function PostfixAddFallBackServerMove() { $main = new main_cf(); $main = new maincf_multi($_GET["hostname"]); $hash = explode(',', $main->GET_BIGDATA("smtp_fallback_relay")); $newarray = array_move_element($hash, $hash[$_GET["PostfixAddFallBackServerMove"]], $_GET["move"]); $main->SET_BIGDATA("smtp_fallback_relay", implode(",", $newarray)); }
function PostfixAddFallBackServerMove() { $main = new main_cf(); $hash = explode(',', $main->main_array["smtp_fallback_relay"]); $newarray = array_move_element($hash, $hash[$_GET["PostfixAddFallBackServerMove"]], $_GET["move"]); $main->main_array["smtp_fallback_relay"] = implode(",", $newarray); $main->save_conf(); }
function NicNameSearchMove() { $index = $_GET["NicNameSearchMove"]; $move = $_GET["move"]; $nic = new networking(); $newarray = array_move_element($nic->array_conf["articanameserverssearchdomains"], $nic->array_conf["articanameserverssearchdomains"][$index], $move); $ldap = new clladp(); $dn = "cn=system_dns,cn=artica,{$ldap->suffix}"; while (list($index, $articanameservers) = each($newarray)) { $upd["articanameserverssearchdomains"][] = $articanameservers; } $ldap->Ldap_modify($dn, $upd); }
function iptablesmove() { $ip = new iptables(); $rules = $ip->rules[$_GET["nic"]]; $ip->rules[$_GET["nic"]] = array_move_element($rules, $rules[$_GET["iptablesmove"]], $_GET["direction"]); $ip->SaveToLdap(); }
function header_filter_rules_move() { $id = $_POST["id"]; $mailman = new mailman($id); $mailman->header_filter_rules = array_move_element($mailman->header_filter_rules, $mailman->header_filter_rules[$_POST["header_filter_rules_pattern_move"]], $_POST["move"]); $mailman->Save(); }
function PostFixClassTableCheckMoveValue() { $tpl = new templates(); $class_name = $_GET["PostFixClassTableCheckMoveValue"]; $table_name = $_GET["table_name"]; $email = $_GET["email"]; $index = $_GET["index"]; $direction = $_GET["move_direction"]; $ldap = new clladp(); $dn = "cn={$email},cn={$table_name},cn={$class_name},cn=restrictions_classes,cn=artica,{$ldap->suffix}"; $array = $ldap->hash_get_class_RestrictionTableAction($dn); $new_array = array_move_element($array, $array[$index], $direction); $upd['PostFixRestrictionTableAction'][0] = implode(",", $new_array); if (!$ldap->Ldap_modify($dn, $upd)) { echo $tpl->_ENGINE_parse_body($ldap->ldap_last_error); exit; } }
function ProcMailRuleMove() { $usr = new usersMenus(); $tpl = new Templates(); if ($usr->AsMailBoxAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges}'); exit; } $proc = new procmail(); if ($_GET["direction"] == 'up') { $proc->array_rule = array_move_element($proc->array_rule, $proc->array_rule[$_GET["ProcMailRuleMove"]], 'up'); } else { $proc->array_rule = array_move_element($proc->array_rule, $proc->array_rule[$_GET["ProcMailRuleMove"]], 'down'); } $proc->save_rules(); echo table_rules(); }
function Save_move_rule() { $ou = $_GET["ou"]; $bck = new backup_email($ou); $newarray = array_move_element($bck->ArticaBackupRules, $bck->ArticaBackupRules[$_GET["ArticaBackupMove"]], $_GET["move"]); $bck->ArticaBackupRules = $newarray; $bck->SaveToLdap(); }