本文整理汇总了PHP中mysql_squid_builder::LIST_TABLES_WEEKS方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_squid_builder::LIST_TABLES_WEEKS方法的具体用法?PHP mysql_squid_builder::LIST_TABLES_WEEKS怎么用?PHP mysql_squid_builder::LIST_TABLES_WEEKS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysql_squid_builder
的用法示例。
在下文中一共展示了mysql_squid_builder::LIST_TABLES_WEEKS方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: change_week_popup
function change_week_popup()
{
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql_squid_builder();
$t = $_GET["t"];
$members = $tpl->_ENGINE_parse_body("{members}");
$week = $tpl->_ENGINE_parse_body("{week}");
$array = array();
$tables = $q->LIST_TABLES_WEEKS();
while (list($index, $tablez) = each($tables)) {
$array[$tablez] = $q->WEEK_TITLE_FROM_TABLENAME($tablez);
}
$field = Field_array_Hash($array, "table-query-{$t}", $table, " DayMemberChangeWeekPanel{$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;'>{week}:</td>\n\t\t\t\t<td>{$field}</td>\n\t\t\t</tr>\n\t</table>\n\n\t<script>\n\t\tfunction DayMemberChangeWeekPanel{$t}(){\n\t\t\tvar xday=document.getElementById('table-query-{$t}').value;\n\t\t\t\$('.ftitle').html('{$members}»{$week}»table:'+xday);\n\t\t\t\$('#{$t}').flexOptions({url: '{$page}?list-week=yes&week='+xday,title:'{$members}'+xday}).flexReload();\n\t\t\n\t\t}\n\t\n\t</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例2: master_table
function master_table()
{
$q = new mysql_squid_builder();
$tpl = new templates();
$page = CurrentPageName();
$year = date("Y");
$week = intval(date('W'));
if ($_GET["table"] == null) {
$table = "{$year}{$week}_week";
} else {
$table = $_GET["table"];
}
$array = array();
$tables = $q->LIST_TABLES_WEEKS();
while (list($index, $tablez) = each($tables)) {
$array[$tablez] = $q->WEEK_TITLE_FROM_TABLENAME($tablez);
}
$MasterTitle = $q->WEEK_TITLE_FROM_TABLENAME($table);
$field = Field_array_Hash($array, "table-query-{$t}", $table, "ChangeWeekPanel{$t}()", null, 0, "font-size:12px");
$array = array();
$field = "<table style='width:100%'>\n\t<tbody>\n\t<tr><td width=100%' style='font-size:16px;font-weight:bold'>{$MasterTitle}</td>\n\t<td width=1%>\n\t<table><tbody><tr><td class=legend>{week}:</td>{$field}</td></tr></table>\n\t</td>\n\t</tr>\n\t</tbody>\n\t</table>";
$html = "\n\t<div id='master-{$t}'>\n\t{$field}<table style='width:100%'>\n\t<tbody>\n\t<tr>\n\t\t<td width='33.33%' valign='top'><div id='panel-left-top'></div></td>\n\t\t<td width='33.33%' valign='top'><div id='panel-middle-top'></div></td>\n\t\t<td width='33.33%' valign='top'><div id='panel-right-top'></div></td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t</div>\n\t<script>\n\t\tLoadAjax('panel-left-top','{$page}?panel-categories-week=yes&table={$_GET["table"]}');\n\t\t\n\t\tfunction ChangeWeekPanel{$t}(){\n\t\t\t\$('master-{$t}').remove();\t\n\t\t\tvar sdate=document.getElementById('table-query-{$t}').value;\n\t\t\tLoadAjax('panel-start-point','{$page}?master=yes&table='+sdate);\n\t\t}\n\t</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例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);
}
示例4: getmypid
$mypid = getmypid();
@file_put_contents($pidfile, $mypid);
$q = new mysql_squid_builder();
$sql = "SELECT * FROM categorize_changes";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
writelogs("Fatal Error: {$q->mysql_error}", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
die;
}
if (mysql_num_rows($results) == 0) {
echo "No changes\n";
die;
}
$table_hours = $q->LIST_TABLES_HOURS();
$table_days = $q->LIST_TABLES_DAYS();
$table_week = $q->LIST_TABLES_WEEKS();
$ALREADY = array();
$MAX = mysql_num_rows($results);
$D = 0;
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
if (isset($ALREADY[$ligne["sitename"]])) {
$q->QUERY_SQL("DELETE FROM categorize_changes WHERE `zmd5`='{$ligne["zmd5"]}'");
continue;
}
$website = $ligne["sitename"];
$categories = $q->GET_CATEGORIES($website, true);
$ALREADY[$ligne["sitename"]] = true;
reset($table_hours);
reset($table_days);
reset($table_week);
$categories = addslashes($categories);
示例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]+\$'");
}
}
示例6: 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;
//.........这里部分代码省略.........