function bridge_popup() { $boot = new boostrap_form(); $sock = new sockets(); $users = new usersMenus(); $ldap = new clladp(); $ID = $_GET["ID"]; $title_button = "{add}"; $nics = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes"))); $IP = new networking(); while (list($key, $value) = each($nics)) { $array = $IP->GetNicInfos($value); $NICZ[$value] = $value . " [{$array["IPADDR"]}]"; } $boot->set_list("nic_inbound", "{from}", $NICZ, null); $boot->set_list("nic_linked", "{to}", $NICZ, null); $boot->set_hidden("ID", $_GET["ID"]); if (!$users->AsSystemAdministrator) { $boot->set_form_locked(); } if ($ID == 0) { $boot->set_CloseYahoo("YahooWin2"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function etchosts_popup() { $boot = new boostrap_form(); $sock = new sockets(); $users = new usersMenus(); $ldap = new clladp(); $ID = $_GET["ID"]; $title_button = "{add_new_entry}"; $boot->set_field("hostname", "{hostname}", $ligne["name"]); $boot->set_field("ipaddr", "{tcp_address}", $ligne["ipaddr"], array("IPV4" => true)); $boot->set_field("alias", "{alias}", null); if (!$users->AsSystemAdministrator) { $boot->set_form_locked(); } if ($ID == 0) { $boot->set_CloseYahoo("YahooWin2"); } $boot->set_button("{add}"); $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function rule() { $page = CurrentPageName(); $tpl = new templates(); $boot = new boostrap_form(); $t = time(); $q = new mysql(); $users = new usersMenus(); if (!$q->TABLE_EXISTS("mailarchives", "artica_backup")) { $q->BuildTables(); } $zmd5 = $_GET["zmd5"]; $btname = "{apply}"; if ($zmd5 == null) { $btname = "{add}"; $boot->set_CloseYahoo("YahooWin"); } $sql = "SELECT * FROM mailarchives WHERE zmd5='{$zmd5}'"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); if (!$q->ok) { $error = "<p class='text-error'>{$q->mysql_error}.</p>"; } $directions["in"] = "{inbound}"; $directions["out"] = "{outbound}"; $directions["all"] = "{all}"; $boot->set_checkbox("enable", "{enabled_rule}", $ligne["enable"]); $boot->set_field("email", "{member}", $ligne["email"], array("MANDATORY" => true, "DISABLED" => true, "BUTTON" => array("JS" => "Loadjs('MembersBrowse.php?field-user=%f&OnlyUsers=1&OnlyGUID=0');", "LABEL" => "{browse}..."))); $boot->set_list("direction", "{direction}", $directions, $ligne["direction"]); if ($users->AsPostfixAdministrator) { $ldap = new clladp(); $hash = $ldap->hash_get_ou(true); $boot->set_list("ou", "{organization}", $hash, $ligne["ou"]); } $boot->set_field("next", "{destination}", $ligne["next"], array("MANDATORY" => true, "BUTTON" => array("JS" => "Loadjs('MembersBrowse.php?field-user=%f&OnlyUsers=1&OnlyGUID=0');", "LABEL" => "{browse}..."))); $boot->set_button($btname); $boot->set_hidden("zmd5", $zmd5); $params = unserialize(base64_decode($ligne["params"])); $boot->set_checkbox("USE_SMTP_SRV", "{external_smtp_server}", $params["USE_SMTP_SRV"], array("LINK" => "SMTP_SRV,USE_AUTH")); $boot->set_field("SMTP_SRV", "{smtp_server}", $params["SMTP_SRV"]); $boot->set_checkbox("USE_AUTH", "{smtp_authentication}", $params["USE_AUTH"], array("LINK" => "SMTP_USERNAME,SMTP_PASSWORD")); $boot->set_field("SMTP_USERNAME", "{username}", $params["SMTP_USERNAME"]); $boot->set_fieldpassword("SMTP_PASSWORD", "{password}", $params["SMTP_PASSWORD"]); $boot->set_RefreshSearchs(); $form = $boot->Compile(); $title = $tpl->_ENGINE_parse_body("{archive_rule}"); $html = $error . "<H2>{$title}</H2><hr>" . $form; echo $tpl->_ENGINE_parse_body($html); }
function group_popup() { $ID = $_GET["ID"]; $q = new mysql_squid_builder(); $title = "{new_group}"; $bt = "{add}"; $q = new mysql_squid_builder(); if (!$q->TABLE_EXISTS("nginx_exploits_groups")) { $sql = "CREATE TABLE IF NOT EXISTS `nginx_exploits_groups` (\n\t\t\t `ID` INT NOT NULL AUTO_INCREMENT,\n\t\t\t `groupname` CHAR(255) NOT NULL,\n\t\t\t PRIMARY KEY (`ID`),\n\t\t\t KEY `groupname` (`groupname`)\n\t\t\t) ENGINE = MYISAM;"; if (!$q->QUERY_SQL($sql)) { echo $q->mysql_error_html(); } } $boot = new boostrap_form(); $sock = new sockets(); if ($ID > 0) { $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_exploits_groups WHERE ID='{$ID}'")); $bt = "{apply}"; $title = "{$ligne["groupname"]}"; } $boot->set_hidden("editgroupid", $ID); $boot->set_hidden("servername", $_GET["servername"]); $boot->set_formtitle($title); $boot->set_field("groupname", "{groupname}", $ligne["groupname"]); if ($ID == 0) { $boot->set_checkbox("addef", "{add_defaults}", 0); } $boot->set_button($bt); if ($ID == 0) { $boot->set_CloseYahoo("YahooWin5"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function charter_settings() { $ID = $_GET["ID"]; $users = new usersMenus(); $page = CurrentPageName(); $sock = new sockets(); $boot = new boostrap_form(); $users = new usersMenus(); $title = "Acceptable Use Policy"; $btname = "{add}"; if ($ID > 0) { $q = new mysql_squid_builder(); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT TextIntro,TextButton,title FROM itcharters WHERE ID='{$ID}'")); if (!$q->ok) { echo "<p class=text-error>{$q->mysql_error}</p>"; } $title = $ligne["title"]; $btname = "{apply}"; } if ($ligne["TextIntro"] == null) { $ligne["TextIntro"] = "<p style='font-size:18px'>Please read the IT chart before accessing trough Internet</p>"; } if ($ligne["TextButton"] == null) { $ligne["TextButton"] = "I accept the terms and conditions of this agreement"; } $boot->set_formtitle($title); $boot->set_hidden("ID", $ID); $boot->set_field("title", "{page_title}", $title); $boot->set_textarea("TextIntro", "{introduction_text}", $ligne["TextIntro"], array("ENCODE" => true)); $boot->set_field("TextButton", "{text_button}", $ligne["TextButton"], array("ENCODE" => true)); if (!$users->AsDansGuardianAdministrator) { $boot->set_form_locked(); } $boot->set_button($btname); if ($ID == 0) { $boot->set_CloseYahoo("YahooWin2"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function lang_popup() { $htmlT = new htmltools_inc(); $page = CurrentPageName(); $lang = $htmlT->LanguageArray(); $tpl = new templates(); $boot = new boostrap_form(); $boot->set_list("lang", "{language}", $lang, $tpl->language, array("COOKIE" => "artica-language")); $boot->set_AjaxFinal("window.location.href='{$page}';"); $boot->set_button("{apply}"); $boot->set_CloseYahoo("YahooWin3"); echo $boot->Compile(); }
function cache_popup() { $tpl = new templates(); $page = CurrentPageName(); $servername = $_GET["servername"]; $q = new mysql_squid_builder(); $title = "{new_cache}"; $bt = "{add}"; $ID = $_GET["ID"]; $boot = new boostrap_form(); $sock = new sockets(); $NginxProxyStorePath = $sock->GET_INFO("NginxProxyStorePath"); if ($NginxProxyStorePath == null) { $NginxProxyStorePath = "/home/nginx"; } if ($ID > 0) { $q = new mysql_squid_builder(); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_caches WHERE ID='{$ID}'")); $bt = "{apply}"; $title = "{$ligne["keys_zone"]}"; } if ($ligne["keys_zone"] == null) { $ligne["keys_zone"] = time(); } if (trim($ligne["directory"]) == null) { $ligne["directory"] = $NginxProxyStorePath . "/{$ligne["keys_zone"]}"; } if ($ligne["levels"] == null) { $ligne["levels"] = "1:2"; } if (!is_numeric($ligne["keys_zone_size"])) { $ligne["keys_zone_size"] = 1; } if (!is_numeric($ligne["max_size"])) { $ligne["max_size"] = 2; } if (!is_numeric($ligne["inactive"])) { $ligne["inactive"] = 10; } if (!is_numeric($ligne["loader_files"])) { $ligne["loader_files"] = 100; } if (!is_numeric($ligne["loader_sleep"])) { $ligne["loader_sleep"] = 10; } if (!is_numeric($ligne["loader_threshold"])) { $ligne["loader_threshold"] = 100; } $boot->set_hidden("ID", $ID); $boot->set_formtitle($title); $boot->set_field("keys_zone", "{name}", $ligne["keys_zone"]); $boot->set_field("directory", "{directory}", $ligne["directory"], array("BROWSE" => true, "MANDATORY" => true, "ENCODE" => true)); $boot->set_field("levels", "{levels}", $ligne["levels"]); $boot->set_field("keys_zone_size", "{memory_size} (MB)", $ligne["keys_zone_size"]); $boot->set_field("max_size", "{max_size} (GB)", $ligne["max_size"]); $boot->set_field("inactive", "{inactive} ({minutes})", $ligne["inactive"], array("TOOLTIP" => "{nginx_inactive_explain}")); $boot->set_field("loader_files", "{loader_files}", $ligne["loader_files"]); $boot->set_field("loader_sleep", "{loader_sleep} {milliseconds}", $ligne["loader_sleep"]); $boot->set_field("loader_threshold", "{loader_threshold} {milliseconds}", $ligne["loader_threshold"]); $boot->set_button($bt); if ($servername == null) { $boot->set_CloseYahoo("YahooWin"); } $boot->set_RefreshSearchs(); if (!AdminPrivs()) { $boot->set_form_locked(); } echo $boot->Compile(); }
function member_popup() { $page = CurrentPageName(); $boot = new boostrap_form(); $tpl = new templates(); $boot->set_field("ipaddr", "{ipaddr}", null, array("IPV4" => true)); $boot->set_field("username", "{username}", null, array("MANDATORY" => True)); $boot->set_fieldpassword("password", "{password}", null, array("MANDATORY" => True)); $boot->set_button("{add}"); $boot->set_RefreshSearchs(); $boot->set_CloseYahoo("YahooWin"); echo $boot->Compile(); }
function bridge_popup() { $boot = new boostrap_form(); $sock = new sockets(); $users = new usersMenus(); $ldap = new clladp(); $ID = $_GET["ID"]; $title_button = "{add}"; $nics = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes"))); if ($_GET["ID"] > 0) { $sql = "SELECT * FROM nics_bridge WHERE ID='{$ID}'"; $q = new mysql(); $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); $title_button = "{apply}"; } $nics_array[null] = "{select}"; $ous[null] = "{select}"; $boot->set_field("name", "{name}", $ligne["name"]); $boot->set_field("ipaddr", "{tcp_address}", $ligne["ipaddr"], array("IPV4" => true)); $boot->set_field("netmask", "{netmask}", $ligne["netmask"], array("IPV4" => true)); $boot->set_field("cdir", "CDIR", $ligne["cdir"], array("CDIR" => "ipaddr,netmask")); $boot->set_field("broadcast", "{broadcast}", $ligne["broadcast"], array("IPV4" => true)); $boot->set_field("gateway", "{gateway}", $ligne["gateway"], array("IPV4" => true)); $boot->set_hidden("ID", $_GET["ID"]); if (!$users->AsSystemAdministrator) { $boot->set_form_locked(); } if ($ID == 0) { $boot->set_CloseYahoo("YahooWin2"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function rules_params() { $boot = new boostrap_form(); $sock = new sockets(); $users = new usersMenus(); $ldap = new clladp(); $ID = $_GET["rules-params"]; $title_button = "{add}"; $title = "{new_authenticator_rule}"; if ($ID > 0) { $sql = "SELECT * FROM authenticator_rules WHERE ID='{$ID}'"; $q = new mysql_squid_builder(); $ligne = @mysql_fetch_array($q->QUERY_SQL($sql)); $title_button = "{apply}"; $title = $ligne["rulename"]; } $boot->set_formtitle($title); $boot->set_hidden("ruleid", $ID); $boot->set_field("rulename", "{rulename}", $ligne["rulename"], array("ENCODE" => true)); $boot->set_field("cachetime", "{cachetime} ({minutes})", $ligne["cachetime"], array("TOOLTIP" => "{authenticator_cache_time_explain}")); $boot->set_textarea("explain", "{explain}", $ligne["explain"], array("ENCODE" => true)); $boot->set_button($title_button); $AdminPrivs = AdminPrivs(); if (!$AdminPrivs) { $boot->set_form_locked(); } if ($ID == 0) { $boot->set_CloseYahoo("YahooWin2"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function page_popup() { $boot = new boostrap_form(); $sock = new sockets(); $users = new usersMenus(); $ldap = new clladp(); $ID = $_GET["ID"]; $title_button = "{add}"; $title = "{new_error_page}"; $f = new squid_reverse(); if ($ID > 0) { $sql = "SELECT * FROM nginx_error_pages WHERE ID='{$ID}'"; $q = new mysql_squid_builder(); $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); if (!$q->ok) { echo "<p class=text-error>{$q->mysql_error}</p>"; } $title_button = "{apply}"; $title = $ligne["pagename"] . " »» " . $ligne["error_code"]; } while (list($key, $value) = each($f->errors_page)) { $errors_code[$value] = $value; } $boot->set_formtitle($title); $boot->set_hidden("page-save", "yes"); $boot->set_hidden("ID", $ID); $boot->set_field("pagename", "{pagename}", $ligne["pagename"], array("ENCODE" => true)); $boot->set_list("error_code", "{error_code}", $errors_code, $ligne["error_code"]); $boot->set_field("title", "{page_title}", $ligne["title"], array("ENCODE" => true)); $boot->set_button($title_button); $AdminPrivs = AdminPrivs(); if (!$AdminPrivs) { $boot->set_form_locked(); } if ($ID == 0) { $boot->set_CloseYahoo("YahooWin3"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function wizard_certificate_1() { $page = CurrentPageName(); $tpl = new templates(); $sock = new sockets(); $hostname = $sock->GET_INFO("myhostname"); if ($hostname == null) { $hostname = $sock->getFrameWork("system.php?hostname-g=yes"); $sock->SET_INFO($hostname, "myhostname"); } $title = $tpl->_ENGINE_parse_body("{new_certificate}"); $html = "\n\t<div class=text-info style='font-size:18px'>{wizard_certificate_1}<br><i>{CSR_MULTIPLE_EXPLAIN}</i></div>"; $ENC[1024] = 1024; $ENC[2048] = 2048; $ENC[4096] = 4096; $boot = new boostrap_form(); $boot->set_field("wizard-certificate-commonname", "{CommonName}", $hostname); $boot->set_list("wizard-certificate-levelenc", "{level_encryption}", $ENC, 1024); $boot->set_fieldpassword("wizard-certificate-password", "{password}", "secret"); $boot->set_formdescription("{wizard_certificate_1}"); $boot->set_button("{add}"); $boot->set_RefreshSearchs(); $boot->set_RefreshFlex("flexRT{$_GET["t"]}"); $boot->set_CloseYahoo("YahooWin6"); echo $boot->Compile(); }
function tasks_popup() { $page = CurrentPageName(); $tpl = new templates(); $users = new usersMenus(); $tasks = new system_tasks(); $PatternToHuman = null; $boot = new boostrap_form(); $q = new mysql(); $no_schedule_set = $tpl->javascript_parse_text("{no_schedule_set}"); $buttontext = "{add}"; $ID = $_GET["ID"]; $t = $_GET["t"]; $title = "{new_schedule}"; $task_type = $tasks->tasks_array; if ($ID > 0) { $buttontext = "{apply}"; $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM system_schedules WHERE ID={$ID}", "artica_backup")); $ligne["TimeDescription"] = utf8_encode($ligne["TimeDescription"]); $title = $task_type[$ligne["TaskType"]]; $PatternToHuman = "<br>" . $tasks->PatternToHuman($ligne["TimeText"], true); } if (!is_numeric($ligne["TaskType"])) { $ligne["TaskType"] = 0; } if (!is_numeric($ID)) { $ID = 0; } if (!$users->KAV4PROXY_INSTALLED) { unset($task_type[5]); unset($task_type[12]); } if (!$users->UPDATE_UTILITYV2_INSTALLED) { unset($task_type[13]); } $task_type = $tasks->tasks_array; while (list($TaskType, $content) = each($task_type)) { $taskz[$TaskType] = "[{$TaskType}] " . $tpl->_ENGINE_parse_body($content); } $YahooWinHide = "YahooWin{$_GET["YahooWin"]}"; $boot->set_formtitle($title); $boot->set_hidden("ID", $ID); if ($ID == 0) { if ($_GET["task-section"] > 0) { $boot->set_hidden("TaskType", $_GET["task-section"]); $boot->set_formdescription($tasks->tasks_explain_array[$_GET["task-section"]] . $PatternToHuman); $ligne["TimeDescription"] = $tpl->javascript_parse_text($tasks->tasks_array[$_GET["task-section"]]); } else { $boot->set_list("TaskType", "{type}", $taskz, null); } $ligne["enabled"] = 1; } else { $boot->set_hidden("TaskType", $ligne["TaskType"]); $boot->set_formdescription($tasks->tasks_explain_array[$ligne["TaskType"]]); } $boot->set_checkbox("enabled", "{enabled}", $ligne["enabled"]); $boot->set_textarea("TimeDescription", "{description}", $ligne["TimeDescription"], array("ENCODE" => true)); $boot->set_field("TimeText", "{schedule}", $ligne["TimeText"], array("SCHEDULE" => true, "MANDATORY" => true, "DISABLED" => true)); if ($ID == 0) { $boot->set_CloseYahoo($YahooWinHide); } // $boot->set_button($buttontext); $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function category_settings() { $q = new mysql_squid_builder(); $dans = new dansguardian_rules(); $lock = false; if ($_GET["cat"] != null) { $lock = true; $sql = "SELECT category_description,master_category FROM personal_categories WHERE category='{$_GET["cat"]}'"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql)); } $groups = $dans->LoadBlackListesGroups(); $groups[null] = "{select}"; $boot = new boostrap_form(); if (!$lock) { $boot->set_field("category-to-add", "{category}", null, array("ENCODE" => true)); $boot->set_button("{add}"); $boot->set_CloseYahoo("YahooWin5"); } else { $boot->set_formtitle("{$_GET["cat"]}"); $boot->set_hidden("category-to-add", $_GET["cat"]); $boot->set_button("{apply}"); } $boot->set_textarea("category_text", "{description}", $ligne["category_description"], array("ENCODE" => true)); $boot->set_list("group", "{group}", $groups, $ligne["master_category"]); $boot->set_field("CatzByGroupA", "{group} ({add})", null); $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function parent_params() { $tpl = new templates(); $page = CurrentPageName(); $ID = $_GET["parent-params"]; $array_type["parent"] = "parent"; $array_type["sibling"] = "sibling"; $array_type["multicast"] = "multicast"; $btname = "{add}"; $q = new mysql(); if ($ID > 0) { $sql = "SELECT * FROM squid_parents WHERE ID={$ID}"; $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); $btname = "{apply}"; } $addoptions = $tpl->_ENGINE_parse_body("{squid_parent_options}"); $add = $tpl->_ENGINE_parse_body("{add}"); $t = time(); if (strlen(trim($ligne["icp_port"])) == 0) { $ligne["icp_port"] = 0; } $options = $tpl->_ENGINE_parse_body("{options}"); $q = new mysql(); $boot = new boostrap_form(); if ($ID == 0) { $title = "{add_a_parent_proxy}"; $boot->set_CloseYahoo("YahooWin4"); } if ($ID > 0) { $button = "{apply}"; $title = $ligne["servername"]; } if (!is_numeric($ligne["weight"])) { $ligne["weight"] = 1; } if (!is_numeric($ligne["enabled"])) { $ligne["enabled"] = 1; } $boot->set_formtitle($title); $boot->set_hidden("parent-id", $ID); $boot->set_field("servername", "{hostname}", $ligne["servername"], array("MANDATORY" => true)); $boot->set_checkbox("enabled", "{enabled}", $ligne["enabled"]); $boot->set_field("weight", "{order}", $ligne["weight"], array("MANDATORY" => true)); $boot->set_field("server_port", "{listen_port}", $ligne["server_port"]); $boot->set_field("icp_port", "{icp_port}", $ligne["icp_port"], array("TOOLTIP" => "{icp_port_explain}")); $boot->set_list("server_type", "{server_type}", $array_type, $ligne["server_type"], array("TOOLTIP" => "{squid_parent_sibling_how_to}")); $boot->set_button($btname); $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function replace_group_popup() { $ID = $_GET["ID"]; $q = new mysql_squid_builder(); $title = "{new_group}"; $bt = "{add}"; $boot = new boostrap_form(); $sock = new sockets(); if ($ID > 0) { $q = new mysql_squid_builder(); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_replace_group WHERE ID='{$ID}'")); $bt = "{apply}"; $title = "{$ligne["groupname"]}"; } if ($ligne["groupname"] == null) { $ligne["groupname"] = "New Group"; } $boot->set_hidden("editgroupid", $ID); $boot->set_formtitle($title); $boot->set_field("groupname", "{groupname}", $ligne["groupname"]); $boot->set_button($bt); if ($ID == 0) { $boot->set_CloseYahoo("YahooWin"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function remotedomain_add() { $ldap = new clladp(); $ou = $_SESSION["ou"]; $btname = "{add}"; $domain = $_GET["domain"]; if ($domain != null) { $btname = "{apply}"; } if ($ou == null) { $ou = $ldap->ou_by_smtp_domain($domain); } $HashDomains = $ldap->Hash_relay_domains(); $tools = new DomainsTools(); $arr = $tools->transport_maps_explode($HashDomains[$domain]); $dn = "cn=@{$domain},cn=relay_recipient_maps,ou={$ou},dc=organizations,{$ldap->suffix}"; $trusted_smtp_domain = 0; if ($ldap->ExistsDN($dn)) { $trusted_smtp_domain = 1; } if (!is_numeric($arr[2])) { $arr[2] = 25; } if ($arr[3] == null) { $arr[3] = 0; } else { if ($arr[3] == "no") { $arr[3] = 0; } else { $arr[3] = 1; } } $boot = new boostrap_form(); $ldap = new clladp(); if ($domain != null) { $boot->set_field("remotedomain", "{domain}", $domain, array("MANDATORY" => true, "DISABLED" => true)); } else { $boot->set_field("remotedomain", "{domain}", $domain, array("MANDATORY" => true)); } $users = new usersMenus(); if ($users->AsPostfixAdministrator) { $ous = $ldap->hash_get_ou(true); $boot->set_list("ou", "{ou}", $ous, $ou); } else { $boot->set_hidden("ou", $ou); } $boot->set_field("destination", "{destination}", $arr[1], null, array("MANDATORY" => true)); $boot->set_field("destination_port", "{port}", $arr[2], null, array("MANDATORY" => true)); $boot->set_checkbox("MX", "{MX_lookups}", $arr[3], array('TOOLTIP' => "{mx_look}")); $boot->set_checkbox("trusted_smtp_domain", "{trusted_smtp_domain}", $trusted_smtp_domain, array('TOOLTIP' => "{trusted_smtp_domain_text}")); $boot->set_button($btname); $boot->set_RefreshSearchs(); $boot->set_CloseYahoo("YahooWin"); echo $boot->Compile(); }
function popup() { $tpl = new templates(); $page = CurrentPageName(); $ID = $_GET["ID"]; $title = "{new_page}"; $buttonname = "{add}"; if ($ID > 0) { $q = new mysql_squid_builder(); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM reverse_pages_content WHERE ID='{$ID}'")); $title = $ligne["subject"]; $buttonname = "{apply}"; } if ($ligne["content"] == null) { $ligne["content"] = "<html>\n<head>\n<title>It's works</title>\n</head>\n<body>\n\t<H1>It works!</H1>\n</body>\n</html>"; } $boot = new boostrap_form(); $boot->set_hidden("ID", $ID); $boot->set_formtitle($title); if (!is_numeric($ligne["cachemin"])) { $ligne["cachemin"] = 5; } $boot->set_list("cachemin", "{cache}", $ligne["cachemin"], $q->CACHE_AGES); $boot->set_field("subject", "{subject}", $ligne["subject"]); $boot->set_textarea("content", "{content}", $ligne["content"], array("ENCODE" => true, "HEIGHT" => 350)); $boot->set_button($buttonname); $boot->set_RefreshSearchs(); if ($ID == 0) { $boot->set_CloseYahoo("YahooWin6"); } echo $boot->Compile(); }
function subrules_popup() { $ruleid = $_GET["rule-id"]; $ID = $_GET["subrule"]; $users = new usersMenus(); $page = CurrentPageName(); $tpl = new templates(); $t = time(); $buttonname = "{add}"; $boot = new boostrap_form(); if ($ID > 0) { $q = new mysql(); $sql = "SELECT * FROM iproute_rules WHERE ID={$ID}"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); $title = $tpl->_ENGINE_parse_body("{$ID}::{$ligne["src"]} - {$ligne["destination"]}"); $buttonname = "{apply}"; } else { $boot->set_CloseYahoo("YahooWin3"); } if (!is_numeric($ligne["enable"])) { $ligne["enable"] = 1; } $boot->set_formtitle($title); $boot->set_formdescription("{iprules_explain}"); $boot->set_hidden("subruleid", $ID); $boot->set_hidden("ruleid", $ruleid); $boot->set_field("src", "{source}", $ligne["source"]); $boot->set_field("destination", "{destination}", $ligne["destination"]); $boot->set_field("priority", "{priority}", $ligne["priority"]); $boot->set_checkbox("enable", "{enabled}", $ligne["enable"]); $users = new usersMenus(); if (!$users->AsSystemAdministrator) { $boot->set_form_locked(); } $boot->set_button($buttonname); $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function add_user_popup() { $ldap = new clladp(); if ($_GET["ou"] == null) { senderror("{ERROR_NO_ORGANISATION_SELECTED}"); } $hash = $ldap->hash_groups($_GET["ou"], 1); $domains = $ldap->hash_get_domains_ou($_GET["ou"]); $boot = new boostrap_form(); $boot->set_hidden("ou", $_GET["ou"]); $boot->set_hidden("encpass", 1); $boot->set_field("new_userid", "{name_the_new_account_title}", null, array("MANDATORY" => true)); $boot->set_field("password", "{password}", null, array("MANDATORY" => true)); $boot->set_field("email", "{email}", null, array("MANDATORY" => true)); $boot->set_field("password", "{password}", null, array("MANDATORY" => true, "ENCODE" => true)); $boot->set_list("group_id", "{group}", $hash); $boot->set_button("{add}"); $boot->set_CloseYahoo("YahooWin2"); $boot->set_RefreshSearchs(); $boot->setAjaxPage("domains.edit.user.php"); $boot->set_formtitle("{$_GET["ou"]}:: {new_member}"); echo $boot->Compile(); }
function virtip_popup() { $boot = new boostrap_form(); $sock = new sockets(); $users = new usersMenus(); $ldap = new clladp(); $ID = $_GET["ID"]; $title_button = "{add}"; $nics = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes"))); if ($_GET["ID"] > 0) { $sql = "SELECT * FROM nics_virtuals WHERE ID='{$ID}'"; $q = new mysql(); $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); $title_button = "{apply}"; } $ous = $ldap->hash_get_ou(true); $ous["openvpn_service"] = "{APP_OPENVPN}"; while (list($num, $val) = each($nics)) { $nics_array[$val] = $val; } $nics_array[null] = "{select}"; $ous[null] = "{select}"; $boot->set_list("nic", "{nic}", $nics_array, $ligne["nic"]); $boot->set_list("org", "{organization}", $ous, $ligne["org"]); $boot->set_field("ipaddr", "{tcp_address}", $ligne["ipaddr"], array("IPV4" => true)); $boot->set_field("netmask", "{netmask}", $ligne["netmask"], array("IPV4" => true)); $boot->set_field("cdir", "CDIR", $ligne["cdir"], array("CDIR" => "ipaddr,netmask")); $boot->set_field("gateway", "{gateway}", $ligne["gateway"], array("IPV4" => true)); $boot->set_field("metric", "{metric}", $ligne["metric"]); $boot->set_hidden("ID", $_GET["ID"]); $boot->set_checkbox("ForceGateway", "{ForceGateway}", $ligne["ForceGateway"]); if (!$users->AsSystemAdministrator) { $boot->set_form_locked(); } if ($ID == 0) { $boot->set_CloseYahoo("YahooWin2"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function pools_popup() { $tpl = new templates(); $page = CurrentPageName(); $poolid = $_GET["pool-id"]; if (!is_numeric($poolid)) { $poolid = 0; } $title = "{new_pool}"; $bt = "{add}"; if ($poolid > 0) { $q = new mysql_squid_builder(); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_pools WHERE ID='{$poolid}'")); $title = $ligne["poolname"]; $bt = "{apply}"; } $boot = new boostrap_form(); $boot->set_hidden("poolid", $poolid); $hashtype[null] = "{default}"; $hashtype["ip_hash"] = "ip_hash"; $hashtype["least_conn"] = "least_conn"; if (!is_numeric($ligne["keepalive"])) { $ligne["keepalive"] = 0; } $boot->set_formtitle($title); $boot->set_field("poolname", "{name}", $ligne["poolname"]); $boot->set_list("hashtype", "{type}", $hashtype, $ligne["hashtype"]); $boot->set_field("keepalive", "{keepalive}", $ligne["keepalive"]); $boot->set_button($bt); if ($poolid == 0) { $boot->set_CloseYahoo("YahooWin"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function search_database_popup() { $boot = new boostrap_form(); $q = new mysql_storelogs(); if (!isset($_SESSION["QUERY_SYSLOG_HOST_DAY_FIELDY"])) { $sql = "SELECT DATE_FORMAT(filetime,'%Y-%m-%d') as filetime FROM files_info GROUP BY filetime ORDER BY filetime DESC"; $results = $q->QUERY_SQL($sql); $dayz[null] = "{select}"; while ($ligne = mysql_fetch_assoc($results)) { $time = time_to_date(strtotime($ligne["filetime"] . " 00:00:00")); $dayz[$ligne["filetime"]] = $time; } $_SESSION["QUERY_SYSLOG_HOST_DAY_FIELDY"] = serialize($dayz); } if (!isset($_SESSION["QUERY_SYSLOG_HOST_FIELDZ"])) { $sql = "SELECT hostname FROM files_info GROUP BY hostname ORDER BY hostname ASC"; $results = $q->QUERY_SQL($sql); $hostz[null] = "{select}"; while ($ligne = mysql_fetch_assoc($results)) { $hostz[$ligne["hostname"]] = $ligne["hostname"]; } $_SESSION["QUERY_SYSLOG_HOST_FIELDZ"] = serialize($hostz); } $LIMITS[50] = 50; $LIMITS[250] = 250; $LIMITS[500] = 250; $LIMITS[1000] = 1000; $LIMITS[2000] = 2000; if (!isset($_SESSION["QUERY_SYSLOG_LIMIT"])) { $_SESSION["QUERY_SYSLOG_LIMIT"] = 250; } if (!is_numeric($_GET["xtime"])) { $boot->set_list("QUERY_SYSLOG_DATE", "{date}", unserialize($_SESSION["QUERY_SYSLOG_HOST_DAY_FIELDY"]), $_SESSION["QUERY_SYSLOG_DATE"]); } $boot->set_list("QUERY_SYSLOG_HOST", "{hostname}", unserialize($_SESSION["QUERY_SYSLOG_HOST_FIELDZ"]), $_SESSION["QUERY_SYSLOG_HOST"]); $boot->set_field("QUERY_SYSLOG_FILE", "{filename}", $_SESSION["QUERY_SYSLOG_FILE"]); $boot->set_list("QUERY_SYSLOG_LIMIT", "{rows}", $LIMITS, $_SESSION["QUERY_SYSLOG_LIMIT"]); $boot->set_button("{search}"); $boot->set_CloseYahoo("YahooWin2"); $boot->set_formdescription("{advanced_search_explain}"); $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function sources_add_group_popup() { $boot = new boostrap_form(); $sock = new sockets(); $users = new usersMenus(); $ldap = new clladp(); $ID = $_GET["groupid"]; $title_button = "{add}"; $title = "{new_group}"; if ($ID > 0) { $sql = "SELECT * FROM authenticator_auth WHERE ID='{$ID}'"; $q = new mysql_squid_builder(); $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); if (!$q->ok) { echo "<p class=text-error>{$q->mysql_error}</p>"; } $title_button = "{apply}"; $title = $ligne["groupname"] . " »» " . $GLOBALS["TYPES"][$ligne["group_type"]]; } $mainrule = $_GET["mainrule"]; if (!is_numeric($mainrule)) { $mainrule = 0; } $boot->set_formtitle($title); $boot->set_hidden("rules-sources-add-group-save", "yes"); $boot->set_hidden("mainrule", $mainrule); $boot->set_hidden("groupid", $ID); $boot->set_field("groupname", "{groupname}", $ligne["groupname"], array("ENCODE" => true)); $boot->set_checkbox("enabled", "{enabled}", $ligne["enabled"]); if ($ID == 0) { $boot->set_list("group_type", "{groupe_type}", $GLOBALS["TYPES"], $ligne["group_type"]); } else { $boot->set_hidden("group_type", $ligne["group_type"]); } $boot->set_button($title_button); $AdminPrivs = AdminPrivs(); if (!$AdminPrivs) { $boot->set_form_locked(); } if ($ID == 0) { $boot->set_CloseYahoo("YahooWin3"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function section_blocked_form() { $boot = new boostrap_form(); $q = new mysql_squid_builder(); $ARRAYTABLES = $q->LIST_TABLES_BLOCKED(); while (list($tablename, $none) = each($ARRAYTABLES)) { $time = $q->TIME_FROM_DAY_TABLE($tablename); $days[$time] = time_to_date($time); } $BLOCKED_CATEGORY_LIMITS[50] = 50; $BLOCKED_CATEGORY_LIMITS[250] = 250; $BLOCKED_CATEGORY_LIMITS[500] = 250; $BLOCKED_CATEGORY_LIMITS[1000] = 1000; $BLOCKED_CATEGORY_LIMITS[2000] = 2000; krsort($days); $boot->set_list("QUERY_BLOCKED_DATE", "{date}", $days, $_SESSION["QUERY_BLOCKED_DATE"]); $boot->set_field("QUERY_BLOCKED_UID", "{member}", $_SESSION["QUERY_BLOCKED_UID"]); $boot->set_field("QUERY_BLOCKED_CATEGORY", "{category}", $_SESSION["QUERY_BLOCKED_CATEGORY"]); $boot->set_list("BLOCKED_CATEGORY_LIMIT", "{rows}", $BLOCKED_CATEGORY_LIMITS, $_SESSION["BLOCKED_CATEGORY_LIMIT"]); $boot->set_button("{search}"); $boot->set_CloseYahoo("YahooWin2"); $boot->set_formdescription("{advanced_search_explain}"); $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function policy2() { $page = CurrentPageName(); $tpl = new templates(); $boot = new boostrap_form(); $t = time(); $q = new amavisdb(); $users = new usersMenus(); $policy_id = $_GET["policy-id"]; $btname = "{apply}"; if ($policy_id < 1) { $btname = "{add}"; $boot->set_CloseYahoo("YahooWin2"); } else { $sql = "SELECT * FROM policy WHERE id='{$policy_id}'"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql)); if (!$q->ok) { $error = "<p class='text-error'>{$q->mysql_error}.</p>"; } } $boot->set_hidden("policy_id", $policy_id); $boot->set_field("spam_tag_level", "{spam_tag_level}", $ligne["spam_tag_level"]); $boot->set_field("spam_tag2_level", "{spam_tag2_level}", $ligne["spam_tag2_level"]); $boot->set_field("spam_tag3_level", "{spam_tag3_level}", $ligne["spam_tag3_level"]); $boot->set_field("spam_kill_level", "{spam_kill_level}", $ligne["spam_kill_level"]); $boot->set_field("spam_dsn_cutoff_level", "{spam_dsn_cutoff_level}", $ligne["spam_dsn_cutoff_level"]); $boot->set_field("spam_quarantine_cutoff_level", "{spam_quarantine_cutoff_level}", $ligne["spam_quarantine_cutoff_level"]); $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function websites_popup_webserver_replace_popup() { $tpl = new templates(); $page = CurrentPageName(); $servername = $_GET["servername"]; $q = new mysql_squid_builder(); $title = "{new_rule}"; $bt = "{add}"; $ID = $_GET["replaceid"]; $boot = new boostrap_form(); $sock = new sockets(); $servername = $_GET["servername"]; if ($ID > 0) { $q = new mysql_squid_builder(); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_replace_www WHERE ID='{$ID}'")); $bt = "{apply}"; $title = "{$ligne["rulename"]}"; $ligne["stringtosearch"] = stripslashes($ligne["stringtosearch"]); $ligne["replaceby"] = stripslashes($ligne["replaceby"]); $servername = $ligne["servername"]; } if ($ligne["tokens"] == null) { $ligne["tokens"] = "g"; } if ($ligne["rulename"] == null) { $ligne["rulename"] = time(); } $boot->set_hidden("replaceid", $ID); $boot->set_hidden("servername", $servername); $boot->set_formtitle($title); $boot->set_field("rulename", "{name}", $ligne["rulename"]); $boot->set_field("zorder", "{order}", $ligne["zorder"]); $boot->set_spacertitle("{search}"); $boot->set_textarea("stringtosearch", "{search}", $ligne["stringtosearch"], array("MANDATORY" => true, "ENCODE" => true)); $boot->set_checkbox("AsRegex", "{regex}", $ligne["AsRegex"], array("TOOLTIP" => "{replace_regex_explain}")); $boot->set_spacertitle("{replace}"); $boot->set_textarea("replaceby", "{replace}", $ligne["replaceby"], array("MANDATORY" => true, "ENCODE" => true)); $boot->set_field("tokens", "{flags}", $ligne["tokens"], array("MANDATORY" => true)); $boot->set_button($bt); if ($ID == 0) { $boot->set_CloseYahoo("YahooWin3"); } $boot->set_RefreshSearchs(); $boot->set_formdescription("{nginx_subst_explain}"); echo $boot->Compile(); }
function firewall_popup() { $ID = $_GET["ID"]; $q = new mysql_squid_builder(); $bt = "{apply}"; $servername = $_GET["servername"]; if (!$q->TABLE_EXISTS("nginx_exploits_fw")) { $sql = "CREATE TABLE IF NOT EXISTS `nginx_exploits_fw` (\n\t\t`servername` CHAR(255) NOT NULL PRIMARY KEY,\n\t\t`maxaccess` smallint(1) NOT NULL DEFAULT 0,\n\t\t`sendlogs` smallint(1) NOT NULL DEFAULT 0,\n\t\tKEY `maxaccess` (`maxaccess`),\n\t\tKEY `sendlogs` (`sendlogs`)\n\t\t) ENGINE = MYISAM;"; if (!$q->QUERY_SQL($sql)) { echo $q->mysql_error_html(); } } $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM nginx_exploits_fw WHERE servername='{$servername}'")); if (!is_numeric($ligne["maxaccess"])) { $ligne["maxaccess"] = 0; } $boot = new boostrap_form(); $sock = new sockets(); $boot->set_hidden("servername", $_GET["servername"]); $boot->set_hidden("firewall", $_GET["servername"]); $boot->set_formtitle("{firewall}"); $boot->set_formdescription("{NGINX_FW_EXPLAIN}"); $boot->set_field("maxaccess", "{MAX_EVENTS}", $ligne["maxaccess"], array("TOOLTIP" => "{NGINX_MAXACCESS_FW_EXPLAIN}")); $boot->set_checkbox("sendlogs", "{write_logs}", $ligne["sendlogs"]); $boot->set_button($bt); if ($ID == 0) { $boot->set_CloseYahoo("YahooWin4"); } $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function table_all_videos_search_popup() { $boot = new boostrap_form(); $q = new mysql_squid_builder(); if (isset($_SESSION["QUERY_YOUTUBE_CATZ"])) { $testCatz = unserialize($_SESSION["QUERY_YOUTUBE_CATZ"]); if (!is_array($testCatz)) { unset($_SESSION["QUERY_YOUTUBE_CATZ"]); } } if (!isset($_SESSION["QUERY_YOUTUBE_CATZ"])) { $sql = "SELECT category FROM youtube_objects GROUP BY category"; $results = $q->QUERY_SQL($sql); $dayz[null] = "{select}"; while ($ligne = mysql_fetch_assoc($results)) { $time = time_to_date(strtotime($ligne["filetime"] . " 00:00:00")); $dayz[$ligne["category"]] = $ligne["category"]; } $_SESSION["QUERY_YOUTUBE_CATZ"] = serialize($dayz); } $LIMITS[50] = 50; $LIMITS[250] = 250; $LIMITS[500] = 250; $LIMITS[1000] = 1000; $LIMITS[2000] = 2000; if (!isset($_SESSION["QUERY_YOUTUBE_LIMIT"])) { $_SESSION["QUERY_YOUTUBE_LIMIT"] = 250; } $boot->set_list("QUERY_YOUTUBE_CATE", "{category}", unserialize($_SESSION["QUERY_YOUTUBE_CATZ"]), $_SESSION["QUERY_YOUTUBE_CATE"]); $boot->set_list("QUERY_YOUTUBE_LIMIT", "{rows}", $LIMITS, $_SESSION["QUERY_YOUTUBE_LIMIT"]); $boot->set_button("{search}"); $boot->set_CloseYahoo("YahooWin2"); $boot->set_formdescription("{advanced_search_explain}"); $boot->set_RefreshSearchs(); echo $boot->Compile(); }
function rule_id() { $ID = $_GET["pattern-id"]; $q = new mysql_squid_builder(); $boot = new boostrap_form(); if ($ID == 0) { $title = "{new_rule}"; $btname = "{add}"; $boot->set_CloseYahoo("YahooWin"); } else { $sql = "SELECT * FROM haarp_redirpats WHERE ID='{$ID}'"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); if (!$q->ok) { $error = "<p class='text-error'>{$q->mysql_error}.</p>"; } $title = "{rule}::{$ID}"; $btname = "{apply}"; } $boot->set_formtitle($title); $boot->set_formdescription("{haarp_rule_explain}"); $boot->set_hidden("pattern-id", $ID); $boot->set_textarea("pattern", "{pattern}", $ligne["pattern"]); $boot->set_button($btname); $boot->set_RefreshSearchs(); echo $boot->Compile(); }