index.php 1016 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. require_once WORKERMAN_ROOT_DIR .'applications/Statistics/Web/_init.php';
  3. $func = isset($_GET['fn']) ? $_GET['fn'] : 'main';
  4. $func = "\\Statistics\\Modules\\".$func;
  5. if(!function_exists($func))
  6. {
  7. foreach(glob(ST_ROOT . "/Modules/*") as $php_file)
  8. {
  9. require_once $php_file;
  10. }
  11. }
  12. if(!function_exists($func))
  13. {
  14. $func = "\\Statistics\\Modules\\main";
  15. }
  16. $module = isset($_GET['module']) ? $_GET['module'] : '';
  17. $interface = isset($_GET['interface']) ? $_GET['interface'] : '';
  18. $date = isset($_GET['date']) ? $_GET['date'] : date('Y-m-d');
  19. $start_time = isset($_GET['start_time']) ? $_GET['start_time'] : strtotime(date('Y-m-d'));
  20. $offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
  21. $log_count_per_ip = $log_count_per_page = 40;
  22. if(empty($_GET['count']) && $ip_count = count(\Statistics\Lib\Cache::$ServerIpList))
  23. {
  24. $log_count_per_ip = ceil($log_count_per_page/$ip_count);
  25. }
  26. call_user_func_array($func, array($module, $interface, $date, $start_time, $offset, $log_count_per_ip));