PageRenderTime 60ms CodeModel.GetById 37ms RepoModel.GetById 0ms app.codeStats 0ms

/dpanel/stat.of_days.php

https://bitbucket.org/DESURE/dcms
PHP | 40 lines | 32 code | 8 blank | 0 comment | 5 complexity | 40b398fa26862e4a64a1782447688704 MD5 | raw file
  1. <?php
  2. include_once '../sys/inc/start.php';
  3. $doc = new document(5);
  4. $doc->title = __('?????????? (?? ????)');
  5. if (!$dcms->log_of_visits) {
  6. $doc->err(__('?????? ??????? ?????????? ?????????'));
  7. }
  8. if (isset($log_of_visits) && mysql_result(mysql_query("SELECT COUNT(*) FROM `log_of_visits_today` WHERE `time` <> '" . DAY_TIME . "' LIMIT 1"), 0)) {
  9. $log_of_visits->tally();
  10. }
  11. $pages = new pages;
  12. $pages->posts = mysql_result(mysql_query("SELECT COUNT(*) FROM `log_of_visits_for_days`"), 0); // ?????????? ?????????
  13. $pages->this_page(); // ???????? ??????? ????????
  14. $listing = new listing();
  15. $q = mysql_query("SELECT * FROM `log_of_visits_for_days` ORDER BY `time_day` DESC LIMIT $pages->limit");
  16. while ($st = mysql_fetch_assoc($q)) {
  17. $post = $listing->post();
  18. $post->title = date('d-m-Y', $st['time_day']);
  19. $post->icon('statistics');
  20. $post->content = "<table border='1' style='border-collapse: collapse'>\n";
  21. $post->content .= "<tr><td></td><td>WAP</td><td>PDA</td><td>iTouch</td><td>WEB</td><td>" . __('? ?????') . "</td></tr>\n";
  22. $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";
  23. $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";
  24. $post->content .= "</table>\n";
  25. }
  26. $listing->display(__('????????? ???????????'));
  27. $pages->display('?');
  28. if (!$dcms->log_of_visits) {
  29. $doc->act(__('?????????? ????????'), 'sys.settings.daemons.php');
  30. }
  31. $doc->ret(__('???????'), './');
  32. ?>