-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
121 lines (100 loc) · 4.55 KB
/
index.php
File metadata and controls
121 lines (100 loc) · 4.55 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
<?php
if (!defined('IN_SPYOGAME')) die ('Hacking attempt');
list($version, $root) = $db->sql_fetch_row($db->sql_query("SELECT version, root FROM " . TABLE_MOD . " WHERE action = 'recycleurs'"));
require_once("mod/recycleurs/core/recyclers.php");
require_once("mod/recycleurs/core/phalanx.php");
require_once("mod/{$root}/lang/" . $ui_lang . "/lang_recycleurs.php");
// config OGSpy
$nb_galaxies = $server_config['num_of_galaxies'] + 1;
$nb_systems = $server_config['num_of_systems'] + 1;
if (!isset ($pub_sub_action)) {
$pub_sub_action = 'index';
}
include_once("views/page_header.php");
?>
<table width="100%">
<tr>
<td>
<table align="center">
<tr align='center'>
<?php
if ($pub_sub_action != 'recycleurs') {
echo "\t\t\t" . "<td class='c' width='150' onclick=\"window.location = 'index.php?action=recycleurs&sub_action=recycleurs';\">";
echo "<a style='cursor: pointer'><font color:'lime'>Recycleurs</font></a>";
echo "</td>";
} else {
echo "\t\t\t" . "<th width='150'>";
echo "<a>Recycleurs</a>";
echo "</th>";
}
if ($pub_sub_action != 'phalanges') {
echo "\t\t\t" . "<td class='c' width='150' onclick=\"window.location = 'index.php?action=recycleurs&sub_action=phalanges';\">";
echo "<a style='cursor: pointer'><font color:'lime'>Phalanges</font></a>";
echo "</td>";
} else {
echo "\t\t\t" . "<th width='150'>";
echo "<a>Phalanges</a>";
echo "</th>";
}
if ($user_data['user_admin'] == 1 || $user_data['user_coadmin'] == 1) {
if ($pub_sub_action != 'admin') {
echo "\t\t\t" . "<td class='c' width='150' onclick=\"window.location = 'index.php?action=recycleurs&sub_action=admin';\">";
echo "<a style='cursor: pointer'><font color:'lime'>Administration</font></a>";
echo "</td>";
} else {
echo "\t\t\t" . "<th width='150'>";
echo "<a>Administration</a>";
echo "</th>";
}
}
?>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<?php
switch ($pub_sub_action) {
case "recycleurs" :
require_once("recycleurs.php");
break;
case "phalanges" :
require_once("phalanges.php");
break;
case "admin" :
require_once("admin.php");
break;
case "add":
add_recyclers($pub_galaxie, $pub_systeme, $pub_position, $pub_porte ,$pub_nombrerecy);
break;
case "addp":
add_phalanx($pub_galaxie, $pub_systeme, $pub_position, $pub_niv);
break;
case "supp":
del_recyclers($pub_id);
break;
case "suppp":
del_phalanx($pub_id);
break;
case "set_recy_limit";
mod_set_option('recy_limit', $pub_low_limit);
redirection("index.php?action=recycleurs&sub_action=admin");
break;
case "raz";
reset_recyclers_table();
reset_phalanx_table();
redirection("index.php?action=recycleurs&sub_action=admin");
break;
default:
require_once("recycleurs.php");
break;
}
?>
</td>
</tr>
</table>
<?php
echo '<hr width="325px">' . "\n";
echo '<p align="center">MOD Recycleurs & Phalanges | Version '.$version.' | OGSteam</p>' . "\n";
include_once './views/page_tail.php';