-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
71 lines (67 loc) · 1.94 KB
/
index.php
File metadata and controls
71 lines (67 loc) · 1.94 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
require_once('includes/core.php');
/* TODO:
- Validate custom home page
*/
/* Get basic stats */
$TotalPunishments = $GLOBALS['sql']->Query_FetchArray('SELECT count(*) AS prows FROM '.SQL_PUNISHMENTS.'');
$GLOBALS['varcache']['punishcount'] = $TotalPunishments['prows'];
unset($TotalPunishments);
$GLOBALS['theme']->AddHeaderStat(sprintf(ParseText('#TRANS_1300'), number_format($GLOBALS['varcache']['punishcount'])));
/* Select Page */
$PageQuery = isset($_GET['q'])?$_GET['q']:$GLOBALS['settings']['site_index'];
switch($PageQuery) {
case 'index':
require_once(DIR_PAGES.'page.home.php');
break;
case 'punishments':
require_once(DIR_PAGES.'page.punishments.php');
break;
case 'view':
require_once(DIR_PAGES.'page.view.php');
break;
case 'search':
case 'searchme':
require_once(DIR_PAGES.'page.search.php');
break;
case 'appeal':
require_once(DIR_PAGES.'page.appeal.php');
break;
case 'servers':
require_once(DIR_PAGES.'page.servers.php');
break;
case 'stats':
require_once(DIR_PAGES.'page.statistics.php');
break;
case 'stats2':
require_once(DIR_PAGES.'page.statistics2.php');
break;
case 'login':
case 'logout':
require_once(DIR_PAGES.'page.login.php');
break;
case 'admin':
require_once(DIR_PAGES.'page.admin.php');
break;
case 'me':
require_once(DIR_PAGES.'page.me.php');
break;
case 'steamid':
require_once(DIR_PAGES.'page.steamid.php');
break;
case 'serverquery':
if(AJAX)
require_once(DIR_PAGES.'page.ajax.serverquery.php');
else
Redirect('^');
break;
default:
if(SP_CustomPageExists($PageQuery) && $PageQuery != 'home_intro')
require_once(DIR_PAGES.'page.custom.php');
else
Redirect('^');
break;
}
/* Build final page */
echo $GLOBALS['theme']->BuildPage();
?>