本文整理汇总了PHP中mysql_squid_builder::LIST_TABLES_SIZEHOURS方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_squid_builder::LIST_TABLES_SIZEHOURS方法的具体用法?PHP mysql_squid_builder::LIST_TABLES_SIZEHOURS怎么用?PHP mysql_squid_builder::LIST_TABLES_SIZEHOURS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysql_squid_builder
的用法示例。
在下文中一共展示了mysql_squid_builder::LIST_TABLES_SIZEHOURS方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: start_export
function start_export()
{
$unix = new unix();
$sock = new sockets();
$q = new mysql_squid_builder();
$ArticaProxyStatisticsBackupFolder = $sock->GET_INFO("ArticaProxyStatisticsBackupFolder");
if ($ArticaProxyStatisticsBackupFolder == null) {
$ArticaProxyStatisticsBackupFolder = "/home/artica/squid/backup-statistics";
}
$ArticaProxyStatisticsBackupFolder = $ArticaProxyStatisticsBackupFolder . "/export";
$LIST_TABLES_YOUTUBE_HOURS = $q->LIST_TABLES_YOUTUBE_HOURS();
$LIST_TABLES_SIZEHOURS = $q->LIST_TABLES_SIZEHOURS();
$LIST_TABLES_QUOTA_HOURS = $q->LIST_TABLES_QUOTA_HOURS();
$LIST_TABLES_QUOTADAY = $q->LIST_TABLES_QUOTADAY();
$LIST_TABLES_QUOTAMONTH = $q->LIST_TABLES_QUOTAMONTH();
$LIST_TABLES_SEARCHWORDS_HOURS = $q->LIST_TABLES_SEARCHWORDS_HOURS();
$LIST_TABLES_SEARCHWORDS_DAY = $q->LIST_TABLES_SEARCHWORDS_DAY();
$LIST_TABLES_dansguardian_events = $q->LIST_TABLES_dansguardian_events();
$LIST_TABLES_HOURS = $q->LIST_TABLES_HOURS();
$LIST_TABLES_USERSIZED = $q->LIST_TABLES_USERSIZED();
$LIST_TABLES_YOUTUBE_WEEK = $q->LIST_TABLES_YOUTUBE_WEEK();
$LIST_TABLES_WEEKS = $q->LIST_TABLES_WEEKS();
$LIST_TABLES_MEMBERS = $q->LIST_TABLES_MEMBERS();
$LIST_TABLES_GSIZE = $q->LIST_TABLES_GSIZE();
$LIST_TABLES_GCACHE = $q->LIST_TABLES_GCACHE();
$LIST_TABLES_VISITED = $q->LIST_TABLES_VISITED();
$LIST_TABLES_BLOCKED = $q->LIST_TABLES_BLOCKED();
$LIST_TABLES_BLOCKED_WEEK = $q->LIST_TABLES_BLOCKED_WEEK();
$LIST_TABLES_BLOCKED_DAY = $q->LIST_TABLES_BLOCKED_DAY();
$LIST_TABLES_WWWUID = $q->LIST_TABLES_WWWUID();
$LIST_CAT_FAMDAY = $q->LIST_CAT_FAMDAY();
while (list($tablename, $none) = each($LIST_TABLES_YOUTUBE_HOURS)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_SIZEHOURS)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_QUOTADAY)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_QUOTAMONTH)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_SEARCHWORDS_HOURS)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_SEARCHWORDS_DAY)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_QUOTA_HOURS)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_dansguardian_events)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_HOURS)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_USERSIZED)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_BLOCKED_WEEK)) {
if (trim($tablename) == null) {
continue;
}
$EXPORT_SOURCES[$tablename] = true;
}
while (list($tablename, $none) = each($LIST_TABLES_BLOCKED)) {
if (trim($tablename) == null) {
continue;
//.........这里部分代码省略.........
示例2: showtables
function showtables()
{
$q = new mysql_squid_builder();
//$results=$q->QUERY_SQL("SHOW TABLES");
//while($ligne=@mysql_fetch_array($results,MYSQL_ASSOC)){
// echo $ligne["Tables_in_squidlogs"]."\n";
//}
$LIST_TABLES_SIZEHOURS = $q->LIST_TABLES_SIZEHOURS();
while (list($tablename, $none) = each($LIST_TABLES_SIZEHOURS)) {
echo "Size Hour: {$tablename}\n";
}
}
示例3: 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}`");
}
}