/dpanel/stat.of_days.php
PHP | 40 lines | 32 code | 8 blank | 0 comment | 5 complexity | 40b398fa26862e4a64a1782447688704 MD5 | raw file
- <?php
-
- include_once '../sys/inc/start.php';
- $doc = new document(5);
- $doc->title = __('?????????? (?? ????)');
-
- if (!$dcms->log_of_visits) {
- $doc->err(__('?????? ??????? ?????????? ?????????'));
- }
-
- if (isset($log_of_visits) && mysql_result(mysql_query("SELECT COUNT(*) FROM `log_of_visits_today` WHERE `time` <> '" . DAY_TIME . "' LIMIT 1"), 0)) {
- $log_of_visits->tally();
- }
-
- $pages = new pages;
- $pages->posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `log_of_visits_for_days`"), 0); // ?????????? ?????????
- $pages->this_page(); // ???????? ??????? ????????
-
- $listing = new listing();
- $q = mysql_query("SELECT * FROM `log_of_visits_for_days` ORDER BY `time_day` DESC LIMIT $pages->limit");
- while ($st = mysql_fetch_assoc($q)) {
- $post = $listing->post();
- $post->title = date('d-m-Y', $st['time_day']);
- $post->icon('statistics');
- $post->content = "<table border='1' style='border-collapse: collapse'>\n";
- $post->content .= "<tr><td></td><td>WAP</td><td>PDA</td><td>iTouch</td><td>WEB</td><td>" . __('? ?????') . "</td></tr>\n";
- $post->content .= "<tr><td>" . __('?????') . "</td><td>$st[hosts_wap]</td><td>$st[hosts_pda]</td><td>$st[hosts_itouch]</td><td>$st[hosts_web]</td><td>" . ($st['hosts_wap'] + $st['hosts_pda'] + $st['hosts_itouch'] + $st['hosts_web']) . "</td></tr>\n";
- $post->content .= "<tr><td>" . __('????') . "</td><td>$st[hits_wap]</td><td>$st[hits_pda]</td><td>$st[hits_itouch]</td><td>$st[hits_web]</td><td>" . ($st['hits_wap'] + $st['hits_pda'] + $st['hits_itouch'] + $st['hits_web']) . "</td></tr>\n";
- $post->content .= "</table>\n";
- }
- $listing->display(__('????????? ???????????'));
-
- $pages->display('?');
-
- if (!$dcms->log_of_visits) {
- $doc->act(__('?????????? ????????'), 'sys.settings.daemons.php');
- }
-
- $doc->ret(__('???????'), './');
- ?>