-
Notifications
You must be signed in to change notification settings - Fork 40
/
stats.php
executable file
·105 lines (80 loc) · 2.86 KB
/
stats.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
require 'config.php';
require '/var/www/classes/Session.class.php';
require '/var/www/classes/Player.class.php';
require '/var/www/classes/System.class.php';
require '/var/www/classes/Ranking.class.php';
$session = new Session();
if($session->issetLogin()){
$system = new System();
$ranking = new Ranking();
require 'template/contentStart.php';
$all = ' class="active"';
$cur = '';
$show = 'game';
$game = ' active';
$server = $forum = '';
if($system->issetGet('show')){
$showInfo = $system->switchGet('show', 'game', 'server', 'forum');
if($showInfo['ISSET_GET'] == 1){
switch($showInfo['GET_VALUE']){
case 'game':
$show = 'game';
break;
case 'server':
$show = 'server';
$game = '';
$server = ' active';
break;
case 'forum':
$show = 'forum';
$game = '';
$forum = ' active';
break;
}
}
}
?>
<div class="span12">
<?php
if($session->issetMsg()){
$session->returnMsg();
}
?>
<div class="widget-box ">
<div class="widget-title">
<ul class="nav nav-tabs">
<li class="link <?php echo $game; ?>"><a href="stats.php"><span class="icon-tab he16-stats"></span>Game Stats</a></li>
<li class="link<?php echo $server; ?>"><a href="?show=server"><span class="icon-tab he16-server_stats"></span>Server Stats</a></li>
<li class="link<?php echo $forum; ?>"><a href="?show=forum"><span class="icon-tab he16-forum_stats"></span>Forum Stats</a></li>
<a href="#"><span class="label label-info"><?php echo _("Help"); ?></span></a>
</ul>
</div>
<div class="widget-content padding noborder">
<?php
switch($show){
case 'game':
$display = '';
if($system->issetGet('round')){
if($_GET['round'] == 'all'){
$display = 'all';
}
}
$ranking->serverStats_list($display);
break;
case 'server':
$system->handleError('Sorry, this page isn\'t implemented yet.', 'stats.php');
break;
case 'forum':
$system->handleError('Sorry, this page isn\'t implemented yet.', 'stats.php');
break;
}
?>
</div>
<div class="nav nav-tabs" style="clear: both;"></div>
<?php
require 'template/contentEnd.php';
} else {
header("Location:index.php");
}
?>