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


PHP mysql_squid_builder::COUNT_CATEGORIES方法代码示例

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


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

示例1: page

function page()
{
    $sock = new sockets();
    $EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
    $MalwarePatrolDatabasesCount = $sock->getFrameWork("cmd.php?MalwarePatrolDatabasesCount=yes");
    if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
        return;
    }
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $users = new usersMenus();
    $websitesnums = $q->COUNT_ROWS("visited_sites");
    $websitesnums = numberFormat($websitesnums, 0, "", " ");
    $sql = "DELETE FROM categorize WHERE LENGTH(pattern)=0";
    $q->QUERY_SQL($sql);
    $export = $q->COUNT_ROWS("categorize");
    $export = numberFormat($export, 0, "", " ");
    $categories = $q->COUNT_CATEGORIES();
    $categories = numberFormat($categories, 0, "", " ");
    $tablescat = $q->LIST_TABLES_CATEGORIES();
    $tablescatNUM = numberFormat(count($tablescat), 0, "", " ");
    $q = new mysql_squid_builder();
    $requests = $q->EVENTS_SUM();
    $requests = numberFormat($requests, 0, "", " ");
    $PhishingURIS = $q->COUNT_ROWS("uris_phishing");
    $PhishingURIS = numberFormat($PhishingURIS, 0, "", " ");
    $MalwaresURIS = $q->COUNT_ROWS("uris_malwares");
    $MalwaresURIS = numberFormat($MalwaresURIS, 0, "", " ");
    $Computers = $q->COUNT_ROWS("webfilters_nodes");
    $Computers = numberFormat($Computers, 0, "", " ");
    $DAYSNumbers = $q->COUNT_ROWS("tables_day");
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT SUM(totalsize) as tsize FROM tables_day"));
    $totalsize = FormatBytes($ligne["tsize"] / 1024);
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT AVG(cache_perfs) as pourc FROM tables_day"));
    $pref = round($ligne["pourc"]);
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT COUNT(sitename) as tcount FROM visited_sites WHERE LENGTH(category)=0"));
    $websitesnumsNot = numberFormat($ligne["tcount"], 0, "", " ");
    $CachePermformance = $q->CachePerfHour();
    if ($CachePermformance > -1) {
        $color = "#E01313";
        if ($CachePermformance > 20) {
            $color = "#6DBB6A";
        }
        $cachePerfText = "\n\t\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b style='color:{$color}'>{$CachePermformance}%</b> {cache_performance} ({now})</td>\n\t\t</tr>\n\t\t";
    }
    $mouse = "OnMouseOver=\";this.style.cursor='pointer';\" OnMouseOut=\";this.style.cursor='default';\"";
    $submenu = "\t\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$totalsize}</b> {downloaded_flow}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$pref}%</b> {cache_performance}</td>\n\t</tr>\n\t";
    $main_table = "\n\t<table style='width:98%' class=form>\n\t<tr><td style='font-size:16px'>{statistics}::{status}</td></tr>\n\t{$cachePerfText}\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;><b>{$DAYSNumbers}</b> {daysOfStatistics}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$requests}</b> {requests}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$Computers}</b> {computers}</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$websitesnums}</b> {visited_websites}</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$categories}</b> {websites_categorized}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$PhishingURIS}</b> {phishing_uris}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$MalwaresURIS}</b> {viruses_uris}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$MalwarePatrolDatabasesCount}</b> Malware Patrol</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$websitesnumsNot}</b> {not_categorized}</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$tablescatNUM}</b> {categories}</td>\n\t</tr>\n\t</table>\t\n";
    $main_table = $tpl->_ENGINE_parse_body($main_table);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $main_table);
    echo $main_table;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:53,代码来源:android.squid.stats.status.php

示例2: myhome2

function myhome2(){
	$page=CurrentPageName();
	$q=new mysql_squid_builder();
	$tpl=new templates();
	$categories=$q->COUNT_CATEGORIES();
	$categories=numberFormat($categories,0,""," ");
	
	$tablescat=$q->LIST_TABLES_CATEGORIES();
	$tablescatNUM=numberFormat(count($tablescat),0,""," ");	
	
	$PhishingURIS=$q->COUNT_ROWS("uris_phishing");
	$PhishingURIS=numberFormat($PhishingURIS,0,""," ");	
	
	
	$MalwaresURIS=$q->COUNT_ROWS("uris_malwares");
	$MalwaresURIS=numberFormat($MalwaresURIS,0,""," ");	
	
	$sql="SELECT COUNT(category) as tcount FROM usersisp_catztables WHERE userid='{$_SESSION["uid"]}' AND blck=0";
	$ligne=@mysql_fetch_array($q->QUERY_SQL($sql));
	$PersonalBlacklists=$ligne["tcount"];
	
	$sql="SELECT COUNT(category) as tcount FROM usersisp_catztables WHERE userid='{$_SESSION["uid"]}' AND blck=1";
	$ligne=@mysql_fetch_array($q->QUERY_SQL($sql));
	$PersonalWhitelists=$ligne["tcount"];

	

	
	$html="
	
	<table style='width:99%' class=form>
	<tbody>
	<tr>
	<td width=1% valign='top'><img src='img/webfilter-64.png'></td>
	<td width=99% valign='top'>
		<table style='width:100%'>
			<tbody>
				<tr>
					<td colspan=2><div style='font-size:16px'>{webfiltering_service}</div></td>
				</tr>
				<tr>
					<td valign='top' $mouse style='font-size:14px;text-decoration:underline' OnClick=\"blur()\"><b>$tablescatNUM</b> {categories}</td>
				</tr>		
				<tr>
					<td valign='top' $mouse style='font-size:14px;text-decoration:underline' OnClick=\"blur()\"><b>$categories</b> {websites_categorized}</td>
				</tr>
				<tr>
					<td valign='top' $mouse style='font-size:14px;text-decoration:underline' OnClick=\"blur()\"><b>$PhishingURIS</b> {phishing_uris}</td>
				</tr>	
				<tr>
					<td valign='top' $mouse style='font-size:14px;text-decoration:underline' OnClick=\"blur()\"><b>$MalwaresURIS</b> {viruses_uris}</td>
				</tr>				
			</tbody>
		</table>
	</td>
	</tr>
	</tbody>
	</table>	
	<br>
	<table style='width:99%' class=form>
	<tbody>
	<tr>
		<td width=1% valign='top'><img src='img/web-ssl-64.png'></td>
		<td width=99% valign='top'>
		<table style='width:100%'>
			<tbody>
				<tr>
					<td colspan=2><div style='font-size:16px'>{your_settings}</div></td>
				</tr>
				<tr>
					<td valign='top' $mouse style='font-size:14px;text-decoration:underline' OnClick=\"javascript:QuickLinkSystems('section_webfiltering_dansguardian')\"><b>$PersonalBlacklists</b> {blacklist_categories}</td>
				</tr>	
				<tr>
					<td valign='top' $mouse style='font-size:14px;text-decoration:underline' OnClick=\"javascript:QuickLinkSystems('section_webfiltering_dansguardian')\"><b>$PersonalWhitelists</b> {whitelist_categories}</td>
				</tr>
			</tbody>
		</table>
		</td>
	</td>
	</tr>
	</tbody>
	</table>	
	
	<script>
		LoadAjax('myhome3','$page?myhome3=yes');
	</script>
	";
	
	echo $tpl->_ENGINE_parse_body($html);
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:91,代码来源:squid.users.homepage.php

示例3: squid_status_stats

function squid_status_stats(){
	$page=CurrentPageName();
	$tpl=new templates();	
	$q=new mysql_squid_builder();
	
	$websitesnums=$q->COUNT_ROWS("visited_sites");
	$websitesnums=numberFormat($websitesnums,0,""," ");	
	
	
	$categories=$q->COUNT_CATEGORIES();
	$categories=numberFormat($categories,0,""," ");

	$q=new mysql_squid_builder();
	$requests=$q->EVENTS_SUM();
	$requests=numberFormat($requests,0,""," ");	
	
	$DAYSNumbers=$q->COUNT_ROWS("tables_day");
	
	$ligne=mysql_fetch_array($q->QUERY_SQL("SELECT SUM(totalsize) as tsize FROM tables_day"));
	$totalsize=FormatBytes($ligne["tsize"]/1024);
	
	$ligne=mysql_fetch_array($q->QUERY_SQL("SELECT AVG(cache_perfs) as pourc FROM tables_day"));
	$pref=round($ligne["pourc"]);	

$html="
<table style='width:100%'>
	<tbody>
	<tr>
		<td valign='top' style='font-size:14px'><b>$DAYSNumbers</b> {daysOfStatistics}</td>
	</tr>
	<tr>
		<td valign='top' style='font-size:14px'><b>$requests</b> {requests}</td>
	</tr>
	<tr>
		<td valign='top' style='font-size:14px'><b>$websitesnums</b> {visited_websites}</td>
	</tr>		
	<tr>
		<td valign='top' style='font-size:14px'><b>$categories</b> {websites_categorized}</td>
	</tr>			
	<tr>
		<td valign='top' style='font-size:14px'><b>$totalsize</b> {downloaded_flow}</td>
	</tr>
	<tr>
		<td valign='top' style='font-size:14px'><b>$pref%</b> {cache_performance}</td>
	</tr>	
	</tbody>
	</table>";

echo $tpl->_ENGINE_parse_body($html);
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:51,代码来源:squid.members.statistics.php

示例4: subtitle_categories

function subtitle_categories(){
	if(CACHE_SESSION_GET(__FUNCTION__, __FILE__,15)){return;}
	$tpl=new templates();
	$q=new mysql_squid_builder();
	$categories=$q->COUNT_CATEGORIES();
	$categories=numberFormat($categories,0,""," ");
	$tablescat=$q->LIST_TABLES_CATEGORIES();
	$tablescatNUM=numberFormat(count($tablescat),0,""," ");		
	$html="<div style='font-size:16px'><b>$categories</b> {websites_categorized}&nbsp;|&nbsp;<b>$tablescatNUM</b> {categories}</div>";
	CACHE_SESSION_SET(__FUNCTION__, __FILE__, $tpl->_ENGINE_parse_body($html));
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:11,代码来源:squid.categories.php

示例5: squid_status_stats

function squid_status_stats()
{
    $off = "<script>UnlockPage();</script>";
    if (!$GLOBALS["AS_ROOT"]) {
        $cachefile = "/usr/share/artica-postfix/ressources/logs/web/traffic.statistics.html";
        if (is_file($cachefile)) {
            $tpl = new templates();
            $cacheContent = @file_get_contents($cachefile);
            if (strlen($cacheContent) > 20) {
                echo $tpl->_ENGINE_parse_body(@file_get_contents($cachefile)) . $off;
                return;
            }
        }
    }
    if (CACHE_SESSION_GET(__FUNCTION__, __FILE__)) {
        return;
    }
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " Loading classes<br>\n";
    }
    $sock = new sockets();
    $users = new usersMenus();
    $EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
    $SquidActHasReverse = $sock->GET_INFO("SquidActHasReverse");
    if (!is_numeric($SquidActHasReverse)) {
        $SquidActHasReverse = 0;
    }
    if ($EnableRemoteStatisticsAppliance == 1) {
        return;
    }
    $DisableArticaProxyStatistics = $sock->GET_INFO("DisableArticaProxyStatistics");
    if (!is_numeric($DisableArticaProxyStatistics)) {
        $DisableArticaProxyStatistics = 0;
    }
    $MalwarePatrolDatabasesCount = $sock->getFrameWork("cmd.php?MalwarePatrolDatabasesCount=yes");
    $mouse = "OnMouseOver=\";this.style.cursor='pointer';\" OnMouseOut=\";this.style.cursor='default';\"";
    $EnableMacAddressFilter = $sock->GET_INFO("EnableMacAddressFilter");
    if (!is_numeric($EnableMacAddressFilter)) {
        $EnableMacAddressFilter = 1;
    }
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " Loading mysql_storelogs()<br>\n";
    }
    $syslogs = new mysql_storelogs();
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " Count accesslogs<br>\n";
    }
    $SyslogsFiles = $syslogs->COUNT_ROWS("accesslogs");
    $TR_ACCESSLOG = "\n\t<tr>\n\t<td width=1%><img src='img/arrow-right-16.png'></td>\n\t<td valign='top' {$mouse} style='font-size:12px;text-decoration:underline' \n\t\tOnClick=\"javascript:Loadjs('squid.accesses.rotate.php')\"><b><span style='font-size:12px'>{$SyslogsFiles}</span></b><span style='font-size:12px'> {access_logs}</td>\n\t</tr>";
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    if ($users->PROXYTINY_APPLIANCE) {
        $DisableArticaProxyStatistics = 1;
    }
    if ($DisableArticaProxyStatistics == 0) {
        $websitesnums = $q->COUNT_ROWS("visited_sites");
        $websitesnums = numberFormat($websitesnums, 0, "", " ");
        $sql = "DELETE FROM categorize WHERE LENGTH(pattern)=0";
        $q->QUERY_SQL($sql);
        $export = $q->COUNT_ROWS("categorize");
        $export = numberFormat($export, 0, "", " ");
    }
    $catz = new mysql_catz();
    $categories = $catz->COUNT_CATEGORIES();
    $categories = numberFormat($categories, 0, "", " ");
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " categories= {$categories}<br>\n";
    }
    $YourItems = $q->COUNT_CATEGORIES();
    $YourItems = numberFormat($YourItems, 0, "", " ");
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " LIST_TABLES_CATEGORIES()<br>\n";
    }
    $tablescat = $q->LIST_TABLES_CATEGORIES();
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " tablescat={$tablescat}<br>\n";
    }
    $tablescatNUM = numberFormat(count($tablescat), 0, "", " ");
    if ($DisableArticaProxyStatistics == 0) {
        if ($GLOBALS["VERBOSE"]) {
            echo __LINE__ . " EVENTS_SUM()<br>\n";
        }
        $requests = $q->EVENTS_SUM();
        $requests = numberFormat($requests, 0, "", " ");
        if ($GLOBALS["VERBOSE"]) {
            echo __LINE__ . " requests = {$requests}<br>\n";
        }
    }
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " no_license -> translate<br>\n";
    }
    $nolicense = $tpl->_ENGINE_parse_body("{no_license}");
    $PhishingURIS = $q->COUNT_ROWS("categoryuris_phishing");
    $PhishingURIS = numberFormat($PhishingURIS, 0, "", " ");
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " >COUNT_ROWS('categoryuris_malware')<br>\n";
    }
    $MalwaresURIS = $q->COUNT_ROWS("categoryuris_malware");
    $MalwaresURIS = numberFormat($MalwaresURIS, 0, "", " ");
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:squid.traffic.statistics.php


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