本文整理汇总了PHP中mysql_squid_builder::COUNT_ROWS方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_squid_builder::COUNT_ROWS方法的具体用法?PHP mysql_squid_builder::COUNT_ROWS怎么用?PHP mysql_squid_builder::COUNT_ROWS使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysql_squid_builder
的用法示例。
在下文中一共展示了mysql_squid_builder::COUNT_ROWS方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xstart
function xstart()
{
$unix = new unix();
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . ".pid";
$pidtime = "/etc/artica-postfix/pids/" . basename(__FILE__) . ".time";
$pid = $unix->get_pid_from_file($pidfile);
if ($unix->process_exists($pid, basename(__FILE__))) {
return;
}
$TimeExec = $unix->file_time_min($pidtime);
if ($TimeExec < 360) {
return;
}
@unlink($pidtime);
@file_put_contents($pidtime, time());
@file_put_contents($pidfile, getmypid());
$php5 = $unix->LOCATE_PHP5_BIN();
$q = new mysql_squid_builder();
$q->CreateCategoryUrisTable("malware");
$COUNT1 = $q->COUNT_ROWS("categoryuris_malware");
vxvault();
malwareurls_joxeankoret();
clean_mx_de();
$COUNT2 = $q->COUNT_ROWS("categoryuris_malware");
$URLS_ADDED = $COUNT2 - $COUNT1;
if ($URLS_ADDED > 0) {
system("{$php5} /usr/share/artica-postfix/exec.squidguard.php --compile-category malware");
squid_admin_mysql(2, "{$URLS_ADDED} malware URLs added", null, __FILE__, __LINE__);
}
}
示例2: page
function page()
{
//dashboard_user_day
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql_squid_builder();
$html = "<div style='width:1490'>\n\t<div style='float:right'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjaxRound('squid-top-stats','squid.statistics.top.php');") . "</div>\n\t<div style='font-size:30px'>{top_web}: " . DATE_START() . "</div>\n\t";
if ($q->COUNT_ROWS("dashboard_countwebsite_day") > 1) {
$tr[] = "\n\t\t<tr>\n\t\t\t<td style='width:100%'>\n\t\t\t\t<div style='width:745;height:700px' id='top-web-site-size'></div>\n\t\t\t</td>\t\t\n\t\t\t<td style='width:100%'>\n\t\t\t\t<div style='width:745;height:700px' id='top-web-site-hits'></div>\n\t\t\t</td>\t\n\t\t</tr>\n\t\t";
$js[] = "Loadjs('{$page}?top-web-site-size=yes');";
$js[] = "Loadjs('{$page}?top-web-site-hits=yes');";
}
if ($q->COUNT_ROWS("dashboard_user_day") > 1) {
$tr[] = "\n\t\t<tr>\n\t\t\t<td colspan=2><hr></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style='width:100%'>\n\t\t\t\t<div style='width:745;height:700px' id='top-web-user-size'></div>\n\t\t\t</td>\n\t\t\t<td style='width:100%'>\n\t\t\t\t<div style='width:745;height:700px' id='top-web-user-hits'></div>\n\t\t\t</td>\n\t\t</tr>\n\t\t";
$js[] = "Loadjs('{$page}?top-web-user-size=yes');";
$js[] = "Loadjs('{$page}?top-web-user-hits=yes');";
}
if ($q->COUNT_ROWS("dashboard_blocked_day") > 1) {
$tr[] = "\n\t\t<tr>\n\t\t\t<td colspan=2><hr></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style='width:100%'>\n\t\t\t\t<div style='width:745;height:700px' id='top-web-blocked-site'></div>\n\t\t\t</td>\n\t\t\t<td style='width:100%'>\n\t\t\t\t<div style='width:745;height:700px' id='top-web-blocked-category'></div>\n\t\t\t</td>\n\t\t</tr>\n\t\t";
$js[] = "Loadjs('{$page}?top-web-blocked-site=yes');";
$js[] = "Loadjs('{$page}?top-web-blocked-category=yes');";
}
$html = $html . "<table style='width:100%'>" . @implode("\n", $tr) . "</table></div>\n\t<script>\t\t\n\t\t\t\n\t" . @implode("\n", $js) . "</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例3: 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;
}
示例4: status
function status(){
$q=new mysql_squid_builder();
$page=CurrentPageName();
$tpl=new templates();
$total=FormatNumber($q->COUNT_ROWS("dansguardian_community_categories","artica_backup"),0,'.',' ',3);
$sql="SELECT count(*) as tcount FROM `dansguardian_sitesinfos` WHERE `dbpath` = ''";
$ligne=@mysql_fetch_array($q->QUERY_SQL($sql,'artica_backup'));
$websites_not_categorized=$tpl->_ENGINE_parse_body("{websites_not_categorized}");
$pp=$tpl->_ENGINE_parse_body(Paragraphe("64-categories.png",$ligne["tcount"]." $websites_not_categorized",
"{websites_not_categorized_text}","javascript:Loadjs('squid.visited.php')",null,300,76));
$html="
<table style='width:100%'>
<tr>
<td valign='top'><img src='img/webfilter-community-128.png'></td>
<td valign='top' width=99%'>
<div class=text-info>{APP_WEBFILTER_COMMUNITY_EXPLAIN}</div>
<div style='font-size:14px;font-weight:bold'>$total {websites} ({community})</div>
$pp
</td>
</tr>
</table>
";
echo $tpl->_ENGINE_parse_body($html);
}
示例5: section_websites_search
function section_websites_search()
{
$boot = new boostrap_form();
$tpl = new templates();
$q = new mysql_squid_builder();
$page = CurrentPageName();
$table = "visited_sites_tot";
$searchstring = string_to_flexquery("sites-search");
$ORDER = $boot->TableOrder(array("size" => "ASC"));
if ($q->COUNT_ROWS($table) == 0) {
senderrors("no data");
}
$sql = "SELECT * FROM {$table} WHERE 1 {$searchstring} ORDER BY {$ORDER} LIMIT 0,250";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
senderrors($q->mysql_error . "<br>{$sql}");
}
while ($ligne = mysql_fetch_assoc($results)) {
$md = md5(serialize($ligne));
$ligne["size"] = FormatBytes($ligne["size"] / 1024);
$sitenameenc = urlencode($ligne["familysite"]);
$js = "Loadjs('miniadm.webstats.familysite.all.php?familysite={$sitenameenc}')";
$link = $boot->trswitch($js);
$tr[] = "\n\t\t<tr id='{$md}'>\n\t\t\t<td style='font-size:16px' width=10% nowrap {$link}>{$ligne["familysite"]}</td>\n\t\t\t<td style='font-size:16px' width=1% nowrap {$link}>{$ligne["hits"]}</td>\n\t\t\t<td style='font-size:16px' width=1% nowrap {$link}>{$ligne["size"]}</td>\n\t\t</tr>\n\t\t";
}
echo $boot->TableCompile(array("familysite" => "{familysite}", "hits" => "{hits}", "size" => "{size}"), $tr);
}
示例6: title_not_categorized
function title_not_categorized()
{
$tpl = new templates();
$q = new mysql_squid_builder();
$number = FormatNumber($q->COUNT_ROWS("notcategorized"));
echo $tpl->_ENGINE_parse_body("{$number} {not_categorized}");
}
示例7: page
function page(){
$q=new mysql_squid_builder();
$timekey=date('Ymd');
$timekeyMonth=date("Ym");
$time=time();
$page=CurrentPageName();
$tpl=new templates();
$q=new mysql_squid_builder();
$table="squidmemory_$timekey";
$TableMonth="squidmemoryM_$timekeyMonth";
if($q->TABLE_EXISTS($table)){
if($q->COUNT_ROWS($table)>1){
$f1[]="<div style='width:1150px;height:340px' id='$time-squid-02'></div>";
$f2[]="
function XSquid02$time(){
AnimateDiv('$time-squid-02');
Loadjs('$page?graph-hour=yes&container=$time-squid-02&time=$time',true);
}
setTimeout(\"XSquid02$time()\",500);";
$f1[]="<div style='width:1150px;height:340px' id='$time-squid-03'></div>";
$f2[]="
function XSquid03$time(){
AnimateDiv('$time-squid-03');
Loadjs('$page?graph-hour-day=yes&container=$time-squid-03&time=$time',true);
}
setTimeout(\"XSquid03$time()\",500);";
}
}
if($q->TABLE_EXISTS($TableMonth)){
if($q->COUNT_ROWS($table)>1){
$f1[]="<div style='width:1150px;height:340px' id='$time-squid-04'></div>";
$f2[]="
function XSquid04$time(){
AnimateDiv('$time-squid-04');
Loadjs('$page?graph-hour-month=yes&container=$time-squid-04&time=$time',true);
}
setTimeout(\"XSquid04$time()\",500);";
}
}
$tpl=new templates();
echo "<div style='font-size:26px'>".$tpl->_ENGINE_parse_body("{proxy_memory_service_status}")."</div><p> </p>".@implode($f1, "\n")."<script>\n".@implode($f2, "\n")."</script>";
}
示例8: members_search
function members_search()
{
$tpl = new templates();
$MyPage = CurrentPageName();
$q = new mysql_squid_builder();
$search = '%';
$table = "usersisp";
$page = 1;
$FORCE_FILTER = null;
if ($q->COUNT_ROWS($table) == 0) {
json_error_show("Empty table");
}
if (isset($_POST["sortname"])) {
if ($_POST["sortname"] != null) {
$ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";
}
}
if (isset($_POST['page'])) {
$page = $_POST['page'];
}
if ($_POST["query"] != null) {
$_POST["query"] = "*" . $_POST["query"] . "*";
$_POST["query"] = str_replace("**", "*", $_POST["query"]);
$_POST["query"] = str_replace("**", "*", $_POST["query"]);
$_POST["query"] = str_replace("*", "%", $_POST["query"]);
$search = $_POST["query"];
$searchstring = "AND (`{$_POST["qtype"]}` LIKE '{$search}')";
$sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE 1 {$FORCE_FILTER} {$searchstring}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql));
$total = $ligne["TCOUNT"];
} else {
$sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE 1 {$FORCE_FILTER}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql));
$total = $ligne["TCOUNT"];
}
if (isset($_POST['rp'])) {
$rp = $_POST['rp'];
}
$pageStart = ($page - 1) * $rp;
$limitSql = "LIMIT {$pageStart}, {$rp}";
$sql = "SELECT * FROM `{$table}` WHERE 1 {$searchstring} {$FORCE_FILTER} {$ORDER} {$limitSql}";
writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
$results = $q->QUERY_SQL($sql);
$data = array();
$data['page'] = $page;
$data['total'] = $total;
$data['rows'] = array();
if (!$q->ok) {
json_error_show($q->mysql_error);
}
while ($ligne = mysql_fetch_assoc($results)) {
$id = md5(serialize($ligne));
$delete = "<a href=\"javascript:blur()\" OnClick=\"javascript:DeleteISPMEmber('{$ligne["userid"]}','{$id}','{$ligne["email"]}');\"><img src='img/delete-24.png'></a>";
$enable = Field_checkbox("check-{$id}", 1, $ligne["enabled"], "ISPMemberEnable('{$ligne["userid"]}','check-{$id}')");
$data['rows'][] = array('id' => $id, 'cell' => array("<span style='font-size:14px'>{$ligne["userid"]}</span>", "<span style='font-size:14px'>{$ligne["publicip"]}</span>", "<span style='font-size:14px'>{$ligne["email"]}</span>", $enable, $delete));
}
echo json_encode($data);
}
示例9: items
function items()
{
//1.4.010916
$t = $_GET["t"];
$tpl = new templates();
$MyPage = CurrentPageName();
$q = new mysql_squid_builder();
$search = '%';
$table = "webfilter_avwhitedoms";
$database = "artica_backup";
$page = 1;
$FORCE_FILTER = "";
if ($q->COUNT_ROWS($table) == 0) {
json_error_show("no data...");
}
if (isset($_POST["sortname"])) {
if ($_POST["sortname"] != null) {
$ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";
}
}
if (isset($_POST['page'])) {
$page = $_POST['page'];
}
$searchstring = string_to_flexquery();
if ($searchstring != null) {
$sql = "SELECT COUNT(*) as TCOUNT FROM {$table} WHERE 1 {$FORCE_FILTER} {$searchstring}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, $database));
$total = $ligne["TCOUNT"];
} else {
$sql = "SELECT COUNT(*) as TCOUNT FROM {$table} WHERE 1 {$FORCE_FILTER}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, $database));
$total = $ligne["TCOUNT"];
}
if (isset($_POST['rp'])) {
$rp = $_POST['rp'];
}
$pageStart = ($page - 1) * $rp;
$limitSql = "LIMIT {$pageStart}, {$rp}";
$sql = "SELECT * FROM {$table} WHERE 1 {$searchstring} {$FORCE_FILTER} {$ORDER} {$limitSql}";
$results = $q->QUERY_SQL($sql, $database);
if (mysql_num_rows($results) == 0) {
json_error_show("no data");
}
$data = array();
$data['page'] = $page;
$data['total'] = $total;
$data['rows'] = array();
if (!$q->ok) {
json_error_show($q->mysql_error);
}
while ($ligne = mysql_fetch_assoc($results)) {
$zmd5 = md5($ligne["websitename"]);
$delete = imgsimple("delete-32.png", "", "Delete{$t}('{$ligne["websitename"]}','{$zmd5}')");
$data['rows'][] = array('id' => "{$zmd5}", 'cell' => array("<span style='font-size:26px;color:{$color}'>{$urljs}{$ligne["websitename"]}</a></span>", "<center style='font-size:16px;color:{$color}'>{$delete}</a></center>"));
}
echo json_encode($data);
}
示例10: items_list
function items_list()
{
//ini_set('html_errors',0);ini_set('display_errors', 1);ini_set('error_reporting', E_ALL);ini_set('error_prepend_string','');ini_set('error_append_string','');
$tpl = new templates();
$MyPage = CurrentPageName();
$q = new mysql_squid_builder();
$currentWeek = date("YW");
$table = "{$currentWeek}_not_cached";
$search = '%';
$page = 1;
if ($q->COUNT_ROWS("{$table}") == 0) {
json_error_show("No datas");
}
if (isset($_POST["sortname"])) {
if ($_POST["sortname"] != null) {
$ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";
}
}
if (isset($_POST['page'])) {
$page = $_POST['page'];
}
$searchstring = string_to_flexquery();
if ($searchstring != null) {
$sql = "SELECT COUNT(*) as TCOUNT FROM {$table} WHERE 1 {$FORCE_FILTER} {$searchstring}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql));
$total = $ligne["TCOUNT"];
} else {
$sql = "SELECT COUNT(*) as TCOUNT FROM {$table} WHERE 1 {$FORCE_FILTER}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql));
$total = $ligne["TCOUNT"];
}
if (isset($_POST['rp'])) {
$rp = $_POST['rp'];
}
$pageStart = ($page - 1) * $rp;
$limitSql = "LIMIT {$pageStart}, {$rp}";
$sql = "SELECT * FROM {$table} WHERE 1 {$searchstring} {$FORCE_FILTER} {$ORDER} {$limitSql}";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
json_error_show($q->mysql_error . "\n{$sql}");
}
$data = array();
$data['page'] = $page;
$data['total'] = $total;
$data['rows'] = array();
if (mysql_num_rows($results) == 0) {
json_error_show($q->mysql_error);
}
while ($ligne = mysql_fetch_assoc($results)) {
$val = 0;
$familysite = $ligne["familysite"];
$size = FormatBytes($ligne["size"] / 1024);
$hits = FormatNumber($ligne["hits"]);
$data['rows'][] = array('id' => "{$familysite}", 'cell' => array("<span style='font-size:16px;'>{$familysite}</span>", "<span style='font-size:16px;font-weight:bold'>{$size}</span>", "<span style='font-size:16px;font-weight:bold'>{$hits}</span>"));
}
echo json_encode($data);
}
示例11: js
function js()
{
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql_squid_builder();
$export = $q->COUNT_ROWS("categorize");
$title = $tpl->_ENGINE_parse_body("{$export} {websites_to_export}");
$html = "YahooWin('650','{$page}?popup=yes','{$title}')";
echo $html;
}
示例12: community_status
function community_status(){
$page=CurrentPageName();
$tpl=new templates();
$q=new mysql_squid_builder();
$all_count=FormatNumber($q->COUNT_ROWS("dansguardian_community_categories","artica_backup"),0,'.',' ',3);
$artica_community=Paragraphe('webfilter-community-64.png','{community}','{webfilter_community_text}',"javascript:Loadjs('webfilter.community.php')");
if($classtr=="oddRow"){$classtr=null;}else{$classtr="oddRow";}
$html="
<table style='width:100%'>
<tr>
<td width=99% valign='top'>
<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>
<thead class='thead'>
<tr>
<th colspan=2></th>
<th> </th>
</tr>
</thead>
<tbody class='tbody'>
<tr class=$classtr>
<td style='font-size:14px' colspan=2><i>{websites_number}:</i> <strong>$all_count</i></td>
</tr>
";
$array=unserialize(@file_get_contents("ressources/logs/web.community.db.status.txt"));
while (list ($num, $ligne) = each ($array) ){
if($classtr=="oddRow"){$classtr=null;}else{$classtr="oddRow";}
$f=FormatNumber($ligne,0,'.',' ',3);
$html=$html."<tr class=$classtr>
<td style='font-size:14px;text-align:right' width=1% nowrap><strong>$num:</td>
<td style='font-size:14px' width=99%><strong>$f</strong></td>
</tr>";
}
$html=$html."</table>
</td>
<td valign='top' width=1%>$artica_community</td>
</tr>
</table>
";
echo $tpl->_ENGINE_parse_body($html);
}
示例13: popup
function popup()
{
$fontsize = 18;
$tpl = new templates();
$page = CurrentPageName();
$users = new usersMenus();
$q = new mysql_squid_builder();
$webfilters_usersasks = $q->COUNT_ROWS("webfilters_usersasks");
$array["table"] = "{$webfilters_usersasks} {unblocks}";
$array["queue"] = "{queue}";
while (list($num, $ligne) = each($array)) {
if ($num == "queue") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squidguardweb.unblock.queue.php\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
continue;
}
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}={$time}\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
}
echo build_artica_tabs($html, "main_squid_unlock_tabs") . "<script>LeftDesign('logs-white-256-opac20.png');</script>";
}
示例14: search
function search()
{
$search = $_GET["search"];
$search = "*{$search}*";
$search = str_replace("**", "*", $search);
$search = str_replace("**", "*", $search);
$search = str_replace("*", "%", $search);
if (CACHE_SESSION_GET(__FILE__ . __FUNCTION__ . $search, __FILE__, 2)) {
return;
}
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql_squid_builder();
$table = "visited_sites";
if ($q->COUNT_ROWS($table) == 0) {
echo "<H2>" . $tpl->_ENGINE_parse_body("TABLE:{$table}<br>{error_no_datas}") . "</H2>";
return;
}
$sql = "SELECT familysite,SUM(HitsNumber) as HitsNumber FROM `{$table}` \n\tGROUP BY familysite HAVING (`familysite` LIKE '{$search}')\n\tORDER BY HitsNumber DESC LIMIT 0,100";
$html = "<center>\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t\t\n\t\t<th width=50% nowrap colspan=2>{websites}</th>\n\t\t<th width=50% nowrap>{hits}</th>\n\t\t<th width=1% nowrap> </th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
echo "<H2>{$q->mysql_error}</H2><center style='font-size:11px'><code>{$sql}</code></center>";
}
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
if ($classtr == "oddRow") {
$classtr = null;
} else {
$classtr = "oddRow";
}
$js = "BrowseWWWSelect('{$ligne["familysite"]}');";
$siteTool = imgtootltip("website-add-32.png", "{select}:{$ligne["familysite"]}", $js);
$sitname = texttooltip($ligne["familysite"], "{select}", $js, null, 0, "font-size:14px;text-decoration:underline");
$html = $html . "\n\t\t<tr class={$classtr}>\n\t\t<td width=1% style='font-size:14px'>{$siteTool}</td>\n\t\t<td style='font-size:14px' width=99%>{$sitname}</td>\n\t\t<td style='font-size:14px' width=1%>{$ligne["HitsNumber"]}</td>\n\t\t</tr>\t\n\t\t\n\t\t";
}
$html = $html . "</tbody></table>\n";
CACHE_SESSION_SET(__FILE__ . __FUNCTION__ . $search, __FILE__, $tpl->_ENGINE_parse_body($html));
}
示例15: week_uris_blocked_verify
function week_uris_blocked_verify()
{
$q = new mysql_squid_builder();
$sql = "SELECT tablename,DATE_FORMAT( zDate, '%Y%m%d' ) AS tablesource, DAYOFWEEK(zDate) \n\t\t\tas DayNumber,WEEK( zDate ) AS tweek, YEAR( zDate ) \n\t\t\tAS tyear FROM tables_day WHERE zDate < DATE_SUB( NOW( ) , INTERVAL 1 DAY ) ORDER BY zDate";
$results = $GLOBALS["Q"]->QUERY_SQL($sql);
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$tablename = $ligne["tablename"];
$week_table = "{$ligne["tyear"]}{$ligne["tweek"]}_blocked_week";
if ($GLOBALS["VERBOSE"]) {
echo "\n*********** WEEK {$week_table} -> {$ligne["tweek"]} of year {$ligne["tyear"]} ***********\n";
}
if (!$q->TABLE_EXISTS($week_table)) {
if ($GLOBALS["VERBOSE"]) {
echo "Restart {$tablename}\n";
}
$q->QUERY_SQL("UPDATE tables_day SET weekbdone=0 WHERE `tablename`='{$tablename}'");
}
$Rows = $q->COUNT_ROWS($week_table);
if ($GLOBALS["VERBOSE"]) {
echo "{$week_table} = {$Rows} rows\n";
}
}
}