forked from XG-Project/XG-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.php
More file actions
200 lines (192 loc) · 8.54 KB
/
Copy pathgame.php
File metadata and controls
200 lines (192 loc) · 8.54 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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?php
/**
* @package XG Project
* @copyright Copyright (c) 2008 - 2015
* @license http://opensource.org/licenses/gpl-3.0.html GPL-3.0
* @since Version 3.0.0
*/
define ( 'INSIDE' , TRUE );
define ( 'IN_GAME' , TRUE );
define ( 'XGP_ROOT' , './' );
require ( XGP_ROOT . 'application/core/common.php' );
$hooks->call_hook ( 'before_page' );
switch ( ( isset ( $_GET['page'] ) ? $_GET['page'] : NULL ) )
{
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'changelog':
include_once ( XGP_ROOT . GAME_PATH . 'changelog.php' );
new Changelog();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'overview':
include_once ( XGP_ROOT . GAME_PATH . 'overview.php' );
new Overview();
break;
case 'renameplanet':
include_once ( XGP_ROOT . GAME_PATH . 'renameplanet.php' );
new RenamePlanet();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'imperium':
include_once ( XGP_ROOT . GAME_PATH . 'imperium.php' );
new Imperium();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'resources':
include_once ( XGP_ROOT . GAME_PATH . 'buildings.php' );
new Buildings();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'resourceSettings':
include_once ( XGP_ROOT . GAME_PATH . 'resources.php' );
new Resources();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'station':
include_once ( XGP_ROOT . GAME_PATH . 'buildings.php' );
new Buildings();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'trader':
include_once ( XGP_ROOT . GAME_PATH . 'trader.php' );
new Trader();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'research':
include_once ( XGP_ROOT . GAME_PATH . 'research.php' );
new Research();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'shipyard':
include_once ( XGP_ROOT . GAME_PATH . 'shipyard.php' );
new Shipyard();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'fleet1':
include_once ( XGP_ROOT . GAME_PATH . 'fleet1.php' );
new Fleet1();
break;
case 'fleet2':
include_once ( XGP_ROOT . GAME_PATH . 'fleet2.php' );
new Fleet2();
break;
case 'fleet3':
include_once ( XGP_ROOT . GAME_PATH . 'fleet3.php' );
new Fleet3();
break;
case 'fleet4':
include_once ( XGP_ROOT . GAME_PATH . 'fleet4.php' );
new Fleet4();
break;
case 'federationlayer':
include_once ( XGP_ROOT . GAME_PATH . 'federation.php' );
new Federation();
break;
case 'shortcuts':
include_once ( XGP_ROOT . GAME_PATH . 'fleetshortcuts.php' );
new Fleetshortcuts();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'movement':
include_once ( XGP_ROOT . GAME_PATH . 'movement.php' );
new Movement();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'techtree':
include_once ( XGP_ROOT . GAME_PATH . 'techtree.php' );
new Techtree();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'galaxy':
include_once ( XGP_ROOT . GAME_PATH . 'galaxy.php' );
new Galaxy();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'phalanx':
include_once ( XGP_ROOT . GAME_PATH . 'phalanx.php' );
new Phalanx();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'defense':
include_once ( XGP_ROOT . GAME_PATH . 'defense.php' );
new Defense();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'alliance':
include_once ( XGP_ROOT . GAME_PATH . 'alliance.php' );
new Alliance();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'forums':
include_once ( XGP_ROOT . GAME_PATH . 'forum.php' );
new Forum();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'officier':
include_once ( XGP_ROOT . GAME_PATH . 'officier.php' );
new Officier();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'statistics':
include_once ( XGP_ROOT . GAME_PATH . 'statistics.php' );
new Statistics();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'search':
include_once ( XGP_ROOT . GAME_PATH . 'search.php' );
new Search();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'messages':
include_once ( XGP_ROOT . GAME_PATH . 'messages.php' );
new Messages();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'notes':
include_once ( XGP_ROOT . GAME_PATH . 'notes.php' );
new Notes();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'buddy':
include_once ( XGP_ROOT . GAME_PATH . 'buddy.php' );
new Buddy();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'options':
include_once ( XGP_ROOT . GAME_PATH . 'options.php' );
new Options();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'banned':
include_once ( XGP_ROOT . GAME_PATH . 'banned.php' );
new Banned();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'CombatReport':
include_once ( XGP_ROOT . GAME_PATH . 'combatreport.php' );
new CombatReport();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'infos':
include_once ( XGP_ROOT . GAME_PATH . 'infos.php' );
new Infos();
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
case 'logout':
$session->delete();
Functions_Lib::redirect ( XGP_ROOT );
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
default:
if ( ! isset ( $_GET['page'] ) )
{
Functions_Lib::redirect ( 'game.php?page=overview' );
}
if ( ! $hooks->call_hook ( 'new_page' ) )
{
Functions_Lib::redirect ( 'game.php?page=overview' );
}
break;
// ----------------------------------------------------------------------------------------------------------------------------------------------//
}
/* end of game.php */