|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
use XoopsModules\Statistics\Utility; |
|
4
|
|
|
|
|
5
|
|
|
require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
6
|
|
|
//require_once __DIR__ . '/include/statutils.php'; |
|
7
|
|
|
|
|
8
|
|
|
$op = \Xmf\Request::getCmd('op', 'main'); |
|
9
|
|
|
if (\Xmf\Request::hasVar('year', 'GET')) { |
|
10
|
|
|
$year = $_GET['year']; |
|
11
|
|
|
} |
|
12
|
|
|
if (\Xmf\Request::hasVar('month', 'GET')) { |
|
13
|
|
|
$month = $_GET['month']; |
|
14
|
|
|
} |
|
15
|
|
|
if (\Xmf\Request::hasVar('date', 'GET')) { |
|
16
|
|
|
$date = $_GET['date']; |
|
17
|
|
|
} |
|
18
|
|
|
|
|
19
|
|
|
require_once XOOPS_ROOT_PATH . '/header.php'; |
|
20
|
|
|
|
|
21
|
|
|
function statDetails($op, $year, $month, $date) |
|
22
|
|
|
{ |
|
23
|
|
|
global $xoopsTpl, $xoopsOption; |
|
24
|
|
|
|
|
25
|
|
|
$xoopsTpl->assign('lang_stat_thissite', $_SERVER['HTTP_HOST']); |
|
26
|
|
|
|
|
27
|
|
|
$l_size = getimagesize('assets/images/leftbar.gif'); |
|
|
|
|
|
|
28
|
|
|
$m_size = getimagesize('assets/images/mainbar.gif'); |
|
|
|
|
|
|
29
|
|
|
$r_size = getimagesize('assets/images/rightbar.gif'); |
|
|
|
|
|
|
30
|
|
|
|
|
31
|
|
|
switch ($op) { |
|
32
|
|
|
case b_yearlystats: |
|
33
|
|
|
$GLOBALS['xoopsOption']['template_main'] = 'y_statdetails.tpl'; |
|
34
|
|
|
$xoopsTpl->assign('lang_stat_hitdetail', STATS_BHITDETAIL); |
|
35
|
|
|
Utility::getBlockedMonthlyStats($year); |
|
36
|
|
|
break; |
|
37
|
|
|
case b_monthlystats: |
|
38
|
|
|
$GLOBALS['xoopsOption']['template_main'] = 'm_statdetails.tpl'; |
|
39
|
|
|
$xoopsTpl->assign('lang_stat_hitdetail', STATS_BHITDETAIL); |
|
40
|
|
|
Utility::getBlockedDailyStats($year, $month); |
|
41
|
|
|
break; |
|
42
|
|
|
case b_dailystats: |
|
43
|
|
|
$GLOBALS['xoopsOption']['template_main'] = 'd_statdetails.tpl'; |
|
44
|
|
|
$xoopsTpl->assign('lang_stat_hitdetail', STATS_BHITDETAIL); |
|
45
|
|
|
Utility::getBlockedHourlyStats($year, $month, $date); |
|
46
|
|
|
break; |
|
47
|
|
|
case yearlystats: |
|
48
|
|
|
$GLOBALS['xoopsOption']['template_main'] = 'y_statdetails.tpl'; |
|
49
|
|
|
$xoopsTpl->assign('lang_stat_hitdetail', STATS_HITDETAIL); |
|
50
|
|
|
Utility::getMonthlyStats($year); |
|
51
|
|
|
break; |
|
52
|
|
|
case monthlystats: |
|
53
|
|
|
$GLOBALS['xoopsOption']['template_main'] = 'm_statdetails.tpl'; |
|
54
|
|
|
$xoopsTpl->assign('lang_stat_hitdetail', STATS_HITDETAIL); |
|
55
|
|
|
Utility::getDailyStats($year, $month); |
|
56
|
|
|
break; |
|
57
|
|
|
case dailystats: |
|
58
|
|
|
$GLOBALS['xoopsOption']['template_main'] = 'd_statdetails.tpl'; |
|
59
|
|
|
$xoopsTpl->assign('lang_stat_hitdetail', STATS_HITDETAIL); |
|
60
|
|
|
Utility::getHourlyStats($year, $month, $date); |
|
61
|
|
|
break; |
|
62
|
|
|
default: |
|
63
|
|
|
$GLOBALS['xoopsOption']['template_main'] = 'statdetails.tpl'; |
|
64
|
|
|
$xoopsTpl->assign('lang_stat_invalidoperation', STATS_INVALIDOPERATION); |
|
65
|
|
|
break; |
|
66
|
|
|
} |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
statDetails($op, $year, $month, $date); |
|
70
|
|
|
|
|
71
|
|
|
require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
72
|
|
|
|