function infra_section() { include_once dirname(__FILE__) . "/ressources/class.squid.inc"; $users = new usersMenus(); $sock = new sockets(); $tpl = new templates(); $q = new mysql_squid_builder(); $icon = "arrow-right-24.png"; $SSLColor = "#000000"; $icon_ssl = "arrow-right-24.png"; $icon_ssl_enc = "arrow-right-24.png"; $ssl_enc_color = "#000000"; $GotoSSLEncrypt = "GotoSSLEncrypt()"; $squid = new squidbee(); $EnableArticaHotSpot = intval($sock->GET_INFO("EnableArticaHotSpot")); $EnableIntelCeleron = intval($sock->GET_INFO("EnableIntelCeleron")); $COUNT_DE_CACHES = intval(@file_get_contents("{$GLOBALS["BASEDIR"]}/COUNT_DE_CACHES")); $COUNT_DE_MEMBERS = intval(@file_get_contents("{$GLOBALS["BASEDIR"]}/MEMBERS_COUNT")); $SquidBoosterEnable = intval($sock->GET_INFO("SquidBoosterEnable")); $SquidCacheLevel = $sock->GET_INFO("SquidCacheLevel"); if (!is_numeric($SquidCacheLevel)) { $SquidCacheLevel = 4; } $HyperCacheStoreID = intval($sock->GET_INFO("HyperCacheStoreID")); $EnableSS5 = intval($sock->GET_INFO("EnableSS5")); $EnableRDPProxy = intval($sock->GET_INFO("EnableRDPProxy")); $PrivoxyEnabled = intval($sock->GET_INFO("PrivoxyEnabled")); $EnableParentProxy = intval($sock->GET_INFO("EnableParentProxy")); if (!$q->FIELD_EXISTS("proxy_ports", "UseSSL")) { $q->QUERY_SQL("ALTER TABLE `proxy_ports` ADD `UseSSL` smallint(1) NOT NULL DEFAULT '0'"); if (!$q->ok) { echo $q->mysql_error_html(); } } $sql = "SELECT COUNT(*) as tcount FROM proxy_ports WHERE UseSSL=1 AND enabled=1"; $ligne = @mysql_fetch_array($q->QUERY_SQL($sql)); if (!$q->ok) { echo $q->mysql_error_html(); } $CountOfSSL = intval($ligne["tcount"]); $ssl_rules_js = "GotoSSLRules()"; $WHY_SSL_RULES_DISABLED = null; if ($CountOfSSL == 0) { $icon_ssl = "arrow-right-24-grey.png"; $icon_ssl_enc = $icon_ssl; $SSLColor = "#898989"; $ssl_enc_color = $SSLColor; $GotoSSLEncrypt = "blur()"; $ssl_rules_js = "blur()"; $WHY_SSL_RULES_DISABLED = "<hr>{WHY_SSL_RULES_DISABLED}"; $decrypted_ssl_websites = "<tr>\n\t\t<td valign='middle' style='width:25px'>\n\t\t<img src='img/arrow-right-24-grey.png'>\n\t\t</td>\n\t\t<td valign='middle' style='font-size:18px;width:99%;color:{$SSLColor}'>{decrypted_ssl_websites}</td>\n\t\t</tr>"; $ssl_rules = "<tr>\n\t\t<td valign='middle' style='width:25px'>\n\t\t<img src='img/arrow-right-24-grey.png'>\n\t\t</td>\n\t\t<td valign='middle' style='font-size:18px;width:99%;color:{$SSLColor}'>{ssl_rules}</td>\n\t\t</tr>"; } else { if ($squid->SSL_BUMP_WHITE_LIST == 1) { $decrypted_ssl_websites = "<tr>\n\t\t\t<td valign='middle' style='width:25px'>\n\t\t\t\t<img src='img/{$icon_ssl}'>\n\t\t\t</td>\n\t\t\t<td valign='middle' style='font-size:18px;width:99%;color:{$SSLColor}'>" . texttooltip("{decrypted_ssl_websites}", null, "GotoSSLEncrypt()") . "</td>\n\t\t\t</tr>"; } else { $decrypted_ssl_websites = "<tr>\n\t\t\t<td valign='middle' style='width:25px'>\n\t\t\t<img src='img/arrow-right-24-grey.png'>\n\t\t\t</td>\n\t\t\t<td valign='middle' style='font-size:18px;width:99%;color:{$SSLColor}'>{decrypted_ssl_websites}</td>\n\t\t\t</tr>"; } } $sslshitelist = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon_ssl}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$SSLColor}'>" . texttooltip("{ssl_whitelist}", "position:left:{SSL_BUMP_WL}", "GotoSquidSSLWL()") . "</td>\n\t</tr>"; $ssl_rules = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon_ssl}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$SSLColor}'>" . texttooltip("{ssl_rules}", "{ssl_rules}{$WHY_SSL_RULES_DISABLED}", $ssl_rules_js) . "</td>\n\t</tr>"; $tr[] = "<table style='width:100%'>\n\t<tr>\n\t<td valign='middle' colspan=2 style='font-size:22px;font-weight:bold'>{infrastructure}:</td>\n\t</tr>"; $icon_ports = "arrow-right-24.png"; $explain_ports = "{dashboard_listen_ports_explain}<br>{dashboard_listen_ports_explain2}"; $js_ports = "GotoSquidPorts()"; $color_port = "black"; if ($EnableArticaHotSpot == 1) { $icon_ports = "arrow-right-24-grey.png"; $explain_ports = "{section_disabled_hotsport}"; $js_ports = "blur();"; $color_port = "#898989"; } $tr[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon_ports}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$color_port}'>" . texttooltip("{listen_ports}", "position:left:{$explain_ports}", $js_ports) . "</td>\n\t</tr>"; $ssl_options = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon_ssl}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$SSLColor}'>" . texttooltip("{ssl_options}", null, "Loadjs('squid.ssl.center.php?js=yes')") . "</td>\n\t</tr>"; if (!$squid->IS_35) { $tr[] = $decrypted_ssl_websites; $tr[] = $sslshitelist; $tr[] = $ssl_options; } else { $tr[] = $ssl_rules; } $tr[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/arrow-right-24.png'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:black'>" . texttooltip("{squid_templates_error}", "{squid_templates_error_explain}", "GotoSquidTemplatesErrors()") . "</td>\n\t</tr>"; $tr[] = "<tr>\n\t<td valign='middle' style='width:25px'> </td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:black'>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t<td valign='middle' style='width:16px'>\n\t\t\t<img src='img/arrow-right-16.png'></td>\n\t\t\t<td valign='middle' style='font-size:16px;width:99%;color:black'>" . texttooltip("{ftp_template}", "{ftp_template_error_explain}", "GotoSquidTemplateFTP()") . "</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t\n\t\t\t</td>\n\t</tr>"; $tr[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/arrow-right-24.png'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:black'>" . texttooltip("{timeouts}", null, "GotoSquidTimeOuts()") . "</td>\n\t</tr>"; $tr[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/arrow-right-24.png'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:black'>" . texttooltip("{dns_settings}", null, "GotoSquidDNSsettings()") . "</td>\n\t</tr>"; $tr[] = "<tr><td colspan=2> </td></tr>"; $squid_parent_proxy_color = "black"; $squid_parent_proxy_icon = "arrow-right-24.png"; $squid_parent_proxy_js = "GotoSquidParentProxy()"; if ($EnableParentProxy == 0) { $squid_parent_proxy_icon = "arrow-right-24-grey.png"; $squid_parent_proxy_color = "#898989"; $squid_parent_proxy_text = " <span style='font-size:14px'>({disabled})</span>"; } if ($PrivoxyEnabled == 1) { $squid_parent_proxy_icon = "arrow-right-24-grey.png"; $squid_parent_proxy_color = "#898989"; $squid_parent_proxy_text = " <span style='font-size:14px'>({disabled} - {APP_PRIVOXY})</span>"; $squid_parent_proxy_js = "blur()"; } $tr[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$squid_parent_proxy_icon}'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$squid_parent_proxy_color}'>" . texttooltip("{squid_parent_proxy}{$squid_parent_proxy_text}", "{squid_parent_proxy_explain}", $squid_parent_proxy_js) . "</td>\n\t</tr>"; $tr[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/arrow-right-24.png'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:black'>" . texttooltip("X-Forwarded-For", "{follow_x_forwarded_for_explain}", "GotoFollowXforwardedFor()") . "</td>\n\t</tr>"; $ecap_gzip_icon = "arrow-right-24.png"; $ecap_gzip_color = "#000000"; $ecap_gzip_explain = null; $EnableeCapGzip = intval($sock->GET_INFO("EnableeCapGzip")); if ($EnableeCapGzip == 0) { $ecap_gzip_color = "#898989"; $ecap_gzip_icon = "arrow-right-24-grey.png"; $ecap_gzip_explain = " <span style='font-size:12px'>({disabled})</span>"; } $tr[] = "\n\t<tr>\n\t\t<td valign='middle' style='width:25px'>\n\t\t\t<img src='img/{$ecap_gzip_icon}'>\n\t\t</td>\n\t\t<td valign='middle' style='font-size:18px;width:99%;color:{$ecap_gzip_color}'>" . texttooltip("{http_compression}{$ecap_gzip_explain}", "{http_compression_explain}", "GoToeCapGzip()") . "</td>\n\t</tr>"; $SLAVE_IP = null; $icon_failover = "arrow-right-24.png"; $js_failover = "GotoFailover()"; $color_failover = "black"; $MAIN = unserialize(base64_decode($sock->GET_INFO("HASettings"))); if (isset($MAIN["SLAVE"])) { $SLAVE_IP = $MAIN["SLAVE"]; } if ($SLAVE_IP == null) { $icon_failover = "arrow-right-24-grey.png"; $color_failover = "#898989"; $text_failover = " <span style='font-size:12px'>({disabled})</span>"; } else { $text_failover = " <span style='font-size:12px'>({slave_ip} {$SLAVE_IP})</span>"; } if (!$users->CORP_LICENSE) { $icon_failover = "arrow-right-24-grey.png"; $js_failover = "blur()"; $color_failover = "#898989"; $text_failover = " <span style='font-size:12px'>({no_license})</span>"; } $tr[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon_failover}'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$color_failover}'>" . texttooltip("{failover}{$text_failover}", "{failover_explain}", "{$js_failover}") . "</td>\n\t</tr>"; $img_hostpot = "arrow-right-24.png"; $explain_hostpot = "{dashboard_hotspot}"; $js_hostpot = "GotoHostpotv3()"; $color_hotspot = "black"; $TCP_LIST_NICS = TCP_LIST_NICS(); if ($TCP_LIST_NICS < 2) { $img_hostpot = "arrow-right-24-grey.png"; $explain_hostpot = "<div style='background-color:white;color:#d32d2d;margin:10px;padding:10px'>{dashboard_hotspot_nonic}</div>"; $js_hostpot = "blur();"; $color_hotspot = "#898989"; } if ($EnableArticaHotSpot == 0) { $img_hostpot = "arrow-right-24-grey.png"; $color_hotspot = "#898989"; } $tr[] = "\n<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$img_hostpot}'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$color_hotspot}'>" . texttooltip("HotSpot", $explain_hostpot, $js_hostpot) . "</td>\n</tr>"; $tr[] = "</table>"; // *************************************************************************************************** $tr2[] = "<table style='width:100%'>"; $tr2[] = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='middle' colspan=2 style='font-size:22px;font-weight:bold'>{system_pcaches}:</td>\n\t</tr>"; $Color = "black"; $icon = "Database24.png"; $hypercache_mirror_Color = "black"; $icon_center_cache_explain = null; $hypercache_mirror_icon = "arrow-right-24.png"; $js_cache_status = "GoToCaches()"; $icon_cache_status = "Database24.png"; $icon_cache_explain = null; $color_cache_status = "black"; $js = "GoToCachesCenter()"; if (!$users->CORP_LICENSE) { $icon_center_cache_explain = "<span style='font-size:12px'> ({no_license})</span>"; $icon = "Database24-grey.png"; $Color = "#898989"; $js = "blur();"; } if ($COUNT_DE_CACHES > 0) { if ($COUNT_DE_MEMBERS > 15) { if ($COUNT_DE_CACHES < 20000) { $icon = "alert-24.png"; } } } if ($SquidCacheLevel == 0) { $icon = "Database24-grey.png"; $icon_cache_status = $icon; $hypercache_mirror_icon = "arrow-right-24-grey.png"; $icon_cache_explain = "<span style='font-size:12px'> ({disabled})</span>"; $icon_center_cache_explain = "<span style='font-size:12px'> ({disabled})</span>"; $js_cache_status = "blur();"; $Color = "#898989"; $color_cache_status = $Color; $hypercache_mirror_Color = $Color; $js = "blur();"; $SquidBoosterEnable = 0; $EnableRockCache = 0; $HyperCacheStoreID = 0; } $tr2[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon_cache_status}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$color_cache_status}'>" . texttooltip("{caches_status}{$icon_cache_explain}", "{your_proxy_caches_explain}", $js_cache_status) . "</td>\n\t</tr>"; $tr2[] = "<tr>\n\t\t<td valign='middle' style='width:25px'>\n\t\t<img src='img/{$icon}'>\n\t\t</td>\n\t\t<td valign='middle' style='font-size:18px;width:99%;color:{$Color}'>" . texttooltip("{caches_center}{$icon_center_cache_explain}", "{caches_center_explain}", "{$js}") . "</td>\n\t</tr>"; $icon_booster_explain = null; $EnableRockCache = intval($sock->GET_INFO("EnableRockCache")); $icon_booster = "Database24.png"; $icon_rock = "Database24.png"; $js_booster = "GotoProxyBooster()"; $Color_booster = "black"; $Color_rock = "black"; $js_rock = "GoToRock()"; if ($SquidBoosterEnable == 0) { $icon_booster = "Database24-grey.png"; $icon_booster_explain = "<span style='font-size:12px'> ({disabled})</span>"; } if (!$users->CORP_LICENSE) { $icon_booster = "Database24-grey.png"; $icon_rock = "Database24-grey.png"; $js_booster = "blur();"; $Color_booster = "#898989"; $Color_rock = "#898989"; $EnableRockCache = 0; $js_rock = "blur()"; $icon_booster_explain = "<span style='font-size:12px'> ({no_license})</span>"; $icon_rock_explain = "<span style='font-size:12px'> ({no_license})</span>"; $icon_caches_rules_explain = "<span style='font-size:12px'> ({no_license})</span>"; } $tr2[] = "\n\t<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon_booster}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$Color_booster}'>" . texttooltip("{squid_booster}{$icon_booster_explain}", null, "GotoProxyBooster()") . "</td>\n\t</tr>"; if ($users->CORP_LICENSE) { if ($EnableRockCache == 0 or $SquidCacheLevel == 0) { $icon_rock = "Database24-grey.png"; $Color_rock = "#898989"; $icon_rock_explain = "<span style='font-size:12px'> ({disabled})</span>"; } } if ($SquidCacheLevel == 0) { $icon_rock = "Database24-grey.png"; $Color_rock = "#898989"; $icon_rock_explain = "<span style='font-size:12px'> ({disabled})</span>"; $icon_caches_rules_explain = "<span style='font-size:12px'> ({disabled})</span>"; $icon_caches_rules = "arrow-right-24-grey.png"; $Color_caches_rules = "#898989"; } $tr2[] = "\n\t<tr>\n\t<td valign='middle' style='width:25px'>\n\t\t<img src='img/{$icon_rock}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$Color_rock}'>" . texttooltip("{rock_store}{$icon_rock_explain}", null, $js_rock) . "</td>\n\t</tr>"; $tr2[] = "<tR><td colspan=2> </td></tr>"; $icon = "arrow-right-24.png"; $Color = "black"; $icon = "arrow-right-24.png"; $SquidVersion = @file_get_contents("/etc/artica-postfix/settings/Daemons/SquidVersion"); if (preg_match("#^3\\.5#", $SquidVersion)) { $HyperCacheCompatible = true; } if (preg_match("#^4\\.#", $SquidVersion)) { $HyperCacheCompatible = true; } if ($HyperCacheStoreID == 0) { $icon = "arrow-right-24-grey.png"; $Color = "#898989"; } $explain = "{HyperCache_explain}"; $js_hypercache = "GoToHyperCache()"; if (!$HyperCacheCompatible) { $icon = "arrow-right-24-grey.png"; $js_hypercache = "blur()"; $Color = "#898989"; $hypercache_explain = "{ERROR_SQUID_MUST_35}"; } if ($EnableIntelCeleron == 1) { $icon = "arrow-right-24-grey.png"; $js_hypercache = "blur()"; $Color = "#898989"; $hypercache_explain = "{ERROR_FEATURE_CELERON}"; } $tr2[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/arrow-right-24.png'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%'>" . texttooltip("{cache_level}", null, "GoToCachesLevel()") . "</td>\n\t</tr>"; $js_caches_rules = "GotoSquidCachesRules()"; $Color_caches_rules = "black"; $icon_caches_rules = "arrow-right-24.png"; if (!$users->CORP_LICENSE) { $icon_caches_rules = "arrow-right-24-grey.png"; $Color_caches_rules = "#898989"; $js_caches_rules = null; } $tr2[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon_caches_rules}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$Color_caches_rules}'>" . texttooltip("{caches_rules}{$icon_caches_rules_explain}", "{refresh_pattern_intro}", "{$js_caches_rules}") . "</td>\n\t</tr>"; $WindowsUpdateCacher_icon = "arrow-right-24.png"; $WindowsUpdateCacher_explain = null; $WindowsUpdateCacher_color = "black"; $EnableUfdbGuard = intval($sock->GET_INFO("EnableUfdbGuard")); $WindowsUpdateCaching = intval(@file_get_contents("/etc/artica-postfix/settings/Daemons/WindowsUpdateCaching")); if ($EnableUfdbGuard == 0) { $WindowsUpdateCaching = 0; } if ($WindowsUpdateCaching == 0) { $WindowsUpdateCacher_icon = "arrow-right-24-grey.png"; $WindowsUpdateCacher_color = "#898989"; $WindowsUpdateCacher_explain = " <span style='font-size:12px'> ({disabled})</span>"; } $webcopy_color = "black"; $webcopy_icon = "arrow-right-24.png"; $webcopy_explain = null; $webcopy_js = "GotoWebCopy()"; $HTTrackInSquid = intval(@file_get_contents("/etc/artica-postfix/settings/Daemons/HTTrackInSquid")); if ($HTTrackInSquid == 0) { $webcopy_icon = "arrow-right-24-grey.png"; $webcopy_color = "#898989"; $webcopy_explain = " <span style='font-size:12px'> ({disabled})</span>"; } if (!is_file("/usr/bin/httrack")) { $webcopy_icon = "arrow-right-24-grey.png"; $webcopy_color = "#898989"; $webcopy_explain = " <span style='font-size:12px'> ({not_installed})</span>"; } $tr2[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$webcopy_icon}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$webcopy_color}'>" . texttooltip("WebCopy{$webcopy_explain}", "{WebCopy_task_explain}", $webcopy_js) . "</td>\n\t</tr>"; $tr2[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$WindowsUpdateCacher_icon}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$WindowsUpdateCacher_color}'>" . texttooltip("Windows Updates{$WindowsUpdateCacher_explain}", "{enable_windows_updates_cache_enforcement_explain}", "GotoWindowsUpdate()") . "</td>\n\t</tr>"; $tr2[] = "\n\t<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$Color}'>" . texttooltip("HyperCache{$icon_cache_explain}", "{$hypercache_explain}", $js_hypercache) . "</td>\n\t</tr>"; $tr2[] = "\n\t<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$hypercache_mirror_icon}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$hypercache_mirror_Color}'>" . texttooltip("HyperCache mirror{$icon_cache_explain}", "{HyperCache_mirror_explain}", "GoToHyperCacheMirror()") . "</td>\n\t</tr>"; $tr2[] = "<tR><td colspan=2> </td></tr>\n\t<tr>\n\t<td valign='middle' colspan=2 style='font-size:22px;font-weight:bold'>{gateway_services}:</td>\n\t</tr>"; $img_ss5 = "arrow-right-24.png"; $explain_ss5 = "{APP_SS5_ABOUT}"; $js_ss5 = "GoToSS5()"; $color_ss5 = "black"; $img_rdp = "arrow-right-24.png"; $explain_rdp = "{APP_RDPPROXY}"; $js_rdp = "GotToRDPPROX()"; $color_rdp = "black"; if ($EnableSS5 == 0) { $img_ss5 = "arrow-right-24-grey.png"; $explain_ss5 = "{APP_SS5_ABOUT}"; $error_ss5 = " <span style='font-size:12px'>{disabled}</span>"; $js_ss5 = "GoToSS5()"; $color_ss5 = "#898989"; } if (!is_file("/usr/sbin/ss5")) { $img_ss5 = "arrow-right-24-grey.png"; $explain_ss5 = "{APP_SS5_ABOUT}"; $error_ss5 = " <span style='font-size:12px'>{not_installed}</span>"; $js_ss5 = null; $color_ss5 = "#898989"; } if (!is_file("/var/lib/ss5/ss5/mod_socks4.so")) { $img_ss5 = "arrow-right-24-grey.png"; $explain_ss5 = "{APP_SS5_ABOUT}"; $error_ss5 = " <span style='font-size:12px'>{not_installed}</span>"; $js_ss5 = null; $color_ss5 = "#898989"; } if ($EnableRDPProxy == 0) { $img_rdp = "arrow-right-24-grey.png"; $explain_rdp = "{APP_SS5_ABOUT}"; $error_rdp = " <span style='font-size:12px'>{disabled}</span>"; $js_rdp = "GotToRDPPROX()"; $color_rdp = "#898989"; } if (!$users->RDPPROXY_INSTALLED) { $img_rdp = "arrow-right-24-grey.png"; $explain_rdp = "{APP_SS5_ABOUT}"; $error_rdp = " <span style='font-size:12px'>{not_installed}</span>"; $js_rdp = null; $color_rdp = "#898989"; } $tr2[] = "\n\t<tr>\n\t<td valign='middle' style='width:25px'><img src='img/{$img_ss5}'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$color_ss5}'>" . texttooltip("{APP_SS5}{$error_ss5}", $explain_ss5, $js_ss5) . "</td>\n\t</tr>"; $tr2[] = "<tr>\n\t<td valign='middle' style='width:25px'><img src='img/{$img_rdp}'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$color_rdp}'>" . texttooltip("{APP_RDPPROXY}{$error_rdp}", "position:right:{APP_RDPPROXY}", $js_rdp) . "</td>\n\t</tr>"; $EnableSecureGateway = intval($sock->GET_INFO("EnableSecureGateway")); $icon_secure_gateway = "arrow-right-24.png"; $color_secure_gateway = "black"; $text_secure_gateway = null; if ($EnableSecureGateway == 0) { $icon_secure_gateway = "arrow-right-24-grey.png"; $color_secure_gateway = "#898989"; $text_secure_gateway = " <span style='font-size:12px'>({disabled})</span>"; } "arrow-right-24-grey.png"; $tr2[] = "<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$icon_secure_gateway}'></td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$color_secure_gateway}'>" . texttooltip("{secure_gateway}{$text_secure_gateway}", "{secure_gateway_explain}", "GotoGatewaySecure()") . "</td>\n\t</tr>"; $Transmission_icon = "arrow-right-24.png"; $Transmission_Color = "black"; $Transmission_js = "GoToTransmissionDaemon()"; $EnableTransMissionDaemon = intval($sock->GET_INFO("EnableTransMissionDaemon")); $UpdateUtilityWizard = intval($sock->GET_INFO("UpdateUtilityWizard")); if (!is_file("/usr/bin/transmission-daemon")) { $Transmission_icon = "arrow-right-24-grey.png"; $Transmission_Color = "#898989"; $Transmission_js = "blur();"; } else { if ($EnableTransMissionDaemon == 0) { $Transmission_icon = "arrow-right-24-grey.png"; $Transmission_Color = "#898989"; } } $UpdateUtilityIcon = "arrow-right-24.png"; $UpdateUtilityColor = "black"; if ($UpdateUtilityWizard == 0) { $UpdateUtilityIcon = "arrow-right-24-grey.png"; $UpdateUtilityColor = "#898989"; } if (!is_file("/etc/UpdateUtility/UpdateUtility-Console")) { $UpdateUtilityIcon = "arrow-right-24-grey.png"; $UpdateUtilityColor = "#898989"; } $tr2[] = "\n\t<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$Transmission_icon}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$Transmission_Color}'>" . texttooltip("{bittorrent_service}", "{bittorrent_service_explain}", "GoToTransmissionDaemon()") . "</td>\n\t</tr>"; $tr2[] = "\n\t<tr>\n\t<td valign='middle' style='width:25px'>\n\t<img src='img/{$UpdateUtilityIcon}'>\n\t</td>\n\t<td valign='middle' style='font-size:18px;width:99%;color:{$UpdateUtilityColor}'>" . texttooltip("{APP_KASPERSKY_UPDATE_UTILITY}", "{APP_KASPERSKY_UPDATE_UTILITY}", "GoToUpdateUtility()") . "</td>\n\t</tr>"; $tr2[] = "</table>"; $final = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:50%' valign='top'>" . $tpl->_ENGINE_parse_body(@implode("\n", $tr)) . "</td>\n\t\t<td style='width:50%' valign='top'>" . $tpl->_ENGINE_parse_body(@implode("\n", $tr2)) . "</td>\n\t</tr>\n\t</table>\n\t"; $filename = "/usr/share/artica-postfix/ressources/logs/web/cache/" . md5("INFRASECTION" . $tpl->language . $_SESSION["uid"]); @file_put_contents($filename, $final); echo $final; }
function nics_section() { $sock = new sockets(); $tpl = new templates(); $datas = TCP_LIST_NICS(); $icon = "arrow-right-24.png"; $tr[] = "<table style='width:100%'>"; while (list($num, $val) = each($datas)) { writelogs("Found: {$val}", __FUNCTION__, __FILE__, __LINE__); $val = trim($val); $nic = new system_nic($val); $BEHA["reject"] = "{strict_mode}"; $BEHA["accept"] = "{trusted_mode}"; $BEHA2[0] = "{not_defined}"; $BEHA2[1] = "{act_as_lan}"; $BEHA2[2] = "{act_as_wan}"; $b1 = $BEHA2[$nic->firewall_behavior] . "/" . $BEHA[$nic->firewall_policy]; if ($nic->firewall_artica == 1) { $b1 = $b1 . "<br>{accept_artica_w}"; } $tr[] = "<tr>\n\t\t<td valign='middle' style='width:25px'>\n\t\t<img src='img/interfaces-24.png'>\n\t\t</td>\n\t\t<td valign='middle' style='font-size:20px;width:99%'>" . texttooltip("{$val}: {$nic->NICNAME}<br><span style='font-size:14px'>{$b1}</span>", "position:right:{$nic->IPADDR} - {$nic->netzone}", "GoToNicFirewallConfiguration('{$val}')") . "</td>\n\t\t</tr>\n\t\t<tr>\t\t\t\t\t\n\t\t\t<td valign='middle' style='width:25px'> </td>\n\t\t\t<td valign='top'>\n\t\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t\t<td valign='middle' style='width:18px'><img src='img/arrow-right-16.png'></td>\n\t\t\t\t\t\t<td valign='middle' style='font-size:14px'>" . texttooltip("{firewall_rules}", "position:top:{rules}", "GotoFireholeRules('{$val}')") . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tR>\n\t\t\t\t\t\t\t\t\n\t\t"; } $tr[] = "</table>"; echo $tpl->_ENGINE_parse_body(@implode("\n", $tr)); }
//Ad importation if (isset($_GET["ad-import-schedule"])) { AD_IMPORT_SCHEDULE(); exit; } if (isset($_GET["ad-import-remove-schedule"])) { AD_REMOVE_SCHEDULE(); exit; } if (isset($_GET["ad-import-perform"])) { AD_PERFORM(); exit; } //exec.hamachi.php if (isset($_GET["list-nics"])) { TCP_LIST_NICS(); exit; } if (isset($_GET["virtuals-ip-reconfigure"])) { TCP_VIRTUALS(); exit; } if (isset($_GET["QueryArticaLogs"])) { artica_update_query_fileslogs(); exit; } if (isset($_GET["ReadArticaLogs"])) { artica_update_query_logs(); exit; } if (isset($_GET["repair-artica-ldap-branch"])) {
if(isset($_GET["restart-fetchmail"])){RestartFetchmail();exit;} if(isset($_GET["fetchmail-status"])){fetchmail_status();exit;} if(isset($_GET["fetchmail-logs"])){fetchmail_logs();exit;} //Ad importation if(isset($_GET["ad-import-schedule"])){AD_IMPORT_SCHEDULE();exit;} if(isset($_GET["ad-import-remove-schedule"])){AD_REMOVE_SCHEDULE();exit;} if(isset($_GET["ad-import-perform"])){AD_PERFORM();exit;} if(isset($_GET["ou-ldap-import-schedules"])){LDAP_IMPORT_SCHEDULE();exit;} if(isset($_GET["ou-ldap-import-schedules"])){LDAP_IMPORT_EXEC();exit;} //exec.hamachi.php if(isset($_GET["list-nics"])){TCP_LIST_NICS();exit;} if(isset($_GET["virtuals-ip-reconfigure"])){TCP_VIRTUALS();exit;} if(isset($_GET["vlan-ip-reconfigure"])){TCP_VLANS();exit;} if(isset($_GET["nicstatus"])){TCP_NIC_STATUS();exit;} if(isset($_GET["QueryArticaLogs"])){artica_update_query_fileslogs();exit;} if(isset($_GET["ReadArticaLogs"])){artica_update_query_logs();exit;} if(isset($_GET["repair-artica-ldap-branch"])){RepairArticaLdapBranch();exit;} //certitifcate if(isset($_GET["ChangeSSLCertificate"])){ChangeSSLCertificate();exit;} if(isset($_GET["postfix-certificate"])){postfix_certificate();exit;} if(isset($_GET["certificate-viewinfos"])){certificate_infos();exit;} if(isset($_GET["postfix-perso-settings"])){postfix_perso_settings();exit;}