forked from Madmunus/AntiCombats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
adminbar.php
139 lines (135 loc) · 4.15 KB
/
adminbar.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
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
<?
defined('AntiBK') or die("Доступ запрещен!");
$char->test->Admin();
?>
<script src="scripts/sha1.js" type="text/javascript"></script>
<script type="text/javascript">
function deleteChar (d_guid)
{
$.post('ajax_admin.php', {'do': 'delete_char', 'd_guid': d_guid}, function (data){
var error = top.exploder(data);
if (error[0] == 'complete')
$('tr#'+d_guid).hide();
});
}
$(function (){
$('#getSHA1').click(function (){
$('#sha1text').val(SHA1($('#text').val()));
});
$('input[name=changetype]').click(function (){
$('div[name=content]').hide();
$('div#'+$(this).attr('id')+'c').show();
});
$('img.remove').click(function (){
deleteChar($(this).attr('id'));
});
});
</script>
<style>
.remove {cursor: pointer;}
</style>
<font color='red' id='error'><?$char->error->getFormattedError($error, $parameters);?></font>
<table width="100%">
<tr>
<td align="left">
<input type="button" class="nav" value="Основное" id="main" name="changetype">
<input type="button" class="nav" value="Персонажи" id="characters" name="changetype">
</td>
<td align="right">
<input type="button" class="nav" value="Админ панель" onclick="window.open('admin/index.php', '', 'menubar=no,status=no');">
<input type="button" class="nav" value="<?echo $lang['refresh'];?>" id="link" link="admin">
<input type="button" class="nav" value="<?echo $lang['return'];?>" id="link" link="inv">
</td>
</tr>
</table>
<div id="mainc" name="content">
<font color='red'>Глобальные переменные:</font>
<table border="1" cellspacing="0" cellpadding="0" width="100%">
<tr style="font-weight: bold;">
<?
foreach ($_SESSION as $key => $value)
echo "<td>$key</td>";
?>
</tr>
<tr>
<?
foreach ($_SESSION as $key => $value)
echo "<td>$value</td>";
?>
</tr></table>
<font color='red'>Cookies:</font>
<table border="1" cellspacing="0" cellpadding="0" width="100%">
<tr style="font-weight: bold;">
<?
foreach ($_COOKIE as $key => $value)
echo "<td>$key</td>";
?>
</tr>
<tr>
<?
foreach ($_COOKIE as $key => $value)
echo "<td>$value</td>";
?>
</tr></table>
<font color='red'>Lasts:</font>
<table border="1" cellspacing="0" cellpadding="0" width="100%">
<tr style="font-weight: bold;">
<td>next_shape</td>
<td>last_go</td>
<td>last_return</td>
<td>last_time</td>
</tr>
<tr>
<?
echo "<td>".date('d.m.y H:i:s', $char_db['next_shape'])."</td>";
echo "<td>".date('d.m.y H:i:s', $char_db['last_go'])."</td>";
echo "<td>".date('d.m.y H:i:s', $char_db['last_return'])."</td>";
echo "<td>".date('d.m.y H:i:s', $char_db['last_time'])."</td>";
?>
</tr>
</table>
<font color='red'>SHA1:</font>
<input type='text' id='text' style='width: 40%;'><input type='submit' id='getSHA1' value='Зашифровать'><input type='text' id='sha1text' readonly style='width: 40%;'><br>
</div>
<div id="charactersc" name="content" style="display: none;">
<font color='red'>Персонажи:</font>
<table border="1" cellspacing="0" cellpadding="0" width="100%">
<tr style="font-weight: bold;">
<td>Guid</td>
<td>Login</td>
<td>Level</td>
<td>Exp</td>
<td>Next Up</td>
<td>Money</td>
<td>Euro</td>
<td>City</td>
<td>Room</td>
<td> </td>
</tr>
<tr>
<?
$all_characters = $adb->select("SELECT * FROM `characters` ORDER BY `guid`;");
foreach ($all_characters as $one_character)
{
$online = $adb->selectCell("SELECT `guid` FROM `online` WHERE `guid` = ?d", $one_character['guid']);
$bg = ($online) ?"#00FFAA" :"#FFAAAA";
echo "<tr id='$one_character[guid]' style='background: $bg;'>";
echo "<td>$one_character[guid]</td>";
echo "<td>$one_character[login]</td>";
echo "<td>$one_character[level]</td>";
echo "<td>$one_character[exp]</td>";
echo "<td>$one_character[next_up]</td>";
echo "<td>".getMoney($one_character['money'])." кр.</td>";
echo "<td>".getMoney($one_character['money_euro'])." кр.</td>";
echo "<td>$one_character[city]</td>";
echo "<td>$one_character[room]</td>";
echo "<td width='14'><img src='img/icon/clear.gif' width='14' height='14' border='0' alt='Удалить персонажа' id='$one_character[guid]' class='remove'></td>";
echo "</tr>";
}
?>
</tr></table>
</div>
<?
echo time().'<br>';
echo microtime();
?>