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


PHP mysql_squid_builder::LIST_TABLES_MONTH方法代码示例

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


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

示例1: CleanAll

function CleanAll()
{
    $q = new mysql_squid_builder();
    $LIST_TABLES_MONTH = $q->LIST_TABLES_MONTH();
    while (list($tablename, $none) = each($LIST_TABLES_MONTH)) {
        echo "Empty {$tablename}\n";
        $q->QUERY_SQL("DROP TABLE `{$tablename}`");
    }
    $q->QUERY_SQL("UPDATE tables_day SET monthdone=0 WHERE monthdone=1");
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:10,代码来源:exec.squid.stats.uid-month.php

示例2: change_month_popup

function change_month_popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $t = $_GET["t"];
    $members = $tpl->_ENGINE_parse_body("{members}");
    $month = $tpl->_ENGINE_parse_body("{month}");
    $array = array();
    $tables = $q->LIST_TABLES_MONTH();
    while (list($index, $tablez) = each($tables)) {
        $array[$tablez] = $q->MONTH_TITLE_FROM_TABLENAME($tablez);
    }
    $field = Field_array_Hash($array, "table-m-{$t}", $table, " DayMemberChangeMonthPanel{$t}()", null, 0, "font-size:14px");
    $array = array();
    $html = "\n\t<table style='width:99%' class=form>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:16px;'>{month}:</td>\n\t\t\t\t<td>{$field}</td>\n\t\t\t</tr>\n\t</table>\n\n\t<script>\n\t\tfunction DayMemberChangeMonthPanel{$t}(){\n\t\t\tvar xday=document.getElementById('table-m-{$t}').value;\n\t\t\t\$('.ftitle').html('{$members}&raquo;{$month}&raquo;table:'+xday);\n\t\t\t\$('#{$t}').flexOptions({url: '{$page}?search=yes&table='+xday,title:'{$members}'+xday}).flexReload();\n\t\t\n\t\t}\n\t\n\t</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:18,代码来源:squid.members.query.php

示例3: clean_squid_stats_dbs

function clean_squid_stats_dbs()
{
    $sock = new sockets();
    $DisableArticaProxyStatistics = $sock->GET_INFO("DisableArticaProxyStatistics");
    $CleanArticaSquidDatabases = $sock->GET_INFO("CleanArticaSquidDatabases");
    if (!is_numeric($DisableArticaProxyStatistics)) {
        $DisableArticaProxyStatistics = 0;
    }
    if (!is_numeric($CleanArticaSquidDatabases)) {
        $CleanArticaSquidDatabases = 0;
    }
    if (!$GLOBALS["FORCE"]) {
        if ($CleanArticaSquidDatabases == 0) {
            echo "Option is not activated...\n";
            return;
        }
    }
    $q = new mysql_squid_builder();
    $tables = $q->LIST_TABLES_DAYS();
    $rows = 0;
    $count_tables = 0;
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $tables = $q->LIST_TABLES_DAYS_BLOCKED();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $tables = $q->LIST_TABLES_MEMBERS();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $tables = $q->LIST_TABLES_MONTH();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $tables = $q->LIST_TABLES_WEEKS();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $q = new mysql_catz();
    $tables = $q->LIST_TABLES_CATEGORIES();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $q = new mysql();
    if ($q->DATABASE_EXISTS("catz")) {
        $q->DELETE_DATABASE("catz");
    }
    if ($count_tables > 0) {
        mysql_admin_mysql(1, "Restarting MySQL service...", null, __FILE__, __LINE__);
        shell_exec("/etc/init.d/mysql restart");
    }
    $sock->TOP_NOTIFY("{$count_tables} statistics tables as been deleted with {$rows} rows", "info");
    //print_r($tables);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:86,代码来源:exec.mysql.clean.php

示例4: updates_retranslation


//.........这里部分代码省略.........
            $pid = null;
        }
        $unix = new unix();
        if ($unix->process_exists($pid, basename(__FILE__))) {
            if ($GLOBALS["VERBOSE"]) {
                echo "Already executed pid {$pid}\n";
            }
            return;
        }
        $mypid = getmypid();
        @file_put_contents($pidfile, $mypid);
    }
    $q = new mysql_squid_builder();
    $sql = "UPDATE youtube_all SET uid='{$uid}' WHERE MAC='{$MAC}'";
    $q->QUERY_SQL($sql);
    $sql = "UPDATE UserAuthDaysGrouped SET uid='{$uid}' WHERE MAC='{$MAC}'";
    $q->QUERY_SQL($sql);
    $sql = "UPDATE UserAuthDays SET uid='{$uid}' WHERE MAC='{$MAC}'";
    $q->QUERY_SQL($sql);
    $TABLES = $q->LIST_TABLES_QUOTADAY();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
    $TABLES = $q->LIST_TABLES_QUOTAMONTH();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
    $TABLES = $q->LIST_TABLES_dansguardian_events();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
    $TABLES = $q->LIST_TABLES_USERSIZED();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
    $TABLES = $q->LIST_TABLES_YOUTUBE_HOURS();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
    $TABLES = $q->LIST_TABLES_YOUTUBE_DAYS();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
    $TABLES = $q->LIST_TABLES_YOUTUBE_WEEK();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
    $TABLES = $q->LIST_TABLES_SEARCHWORDS_DAY();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
    $TABLES = $q->LIST_TABLES_SEARCHWORDS_HOURS();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
    $TABLES = $q->LIST_TABLES_MONTH();
    while (list($tablename, $rows) = each($TABLES)) {
        $sql = "UPDATE `{$tablename}` SET uid='{$uid}' WHERE MAC='{$MAC}'";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            echo $q->mysql_error;
        }
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:exec.squid.retranslations.updates.php

示例5: remove_numeric_members

function remove_numeric_members()
{
    $unix = new unix();
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $pid = @file_get_contents($pidfile);
    if ($pid < 100) {
        $pid = null;
    }
    if ($unix->process_exists($pid, basename(__FILE__))) {
        $timepid = $unix->PROCCESS_TIME_MIN($pid);
        ufdbguard_admin_events("Already executed pid {$pid} since {$timepid}", __FUNCTION__, __FILE__, __LINE__, "reports");
        if ($GLOBALS["VERBOSE"]) {
            echo "Already executed pid {$pid}\n";
        }
        return;
    }
    $q = new mysql_squid_builder();
    $q->QUERY_SQL("DELETE FROM members_uid WHERE uid REGEXP '^[0-9]+\$'");
    $q->QUERY_SQL("DELETE FROM UserAuthDaysGrouped WHERE uid REGEXP '^[0-9]+\$'");
    $q->QUERY_SQL("DELETE FROM UserAutDB WHERE uid REGEXP '^[0-9]+\$'");
    $tables = $q->LIST_TABLES_WWWUID();
    while (list($tablename, $ligne) = each($tables)) {
        if (!preg_match("#^www_[0-9]+\$#", $ligne)) {
            continue;
        }
        $q->QUERY_SQL("DROP TABLE {$tablename}");
    }
    $tables = $q->LIST_TABLES_DAYS();
    while (list($tablename, $ligne) = each($tables)) {
        $q->QUERY_SQL("DELETE FROM {$tablename} WHERE uid REGEXP '^[0-9]+\$'");
    }
    $tables = $q->LIST_TABLES_WEEKS();
    while (list($tablename, $ligne) = each($tables)) {
        $q->QUERY_SQL("DELETE FROM {$tablename} WHERE uid REGEXP '^[0-9]+\$'");
    }
    $tables = $q->LIST_TABLES_MONTH();
    while (list($tablename, $ligne) = each($tables)) {
        $q->QUERY_SQL("DELETE FROM {$tablename} WHERE uid REGEXP '^[0-9]+\$'");
    }
    $tables = $q->LIST_TABLES_MEMBERS();
    while (list($tablename, $ligne) = each($tables)) {
        $q->QUERY_SQL("DELETE FROM {$tablename} WHERE uid REGEXP '^[0-9]+\$'");
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:44,代码来源:exec.squidlogs.purge.php

示例6: not_categorized_months

function not_categorized_months()
{
    $current_month_table = date("Ym") . "_month";
    $q = new mysql_squid_builder();
    $q->QUERY_SQL("TRUNCATE TABLE `catztemp`");
    if ($q->TABLE_EXISTS($current_month_table)) {
        _not_categorized_months($current_month_table);
    }
    $LIST_TABLES_MONTH = $q->LIST_TABLES_MONTH();
    while (list($tablename, $infos) = each($LIST_TABLES_MONTH)) {
        if ($tablename == $current_month_table) {
            continue;
        }
        echo "Scanning {$tablename}\n";
        _not_categorized_months($tablename);
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:17,代码来源:exec.squid.stats.not-categorized.php


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