-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtool.php
56 lines (55 loc) · 2.03 KB
/
tool.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
*
* @category admintools
* @package wbCounter
* @original wbstats
* @author Ruud Eisinga - Dev4me
* @link http://www.dev4me.nl/
* @license http://www.gnu.org/licenses/gpl.html
* @platform WebsiteBaker 2.8.x
* @requirements PHP 5.2.2 and higher
* @version 0.1.9.x
* @lastmodified Februari 20, 2015
*
*/
/* -------------------------------------------------------- */
// Must include code to stop this file being accessed directly
if(defined('WB_PATH') == false) { die('Cannot access '.basename(__DIR__).'/'.basename(__FILE__).' directly'); }
/* -------------------------------------------------------- */
$sAddonName = basename(__DIR__);
require(WB_PATH .'/modules/'.$sAddonName.'/languages/EN.php');
if(file_exists(WB_PATH .'/modules/'.$sAddonName.'/languages/'.LANGUAGE .'.php')) {
require(WB_PATH .'/modules/'.$sAddonName.'/languages/'.LANGUAGE .'.php');
}
if (!class_exists('wbstats', false)){require __DIR__.'/wbstats.php';}
$moduleName = basename(__DIR__);
$admintool_url = ADMIN_URL .'/admintools/index.php';
$module_link = ADMIN_URL .'/admintools/tool.php?tool='.$moduleName;
$module_overview_link = ADMIN_URL .'/admintools/tool.php?tool='.$moduleName.'&overview';
$module_visitors_link = ADMIN_URL .'/admintools/tool.php?tool='.$moduleName.'&visitors';
$module_history_link = ADMIN_URL .'/admintools/tool.php?tool='.$moduleName.'&history';
$module_help_link = ADMIN_URL .'/admintools/tool.php?tool='.$moduleName.'&help';
$sFrontend = '';
require_once ("head.php");
if (isset($_GET['overview'])) {
require ("overview.php");
return;
}
if (isset($_GET['visitors'])) {
require ("visitors.php");
return;
}
if (isset($_GET['history'])) {
require ("history.php");
return;
}
if (isset($_GET['help'])) {
require ("help.php");
return;
}
if (!$check = $database->get_one('SELECT SUM(`user`) visitors FROM '.$table_day)) {
require ("help.php");
return;
}
require_once ("overview.php");