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


PHP mysql_squid_builder::TABLE_EXISTS方法代码示例

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


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

示例1: tabs

function tabs()
{
    $sock = new sockets();
    $fontsize = 16;
    $tpl = new templates();
    $page = CurrentPageName();
    $md5 = md5(serialize($_GET));
    $date = date("Ym");
    $table = "{$date}_maccess";
    $q = new mysql_squid_builder();
    if (!$q->TABLE_EXISTS($table)) {
        echo FATAL_ERROR_SHOW_128("{no_table_see_support}");
        return;
    }
    $suffix = suffix();
    $array["flow-day"] = "{$_GET["familysite"]}: {flow_by_day}";
    $array["websites"] = "{$_GET["familysite"]}: {chronology}";
    while (list($num, $ligne) = each($array)) {
        if ($num == "parameters") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.accesslogs.params.php?parameters=yes\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        if ($num == "schedule") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.databases.schedules.php?TaskType=54\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes{$suffix}\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
    }
    echo build_artica_tabs($html, "squid_users_stats_{$md5}", 990) . "";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:30,代码来源:squid.users-stats.currentmonth.website.php

示例2: tabs

function tabs()
{
    $sock = new sockets();
    $fontsize = 16;
    $tpl = new templates();
    $page = CurrentPageName();
    $date = date("Ym");
    $table = "{$date}_maccess";
    $q = new mysql_squid_builder();
    if (!$q->TABLE_EXISTS($table)) {
        echo FATAL_ERROR_SHOW_128("{no_table_see_support}");
        return;
    }
    $array["popup"] = '{members_this_month}';
    while (list($num, $ligne) = each($array)) {
        if ($num == "parameters") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.accesslogs.params.php?parameters=yes\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        if ($num == "schedule") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.databases.schedules.php?TaskType=54\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
    }
    echo build_artica_tabs($html, "squid_users_profiling", 1100) . "<script>LeftDesign('user-stats-256.png');</script>";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:27,代码来源:squid.users-profiling.php

示例3: table

function table()
{
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $page = CurrentPageName();
    $page = CurrentPageName();
    $sock = new sockets();
    $t = time();
    if (!$q->TABLE_EXISTS("ufdbunlock")) {
        $sql = "CREATE TABLE IF NOT EXISTS `squidlogs`.`ufdbunlock` (\n\t\t\t`md5` VARCHAR( 90 ) NOT NULL ,\n\t\t\t`logintime` BIGINT UNSIGNED ,\n\t\t\t`finaltime` INT UNSIGNED ,\n\t\t\t`uid` VARCHAR(128) NOT NULL,\n\t\t\t`MAC` VARCHAR( 90 ) NULL,\n\t\t\t`www` VARCHAR( 128 ) NOT NULL ,\n\t\t\t`ipaddr` VARCHAR( 128 ) ,\n\t\t\tPRIMARY KEY ( `md5` ) ,\n\t\t\tKEY `MAC` (`MAC`),\n\t\t\tKEY `logintime` (`logintime`),\n\t\t\tKEY `finaltime` (`finaltime`),\n\t\t\tKEY `uid` (`uid`),\n\t\t\tKEY `www` (`www`),\n\t\t\tKEY `ipaddr` (`ipaddr`)\n\t\t\t)  ENGINE = MEMORY;";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo FATAL_ERROR_SHOW_128($q->mysql_error_html());
            return;
        }
    }
    //
    $ipaddr = $tpl->_ENGINE_parse_body("{ipaddr}");
    $uid = $tpl->_ENGINE_parse_body("{uid}");
    $sitename = $tpl->_ENGINE_parse_body("{sitename}");
    $date = $tpl->_ENGINE_parse_body("{created}");
    $finish = $tpl->_ENGINE_parse_body("{finish}");
    $delete = $tpl->_ENGINE_parse_body("{delete}");
    $member = $tpl->javascript_parse_text("{members}");
    $parameters = $tpl->javascript_parse_text("{settings}");
    $title = $tpl->_ENGINE_parse_body("{unblock_queue}");
    $buttons = "\n\tbuttons : [\n\t\t{name: '{$parameters}', bclass: 'Reconf', onpress : unblock_parms},\n\t\n\t],";
    $buttons = null;
    $html = "\n\n<table class='UFDBGUARD_QUEUE_RELEASE' style='display: none' id='UFDBGUARD_QUEUE_RELEASE' style='width:100%'></table>\n<script>\nvar rowid{$t}='';\n\$(document).ready(function(){\n\$('#UFDBGUARD_QUEUE_RELEASE').flexigrid({\n\turl: '{$page}?rules-table-list=yes&t={$t}',\n\tdataType: 'json',\n\tcolModel : [\n\t\t{display: '{$date}', name : 'logintime', width : 180, sortable : true, align: 'left'},\t\n\t\t{display: '{$ipaddr}', name : 'ipaddr', width : 160, sortable : true, align: 'left'},\n\t\t{display: '{$uid}', name : 'uid', width : 160, sortable : true, align: 'left'},\t\t\n\t\t{display: '{$sitename}', name : 'www', width : 299, sortable : true, align: 'left'},\n\t\t{display: '{$finish}', finaltime : 'uid', width :180, sortable : true, align: 'left'},\n\t\t{display: '{$delete}', name : 'delete', width : 70, sortable : false, align: 'center'},\n\t\t],\n\t{$buttons}\n\tsearchitems : [\n\t\t{display: '{$ipaddr}', name : 'ipaddr'},\n\t\t{display: '{$member}', name : 'uid'},\n\t\t{display: '{$sitename}', name : 'www'},\n\t\t],\n\tsortname: 'logintime',\n\tsortorder: 'desc',\n\tusepager: true,\n\ttitle: '<strong style=font-size:22px>{$title}</strong>',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: 400,\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\t\n\t});   \n});\n\n\tfunction unblock_parms(){\n\t\tLoadjs('squidguardweb.unblock.php')\n\t}\n\n\tvar xBannedDeleteQueueUFDB= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){alert(res);return;}\n\t\t\$('#row'+rowid{$t}).remove();\n\t\t\$('#UFDBGUARD_QUEUE_RELEASE').flexReload();\n\t}\t\t\n\t\t\n\tfunction BannedDeleteQueueUFDB(md5){\n\t\trowid{$t}=md5;\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('DeleteWhiteListed', md5);\n\t\tXHR.sendAndLoad('{$page}', 'POST',xBannedDeleteQueueUFDB);  \n\t}\n\n</script>\n";
    echo $html;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:squidguardweb.unblock.queue.php

示例4: tabs

function tabs()
{
    $t = time();
    $page = CurrentPageName();
    $users = new usersMenus();
    $tpl = new templates();
    $array["popup"] = '{panel}';
    $array["members"] = '{members}';
    $q = new mysql_squid_builder();
    $table = "RTTD_" . date("Ymd", $q->HIER_TIME());
    if ($q->TABLE_EXISTS($table)) {
        $array["yesterday"] = '{yesterday}';
    }
    $page = CurrentPageName();
    while (list($num, $ligne) = each($array)) {
        if ($num == "members") {
            $html[] = "<li style='font-size:18px'><a href=\"squid.rrt-members.php\"><span>{$ligne}</span></a></li>\n";
            continue;
        }
        if ($num == "yesterday") {
            $html[] = "<li style='font-size:18px'><a href=\"squid.rrt-yesterday.php\"><span>{$ligne}</span></a></li>\n";
            continue;
        }
        $html[] = "<li style='font-size:18px'><a href=\"{$page}?{$num}=yes\"><span>{$ligne}</span></a></li>\n";
    }
    echo build_artica_tabs($html, "squid_rrtt_tabs", 1100) . "\n\t\t\t<script>LeftDesign('statistics-white-256-opac20.png');</script>";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:27,代码来源:squid.rtt.php

示例5: 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>&nbsp;</p>".@implode($f1, "\n")."<script>\n".@implode($f2, "\n")."</script>";
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:47,代码来源:squid.memory.status.php

示例6: table

function table()
{
    $sock = new sockets();
    $q = new mysql();
    $CountDeFreeWebs = $q->COUNT_ROWS("freeweb", "artica_backup");
    $EnableFreeWeb = $sock->GET_INFO("EnableFreeWeb");
    if (!is_numeric($EnableFreeWeb)) {
        $EnableFreeWeb = 0;
    }
    $q = new mysql_squid_builder();
    if (!$q->TABLE_EXISTS("reverse_www")) {
        $f = new squid_reverse();
    }
    if (!$q->TABLE_EXISTS("reverse_sources")) {
        $f = new nginx_sources();
        $f->PatchTables();
    }
    if (!$q->FIELD_EXISTS("reverse_sources", "OnlyTCP")) {
        $q->QUERY_SQL("ALTER TABLE `reverse_sources` ADD `OnlyTCP` smallint(1) NOT NULL DEFAULT '0'");
        if (!$q->ok) {
            echo "<p class=text-error>{$q->mysql_error} in " . basename(__FILE__) . " line " . __LINE__ . "</p>";
        }
    }
    $page = CurrentPageName();
    $tpl = new templates();
    $date = $tpl->_ENGINE_parse_body("{zDate}");
    $description = $tpl->_ENGINE_parse_body("{description}");
    $context = $tpl->_ENGINE_parse_body("{context}");
    $events = $tpl->_ENGINE_parse_body("{events}");
    $destination = $tpl->_ENGINE_parse_body("{destination}");
    $website = $tpl->_ENGINE_parse_body("{website}");
    $settings = $tpl->javascript_parse_text("{watchdog_squid_settings}");
    $empty_events_text_ask = $tpl->javascript_parse_text("{empty_events_text_ask}");
    $apply_parameters = $tpl->javascript_parse_text("{rebuild_all_websites}");
    $purge_caches = $tpl->javascript_parse_text("{purge_caches}");
    $import_export = $tpl->javascript_parse_text("{import_export}");
    $new_server = $tpl->javascript_parse_text("{new_server}");
    $TB_HEIGHT = 450;
    $TB_WIDTH = 927;
    $TB2_WIDTH = 551;
    $all = $tpl->_ENGINE_parse_body("{all}");
    $t = time();
    $buttons = "\n\tbuttons : [\n\t\n\t{name: '{$apply_parameters}', bclass: 'apply', onpress :  apply_parameters{$t}},\n\t{name: '{$purge_caches}', bclass: 'Delz', onpress :  purge_caches{$t}},\n\t{name: '{$import_export}', bclass: 'Down', onpress :  import_export{$t}},\n\n\n\n\n\t],\t";
    $buttons = "\n\tbuttons : [\n\t{name: '{$new_server}', bclass: 'add', onpress : New{$t}},\n\t{name: '{$apply_parameters}', bclass: 'apply', onpress :  apply_parameters{$t}},\n\t],\t";
    $html = "\n\t<table class='NGINX_MAIN_TABLE2' style='display: none' id='NGINX_MAIN_TABLE2' style='width:99%'></table>\n\t<script>\n\tfunction BuildTable{$t}(){\n\t\$('#NGINX_MAIN_TABLE2').flexigrid({\n\turl: '{$page}?list=yes&t={$t}&ID={$_GET["ID"]}',\n\tdataType: 'json',\n\tcolModel : [\n\t{display: '&nbsp;', name : 'severity', width :70, sortable : false, align: 'center'},\n\t{display: '{$website}', name : 'servername', width :560, sortable : true, align: 'left'},\n\t{display: '&nbsp;', name : 'compile', width :60, sortable : false, align: 'center'},\n\t{display: '&nbsp;', name : 'delete', width :60, sortable : false, align: 'center'},\n\t],\n\t{$buttons}\n\n\tsearchitems : [\n\t{display: '{$website}', name : 'servername'},\n\t],\n\tsortname: 'zOrder',\n\tsortorder: 'asc',\n\tusepager: true,\n\ttitle: '',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: 550,\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200,500]\n\n});\n}\n\nfunction apply_parameters{$t}(){\n\tLoadjs('nginx.destination.progress.php?cacheid={$_GET["ID"]}')\n}\nfunction purge_caches{$t}(){\nLoadjs('system.services.cmd.php?APPNAME=APP_NGINX&action=purge&cmd=%2Fetc%2Finit.d%2Fnginx&appcode=APP_NGINX');\n}\nfunction import_export{$t}(){\nLoadjs('miniadmin.proxy.reverse.import.php');\n}\n\nfunction New{$t}(){\nLoadjs('nginx.new.php?peer-id={$_GET["ID"]}');\n}\n\tBuildTable{$t}();\n\t</script>";
    echo $html;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:47,代码来源:nginx.peer.www.php

示例7: items_add

function items_add()
{
    $q = new mysql_squid_builder();
    if (!$q->TABLE_EXISTS("webfilter_avwhitedoms")) {
        $q->CheckTables();
    }
    $q->QUERY_SQL("INSERT IGNORE INTO webfilter_avwhitedoms (websitename) VALUES ('{$_POST["add-item"]}')");
    if (!$q->ok) {
        echo $q->mysql_error;
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:11,代码来源:c-icap.wwwex.php

示例8: migrate_categories_single

function migrate_categories_single($category)
{
    $categoryTB = str_replace('/', "_", $category);
    $categoryTB = str_replace('-', "_", $categoryTB);
    $qA = new mysql_squid_builder();
    $q = new mysql();
    $qA->CreateCategoryTable($categoryTB);
    if (!$qA->TABLE_EXISTS("category_{$categoryTB}")) {
        events_tail("Unable to create category_{$categoryTB} table");
        return false;
    }
    $sql = "SELECT * FROM dansguardian_community_categories WHERE category='{$category}'";
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        writelogs("Fatal Error: {$q->mysql_error}", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
        return;
    }
    $mysql_num_rows = mysql_num_rows($results);
    if ($GLOBALS["VERBOSE"]) {
        echo $sql . " => {$mysql_num_rows}\n";
    }
    $prefix = "INSERT IGNORE INTO category_{$categoryTB}(`zmd5`,`zDate`,`category`,`pattern`,`enabled`,`uuid`) VALUES ";
    $c = 0;
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $c++;
        $f[] = "('{$ligne["zmd5"]}','{$ligne["zDate"]}','{$ligne["category"]}','{$ligne["pattern"]}','{$ligne["enabled"]}','{$ligne["uuid"]}')";
        if (count($f) > 500) {
            events_tail("Injecting {$c} rows");
            $qA->QUERY_SQL("{$prefix}" . @implode(",", $f));
            $f = array();
            if (!$q->ok) {
                writelogs("Fatal Error: {$q->mysql_error}", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
                return;
            }
        }
    }
    if (count($f) > 0) {
        $c = $c + count($f);
        events_tail("Injecting {$c} rows");
        $qA->QUERY_SQL("{$prefix}" . @implode(",", $f));
        if (!$q->ok) {
            writelogs("Fatal Error: {$q->mysql_error}", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
            return;
        }
    }
    events_tail("removing category {$category} in original table");
    $sql = "DELETE FROM dansguardian_community_categories WHERE category='{$category}'";
    $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        writelogs("Fatal Error: {$q->mysql_error}", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
        return;
    }
    return true;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:54,代码来源:exec.squid.logs.migrate.php

示例9: STATS_LINE

function STATS_LINE()
{
    $sock = new sockets();
    $EnableWebProxyStatsAppliance = $sock->GET_INFO("EnableWebProxyStatsAppliance");
    if (!is_numeric($EnableWebProxyStatsAppliance)) {
        $EnableWebProxyStatsAppliance = 0;
    }
    if ($EnableWebProxyStatsAppliance == 0) {
        die;
    }
    $q = new mysql_squid_builder();
    $q->CheckTables();
    if (isset($_POST["MYSSLPORT"])) {
        writelogs($_SERVER["REMOTE_ADDR"] . ":{$_POST["MYSSLPORT"]} production server....", __FUNCTION__, __FILE__, __LINE__);
        $hostname = gethostbyaddr($_SERVER["REMOTE_ADDR"]);
        $time = date('Y-m-d H:i:s');
        $sql = "INSERT IGNORE INTO `squidservers`\n\t\t (ipaddr,hostname,port,created,udpated) \n\t\t VALUES ('{$_SERVER["REMOTE_ADDR"]}','{$hostname}','{$_POST["MYSSLPORT"]}','{$time}','{$time}')";
        $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT ipaddr FROM squidservers WHERE ipaddr='{$_SERVER["REMOTE_ADDR"]}'"));
        if ($ligne["ipaddr"] == null) {
            $q->QUERY_SQL($sql);
        } else {
            $q->QUERY_SQL("UPDATE `squidservers` SET udpated='{$time}' WHERE ipaddr='{$ligne["ipaddr"]}'");
        }
    } else {
        writelogs("MYSSLPORT is not set....", __FUNCTION__, __FILE__, __LINE__);
    }
    $array = unserialize(base64_decode($_POST["STATS_LINE"]));
    while (list($table, $contentArray) = each($array)) {
        if (preg_match("#squidhour_([0-9]+)#", $table, $re)) {
            $q->TablePrimaireHour($re[1]);
        }
        if (!$q->TABLE_EXISTS($table)) {
            writelogs("{$table} no such table, aborting ", __FUNCTION__, __FILE__, __LINE__);
            echo "<ANSWER>{$table} no such table</ANSWER>\n";
            die;
        }
        $prefixsql = "INSERT IGNORE INTO {$table} (`sitename`,`uri`,`TYPE`,`REASON`,`CLIENT`,`zDate`,`zMD5`,`remote_ip`,`country`,`QuerySize`,`uid`,`cached`,`MAC`,`hostname`) VALUES ";
        if (count($contentArray) > 0) {
            $sql = "{$prefixsql}" . @implode(",", $contentArray);
            $q->QUERY_SQL($sql);
            if (!$q->ok) {
                writelogs($q->mysql_error, __FUNCTION__, __FILE__, __LINE__);
                if (preg_match("#Column count doesn.+?t match#", $q->mysql_error)) {
                    continue;
                }
                echo "ERROR: {$q->mysql_error}\n";
                return;
            }
        }
    }
    writelogs("Received " . strlen($_POST["STATS_LINE"]) . " bytes " . count($array) . " lines from " . $_SERVER["REMOTE_ADDR"] . ":{$_POST["MYSSLPORT"]} (success)", __FUNCTION__, __FILE__, __LINE__);
    echo "<ANSWER>OK</ANSWER>\n";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:53,代码来源:squid.stats.listener.php

示例10: tabs

function tabs(){
	$sock=new sockets();
	$fontsize=16;
	$tpl=new templates();
	$page=CurrentPageName();

	$md5=md5($_GET["field"].$_GET["value"]);

	$date=date("Ym");
	$table="{$date}_maccess";


	$q=new mysql_squid_builder();
	if(!$q->TABLE_EXISTS($table)){
		echo FATAL_ERROR_SHOW_128("{no_table_see_support}");
		return;
	}

	$suffix=suffix();
	$array["flow-day"]='{flow_by_day}';
	$array["members"]='{members}';
	//$array["categories"]='{categories}';
	$array["days"]='{day_tracking}';
	
	




	while (list ($num, $ligne) = each ($array) ){

		if($num=="parameters"){
			$html[]= $tpl->_ENGINE_parse_body("<li><a href=\"squid.accesslogs.params.php?parameters=yes\" style='font-size:{$fontsize}px'><span>$ligne</span></a></li>\n");
			continue;

		}

		if($num=="schedule"){
			$html[]= $tpl->_ENGINE_parse_body("<li><a href=\"squid.databases.schedules.php?TaskType=54\" style='font-size:{$fontsize}px'><span>$ligne</span></a></li>\n");
			continue;

		}

		$html[]= $tpl->_ENGINE_parse_body("<li><a href=\"$page?$num=yes$suffix\" style='font-size:{$fontsize}px'><span>$ligne</span></a></li>\n");
	}

	echo build_artica_tabs($html, "squid_users_stats_$md5",990)."";

}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:49,代码来源:squid.website-stats.currentmonth.php

示例11: tabs

function tabs(){
	$tpl=new templates();
	$q=new mysql_squid_builder();
	$sock=new sockets();
	
	$status=trim($sock->getFrameWork("squid.php?videocache-streamsquidcache=yes"));
	
	if($status<>"TRUE"){
		echo $tpl->_ENGINE_parse_body(FATAL_WARNING_SHOW_128("{module_in_squid_not_installed}<hr>{EnableStreamCache_text}"));
		return;
	}
	
	$page=CurrentPageName();
	$array["status"]='{status}';
	$array["parameters"]='{parameters}';
	$array["events"]='{events}';
	$array["events-retriver"]='{retreiver_events}';
	if($q->TABLE_EXISTS("videocacheA")){
		$array["stats"]='{statistics}';
	}
	
	$array["websites"]="{supported_websites}";
	
	$t=time();
	while (list ($num, $ligne) = each ($array) ){
		if($num=="events"){
			$html[]= $tpl->_ENGINE_parse_body("<li><a href=\"squid.videocache.events.php\" style='font-size:18px'><span>$ligne</span></a></li>\n");
			continue;
		}
		if($num=="events-retriver"){
			$html[]= $tpl->_ENGINE_parse_body("<li><a href=\"squid.videocache.events-retreiver.php\" style='font-size:18px'><span>$ligne</span></a></li>\n");
			continue;
		}
		
		if($num=="master"){
			$html[]= $tpl->_ENGINE_parse_body("<li><a href=\"squid.master-proxy.php?byQuicklinks=yes\" style='font-size:18px'><span>$ligne</span></a></li>\n");
			continue;
		}
	
		$html[]= $tpl->_ENGINE_parse_body("<li><a href=\"$page?$num=yes\" style='font-size:18px'><span>$ligne</span></a></li>\n");
		}
	
	echo build_artica_tabs($html, "main_squid_videocache_tabs",1200)."<script>LeftDesign('videocache-256-white-opac20.png');</script>";
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:44,代码来源:squid.videocache.php

示例12: popup

function popup()
{
    $q = new mysql_squid_builder();
    $page = CurrentPageName();
    if (!$q->TABLE_EXISTS("webfilter_dnsbl")) {
        $q->CheckTables();
    }
    $tpl = new templates();
    $add = $tpl->_ENGINE_parse_body("{add}");
    $dsnbl_service = $tpl->_ENGINE_parse_body("{dnsbl_service}");
    $service_name = $tpl->_ENGINE_parse_body("{description}");
    $CICAP_DNSBL = $tpl->_ENGINE_parse_body("{CICAP_DNSBL}");
    $DNSBL_WHY = $tpl->_ENGINE_parse_body("{DNSBL_WHY}");
    $p = Paragraphe_switch_img("{enable_dnsbl_service}", $DNSBL_WHY);
    $buttons = "buttons : [\n\t\t{name: '{$add}', bclass: 'add', onpress : AddDnsblService}\n\t\t\n\t\t],";
    $buttons = null;
    $html = "<div class=text-info style='font-size:13px'>{$DNSBL_WHY}</div>\n\t<table class='dnsbl-table' style='display: none' id='dnsbl-table' style='width:99%'></table>\n<script>\n\t\$(document).ready(function(){\n\$('#dnsbl-table').flexigrid({\n\turl: '{$page}?list=yes',\n\tdataType: 'json',\n\tcolModel : [\n\t\t{display: '{$dsnbl_service}', name : 'dnsbl', width :233, sortable : true, align: 'left'},\n\t\t{display: '{$service_name}', name : 'name', width : 541, sortable : true, align: 'left'},\n\t\t{display: '&nbsp;', name : 'none3', width : 24, sortable : false, align: 'left'},\n\t],\n{$buttons}\t\n\tsearchitems : [\n\t\t{display: '{$extension}', name : 'ext'},\n\t\t{display: '{$description}', name : 'description'},\n\t\t],\n\tsortname: 'name',\n\tsortorder: 'asc',\n\tusepager: true,\n\ttitle: '{$CICAP_DNSBL}',\n\tuseRp: true,\n\trp: 15,\n\tshowTableToggleBtn: false,\n\twidth: 854,\n\theight: 350,\n\tsingleSelect: true\n\t\n\t});   \n});\n\nfunction AddDnsblService(){\n\n}\n\n\n\n\n\n\nvar x_EnableDisableCiCapDNSBL= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){alert(res);}\n\t\t\n\t}\t\t\t\n\t\n\t\n\tfunction EnableDisableCiCapDNSBL(md5,serv){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('EnableDNSBL',serv);\n\t\tif(document.getElementById(md5).checked){\n\t\tXHR.appendData('enabled',1);}else{XHR.appendData('enabled',0);}\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_EnableDisableCiCapDNSBL);\t\n\t}\n\n</script>";
    echo $html;
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:19,代码来源:c-icap.dnsbl2.php

示例13: table

function table()
{
    $error = null;
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $sock = new sockets();
    $q = new mysql_squid_builder();
    if (!$q->TABLE_EXISTS("artica_caches")) {
        create_table();
    }
    $hits = $tpl->javascript_parse_text("{hits}");
    $rulename = $tpl->javascript_parse_text("{rulename}");
    $new_rule = $tpl->javascript_parse_text("{new_rule}");
    $lang = $tpl->javascript_parse_text("{language}");
    $rule = $tpl->javascript_parse_text("{rule}");
    $title = $tpl->javascript_parse_text("{subject}");
    $new_template = $tpl->javascript_parse_text("{new_template}");
    $apply = $tpl->javascript_parse_text("{apply}");
    $online_help = $tpl->javascript_parse_text("{online_help}");
    $date = $tpl->javascript_parse_text("{zDate}");
    $replace = $tpl->_ENGINE_parse_body("{replace}");
    $sitename = $tpl->javascript_parse_text("{sitename}");
    $size = $tpl->javascript_parse_text("{size}");
    $sitename_explain = $tpl->javascript_parse_text("{artica_cache_rule_explain_sitename}");
    $t = time();
    $backToDefault = $tpl->javascript_parse_text("{backToDefault}");
    $ERROR_SQUID_REBUILD_TPLS = $tpl->javascript_parse_text("{ERROR_SQUID_REBUILD_TPLS}");
    $q = new mysql_squid_builder();
    $q = new mysql_squid_builder();
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT rulename,foldersize FROM artica_caches WHERE ID='{$_GET["ID"]}'", "artica_backup"));
    $enforce_rules = $tpl->javascript_parse_text("{enforce_rules}:{$ligne["rulename"]} (" . FormatBytes($ligne["foldersize"] / 1024) . ")");
    //if(!$users->CORP_LICENSE){
    //$error="<p class=text-error>".$tpl->_ENGINE_parse_body("{MOD_TEMPLATE_ERROR_LICENSE}")."</p>";
    //}
    $buttons = "\n\tbuttons : [\n\t{name: '{$new_rule}', bclass: 'add', onpress : NewRule{$t}},\n\t{name: '{$apply}', bclass: 'Reconf', onpress : Apply{$t}},\n\n\t],";
    $buttons = null;
    $html = "\n\t{$error}\n\t<table class='squid_enforce_foldersize' style='display: none' id='squid_enforce_foldersize' style='width:99%'></table>\n\n\t<script>\n\tvar mem{$t}='';\n\t\$(document).ready(function(){\n\t\$('#squid_enforce_foldersize').flexigrid({\n\turl: '{$page}?liste-rules=yes&ID={$_GET["ID"]}',\n\tdataType: 'json',\n\tcolModel : [\n\t{display: '{$sitename}', name : 'sitename', width : 629, sortable : false, align: 'left'},\n\t{display: '{$size}', name : 'foldersize', width : 184, sortable : true, align: 'right'},\n\n\t],\n\t{$buttons}\n\tsearchitems : [\n\t{display: '{$sitename}', name : 'sitename'},\n\t],\n\tsortname: 'sizebytes',\n\tsortorder: 'desc',\n\tusepager: true,\n\ttitle: '<span style=font-size:18px>{$enforce_rules}</span>',\n\tuseRp: true,\n\trp: 250,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: 400,\n\tsingleSelect: true\n\n});\n});\n\n\n\nvar xNewRule{$t}= function (obj) {\nvar tempvalue=obj.responseText;\nif(tempvalue.length>3){alert(tempvalue);}\n\$('#squid_enforce_foldersize').flexReload();\n}\n\nfunction NewRule{$t}(){\nvar rule=prompt('{$rulename} ?');\nif(!rule){return;}\nvar sitename=prompt('{$sitename_explain}');\nif(!sitename){return;}\nvar XHR = new XHRConnection();\nXHR.appendData('new-rule',encodeURIComponent(rule));\nXHR.appendData('sitename',encodeURIComponent(sitename));\nXHR.sendAndLoad('{$page}', 'POST',xNewRule{$t});\n}\n\nfunction Apply{$t}(){\nLoadjs('squid.artica-rules.progress.php');\n}\n\n</script>\n";
    echo $html;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:40,代码来源:squid.artica-rules.foldersize.php

示例14: 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";
        }
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:23,代码来源:exec.squid.stats.blocked.week.php

示例15: tabs

function tabs()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $q = new mysql_squid_builder();
    $familysite = $q->GetFamilySites($_GET["sitename"]);
    $_GET["xtime"] = strtotime("{$_GET["day"]} 00:00:00");
    if (is_numeric($_GET["xtime"])) {
        $dateT = " " . date("{l} {F} d", $_GET["xtime"]);
        if ($tpl->language == "fr") {
            $dateT = date("{l} d {F} ", $_GET["xtime"]);
        }
    }
    $tablesource = "dansguardian_events_" . date("Ymd", $_GET["xtime"]);
    $array["popup"] = "{status} {$dateT}";
    if ($q->TABLE_EXISTS($tablesource)) {
        $array["uris"] = "{urls}";
    }
    while (list($num, $ligne) = each($array)) {
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes&field={$_GET["field"]}&value=" . urlencode($_GET["value"]) . "&familysite={$_GET["familysite"]}&day={$_GET["day"]}\"><span style='font-size:14px'>{$ligne}</span></a></li>\n");
    }
    echo "\n\t<div id=main_config_zoomwebsiteAndUser>\n\t\t<ul>" . implode("\n", $html) . "</ul>\n\t</div>\n\t\t<script>\n\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\t\$('#main_config_zoomwebsiteAndUser').tabs();\n\t\t\n\t\t\n\t\t\t});\n\t\t</script>";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:23,代码来源:squid.traffic.statistics.days.memberAndWebsite.php


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