当前位置: 首页>>代码示例>>PHP>>正文


PHP sockets::EnableUfdbGuard方法代码示例

本文整理汇总了PHP中sockets::EnableUfdbGuard方法的典型用法代码示例。如果您正苦于以下问题:PHP sockets::EnableUfdbGuard方法的具体用法?PHP sockets::EnableUfdbGuard怎么用?PHP sockets::EnableUfdbGuard使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sockets的用法示例。


在下文中一共展示了sockets::EnableUfdbGuard方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: page_active_directory

function page_active_directory()
{
    $acl = new squid_acls();
    $ad = new external_ad_search();
    $DNDUMP = $ad->DNDUMP($_GET["LoadGroupSettings"]);
    $GroupName = $DNDUMP["samaccountname"][0];
    $RULES = $acl->GetRulesFromADGroup($GroupName);
    if ($GLOBALS["VERBOSE"]) {
        echo "<span style='color:red;font-size:22px'>{$GroupName}:: " . count($RULES) . " RULES</span><br>\n";
    }
    if (is_array($RULES)) {
        while (list($key, $ligne) = each($RULES)) {
            $MAIN_SQUIDRULES[$key] = $ligne;
        }
        if ($GLOBALS["VERBOSE"]) {
            echo "<span style='color:red;font-size:28px'>{$GroupName}:: \$MAIN_SQUIDRULES:" . count($MAIN_SQUIDRULES) . " RULES</span><br>\n";
        }
    }
    $sock = new sockets();
    if ($sock->EnableUfdbGuard() == 1) {
        $MAIN_WEBRULES[0] = "{default}";
        $RULES = $acl->GetWebfilteringRulesFromADGroup($GroupName);
        if ($GLOBALS["VERBOSE"]) {
            echo "<span style='color:red;font-size:22px'>{$GroupName}:: " . count($RULES) . " RULES</span><br>\n";
        }
        if (is_array($RULES)) {
            while (list($key, $ligne) = each($RULES)) {
                $MAIN_WEBRULES[$key] = $ligne;
            }
            if ($GLOBALS["VERBOSE"]) {
                echo "<span style='color:red;font-size:22px'>{$GroupName}:: \$MAIN_WEBRULES:" . count($MAIN_WEBRULES) . " RULES</span><br>\n";
            }
        }
    }
    if (count($MAIN_SQUIDRULES) > 0) {
        $rules_title = "{rules}";
        if (count($MAIN_SQUIDRULES) < 2) {
            $rules_title = "{rule}";
        }
        while (list($aclid, $aclname) = each($MAIN_SQUIDRULES)) {
            $jsGRP = "Loadjs('squid.acls-rules.php?Addacl-js=yes&ID={$aclid}');";
            $XTRGB[] = "<tr>\n\t\t\t<td style='width:48px'><img src='img/folder-script-database-48.png'></td>\n\t\t\t<td style='font-size:22px'><a href=\"javascript:blur();\" OnClick=\"javascript:{$jsGRP}\"\n\t\t\tstyle='text-decoration:underline'>{$aclname}</a></td>\n\t\t\t</tr>";
        }
        $proxay_acls = "</tr>\n\t\t<tr style='height:70px'>\n\t\t<td valign=middle style='font-size:30px' class=legend>" . count($MAIN_SQUIDRULES) . " {$rules_title} (Proxy):</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td><table style='width:100%'>" . @implode("", $XTRGB) . "</table></td>\n\t\t</tr>";
    }
    if (count($MAIN_WEBRULES) > 0) {
        $XTRGB = array();
        while (list($aclid, $aclname) = each($MAIN_WEBRULES)) {
            $jsGRP = "YahooWin3('1100','dansguardian2.edit.php?ID={$aclid}&t=0','{$aclid} {$aclname}');";
            $XTRGB[] = "<tr>\n\t<td style='width:48px'><img src='img/folder-script-database-48.png'></td>\n\t<td style='font-size:22px'><a href=\"javascript:blur();\" OnClick=\"javascript:{$jsGRP}\"\n\tstyle='text-decoration:underline'>{$aclname}</a></td>\n\t</tr>";
        }
        $rules_title = "{rules}";
        if (count($MAIN_WEBRULES) < 2) {
            $rules_title = "{rule}";
        }
        $webfilter_acls = "</tr>\n\t<tr style='height:70px'>\n\t<td valign=middle style='font-size:30px' class=legend>" . count($MAIN_WEBRULES) . " {$rules_title} ({webfiltering}):</td>\n\t</tr>\n\t<tr>\n\t<td></td>\n\t<td><table style='width:100%'>" . @implode("", $XTRGB) . "</table></td>\n\t</tr>";
    }
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body("<center style='width:98%' class=form><table style='width:100%'>{$proxay_acls}{$webfilter_acls}</table></center>");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:60,代码来源:domains.edit.group.proxy-rules.php

示例2: build

function build()
{
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $unix = new unix();
    $sock = new sockets();
    $pid = $unix->get_pid_from_file($pidfile);
    if ($unix->process_exists($pid, basename(__FILE__))) {
        die;
    }
    $php = $unix->LOCATE_PHP5_BIN();
    @file_put_contents($pidfile, getmypid());
    progress("{get_system_informations}", 30);
    support_step1();
    progress("{APP_UFDBGUARD}", 40);
    $EnableUfdbGuard = intval($sock->EnableUfdbGuard());
    if ($EnableUfdbGuard == 1) {
        $ufdbguardd = $unix->find_program("ufdbguardd");
        if (is_file($ufdbguardd)) {
            shell_exec("{$php} /usr/share/artica-postfix/exec.squidguard.php --build --force --verbose >/usr/share/artica-postfix/ressources/support/build-ufdbguard.log 2>&1");
        }
    }
    progress("{get_all_logs}", 50);
    support_step2();
    progress("{get_all_logs}", 70);
    export_tables();
    progress("{compressing_package}", 90);
    support_step3();
    progress("{success}", 100);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:29,代码来源:exec.support.package.php

示例3: popup

function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $sock = new sockets();
    $EnableUfdbGuard = $sock->EnableUfdbGuard();
    $SquidActHasReverse = $sock->GET_INFO("SquidActHasReverse");
    $EnablePDNS = $sock->GET_INFO("EnablePDNS");
    if (!is_numeric($EnableUfdbGuard)) {
        $EnableUfdbGuard = 0;
    }
    if (!is_numeric($SquidActHasReverse)) {
        $SquidActHasReverse = 0;
    }
    if (!is_numeric($EnablePDNS)) {
        $EnablePDNS = 0;
    }
    $help = "<hr>\n\t<div style='text-align:right'>\n\t<a href=\"javascript:blur();\"\n\tOnClick=\"javascript:s_PopUpFull('http://proxy-appliance.org/index.php?cID=365','1024','900');\"\n\tstyle=\"font-size:16px;font-weight:bold;text-decoration:underline\">{online_help}</a>\n\t</div>";
    if ($EnablePDNS == 0) {
        echo $tpl->_ENGINE_parse_body(FATAL_ERROR_SHOW_128("{PDNS_IS_NOT_ENABLED}{$help}"));
        return;
    }
    if ($EnableUfdbGuard == 0) {
        echo $tpl->_ENGINE_parse_body(FATAL_ERROR_SHOW_128("{UFDBGUARD_NOT_ENABLED_EXPLAIN}{$help}"));
        return;
    }
    if ($SquidActHasReverse == 1) {
        echo $tpl->_ENGINE_parse_body(FATAL_ERROR_SHOW_128("{SQUID_IS_IN_REVERSE_MODE}{$help}"));
        return;
    }
    $t = time();
    $EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
    if (!is_numeric($EnableRemoteStatisticsAppliance)) {
        $EnableRemoteStatisticsAppliance = 0;
    }
    $PDSNInUfdb = $sock->GET_INFO("PDSNInUfdb");
    if (!is_numeric($PDSNInUfdb)) {
        $PDSNInUfdb = 0;
    }
    $PDSNInUfdbWebsite = $sock->GET_INFO("PDSNInUfdbWebsite");
    if ($PDSNInUfdbWebsite == null) {
        $PDSNInUfdbWebsite = "google.com";
    }
    $form = Paragraphe_switch_img("{activate_pdnsinufdb}", "{activate_pdnsinufdb_explain}", "PDSNInUfdb", $PDSNInUfdb, null, 550);
    $html = "\n\t<div id='{$t}'></div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td colspan=2>{$form}</td>\n\t</tR>\n\t<tr>\n\t<td class=legend style='font-size:16px'>{redirect_queries_to}:</td>\n\t<td>" . Field_text("PDSNInUfdbWebsite", $PDSNInUfdbWebsite, "font-size:16px;width:250px") . "</td>\n\t\t</tr>\n\n\n\t<tr>\n\t\t<td align='right' colspan=2><hr>" . button("{apply}", "Save{$t}()", "18px") . "</td>\n\t</tr>\n\t</table>\n\t{$help}\n\t\t\t<script>\n\t\t\tvar x_Save{$t}=function (obj) {\n\t\t\t\tvar tempvalue=obj.responseText;\n\t\t\t\tif(tempvalue.length>3){alert(tempvalue);}\n\t\t\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\t\t\tif(document.getElementById('squid-status')){\n\t\t\t\t\tLoadAjax('squid-status','squid.main.quicklinks.php?status=yes');\n\t\t\t\t}\n\t\t\t\tYahooWin4Hide();\n\t\t\t}\n\n\t\t\tfunction Save{$t}(){\n\t\t\t\tvar lock={$EnableRemoteStatisticsAppliance};\n\t\t\t\tif(lock==1){Loadjs('squid.newbee.php?error-remote-appliance=yes');return;}\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('PDSNInUfdbWebsite',document.getElementById('PDSNInUfdbWebsite').value);\n\t\t\t\tXHR.appendData('PDSNInUfdb',document.getElementById('PDSNInUfdb').value);\n\t\t\t\tAnimateDiv('{$t}');\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_Save{$t});\n\t\t\t}\n\n\t\t\t</script>\n\t\t\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:47,代码来源:pdns.ufdb.php

示例4: popup

function popup()
{
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $familysite = $_GET["familysite"];
    $q = new mysql_squid_builder();
    $sock = new sockets();
    $ldap = new clladp();
    if ($ldap->IsKerbAuth()) {
        $whitelist_auth = "\t<center style='width:98%' class=form>\n\t\t<center>" . button("{do_not_authenticate_this_website}", "WhiteNTLMThis{$t}()", 30) . "</center>\n\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{do_not_authenticate_this_website_explain}\n\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-ntlm-js=yes')\"\n\t\t\t\t\tstyle='text-decoration:underline'>{authentication_whitelist}</a>&nbsp;&raquo;\n\t\t\t\n\t\t\t</center>\n\t\t</center>\n\t\t<p>&nbsp;</p>";
    }
    $EnableRangeOffset = intval($sock->GET_INFO("EnableRangeOffset"));
    if ($EnableRangeOffset == 1) {
        $rangeoffset = "\t<center style='width:98%' class=form>\n\t\t\t<center>" . button("{enforce_partial_content}", "RangeOffsetLimit{$t}()", 30) . "</center>\n\t\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{enforce_partial_content_explain}\n\t\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" \n\t\t\t\t\tOnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-rangeoffsetlimit-js=yes')\"\n\t\t\t\t\tstyle='text-decoration:underline'>{partial_content_list}</a>&nbsp;&raquo;\n\t\t\t\n\t\t\t\t</center>\n\t\t\t</center>\n\t\t\t<p>&nbsp;</p>";
    }
    if ($sock->EnableUfdbGuard()) {
        $results = $q->QUERY_SQL("SELECT * FROM personal_categories");
        while ($ligne = mysql_fetch_assoc($results)) {
            $PERSO[$ligne["category"]] = true;
        }
        $results = $q->QUERY_SQL("SELECT category FROM webfilter_blks WHERE modeblk=1");
        $WHITECATS[null] = "{select}";
        while ($ligne = mysql_fetch_assoc($results)) {
            if (!isset($PERSO[$ligne["category"]])) {
                continue;
            }
            $WHITECATS[$ligne["category"]] = $ligne["category"];
        }
        $whitelist_ufdb = "\t<center style='width:98%' class=form>\n\t\t\t<center>" . button("{whitelist_this_website}", "WhiteThis{$t}()", 30) . "</center>\n\t\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{whitelist_this_website_explain}\n\t\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-www-js=yes')\"\n\t\t\t\t\t\tstyle='text-decoration:underline'>{global_whitelists}</a>&nbsp;&raquo;\t\t\n\t\t\t\t\t\t\n\t\t\t\t</center>\n\t\t\t</center>\n\t\t\t<p>&nbsp;</p>";
        $blacklist_ufdb = "\t<center style='width:98%' class=form>\n\t\t<center>" . button("{blacklist_this_website}", "BlackUFDBThis{$t}()", 30) . "</center>\n\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{blacklist_this_website_explain}\n\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-black-js=yes')\"\n\t\t\t\t\tstyle='text-decoration:underline'>{global_blacklist}</a>&nbsp;&raquo;\n\t\t\t\n\t\t\t</center>\n\t\t</center>\n\t\t<p>&nbsp;</p>";
        $white_category = "\t<p>&nbsp;</p>\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='font-size:22px' class=legend>{save_into_a_whitelisted_category}:</td>\n\t\t<td>" . Field_array_Hash($WHITECATS, "category-{$t}", null, "style:font-size:22px") . "</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><hr>" . button("{add}", "CatzThis{$t}()", 30) . "</td>\n\t</tr>\n\t</table>";
    }
    $html = "<div style='font-size:35px;margin-bottom:20px'>&laquo;&nbsp;{$familysite}&nbsp;&raquo;</div>\n\t{$whitelist_auth}\n\t{$whitelist_ufdb}\n\t{$rangeoffset}\n\t\t<center style='width:98%' class=form>\t\n\t\t<center>" . button("{do_not_cache}", "NocacheThis{$t}()", 30) . "</center>\n\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{do_not_cache_this_web_site_explain}\n\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-nocache-js=yes')\"\n\t\t\t\t\tstyle='text-decoration:underline'>{global_deny_cache_list}</a>&nbsp;&raquo;\t\t\n\t\t\t\t\t\n\t\t\t</center>\n\t\t</center>\t\n\t{$blacklist_ufdb}\t\t\t\n\t\t\t<p>&nbsp;</p>\t\t\n\t\t\t\t\n\t\t\t{$white_category}\n\t</div>\n<script>\n\nvar CallBack{$t}= function (obj) {\n\tvar res=obj.responseText;\n\tif(res.length>3){alert(res);return;}\n\tvar category=document.getElementById('category-{$t}').value;\n\tYahooWinBrowseHide();\n\tLoadjs('ufdbguard.compile.category.php?category='+category);\n}\t\nvar CallBackNocacheThis{$t}= function (obj) {\n\tvar res=obj.responseText;\n\tif(res.length>3){alert(res);return;}\n\tYahooWinBrowseHide();\n\tLoadjs('squid.global.wl.center.progress.php');\n}\nfunction CatzThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('add-to-cat', '{$familysite}');\n\tXHR.appendData('category', document.getElementById('category-{$t}').value);\t      \n\tXHR.sendAndLoad('{$page}', 'POST',CallBack{$t});  \t\t\t\n}\n\nfunction NocacheThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('nocache_single', '{$familysite}');    \n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBackNocacheThis{$t}); \n\n}\n\nfunction RangeOffsetLimit{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('rangeoffsetlimit_single', '{$familysite}');    \n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBackNocacheThis{$t}); \n}\n\nfunction WhiteNTLMThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('nonntlm_single', '{$familysite}');    \n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBackNocacheThis{$t}); \n\n}\n\nvar CallBack2{$t}= function (obj) {\n\tvar res=obj.responseText;\n\tif(res.length>3){alert(res);return;}\n\tvar category=document.getElementById('category-{$t}').value;\n\tYahooWinBrowseHide();\n\tLoadjs('squid.compile.whiteblack.progress.php');\n}\n\t\n// \nfunction WhiteThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('whitelist-single', '{$familysite}');\t\t\n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBack2{$t}); \n\n\t}\nfunction BlackUFDBThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('blacklist-single', '{$familysite}');\t\t\n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBack2{$t}); \n\n\t}\t\n\n</script>\t\t\t\n\t\t\t\n\t\t\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:36,代码来源:squid.access.webfilter.tasks.php

示例5: all_status


//.........这里部分代码省略.........
	$tr[]=$APP_HAARP;
	$tr[]=$APP_HYPERCACHE_WEB;
	$tr[]=$APP_SAMBA_WINBIND;
	$tr[]=$APP_CNTLM;
	$tr[]=$APP_CNTLM_PARENT;
	$tr[]=$dansguardian_status;
	$tr[]=$kav;
	$tr[]=$cicap;
	$tr[]=$DNSCACHE;
	$tr[]=$CLAMAV;
	$tr[]=$APP_PROXY_PAC;
	$tr[]=$APP_SQUIDGUARD_HTTP;
	$tr[]=$APP_SARG;
	$tr[]=$HOTSPOT_WWW;
	$tr[]=$HOTSPOT_SERVICE;
	
	$tr[]=$HOTSPOT_FW;
	$tr[]=$APP_ZIPROXY;
	$tr[]=$APP_UFDBGUARD;
	$tr[]=$APP_UFDBGUARD_CLIENT;
	$tr[]=$APP_UFDBCAT;
	$tr[]=$APP_ARTICADB;
	$tr[]=$APP_SQUID_DB;
	$tr[]=$APP_FTP_PROXY;

	$tr[]=$UCARP_MASTER;
	$tr[]=$UCARP_SLAVE;
	
	if(isset($_GET["miniadmin"])){
		echo $tpl->_ENGINE_parse_body(CompileTr3($tr,true));
		return;
		
	}
	$EnableUfdbGuard=$sock->EnableUfdbGuard();
	if(!is_numeric($EnableUfdbGuard)){$EnableUfdbGuard=0;}
	if(!$users->APP_UFDBGUARD_INSTALLED){$EnableUfdbGuard=0;}
	
	$tables[]="<div style='min-height:350px;'>
		<table style='width:100%' class='TableRemove TableMarged'><tr>";
	$t=0;
	while (list ($key, $line) = each ($tr) ){
			$line=trim($line);
			if($line==null){continue;}
			$t=$t+1;
			$tables[]="<td valign='top'>$line</td>";
			if($t==2){$t=0;$tables[]="</tr><tr>";}
			}
	
	if($t<2){
		for($i=0;$i<=$t;$i++){
			$tables[]="<td valign='top'>&nbsp;</td>";				
		}
	}
	

	

	$SquidBoosterMemText="
		<tr>
			<td width=1%><img src='img/memory-32.png'></td>
			<td><div id='ptx-status'></div></td>
		</tr>
	";
	
	
	
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:64,代码来源:squid.main.quicklinks.php

示例6: rules_toolbox_left

function rules_toolbox_left()
{
    if (!isset($_GET["t"])) {
        $_GET["t"] = time();
    }
    $updateutility = null;
    $q = new mysql_squid_builder();
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $mouse = "OnMouseOver=\";this.style.cursor='pointer';\" OnMouseOut=\";this.style.cursor='default';\"";
    $t = $_GET["t"];
    if (!is_numeric($t)) {
        $t = time();
    }
    $Computers = $q->COUNT_ROWS("webfilters_nodes");
    if (!$q->TABLE_EXISTS("webfilter_certs")) {
        $q->CheckTables();
    }
    if ($q->COUNT_ROWS("webfilter_certs") == 0) {
        $q->fill_webfilter_certs();
    }
    $Computers = numberFormat($Computers, 0, "", " ");
    $sock = new sockets();
    $EnableUfdbGuard = intval($sock->EnableUfdbGuard());
    $tablescat = $q->LIST_TABLES_CATEGORIES();
    $CountDeCategories = numberFormat(count($tablescat), 0, "", " ");
    $categoryuris_malware = numberFormat($q->COUNT_ROWS("categoryuris_malware"), 0, "", " ");
    $disable_service = $tpl->_ENGINE_parse_body("{disable_service}");
    $datasUFDB = unserialize(base64_decode($sock->GET_INFO("ufdbguardConfig")));
    if (!is_numeric($datasUFDB["DebugAll"])) {
        $datasUFDB["DebugAll"] = 0;
    }
    $update_parameters = $tpl->_ENGINE_parse_body("{update_parameters}");
    $EnableWebProxyStatsAppliance = $sock->GET_INFO("EnableWebProxyStatsAppliance");
    $SquidDatabasesUtlseEnable = $sock->GET_INFO("SquidDatabasesUtlseEnable");
    $UseRemoteUfdbguardService = $sock->GET_INFO("UseRemoteUfdbguardService");
    $UFDB = unserialize(base64_decode($sock->GET_INFO("ufdbguardConfig")));
    $EnableKerbAuth = $sock->GET_INFO("EnableKerbAuth");
    $SquidPerformance = intval($sock->GET_INFO("SquidPerformance"));
    if (!is_numeric($UseRemoteUfdbguardService)) {
        $UseRemoteUfdbguardService = 0;
    }
    if (!is_numeric($EnableWebProxyStatsAppliance)) {
        $EnableWebProxyStatsAppliance = 0;
    }
    if (!is_numeric($UseRemoteUfdbguardService)) {
        $UseRemoteUfdbguardService = 0;
    }
    if (!is_numeric($EnableKerbAuth)) {
        $EnableKerbAuth = 0;
    }
    if (!is_numeric($SquidDatabasesUtlseEnable)) {
        $SquidDatabasesUtlseEnable = 1;
    }
    $SquidDatabasesArticaEnable = $sock->GET_INFO("SquidDatabasesArticaEnable");
    if (!is_numeric($SquidDatabasesArticaEnable)) {
        $SquidDatabasesArticaEnable = 1;
    }
    if ($EnableWebProxyStatsAppliance == 1) {
        $EnableUfdbGuard = 1;
    }
    if ($UseRemoteUfdbguardService == 0) {
        if ($UFDB["UseRemoteUfdbguardService"] == 1) {
            $sock->SET_INFO("UseRemoteUfdbguardService", 1);
            $UseRemoteUfdbguardService = 1;
        }
    }
    if ($users->WEBSTATS_APPLIANCE) {
        $EnableWebProxyStatsAppliance = 1;
    }
    if (!$users->APP_UFDBGUARD_INSTALLED) {
        $EnableUfdbGuard = 0;
    }
    if ($users->UPDATE_UTILITYV2_INSTALLED) {
        $updateutility = "\t<tr>\n\t\t<td valign='middle' width=1%><img src='img/kaspersky-update-32.png'></td>\n\t\t<td valign='middle' width=99%>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td valign='middle' width=1%><img src='img/arrow-right-16.png'></td>\n\t\t\t\t<td valign='top' {$mouse} style='font-size:13px;text-decoration:underline' \n\t\t\t\tOnClick=\"javascript:Loadjs('ufdbguard.UpdateUtility.php')\" nowrap>UpdateUtility</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>";
    }
    $ufdbgverb_icon = "ok24-grey.png";
    $ufdbgverb_txt = "OFF";
    if ($datasUFDB["DebugAll"] == 1) {
        $ufdbgverb_icon = "ok32.png";
        $ufdbgverb_txt = "ON";
    }
    if ($SquidDatabasesUtlseEnable == 1) {
        $SquidDatabasesUtlseEnable_P = "<tr>\n\t\t<td valign='middle' width=1%><img src='img/ok32.png'></td>\n\t\t<td valign='middle' width=99%>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td valign='middle' width=1%><img src='img/arrow-right-16.png'></td>\n\t\t\t\t<td valign='middle' {$mouse} style='font-size:13px;text-decoration:underline' \n\t\t\t\tOnClick=\"javascript:Loadjs('squid.toulouse-university.disable.php')\" nowrap>\n\t\t\t\t<b><span style='font-size:13px;text-decoration:underline'>{toulouse_university} {enabled}</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t\t</tr>\t\t\n\t\t";
    } else {
        $SquidDatabasesUtlseEnable_P = "<tr>\n\t\t<td valign='middle' width=1%><img src='img/ok32-grey.png'></td>\n\t\t<td valign='middle' width=99%>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='middle' width=1%><img src='img/arrow-right-16.png'></td>\n\t\t<td valign='middle' {$mouse} style='font-size:13px;text-decoration:underline'\n\t\tOnClick=\"javascript:Loadjs('squid.toulouse-university.disable.php')\" nowrap>\n\t\t<b><span style='font-size:13px;text-decoration:underline'>{toulouse_university} {disabled}</td>\n\t\t</tr>\n\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t";
    }
    if ($SquidDatabasesArticaEnable == 1) {
        $SquidDatabasesArticaEnable_P = "<tr>\n\t\t<td valign='middle' width=1%><img src='img/ok32.png'></td>\n\t\t<td valign='middle' width=99%>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='middle' width=1%><img src='img/arrow-right-16.png'></td>\n\t\t<td valign='middle' {$mouse} style='font-size:13px;text-decoration:underline'\n\t\tOnClick=\"javascript:Loadjs('squid.artica-databases.disable.php')\" nowrap>\n\t\t<b><span style='font-size:13px;text-decoration:underline'>{artica_databases} {enabled}</td>\n\t\t</tr>\n\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t";
    } else {
        $SquidDatabasesArticaEnable_P = "<tr>\n\t\t<td valign='middle' width=1%><img src='img/ok32-grey.png'></td>\n\t\t<td valign='middle' width=99%>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='middle' width=1%><img src='img/arrow-right-16.png'></td>\n\t\t<td valign='middle' {$mouse} style='font-size:13px;text-decoration:underline'\n\t\tOnClick=\"javascript:Loadjs('squid.artica-databases.disable.php')\" nowrap>\n\t\t<b><span style='font-size:13px;text-decoration:underline'>{artica_databases} {disabled}</td>\n\t\t</tr>\n\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t";
    }
    if (!$users->CORP_LICENSE) {
        $SquidDatabasesArticaEnable_P = "<tr>\n\t\t<td valign='middle' width=1%><img src='img/ok32-grey.png'></td>\n\t\t<td valign='middle' width=99%>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='middle' width=1%><img src='img/arrow-right-16.png'></td>\n\t\t<td valign='middle' {$mouse} style='font-size:13px;text-decoration:underline'\n\t\tOnClick=\"javascript:blur()\" nowrap>\n\t\t<b><span style='font-size:13px;text-decoration:underline'>{artica_databases} {no_license}</td>\n\t\t</tr>\n\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t";
    }
    if ($EnableUfdbGuard == 1) {
        $DisableUfdbGuard = "\n\t\t\t<tr>\n\t\t<td valign='middle' width=1%><img src='img/ok32.png'></td>\n\t\t<td valign='middle' width=99%>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td valign='middle' width=1%><img src='img/arrow-right-16.png'></td>\n\t\t\t\t<td valign='middle' {$mouse} style='font-size:13px;text-decoration:underline' \n\t\t\t\tOnClick=\"javascript:Loadjs('squid.disableUfdb.php')\" nowrap><b><span style='font-size:13px;text-decoration:underline'>{$disable_service}</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t{$SquidDatabasesArticaEnable_P}\n\t\t{$SquidDatabasesUtlseEnable_P}\t\n\t\t";
    }
    if ($UseRemoteUfdbguardService == 1) {
//.........这里部分代码省略.........
开发者ID:articatech,项目名称:artica,代码行数:101,代码来源:dansguardian2.mainrules.php

示例7: popup

function popup()
{
    $users = new usersMenus();
    $ad = new external_ad_search();
    $DNDUMP = $ad->DNDUMP($_GET["DN"]);
    $tpl = new templates();
    if (isset($DNDUMP["description"][0])) {
        $description = $DNDUMP["description"][0];
    }
    $title = $DNDUMP["samaccountname"][0];
    if (isset($DNDUMP["givenname"][0])) {
        $title = "{$DNDUMP["givenname"][0]} {$DNDUMP["sn"][0]}";
    }
    $MAIN_SQUIDRULES = array();
    $MAIN_WEBRULES = array();
    for ($i = 0; $i < $DNDUMP["memberof"]["count"]; $i++) {
        $DN = $DNDUMP["memberof"][$i];
        $XGRP = $ad->DNinfos($DN);
        $GroupName = $XGRP[0]["samaccountname"][0];
        if ($users->SQUID_INSTALLED) {
            $acl = new squid_acls();
            $RULES = $acl->GetRulesFromADGroup($GroupName);
            if ($GLOBALS["VERBOSE"]) {
                echo "<span style='color:red;font-size:22px'>{$GroupName}:: " . count($RULES) . " RULES</span><br>\n";
            }
            if (is_array($RULES)) {
                while (list($key, $ligne) = each($RULES)) {
                    $MAIN_SQUIDRULES[$key] = $ligne;
                }
                if ($GLOBALS["VERBOSE"]) {
                    echo "<span style='color:red;font-size:22px'>{$GroupName}:: \$MAIN_SQUIDRULES:" . count($MAIN_SQUIDRULES) . " RULES</span><br>\n";
                }
            }
            $sock = new sockets();
            if ($sock->EnableUfdbGuard() == 1) {
                $MAIN_WEBRULES[0] = "{default}";
                $RULES = $acl->GetWebfilteringRulesFromADGroup($GroupName);
                if ($GLOBALS["VERBOSE"]) {
                    echo "<span style='color:red;font-size:22px'>{$GroupName}:: " . count($RULES) . " RULES</span><br>\n";
                }
                if (is_array($RULES)) {
                    while (list($key, $ligne) = each($RULES)) {
                        $MAIN_WEBRULES[$key] = $ligne;
                    }
                    if ($GLOBALS["VERBOSE"]) {
                        echo "<span style='color:red;font-size:22px'>{$GroupName}:: \$MAIN_WEBRULES:" . count($MAIN_WEBRULES) . " RULES</span><br>\n";
                    }
                }
            }
        }
        $jsGRP = "Loadjs('domains.edit.group.php?js=yes&group-id=" . urlencode($DN) . "',true)";
        $XTRG[] = "<tr>\n\t\t\t\t\t<td style='width:16px'><img src='img/wingroup.png'></td>\n\t\t\t\t\t<td style='font-size:16px'><a href=\"javascript:blur();\" OnClick=\"javascript:{$jsGRP}\" style='text-decoration:underline'>{$GroupName}</a></td>\n\t\t\t\t</tr>";
    }
    if (count($MAIN_SQUIDRULES) > 0) {
        $rules_title = "{rules}";
        if (count($MAIN_SQUIDRULES) < 2) {
            $rules_title = "{rule}";
        }
        while (list($aclid, $aclname) = each($MAIN_SQUIDRULES)) {
            $jsGRP = "Loadjs('squid.acls-rules.php?Addacl-js=yes&ID={$aclid}');";
            $XTRGB[] = "<tr>\n\t\t\t<td style='width:16px'><img src='img/scripts-16.png'></td>\n\t\t\t<td style='font-size:16px'><a href=\"javascript:blur();\" OnClick=\"javascript:{$jsGRP}\" \n\t\t\t\tstyle='text-decoration:underline'>{$aclname}</a></td>\n\t\t\t</tr>";
        }
        $proxay_acls = "</tr>\n\t\t<tr style='height:70px'>\n\t\t<td valign=middle style='font-size:26px' class=legend>" . count($MAIN_SQUIDRULES) . " {$rules_title} (Proxy):</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td></td>\n\t\t<td><table style='width:100%'>" . @implode("", $XTRGB) . "</table></td>\n\t\t</tr>";
    }
    if (count($MAIN_WEBRULES) > 0) {
        $XTRGB = array();
        while (list($aclid, $aclname) = each($MAIN_WEBRULES)) {
            $jsGRP = "YahooWin3('1100','dansguardian2.edit.php?ID={$aclid}&t=0','{$aclid} {$aclname}');";
            $XTRGB[] = "<tr>\n\t\t\t<td style='width:16px'><img src='img/scripts-16.png'></td>\n\t\t\t<td style='font-size:16px'><a href=\"javascript:blur();\" OnClick=\"javascript:{$jsGRP}\"\n\t\t\tstyle='text-decoration:underline'>{$aclname}</a></td>\n\t\t\t</tr>";
        }
        $rules_title = "{rules}";
        if (count($MAIN_WEBRULES) < 2) {
            $rules_title = "{rule}";
        }
        $webfilter_acls = "</tr>\n\t\t<tr style='height:70px'>\n\t\t<td valign=middle style='font-size:26px' class=legend>" . count($MAIN_WEBRULES) . " {$rules_title} ({webfiltering}):</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td></td>\n\t\t<td><table style='width:100%'>" . @implode("", $XTRGB) . "</table></td>\n\t\t</tr>";
    }
    $picture_link = "img/impersonate-photo.png";
    $html = "\n\t\t\t\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:190px;vertical-align:top'>\n\t\t<center style='margin-top:15px'>\n\t\t<img style='border-radius: 50% 50% 50% 50%;\n    \t\tbox-shadow: 0 0 5px silver;height: 180px;margin: 0 32px;width: 180px;' src='{$picture_link}'></a>\n    <center style='font-size: 24px;line-height: 1.2;word-wrap: break-word;margin-top:30px;margin-bottom:30px'>{$title}</center>\n\n    \n    </center>\t\n\t</td>\n\t\t<td style='width:80%;vertical-aglin:top'>\n\t\t\t<table style='width:100%'>\n\t\t\t\t\t</tr>\t\t\t\n\t\t\t\t<tr style='height:70px'>\n\t\t\t\t<td valign=middle style='font-size:26px' class=legend><div>{Contact_Information}:</div><i style='font-size:16px'>{$description}</i></td>\n\t\t\t</tr>\n\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{member}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$DNDUMP["givenname"][0]} {$DNDUMP["sn"][0]}</strong></td>\n\t\t\t</tr>\t\t\t\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{name}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$DNDUMP["name"][0]}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{account}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$DNDUMP["samaccountname"][0]}</strong></td>\n\t\t\t</tr>\n\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{email}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$DNDUMP["mail"][0]}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{telephoneNumber}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$DNDUMP["telephonenumber"][0]}</strong></td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{mobile}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$DNDUMP["mobile"][0]}</strong></td>\n\t\t\t</tr>\t\t\t\n\t\t\t\t<tr style='height:70px'>\n\t\t\t\t<td valign=middle style='font-size:26px' class=legend>{$DNDUMP["memberof"]["count"]} {groups}:</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td><table style='width:100%'>" . @implode("", $XTRG) . "</table></td>\n\t\t\t</tr>\n\t\t\t{$proxay_acls}\n\t\t\t{$webfilter_acls}\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<p>&nbsp;</p>\n\t</div>\n\t\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:80,代码来源:system.member.activedirectory.php

示例8: daemons

function daemons()
{
    $ci = new cicap();
    $page = CurrentPageName();
    $sock = new sockets();
    $EnableSquidGuardInCiCAP = $sock->GET_INFO("EnableSquidGuardInCiCAP");
    $EnableUfdbGuard = intval($sock->EnableUfdbGuard());
    $EnableClamavInCiCap = $sock->GET_INFO("EnableClamavInCiCap");
    $MaxCICAPWorkTimeMin = $sock->GET_INFO("MaxCICAPWorkTimeMin");
    $MaxCICAPWorkSize = $sock->GET_INFO("MaxCICAPWorkSize");
    if (!is_numeric($MaxCICAPWorkTimeMin)) {
        $MaxCICAPWorkTimeMin = 1440;
    }
    if (!is_numeric($MaxCICAPWorkSize)) {
        $MaxCICAPWorkSize = 5000;
    }
    $CICAPListenAddress = $sock->GET_INFO("CICAPListenAddress");
    if (!is_numeric($EnableSquidGuardInCiCAP)) {
        $EnableSquidGuardInCiCAP = 0;
    }
    if (!is_numeric($EnableClamavInCiCap)) {
        $EnableClamavInCiCap = 1;
    }
    if ($CICAPListenAddress == null) {
        $CICAPListenAddress = "127.0.0.1";
    }
    $users = new usersMenus();
    if (!$users->SQUIDGUARD_INSTALLED) {
        $disableSquiduard = true;
        $EnableSquidGuardInCiCAP = 0;
    }
    if ($users->APP_UFDBGUARD_INSTALLED) {
        if ($EnableUfdbGuard == 1) {
            $disableSquiduard = true;
            $EnableSquidGuardInCiCAP = 0;
        }
    }
    if ($disableSquiduard) {
        $DisableSquidGuardCheckCicap = "DisableSquidGuardCheckCicap();";
    }
    $tcp = new networking();
    $ips = $tcp->ALL_IPS_GET_ARRAY();
    $notifyVirHTTPServer = false;
    if ($ci->main_array["CONF"]["ViralatorMode"] == 1) {
        if (preg_match('#https://(.*?)/exec#', $ci->main_array["CONF"]["VirHTTPServer"], $re)) {
            if (trim($re[1]) == null) {
                $notifyVirHTTPServer = true;
            }
            if (trim($re[1]) == "127.0.0.1") {
                $notifyVirHTTPServer = true;
            }
            if (trim($re[1]) == "localhost") {
                $notifyVirHTTPServer = true;
            }
        }
    }
    if ($notifyVirHTTPServer == true) {
        $color = "color:#d32d2d;font-weight:bolder";
    }
    for ($i = 1; $i < 13; $i++) {
        $f[$i] = $i;
    }
    $html = "\n\t\n\t<div style='font-size:26px;margin-bottom:20px'>{daemon_settings_text}</div>\n\t\n\t<input type='hidden' id='EnableClamavInCiCapCheck' value='{$EnableClamavInCiCap}'>\n\t<div id='ffmcc1' style='width:95%'  class=form>\n\t<table  style='width:100%'>\t\n\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{listen_address}:</td>\n\t\t<td style='font-size:22px'>" . Field_array_Hash($ips, 'CICAPListenAddress', $CICAPListenAddress, null, null, 0, 'font-size:22px;padding:3px') . "</td>\n\t\t<td></td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{Timeout}", "{Timeout_text}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text('Timeout', $ci->main_array["CONF"]["Timeout"], 'width:150px;font-size:22px;padding:3px') . "&nbsp;{seconds}</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:22px'>" . texttooltip("{MaxKeepAliveRequests}", "{MaxKeepAliveRequests_text}") . ":</td>\n\t\t<td>" . Field_text('MaxKeepAliveRequests', $ci->main_array["CONF"]["MaxKeepAliveRequests"], 'width:150px;font-size:22px;padding:3px') . "&nbsp;</td>\n\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:22px'>" . texttooltip("{KeepAliveTimeout}", "{KeepAliveTimeout_text}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text('KeepAliveTimeout', $ci->main_array["CONF"]["KeepAliveTimeout"], 'width:150px;font-size:22px;padding:3px') . "&nbsp;{seconds}</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:22px'>" . texttooltip("{MaxServers}", "{MaxServers_text}") . ":</td>\n\t\t<td>" . Field_text('MaxServers', $ci->main_array["CONF"]["MaxServers"], 'width:150px;font-size:22px;padding:3px') . "&nbsp;</td>\n\t</tr>\t\n\t\n\t\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:22px'>" . texttooltip("{MinSpareThreads}", "{MinSpareThreads_text}") . ":</td>\n\t\t<td>" . Field_text('MinSpareThreads', $ci->main_array["CONF"]["MinSpareThreads"], 'width:150px;font-size:22px;padding:3px') . "&nbsp;</td>\n\t</tr>\t\t\n\t\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:22px'>" . texttooltip("{MaxSpareThreads}", "{MaxSpareThreads_text}") . ":</td>\n\t\t<td>" . Field_text('MaxSpareThreads', $ci->main_array["CONF"]["MaxSpareThreads"], 'width:150px;font-size:22px;padding:3px') . "&nbsp;</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:22px'>" . texttooltip("{ThreadsPerChild}", "{ThreadsPerChild_text}") . ":</td>\n\t\t<td>" . Field_text('ThreadsPerChild', $ci->main_array["CONF"]["ThreadsPerChild"], 'width:150px;font-size:22px;padding:3px') . "&nbsp;</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:22px'>" . texttooltip("{MaxRequestsPerChild}", "{MaxRequestsPerChild_text}") . ":</td>\n\t\t<td>" . Field_text('MaxRequestsPerChild', $ci->main_array["CONF"]["MaxRequestsPerChild"], 'width:150px;font-size:22px;padding:3px') . "&nbsp;</td>\n\t</tr>\t\n\t\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{debug_mode}", "{log level_text}") . ":</td>\n\t\t<td>" . Field_array_Hash($f, "DebugLevel", $ci->main_array["CONF"]["DebugLevel"], null, null, 0, 'font-size:22px;padding:3px') . "&nbsp;</td>\n\t</tr>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td colspan=3>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 style='border-top:1px solid #CCCCCC'>&nbsp;</td>\n\t</tr>\n\n\t\t\t\t\n\t</tr>\t\n\t\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{max_time_in_tmp}", "{max_time_in_tmp_explain}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text("MaxCICAPWorkTimeMin", $MaxCICAPWorkTimeMin, 'width:150px;font-size:22px;padding:3px') . "&nbsp;{minutes}</td>\n\t</tr>\t\t\t\t\n\t</tr>\t\n\t\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{max_tempdir_size}", "{max_tempdir_size_explain}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text("MaxCICAPWorkSize", $MaxCICAPWorkSize, 'width:150px;font-size:22px;padding:3px') . "&nbsp;MB</td>\n\t</tr>\t\t\t\t\t\n\n\t\t\t\t\n\t<tr>\n\t\t<td colspan=3>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 style='border-top:1px solid #CCCCCC'>&nbsp;</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:22px'>" . texttooltip("{ViralatorMode}", "{ViralatorMode_text}") . ":</td>\n\t\t<td>" . Field_checkbox_design("ViralatorMode", 1, $ci->main_array["CONF"]["ViralatorMode"], "EnableDisableViralatorMode()") . "</td>\n\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{VirSaveDir}", "{VirSaveDir_text}") . ":</td>\n\t\t<td>" . Field_text('VirSaveDir', $ci->main_array["CONF"]["VirSaveDir"], 'width:490px;font-size:22px;padding:3px') . "&nbsp;</td>\n\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='{$color};font-size:22px'>" . texttooltip("{VirHTTPServer}", "{VirHTTPServer_text}") . ":</td>\n\t\t<td>" . Field_text('VirHTTPServer', $ci->main_array["CONF"]["VirHTTPServer"], 'width:290px;font-size:22px;padding:3px') . "&nbsp;</td>\n\t</tr>\n\t<tr>\t\n\t\t<td class=legend>{example}:</td>\n\t\t<td colspan=2><strong><a href='https://{$_SERVER['SERVER_NAME']}/exec.cicap.php?usename=%f&remove=1&file='>https://{$_SERVER['SERVER_NAME']}/exec.cicap.php?usename=%f&remove=1&file=</a></strong></td>\n\t</tr>\t\n\t\t\t\n\t\n\n\t<tr>\n\t\t<td colspan=3 align='right'>\n\t\t<hr>\n\t\t\t" . button("{apply}", "SaveIcapDaemonSet()", 26) . "\n\t\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t\n\t<script>\nvar x_SaveIcapDaemonSet=function(obj){\n     var tempvalue=obj.responseText;\n\t  if(tempvalue.length>3){alert(tempvalue);}\n\t  RefreshTab('main_config_cicap');\n\t\n\t}\t\n\t\n\tfunction SaveIcapDaemonSet(){\n\t\tvar XHR = new XHRConnection();\n\t    XHR.appendData('Timeout',document.getElementById('Timeout').value);\n\t    XHR.appendData('MaxKeepAliveRequests',document.getElementById('MaxKeepAliveRequests').value);\n\t    XHR.appendData('KeepAliveTimeout',document.getElementById('KeepAliveTimeout').value);\n\t    \n\t    XHR.appendData('MaxServers',document.getElementById('MaxServers').value);\n\t    XHR.appendData('MinSpareThreads',document.getElementById('MinSpareThreads').value);\n\t    XHR.appendData('ThreadsPerChild',document.getElementById('ThreadsPerChild').value);\n\t    XHR.appendData('MaxRequestsPerChild',document.getElementById('MaxRequestsPerChild').value);\n\t    XHR.appendData('VirSaveDir',document.getElementById('VirSaveDir').value);\n\t    XHR.appendData('VirHTTPServer',document.getElementById('VirHTTPServer').value);\n\t    XHR.appendData('DebugLevel',document.getElementById('DebugLevel').value);\n\t    XHR.appendData('CICAPListenAddress',document.getElementById('CICAPListenAddress').value);\n\t    if(document.getElementById('ViralatorMode').checked){XHR.appendData('ViralatorMode',1);}else{XHR.appendData('ViralatorMode',0);}\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveIcapDaemonSet);\n\t}\n\t\n\tfunction EnableDisableViralatorMode(){\n\t\t document.getElementById('VirSaveDir').disabled=true;\n\t     document.getElementById('VirHTTPServer').disabled=true;\n\t     if(document.getElementById('EnableClamavInCiCapCheck').value==0){return;}\n\t     \n\t     \n\t     if(document.getElementById('ViralatorMode').checked){\n\t      document.getElementById('VirSaveDir').disabled=false;\n\t      document.getElementById('VirHTTPServer').disabled=false;\n\t\t }\n\t\n\t}\n\t\n\tfunction DisableSquidGuardCheckCicap(){\n\t \tif(document.getElementById('EnableSquidGuardInCiCAP')){\n\t \t\tdocument.getElementById('EnableSquidGuardInCiCAP').checked=false;\n\t \t\tdocument.getElementById('EnableSquidGuardInCiCAP').disabled=true;\n\t\t}\n\t}\n\t\n\tEnableDisableViralatorMode();\n\t{$DisableSquidGuardCheckCicap}\n\t\n</script>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:66,代码来源:c-icap.index.php

示例9: build


//.........这里部分代码省略.........
        $CicapEnabled = 0;
    }
    if ($SQUIDEnable == 1) {
        if ($CicapEnabled == 1) {
            $EnableClamavDaemon = 1;
        }
    }
    if ($EnableClamavDaemonForced == 1) {
        $EnableClamavDaemon = 1;
    }
    //********************************************************************************************************************
    @unlink("/etc/monit/conf.d/APP_CLAMAV.monitrc");
    $MasterBin = $unix->find_program("clamd");
    if (is_file($MasterBin)) {
        if ($EnableClamavDaemon == 1) {
            $f = array();
            $f[] = "check process APP_CLAMAV";
            $f[] = "with pidfile /var/run/clamav/clamd.pid";
            $f[] = "start program = \"/etc/init.d/clamav-daemon start --monit\"";
            $f[] = "stop program =  \"/etc/init.d/clamav-daemon stop --monit\"";
            $f[] = "if 5 restarts within 5 cycles then timeout";
            if ($GLOBALS["OUTPUT"]) {
                echo "Stopping......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} monitoring Clamd service...\n";
            }
            @file_put_contents("/etc/monit/conf.d/APP_CLAMAV.monitrc", @implode("\n", $f));
            $f = array();
        }
    }
    //********************************************************************************************************************
    @unlink("/etc/monit/conf.d/ufdb.monitrc");
    @unlink("/etc/monit/conf.d/ufdbweb.monitrc");
    $ufdbbin = $unix->find_program("ufdbguardd");
    if (is_file($ufdbbin)) {
        $EnableUfdbGuard = $sock->EnableUfdbGuard();
        $UseRemoteUfdbguardService = $sock->GET_INFO('UseRemoteUfdbguardService');
        $EnableSquidGuardHTTPService = $sock->GET_INFO("EnableSquidGuardHTTPService");
        $SquidPerformance = intval($sock->GET_INFO("SquidPerformance"));
        $EnableWebProxyStatsAppliance = $sock->GET_INFO("EnableWebProxyStatsAppliance");
        $SquidGuardApachePort = $sock->GET_INFO("SquidGuardApachePort");
        $SquidGuardApacheSSLPort = $sock->GET_INFO("SquidGuardApacheSSLPort");
        if (!is_numeric($UseRemoteUfdbguardService)) {
            $UseRemoteUfdbguardService = 0;
        }
        if (!is_numeric($EnableUfdbGuard)) {
            $EnableUfdbGuard = 0;
        }
        if (!is_numeric($EnableSquidGuardHTTPService)) {
            $EnableSquidGuardHTTPService = 1;
        }
        if (!is_numeric($EnableWebProxyStatsAppliance)) {
            $EnableWebProxyStatsAppliance = 0;
        }
        if ($EnableUfdbGuard == 0) {
            $EnableSquidGuardHTTPService = 0;
        }
        if ($EnableWebProxyStatsAppliance == 1) {
            $EnableSquidGuardHTTPService = 1;
        }
        if (!is_numeric($SquidGuardApachePort)) {
            $SquidGuardApachePort = "9020";
        }
        if (!is_numeric($SquidGuardApacheSSLPort)) {
            $SquidGuardApacheSSLPort = 9025;
        }
        if ($SquidPerformance > 2) {
            $EnableSquidGuardHTTPService = 0;
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:67,代码来源:exec.monit.php

示例10: CheckAvailable

function CheckAvailable()
{
    $unix = new unix();
    $sock = new sockets();
    $EnableUfdbGuard = $sock->EnableUfdbGuard();
    if ($EnableUfdbGuard == 0) {
        return false;
    }
    $datas = unserialize(base64_decode($sock->GET_INFO("ufdbguardConfig")));
    if (!isset($datas["UseRemoteUfdbguardService"])) {
        $datas["UseRemoteUfdbguardService"] = 0;
    }
    if (!is_numeric($datas["remote_port"])) {
        $datas["remote_port"] = 3977;
    }
    $Detected = false;
    $f = explode("\n", @file_get_contents("/etc/squid3/squid.conf"));
    while (list($index, $line) = each($f)) {
        $line = trim($line);
        if ($line == null) {
            continue;
        }
        if (preg_match("#^url_rewrite_program.*?ufdbgclient#", $line)) {
            if ($GLOBALS["OUTPUT"]) {
                echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]}, OK CLIENT IS LINKED\n";
            }
            if ($GLOBALS["VERBOSE"]) {
                echo "`{$line}` OK\n";
                $Detected = true;
                break;
            }
        }
        if ($GLOBALS["VERBOSE"]) {
            echo "`{$line}` no match\n";
        }
    }
    if ($datas["UseRemoteUfdbguardService"] == 1) {
        $host = $datas["remote_server"];
        $port = $datas["remote_port"];
    } else {
        $array = GetLocalConf();
        $host = $array[1];
        $port = $array[0];
    }
    if ($host == "all") {
        $host = "127.0.0.1";
    }
    if ($GLOBALS["OUTPUT"]) {
        echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]}, Remote host...: {$host}\n";
    }
    if ($GLOBALS["OUTPUT"]) {
        echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]}, Remote port.....: {$port}\n";
    }
    $fsock = fsockopen($host, $port, $errno, $errstr, 5);
    if (!$fsock) {
        if ($GLOBALS["OUTPUT"]) {
            echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]}, Failed to connect to the remote Webfiltering service {$host}:{$port}\n";
        }
        squid_admin_mysql(0, "Fatal, failed to connect to the remote Webfiltering service{$GLOBALS["ADPLUS"]}", "{$datas["remote_server"]}:{$datas["remote_port"]} Error number {$errno} {$errstr}", __FILE__, __LINE__);
        return false;
    }
    if ($GLOBALS["OUTPUT"]) {
        echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]}, Success to connect to the remote Webfiltering service {$host}:{$port}\n";
    }
    return true;
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:66,代码来源:exec.ufdb-client.php

示例11: toolbox

function toolbox()
{
    $page = CurrentPageName();
    if (!isset($_SESSION["uid"])) {
        echo "<script>LoadAjax('services-status','{$page}?services-status-table=yes');</script>";
        return;
    }
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $EnableKerbAuth = $sock->GET_INFO("EnableKerbAuth");
    $EnableUfdbGuard = $sock->EnableUfdbGuard();
    if (!is_numeric($EnableKerbAuth)) {
        $EnableKerbAuth = 0;
    }
    $scripts = "\tvar x_ReconfigureUfdb= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){alert(res);}\n\t\tRefreshTab('prxytab');\n\t}\t\t\n\t\t\n\tfunction ReconfigureUfdb(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t    XHR.appendData('ReconfigureUfdb', 'yes');\n\t\t    AnimateDiv('squid-services');\n\t\t    XHR.sendAndLoad('{$page}', 'POST',x_ReconfigureUfdb); \n\t\t\n\t}";
    if ($EnableUfdbGuard == 1) {
        $ufdbbutt = Paragraphe("service-check-64.png", "UfdbGuard", "{reconfigure_webfilter_service}", "javascript:ReconfigureUfdb()");
    }
    $squid_rotate = Paragraphe("events-rotate-64.png", "Logs rotation", "{squid_logrotate_perform}", "javascript:Loadjs('squid.perf.logrotate.php?img=events-rotate-32-squid&src=events-rotate-32.png')");
    $reconfigure = Paragraphe("rebuild-64.png", "{reconfigure}", "{reconfigure}", "javascript:Loadjs('squid.compile.progress.php');");
    $debug_compile = Paragraphe("64-logs.png", "{compile_in_debug}", "{compile_in_debug}", "javascript:Loadjs('squid.debug.compile.php');");
    $current_sessions = Paragraphe("64-logs.png", "{sessions}", "{display_current_sessions}", "javascript:Loadjs('squid.squidclient.clientlist.php');");
    $performances = Paragraphe("performance-tuning-64.png", "{performance}", "{display_performance_status}", "javascript:Loadjs('squid.squidclient.info.php');");
    $restart_all_services = Paragraphe("service-restart-64.png", "{restart}", "{restart_all_services}", "javascript:Loadjs('squid.restart.php');");
    $restart_service_only = Paragraphe("service-restart-32.png", "{restart_onlysquid}", "{restart_onlysquid}", "javascript:Loadjs('squid.restart.php?onlySquid=yes');");
    $html = "<table style='width:100%'>\n\t<tr>\n\t\t<td>{$ufdbbutt}</td>\n\t\t<td>{$current_sessions}</td>\n\t\t<td>{$performances}</td>\n\t\t<td>{$squid_rotate}</td>\n\t</tr>\n\t\t<td>{$reconfigure}</td>\n\t\t<td>{$debug_compile}</td>\n\t\t<td>{$restart_service_only}</td>\n\t\t<td>&nbsp;</td>\t\t\t\t\n\t</tr>\n\t</table>\n\t\n\t<script>\n\t\tLoadAjax('services-status','{$page}?services-status-table=yes');\n\t</script>\n\t\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:29,代码来源:miniadm.prxy.monitor.php

示例12: squid_filters_infos

function squid_filters_infos()
{
    $sock = new sockets();
    if (!isset($GLOBALS["CLASS_USERS_MENUS"])) {
        $users = new usersMenus();
        $GLOBALS["CLASS_USERS_MENUS"] = $users;
    } else {
        $users = $GLOBALS["CLASS_USERS_MENUS"];
    }
    if (!$users->SQUID_INSTALLED) {
        return null;
    }
    $SQUIDEnable = $sock->GET_INFO("SQUIDEnable");
    if (!is_numeric($SQUIDEnable)) {
        $SQUIDEnable = 1;
    }
    if ($SQUIDEnable == 0) {
        if ($GLOBALS["VERBOSE"]) {
            echo "DEBUG:squid_filters_infos():: SQUIDEnable is not enabled... Aborting\n";
        }
        return;
    }
    $filtered = false;
    $EnableUfdbGuard = $sock->EnableUfdbGuard();
    $squidGuardEnabled = $sock->GET_INFO("squidGuardEnabled");
    $DansGuardianEnabled = $sock->GET_INFO("DansGuardianEnabled");
    if ($EnableUfdbGuard == 1) {
        $filtered = true;
    }
    if ($squidGuardEnabled == 1) {
        $filtered = true;
    }
    if ($DansGuardianEnabled == 1) {
        $filtered = true;
    }
    $IsIcapClient = trim($sock->getFrameWork("squid.php?IsIcapClient=yes"));
    if ($IsIcapClient == 'TRUE') {
        $filtered = true;
    }
    if (!$filtered) {
        if ($GLOBALS["VERBOSE"]) {
            echo "DEBUG:squid_filters_infos():: Not filtered\n";
        }
        return null;
    }
    $EnableCommunityFilters = $sock->GET_INFO("EnableCommunityFilters");
    if ($EnableCommunityFilters == null) {
        $EnableCommunityFilters = 1;
    }
    if ($EnableCommunityFilters != 1) {
        if ($GLOBALS["VERBOSE"]) {
            echo "DEBUG:squid_filters_infos():: EnableCommunityFilters is not enabled... Aborting\n";
        }
        return;
    }
    $sql = "SELECT count(*) as tcount FROM `dansguardian_sitesinfos` WHERE `dbpath` = ''";
    $q = new mysql();
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
    if ($GLOBALS["VERBOSE"]) {
        echo "DEBUG:squid_filters_infos():: EnableCommunityFilters {$ligne["tcount"]}\n";
    }
    if ($ligne["tcount"] == 0) {
        return null;
    }
    return NotifyAdmin("32-categories.png", $ligne["tcount"] . " {websites_not_categorized}", "{websites_not_categorized_text}", "javascript:Loadjs('squid.visited.php')", null, 300, 76, 1);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:66,代码来源:exec.admin.status.postfix.flow.php

示例13: CheckUFDBGuardConfig

function CheckUFDBGuardConfig($ForcePid = false)
{
    if ($GLOBALS["FORCE"]) {
        $ForcePid = false;
    }
    $pidtime = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".time";
    $pidFile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $pidtimeNTP = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".ntp.time";
    $unix = new unix();
    $sock = new sockets();
    if ($ForcePid) {
        $pid = $unix->get_pid_from_file($pidFile);
        if ($unix->process_exists($pid)) {
            if ($unix->PROCCESS_TIME_MIN($pid, 10) < 2) {
                return;
            }
        }
    }
    @file_put_contents($pidFile, getmypid());
    $time = $unix->file_time_min($pidtime);
    if ($time < 2) {
        return;
    }
    @unlink($pidtime);
    @file_put_contents($pidtime, time());
    $EnableUfdbGuard = $sock->EnableUfdbGuard();
    if ($EnableUfdbGuard == 0) {
        if ($GLOBALS["VERBOSE"]) {
            echo "EnableUfdbGuard = {$EnableUfdbGuard}, return...\n";
        }
        return;
    }
    $datas = unserialize(base64_decode($sock->GET_INFO("ufdbguardConfig")));
    if (!isset($datas["UseRemoteUfdbguardService"])) {
        $datas["UseRemoteUfdbguardService"] = 0;
    }
    if (!is_numeric($datas["remote_port"])) {
        $datas["remote_port"] = 3977;
    }
    $Detected = CheckUFDBGuardConfigIsClient();
    if ($Detected) {
        if ($datas["UseRemoteUfdbguardService"] == 1) {
            $fsock = fsockopen($datas["remote_server"], $datas["remote_port"], $errno, $errstr, 5);
            if (!$fsock) {
                @fclose($fsock);
                squid_admin_mysql(0, "Fatal, failed to connect to the remote Webfiltering service", "{$datas["remote_server"]}:{$datas["remote_port"]} Error number {$errno} {$errstr}", __FILE__, __LINE__);
                shell_exec("/etc/init.d/ufdb-client stop --watchdog");
            } else {
                @fclose($fsock);
                if ($GLOBALS["VERBOSE"]) {
                    echo "`{$datas["remote_server"]}:{$datas["remote_port"]}` OK\n";
                    return;
                }
            }
        }
        return;
    }
    if ($datas["UseRemoteUfdbguardService"] == 1) {
        $fsock = fsockopen($datas["remote_server"], $datas["remote_port"], $errno, $errstr, 5);
        if (!$fsock) {
            squid_admin_mysql(0, "Fatal, failed to connect to the remote Webfiltering service", "{$datas["remote_server"]}:{$datas["remote_port"]} Error number {$errno} {$errstr}", __FILE__, __LINE__);
            @fclose($fsock);
            return;
        }
    }
    if ($GLOBALS["VERBOSE"]) {
        echo "`{$datas["remote_server"]}:{$datas["remote_port"]}` OK\n";
    }
    @fclose($fsock);
    if (!$Detected) {
        shell_exec("/etc/init.d/ufdb-client start --watchdog");
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:73,代码来源:exec.squid.watchdog.php

示例14: start6

function start6()
{
    $cacheFile = "/usr/share/artica-postfix/ressources/logs/web/INTERFACE_WEBFILTER_BLOCKED.db";
    @unlink($cacheFile);
    $unix = new unix();
    $squid = $unix->LOCATE_SQUID_BIN();
    if (!is_file($squid)) {
        if ($GLOBALS["VERBOSE"]) {
            echo "start6: squid no such binary\n";
        }
        return;
    }
    $sock = new sockets();
    if ($sock->EnableUfdbGuard() == 0) {
        return;
    }
    $zday = date('Ymd');
    $table = $zday . "_blocked";
    $q = new mysql_squid_builder();
    if (!$q->TABLE_EXISTS($table)) {
        $hier = strtotime($q->HIER() . " 00:00:00");
        $zday = date('Ymd', $hier);
        $table = $zday . "_blocked";
    }
    if (!$q->TABLE_EXISTS($table)) {
        return;
    }
    $sql = "SELECT COUNT(*) as hits,HOUR(zDate) as `hour` FROM {$table} GROUP BY `hour` ORDER BY `hour`";
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        echo "{$q->mysql_error}";
        return;
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $hits = $ligne["hits"];
        $xdata[] = $ligne["hour"];
        $ydata[] = $hits;
    }
    if (count($xdata) < 2) {
        if ($GLOBALS["VERBOSE"]) {
            echo "start4(): " . count($xdata) . " < 2\n";
        }
        return;
    }
    $array = array($xdata, $ydata);
    @file_put_contents($cacheFile, serialize($array));
    @chmod($cacheFile, 0755);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:48,代码来源:exec.loadavg.php

示例15: status

function status()
{
    $sock = new sockets();
    $users = new usersMenus();
    $UseRemoteUfdbguardService = intval($sock->GET_INFO("UseRemoteUfdbguardService"));
    if ($UseRemoteUfdbguardService == 1) {
        status_client();
        exit;
    }
    $shield_ok = "shield-ok-256.png";
    $shield_disabled = "shield-grey-256.png";
    $shield_red = "shield-red-256.png";
    $shield_warn = "shield-warn-256.png";
    $ini = new Bs_IniHandler();
    $err = array();
    $tpl = new templates();
    $curs = "OnMouseOver=\"this.style.cursor='pointer';\"\n\tOnMouseOut=\"this.style.cursor='auto'\"";
    if ($sock->EnableUfdbGuard() == 0) {
        echo "<center><img src='img/{$shield_disabled}'></center>";
        return;
    }
    $ini->loadString(base64_decode($sock->getFrameWork("squid.php?ufdbguardd-all-status=yes")));
    $c = 0;
    while (list($key, $array) = each($ini->_params)) {
        $service_name = $array["service_name"];
        $service_disabled = intval($array["service_disabled"]);
        if ($service_disabled == 0) {
            continue;
        }
        $running = intval($array["running"]);
        $c++;
        if ($running == 0) {
            $icon = "disks-128-warn.png";
            $err[] = "<tr><td style='font-size:18px;color:#d32d2d;vertical-align:middle' OnClick=\"javascript:GoToServices()\">\n\t\t\t<img src='img/warn-red-32.png' style='float:left;margin-right:10px'>\n\t\t\t{{$service_name}} <span style='text-decoration:underline' {$curs}> {stopped}</span></td></tr>";
        }
    }
    if (count($err) > 0) {
        echo "<center><img src='img/{$shield_red}'></center>\n\t\t<table>" . @implode("\n", $err) . "</table>";
    } else {
        echo "<center><img src='img/{$shield_ok}'></center>";
    }
    $EnableArticaMetaClient = intval($sock->GET_INFO("EnableArticaMetaClient"));
    if ($EnableArticaMetaClient == 1) {
        $LOCAL_VERSION_TEXT = $tpl->time_to_date($sock->GET_INFO("UfdbMetaClientVersion"));
    } else {
        $MAINARR = unserialize(base64_decode($sock->GET_INFO("CATZ_ARRAY")));
        $LOCAL_VERSION_TEXT = $tpl->time_to_date($MAINARR["TIME"]);
    }
    echo $tpl->_ENGINE_parse_body("<center style='font-size:22px;margin-top:10px;font-weight:bold'>{running}</center>");
    echo $tpl->_ENGINE_parse_body("<center style='font-size:16px'>{since}:&nbsp;{$ini->_params["APP_UFDBGUARD"]["uptime"]}</center>");
    echo $tpl->_ENGINE_parse_body("<center style='font-size:16px'>{memory}:&nbsp;" . FormatBytes($ini->_params["APP_UFDBGUARD"]["master_memory"]) . "</center>");
    echo "<hr>";
    echo $tpl->_ENGINE_parse_body("<center style='font-size:16px'>{version}:&nbsp;{$LOCAL_VERSION_TEXT}</center>");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:54,代码来源:admin.dashboard.ufdbguard.php


注:本文中的sockets::EnableUfdbGuard方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。