function save() { $sock = new sockets(); $sock->SaveConfigFile(base64_encode($_POST["ChangeLDAPSuffixTo"]), "ChangeLDAPSuffixTo"); $sock->SaveConfigFile(base64_encode($_POST["ChangeLDAPSuffixFrom"]), "ChangeLDAPSuffixFrom"); $sock->getFrameWork("services.php?change-ldap-suffix=yes"); }
function save() { $sock = new sockets(); $arraySamba["ADDOMAIN"] = $_GET["domain"]; $arraySamba["ADSERVER"] = $_GET["servername"]; $arraySamba["ADADMIN"] = $_GET["admin"]; $arraySamba["PASSWORD"] = $_GET["password"]; $sock->SaveConfigFile(serialize($arraySamba), "SambaAdInfos"); $sock->SaveConfigFile(base64_encode(serialize($_GET)), "CyrusToADConfig"); $sock->SET_INFO("CyrusToAD", $_GET["CyrusToAD"]); $sock->getFrameWork("cmd.php?cyrus-to-ad=yes"); }
function Save() { $sock = new sockets(); $final = base64_encode(serialize($_POST)); $sock->SaveConfigFile($final, "SambaWatchdogMonitConfig"); $sock->getFrameWork("samba.php?watchdog-config=yes"); }
function Save() { $sock = new sockets(); $_POST["WINDOWS_SERVER_PASS"] = url_decode_special_tool($_POST["WINDOWS_SERVER_PASS"]); $_POST["LDAP_SUFFIX"] = url_decode_special_tool($_POST["LDAP_SUFFIX"]); $sock->SaveConfigFile(serialize($_POST), "ZarafaImportADSettings"); }
function popup_import_list() { $datas = url_decode_special_tool($_POST["popup_import_list"]); $sock = new sockets(); $sock->SaveConfigFile($datas, "ComputerListToImport"); $sock->getFrameWork("cmd.php?browse-computers-import-list=yes"); }
function save() { $sock = new sockets(); $datas = base64_encode(serialize($_POST)); $sock->SaveConfigFile($datas, "SquidRedirectorsOptions"); $sock->getFrameWork("squid.php?build-smooth=yes"); }
function save() { $tpl = new templates(); $sock = new sockets(); $sock->SaveConfigFile(base64_encode(serialize($_POST)), "MimeDefangServiceOptions"); echo $tpl->javascript_parse_text("{you_need_to_restart_service_take_effet}", 1); }
function SAVE() { $sock = new sockets(); $sock->SET_INFO("EnableCyrusDBConfig", $_GET["EnableCyrusDBConfig"]); $sock->SaveConfigFile(base64_encode(serialize($_GET)), "CyrusDBConfig"); $sock->getFrameWork("cmd.php?cyrus-db-config=yes"); }
function save() { $sock = new sockets(); if ($_POST["ID"] == 0) { $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule"))); $ligne["bypass"] = $_POST["bypass"]; $ligne["BypassSecretKey"] = $_POST["BypassSecretKey"]; writelogs("Default rule, saving DansGuardianDefaultMainRule", __FUNCTION__, __FILE__, __LINE__); $sock->SaveConfigFile(base64_encode(serialize($ligne)), "DansGuardianDefaultMainRule"); writelogs("Ask to compile rule...", __FUNCTION__, __FILE__, __LINE__); $sock->getFrameWork("webfilter.php?compile-rules=yes"); return; } $q = new mysql_squid_builder(); $sql = "UPDATE webfilter_rules SET bypass='******',BypassSecretKey='{$_POST["bypass"]}' WHERE ID='{$_POST["ID"]}'"; $q->QUERY_SQL($sql); if (!$q->ok) { if (strpos($q->mysql_error, "Unknown column") > 0) { $q->CheckTables(); $q->QUERY_SQL($sql); } } if (!$q->ok) { echo $q->mysql_error; return; } $sock->getFrameWork("webfilter.php?compile-rules=yes"); }
function SAVE() { $sock = new sockets(); $DATA = base64_encode(stripslashes($_POST["c-icap-error-page"])); $sock->SaveConfigFile($DATA, "CiCApErrorPage"); $sock->getFrameWork("squid.php?cicap-template=yes"); }
function save() { $sock = new sockets(); $_POST["DansGuardianHTMLTemplate"] = stripslashes($_POST["DansGuardianHTMLTemplate"]); $sock->SaveConfigFile($_POST["DansGuardianHTMLTemplate"], "DansGuardianHTMLTemplate"); $sock->getFrameWork("cmd.php?dansguardian-template=yes"); }
function Save() { $sock = new sockets(); $content = url_decode_special_tool($_POST["SpamAssassinTemplate"]); $sock->SaveConfigFile($content, "SpamAssassinTemplate"); $sock->getFrameWork("cmd.php?smtp-whitelist=yes"); }
function SaveSwapAuto() { $sock = new sockets(); $SwapOffOn = unserialize(base64_decode($sock->GET_INFO("SwapOffOn"))); $sock->SET_INFO("DisableSWAPP", $_POST["DisableSWAPP"]); while (list($num, $line) = each($_POST)) { $SwapOffOn[$num] = $line; } if (!is_numeric($SwapOffOn["SwapEnabled"])) { $SwapOffOn["SwapEnabled"] = 1; } if (!is_numeric($SwapOffOn["SwapMaxPourc"])) { $SwapOffOn["SwapMaxPourc"] = 20; } if (!is_numeric($SwapOffOn["SwapMaxMB"])) { $SwapOffOn["SwapMaxMB"] = 0; } if (!is_numeric($SwapOffOn["SwapTimeOut"])) { $SwapOffOn["SwapTimeOut"] = 60; } if (!is_numeric($SwapOffOn["AutoMemWatchdog"])) { $SwapOffOn["AutoMemWatchdog"] = 1; } if (!is_numeric($SwapOffOn["AutoMemPerc"])) { $SwapOffOn["AutoMemPerc"] = 90; } if (!is_numeric($SwapOffOn["AutoMemInterval"])) { $SwapOffOn["AutoMemInterval"] = 180; } $sock->SaveConfigFile(base64_encode(serialize($SwapOffOn)), "SwapOffOn"); $sock->getFrameWork("cmd.php?restart-artica-status=yes"); $sock->getFrameWork("system.php?swap-init=yes"); }
function save() { $tpl = new templates(); $sock = new sockets(); $sock->SET_INFO("DebugMimeFilter", $_POST["DEBUG"]); $sock->SaveConfigFile(base64_encode(serialize($_POST)), "MimeDefangServiceOptions"); }
function save() { $sock = new sockets(); $sock->SET_INFO("ArticaFilterEnableRedirect", $_GET["ArticaFilterEnableRedirect"]); $sock->SET_INFO("ArticaFilterRedirectExternalSQL", $_GET["ArticaFilterRedirectExternalSQL"]); $sock->SaveConfigFile(base64_encode(serialize($_GET)), "ArticaFilterRedirectExternalSQLDatas"); }
function save() { $sock = new sockets(); $sock->SET_INFO("EnableSambaRemoteLDAP", $_GET["EnableSambaRemoteLDAP"]); $sock->SaveConfigFile(base64_encode(serialize($_GET)), "SambaRemoteLDAPInfos"); $sock->getFrameWork("cmd.php?samba-save-config=yes"); }
function config_popup() { $vpn = new openvpn(); $config = $vpn->BuildClientconf($_SESSION["uid"]); $tbconfig = explode("\n", $config); $html_logs[] = htmlentities("VPN config -> " . strlen($config) . " bytes length (" . count($tbconfig) . " lines)"); $uid = $_SESSION["uid"]; writelogs("VPN config -> " . strlen($config) . " bytes length (" . count($tbconfig) . " lines)", __FUNCTION__, __FILE__, __LINE__); $sock = new sockets(); if (!$sock->SaveConfigFile($config, "{$uid}.ovpn")) { $html_logs[] = htmlentities("Framework error while saving -> {$uid}.ovpn;" . strlen($config) . " bytes length (" . count($tbconfig) . " lines)"); } writelogs("sockets() OK", __FUNCTION__, __FILE__, __LINE__); //$datas=$sock->getfile('OpenVPNGenerate:'.$uid); $datas = $sock->getFrameWork("openvpn.php?build-vpn-user={$_SESSION["uid"]}&basepath=" . dirname(__FILE__)); $tbl = explode("\n", $datas); $tbl = array_reverse($tbl); while (list($num, $line) = each($tbl)) { if (trim($line) == null) { continue; } $html_logs[] = "<div><code style='font-size:10px;color:black;'>" . htmlentities($line) . "</code></div>"; } if (is_file('ressources/logs/' . $uid . '.zip')) { $download = "\n\t\t<center>\n\t\t\t<a href='ressources/logs/" . $uid . ".zip'><img src='img/download-64.png' title=\"{DOWNLOAD_CONFIG_FILES}\" style='padding:8Px;border:1px solid #055447;margin:3px'></a>\n\t\t</center>\n\t\t"; } $html = "\n\t\n\t{$download}\n\t<H3>{events}</H3>\n\t" . ParagrapheTXT("<div style='width:100%;height:200px;overflow:auto'>" . implode("\n", $html_logs) . "</div>"); $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function Save() { $sock = new sockets(); $sock->SET_INFO("EnableOpenVPNServerSchedule", $_GET["EnableOpenVPNServerSchedule"]); $sock->SaveConfigFile(base64_encode(serialize($_GET)), "EnableOpenVPNServerScheduleDatas"); $sock->getFrameWork("cmd.php?openvpn-server-schedule=yes"); }
function save() { $squid = new squidbee(); $sock = new sockets(); $sock->SET_INFO("SquidNoAccessLogs", $_POST["SquidNoAccessLogs"]); $_POST["PERSO_EVENT"] = url_decode_special_tool($_POST["PERSO_EVENT"]); $sock->SaveConfigFile(base64_encode(serialize($_POST)), "SquidSyslogAdd"); }
function mod_status_ip_del() { $sock = new sockets(); $hash = unserialize(base64_decode($sock->GET_INFO("FreeWedMoStatusAllowFrom"))); unset($hash[$_POST["mod-ip-del"]]); $sock->SaveConfigFile(base64_encode(serialize($hash)), "FreeWedMoStatusAllowFrom"); $sock->getFrameWork("freeweb.php?reconfigure=yes"); }
function save() { $_POST["smtp_auth_passwd"] = url_decode_special_tool($_POST["smtp_auth_passwd"]); $Key = md5("SMTPTESTS-{$_POST["servername"]}&ou={$_POST["ou"]}"); $sock = new sockets(); $sock->SaveConfigFile(base64_encode(serialize($_POST)), $Key); $sock->getFrameWork("services.php?test-send-email={$Key}"); }
function delban() { $tpl = new templates(); $page = CurrentPageName(); $sock = new sockets(); $datas = unserialize(base64_decode($sock->GET_INFO("ArticaIpListBanned"))); unset($datas[$_POST["delete"]]); $bewdats = base64_encode(serialize($datas)); $sock->SaveConfigFile($bewdats, "ArticaIpListBanned"); }
function save_ssl() { $sock = new sockets(); $datas = unserialize(base64_decode($sock->GET_INFO("ufdbguardConfig"))); while (list($key, $line) = each($_GET)) { $datas[$key] = $line; } $sock->SaveConfigFile(base64_encode(serialize($datas)), "ufdbguardConfig"); $sock->getFrameWork("cmd.php?reload-squidguard=yes"); }
function SaveMSNConf() { $sock = new sockets(); $_POST["PASSWORD"] = md5(time()); $PYMSNT = unserialize(base64_decode($sock->GET_INFO("PYICQT"))); while (list($num, $ligne) = each($_POST)) { $PYMSNT[$num] = $ligne; } $sock->SaveConfigFile(base64_encode(serialize($PYMSNT)), "PYICQT"); }
function save() { $sock = new sockets(); $_POST["DansGuardianHTMLTemplate"] = stripslashes($_POST["DansGuardianHTMLTemplate"]); $sock->SaveConfigFile($_POST["DansGuardianHTMLTemplate"], "DansGuardianHTMLTemplate"); if (isset($_POST["SquidGuardIPWeb"])) { $sock->SET_INFO("SquidGuardIPWeb", $_POST["SquidGuardIPWeb"]); $sock->getFrameWork("cmd.php?reload-squidguard=yes"); } $sock->getFrameWork("cmd.php?dansguardian-template=yes"); }
function debug(){ $sock=new sockets(); $page=CurrentPageName(); $tpl=new templates(); $datas=unserialize(base64_decode($sock->GET_INFO("ufdbguardConfig"))); if(!is_numeric($datas["DebugAll"])){$datas["DebugAll"]=0;} if($datas["DebugAll"]==1){$datas["DebugAll"]=0;}else{$datas["DebugAll"]=1;} $sock->SaveConfigFile(base64_encode(serialize($datas)),"ufdbguardConfig"); $sock->getFrameWork("cmd.php?reload-squidguard=yes"); }
function altermime_disclaimer() { $sock = new sockets(); if (isset($_POST["AlterMimeHTMLDisclaimer"])) { writelogs("Saving disclaimer size=" . strlen($_POST["AlterMimeHTMLDisclaimer"]), __FUNCTION__, __FILE__); $sock->SaveConfigFile($_POST["AlterMimeHTMLDisclaimer"], "AlterMimeHTMLDisclaimer"); $AlterMimeHTMLDisclaimer = $_POST["AlterMimeHTMLDisclaimer"]; } else { $AlterMimeHTMLDisclaimer = $sock->GET_INFO("AlterMimeHTMLDisclaimer"); } if ($AlterMimeHTMLDisclaimer == null) { $AlterMimeHTMLDisclaimer = $DisclaimerExample; $sock->SaveConfigFile($DisclaimerExample, "AlterMimeHTMLDisclaimer"); } $tpl = new templates(); $tiny = TinyMce('AlterMimeHTMLDisclaimer', $AlterMimeHTMLDisclaimer); $page = CurrentPageName(); $html = "\n\t<H1>{edit_disclaimer}</H1>\n\t<p class=caption>{edit_disclaimer_text}</p>\n\t<form name='tinymcedisclaimer' method='post' action=\"{$page}\">\n\t{$tiny}\n\t</form>\n\t\n\t\n\t"; $tpl = new template_users('{edit_disclaimer}', $html, 0, 1, 1); echo $tpl->web_page; }
function savetpl(){ $datas=base64_encode($_POST["template-data"]); $sock=new sockets(); $datas=$_POST["template-data"]; $datas=stripslashes($datas); writelogs("Saving {$_POST["template-data"]}",__FUNCTION__,__FILE__,__LINE__); $sock->SaveConfigFile($datas,"amavis-template-{$_POST["template"]}"); writelogs("Saving {$_POST["template-data"]} ->amavis-template-save={$_POST["template"]}",__FUNCTION__,__FILE__,__LINE__); $sock->getFrameWork("cmd.php?amavis-template-save={$_POST["template"]}"); writelogs("Saving {$_POST["template-data"]} done",__FUNCTION__,__FILE__,__LINE__); }
function SAVE() { $watchdog = new squid_watchdog(); $MonitConfig = $watchdog->MonitConfig; $sock = new sockets(); while (list($num, $ligne) = each($_POST)) { $MonitConfig[$num] = $ligne; } $newparam = base64_encode(serialize($MonitConfig)); $sock = new sockets(); $sock->SaveConfigFile($newparam, "SquidWatchdogMonitConfig"); $sock->getFrameWork("system.php?artica-status-restart=yes"); }
function SaveParams() { $ini = new Bs_IniHandler(); $ini->_params = $this->params; $ou = $this->ou; $name = str_replace('.', '_', $ou); $name = str_replace('-', '_', $name); $sock = new sockets(); $sock->SaveConfigFile($ini->toString(), "JoomlaConfOrg_{$name}"); $this->SaveLDAPParams(); $this->SaveAdminPassword(); $sock->getfile('JoomlaReload'); }