require "modules/{$module_name}/functions.inc"; global $nowyear, $nowmonth, $nowdate, $nowhour, $MAIN_CFG, $prefix, $db, $now; list($total) = $db->sql_ufetchrow('SELECT SUM(count) FROM ' . $prefix . "_counter \n\tWHERE type='os'", SQL_NUM); require_once 'header.php'; $total++; OpenTable(); echo '<table class="forumline" cellspacing="1" width="100%"> <tr> <td class="cat"><div class="cattitle" style="text-align:center;">' . $MAIN_CFG['global']['sitename'] . ' ' . _STATS . '</div></td> </tr><tr> <td class="row1" align="center"><span class="gen">' . _WERECEIVED . " <b>{$total}</b> " . _PAGESVIEWS . " {$MAIN_CFG['global']['startdate']}<br />" . _TODAYIS . ": " . sprintf(_DATESTRING4, getmonth($now[1]), $now[0], $now[2]) . "<br />"; list($year, $month, $hits) = $db->sql_ufetchrow("SELECT year, month, SUM(hits) as hits FROM " . $prefix . "_stats_hour \n\tGROUP BY month, year \n\tORDER BY hits DESC", SQL_NUM); echo _MOSTMONTH . ": " . getmonth($month) . " {$year} ({$hits} " . _HITS . ")<br />"; list($year, $month, $date, $hits) = $db->sql_ufetchrow("SELECT year, month, date, SUM(hits) as hits FROM " . $prefix . "_stats_hour \n\tGROUP BY date, month, year \n\tORDER BY hits DESC", SQL_NUM); echo _MOSTDAY . ": {$date} " . getmonth($month) . " {$year} ({$hits} " . _HITS . ")<br />"; list($year, $month, $date, $hour, $hits) = $db->sql_ufetchrow("SELECT year, month, date, hour, hits from " . $prefix . "_stats_hour \n\tORDER BY hits DESC", SQL_NUM); if ($hour < 10) { $hour = "0{$hour}:00 - 0{$hour}:59"; } else { $hour = "{$hour}:00 - {$hour}:59"; } echo _MOSTHOUR . ": {$hour} " . _ON . " " . getmonth($month) . " {$date}, {$year} ({$hits} " . _HITS . ")<br /><br />[ <a href=\"" . URL::index() . "\">" . _RETURNBASICSTATS . '</a> ]</span><br /> </td> </tr></table><br />'; showYearStats($nowyear); echo '<br />'; showMonthStats($nowyear, $nowmonth); echo '<br />'; showDailyStats($nowyear, $nowmonth, $nowdate); echo '<br />'; showHourlyStats($nowyear, $nowmonth, $nowdate); CloseTable();
function DailyStats($year, $month, $date) { require_once 'header.php'; OpenTable(); showHourlyStats($year, $month, $date); echo '<br />'; echo "<center>[ <a href=\"" . URL::index() . "\">" . _BACKTOMAIN . "</a> | <a href=\"" . URL::index("&file=details") . "\">" . _BACKTODETSTATS . "</a> ]</center>"; CloseTable(); }
function DailyStats($year, $month, $date) { global $sitename, $module_name; include "header.php"; title("{$sitename} " . _STATS . ""); opentable(); $year = intval($year); $month = intval($month); $date = intval($date); showHourlyStats($year, $month, $date); echo "<BR>"; echo "<center>[ <a href=\"modules.php?name={$module_name}\">" . _BACKTOMAIN . "</a> | <a href=\"modules.php?name={$module_name}&op=Stats\">" . _BACKTODETSTATS . "</a> ]</center>"; closetable(); include "footer.php"; }