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


PHP mysql_squid_builder::LIST_TABLES_HOURS_TEMP方法代码示例

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


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

示例1: change_date_popup

function change_date_popup(){
	
	$q=new mysql_squid_builder();
	$tables=$q->LIST_TABLES_HOURS_TEMP();

	
	while (list ($table, $none) = each ($tables) ){
		if(!preg_match("#squidhour_([0-9]+)#",$table,$re)){events_repair("No match `$table` abort... L: ".__LINE__);continue;}
		$hour=$re[1];
		$year=substr($hour,0,4);
		$month=substr($hour,4,2);
		$day=substr($hour,6,2);
		$hour=substr($hour,8,2);
		$time=strtotime("$year-$month-$day $hour:00:00");
		
	}
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:17,代码来源:squid.accesslogs.php

示例2: table_heures_enretard

function table_heures_enretard(){
	
	$tpl=new templates();
	$page=CurrentPageName();
	$q=new mysql_squid_builder();
	$CurrentHourTable="squidhour_".date("YmdH");
	if($GLOBALS["VERBOSE"]){echo "Find hours tables...\n";}
	$tables=$q->LIST_TABLES_HOURS_TEMP();
	$c=0;
	$t=time();
	$CountDeTable=0;
	while (list ($table, $none) = each ($tables) ){
		if($table==$CurrentHourTable){if($GLOBALS["VERBOSE"]){echo "SKIP `$table`\n";}continue;}
		if(!preg_match("#squidhour_([0-9]+)#",$table,$re)){continue;}
		$hour=$re[1];
		$year=substr($hour,0,4);
		$month=substr($hour,4,2);
		$day=substr($hour,6,2);
		$tt[$table]=true;
	}
	if(!is_array($tt)){return null;}
	$CountDeTable=count($tt);
	if($CountDeTable>0){
		$sock=new sockets();
		$time=$sock->getFrameWork("squid.php?squidhour-repair-exec=yes");
		if(is_numeric($time)){
			$title=$tpl->javascript_parse_text("{squidhour_not_scanned} {running} {$time}Mn");
			$title=str_replace("%s", $CountDeTable, $title);
			$title=str_replace("%", $CountDeTable, $title);
			return Paragraphe32("noacco:$title ",'launch_squidhour_explain'
					,"blur()","wait-clock.gif");			
		}
		$launch_squidhour_explain=$tpl->_ENGINE_parse_body("{launch_squidhour_explain}");
		$title=$tpl->javascript_parse_text("{squidhour_not_scanned}");
		$title=str_replace("%s", $CountDeTable, $title);
		$title=str_replace("%", $CountDeTable, $title);
		return Paragraphe32("noacco:$title","$launch_squidhour_explain"
				,"Loadjs('$page?squidhour-js=yes')","Database32-red.png");
	}
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:41,代码来源:squid.statistics.central.php

示例3: remove_memory_tables

function remove_memory_tables()
{
    $q = new mysql_squid_builder();
    $QUEUE = $q->LIST_TABLES_HOURS_TEMP();
    while (list($tablename, $FINAL_ARRAY) = each($QUEUE)) {
        echo "removing {$tablename}\n";
        $q->QUERY_SQL("DROP TABLE {$tablename}");
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:9,代码来源:exec.squid.logs.import.php

示例4: UPDATE_HOURS_IP

function UPDATE_HOURS_IP($IP, $name)
{
    if (!$GLOBALS["UPDATE"]) {
        return;
    }
    $q = new mysql_squid_builder();
    $LIST_TABLES_HOURS_TEMP = $q->LIST_TABLES_HOURS_TEMP();
    while (list($tablename, $ligne) = each($LIST_TABLES_HOURS_TEMP)) {
        $q->QUERY_SQL("UPDATE {$tablename} SET `uid`='{$name}' WHERE `client`='{$IP}'");
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:11,代码来源:exec.usrmactranslation.php

示例5: clean_empty_tables

function clean_empty_tables()
{
    $unix = new unix();
    ///etc/artica-postfix/pids/exec.squid.stats.hours.php.clean_empty_tables.time
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $timefile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".time";
    if ($GLOBALS["VERBOSE"]) {
        echo "Time File: {$timefile}\n";
    }
    $pid = @file_get_contents($pidfile);
    if ($GLOBALS["FORCE"]) {
        ToSyslog("macscan(): Executed in --force mode");
    }
    if (!$GLOBALS["FORCE"]) {
        if ($pid < 100) {
            $pid = null;
        }
        $unix = new unix();
        if ($unix->process_exists($pid, basename(__FILE__))) {
            if ($GLOBALS["VERBOSE"]) {
                echo "Already executed pid {$pid}\n";
            }
            ToSyslog("clean_empty_tables(): already executed pid {$pid}");
            return;
        }
        $timeexec = $unix->file_time_min($timefile);
        if ($timeexec < 30) {
            return;
        }
        $mypid = getmypid();
        @file_put_contents($pidfile, $mypid);
    }
    @unlink($timefile);
    @file_put_contents($timefile, time());
    $q = new mysql_squid_builder();
    $TABLES = $q->LIST_TABLES_HOURS_TEMP();
    $current = "squidhour_" . date("YmdH");
    while (list($tablename, $none) = each($TABLES)) {
        if ($tablename == $current) {
            continue;
        }
        if ($q->COUNT_ROWS($tablename) > 0) {
            continue;
        }
        $q->QUERY_SQL("DROP TABLE `{$tablename}`");
    }
    $TABLES = $q->LIST_TABLES_SIZEHOURS();
    $current = "sizehour_" . date("YmdH");
    while (list($tablename, $none) = each($TABLES)) {
        if ($tablename == $current) {
            continue;
        }
        if ($q->COUNT_ROWS($tablename) > 0) {
            continue;
        }
        $q->QUERY_SQL("DROP TABLE `{$tablename}`");
    }
    $TABLES = $q->LIST_TABLES_dansguardian_events();
    $current = " dansguardian_events_" . date("Ymd");
    while (list($tablename, $none) = each($TABLES)) {
        if ($tablename == $current) {
            continue;
        }
        if ($q->COUNT_ROWS($tablename) > 0) {
            continue;
        }
        $q->QUERY_SQL("DROP TABLE `{$tablename}`");
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:69,代码来源:exec.squid.stats.hours.php


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