Файл: html/admin/index.php
Строк: 307
<?php
require_once '../system/func.php';
require_once '../system/header.php';
if (!$user OR $user['access'] < 3) {
?><script>showContent("/");</script><?php
exit;
}
if (isset($_GET['ticket'])) {
$r_query = $mc->query("SELECT * FROM `ticket` ");
while ($result = $r_query->fetch_array(MYSQLI_ASSOC)) {
?>
<font style="background: #593411;">
<td class='colonright'><?= print "$result[user]"; ?></td> <td class='colonleft'> : <?= print "$result[text]"; ?></td>
<hr></font>
<?php
}
}
$donat = 0;
$rebootEv = 0;
$dnt1 = $mc->query("SELECT * FROM `buyplata` WHERE `status`='1'");
$eventReboot = $mc->query("SELECT COUNT(*) as `pay` FROM `buyplata` WHERE `status` = 1 AND `event` = 1")->fetch_array(MYSQLI_ASSOC);
;
while ($dnt = $dnt1->fetch_array(MYSQLI_ASSOC)) {
$donat += (int) $dnt['colvo'];
}
?>
<style>
.colonleft{
width: 150px;
padding-left: 6;
}
.colonright{
width: 130px;
padding-right: 6;
word-break: break-all;
}
</style>
<center>
<h2><strong>-Админ панель-</strong></h2>
<div>Донат: <?php echo $donat; ?> руб. <?php //readfile("http://www.free-kassa.ru/api.php?merchant_id=86179&s=38d4bde72dbf4a7fa3bc6fe830f1d371&action=get_balance"); ?></div>
<div>REBOOT Купили: <?php echo $eventReboot['pay']; ?> человек. На сумму: <?php echo $eventReboot['pay'] * 150 * 0.9; ?> руб. (С учетом ндс)</div>
<div class="button_alt_01" onclick="showContent('/admin/admin.php?id=<?php echo $user['id']; ?>')">-Редактор игроков-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/quest/quest.php')">-Квесты-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/shop.php?shop=add')">-Создать вещь-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/shop_equip/index.php')">-Магазины-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/hunt.php?mob=add')">-Редактор мобов-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/hunt_equip/index.php')">-Охоты-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/location/')">-Локации-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/battle/')">-БОИ-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/auk/index.php')">-Редактор Аукциона-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/heroes.php')">-Редактор персонажей--</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/new.php')">-Редактор новостей-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/gift.php')">-Редактор Подарков-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/reputation.php')">-Редактор Репутаций-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/lvl.php?create=add')">-Редактор Уровнeй-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/zvanie.php')">-Редактор Званий-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/support.php')">-Создать Раздел Помощи--</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/holidays/index.php')">-Праздники Квесты-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/index.php?vitashitsboya')">-Вытащить всех с боёв-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/index.php?vilechitvseh')">-Вылечить всех-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/money.php')">-Перевод денег-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/index.php?ticket')">-Тикеты-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/keygen.php')">-Ключи ЗБТ-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/shop_view.php')">--<font color="#0094A4">Эпика шмот</font>--</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/index.php?testDonat')">-Тест бот вк донат-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/AlllUserMessages.php')">-Сообщения людей-</div><p></p>
<p></p>
<a href="../mobitva2.apk" download>
<div class="button_alt_01">-Скачать клиент APK-</div>
</a>
<p></p>
<div class="button_alt_01" onclick="showContent('/admin/index.php?deportation')">-ДЕПОРТИРОВАТЬ ВСЕХ НА РОДИНУ-</div><p></p>
<div class="button_alt_01" onclick="showContent('/admin/zarplata/zarplata.php')" style="color: cyan;font-size: 24px;text-decoration: underline;">-Выдача зарПлат-</div><p></p>
<input type="number" id="ids_thing" value="0" style="width: 30%">
<input name="Submit" class="button_alt_01 butt1" style="width: 30%" type="button" value="найти вешь">
<p></p>
</center>
<script>
$(".butt1").click(function () {
showContent("/admin/index.php?findThing=" + $("#ids_thing").val());
});
</script>
<?php
if (isset($_GET['vitashitsboya'])) {
$mc->query("UPDATE `battle` SET `end_battle` = '1'");
message('Все спасены, красаучик');
}
if (isset($_GET['vilechitvseh'])) {
$mc->query("UPDATE `users` SET `temp_health` = `max_health`");
/* $allshop = $mc->query("SELECT * FROM `shop`")->fetch_all(MYSQLI_ASSOC);
foreach ($allshop as $value) {
$PweaponEffect=json_decode($value['effects']);
for ($i = 0; is_array($PweaponEffect) && $i < count($PweaponEffect); $i++) {
if(!isset($PweaponEffect[$i][4])){
$PweaponEffect[$i][4]=0;
}if(!isset($PweaponEffect[$i][5])){
$PweaponEffect[$i][5]=0;
}if(!isset($PweaponEffect[$i][6])){
$PweaponEffect[$i][6]=0;
}if(!isset($PweaponEffect[$i][7])){
$PweaponEffect[$i][7]=0;
}
}
$mc->query("UPDATE `shop` SET `effects` = '". json_encode($PweaponEffect)."' WHERE `id` = '".$value['id']."'");
}
$allshop = $mc->query("SELECT * FROM `hunt`")->fetch_all(MYSQLI_ASSOC);
foreach ($allshop as $value) {
$PweaponEffect=json_decode($value['effects']);
for ($i = 0; is_array($PweaponEffect) && $i < count($PweaponEffect); $i++) {
if(!isset($PweaponEffect[$i][4])){
$PweaponEffect[$i][4]=0;
}if(!isset($PweaponEffect[$i][5])){
$PweaponEffect[$i][5]=0;
}if(!isset($PweaponEffect[$i][6])){
$PweaponEffect[$i][6]=0;
}if(!isset($PweaponEffect[$i][7])){
$PweaponEffect[$i][7]=0;
}
}
$mc->query("UPDATE `hunt` SET `effects` = '". json_encode($PweaponEffect)."' WHERE `id` = '".$value['id']."'");
}
$allquests = $mc->query("SELECT * FROM `quests_notActive` WHERE `id_quests` = '198'")->fetch_all(MYSQLI_ASSOC);
//смотрим на новую вещь
$infoshop1Res = $mc->query("SELECT * FROM `shop` WHERE `id`='1882'");
if ($infoshop1Res->num_rows > 0) {
$infoshop1 = $infoshop1Res->fetch_array(MYSQLI_ASSOC);
//дата истечения в unix
if ($infoshop1['time_s'] > 0) {
$time_the_lapse = $infoshop1['time_s'] + time();
} else {
$time_the_lapse = 0;
}
foreach ($allquests as $value) {
$mc->query("INSERT INTO `userbag`("
. "`id_user`,"
. " `id_shop`,"
. " `id_punct`,"
. " `dress`,"
. " `iznos`,"
. " `time_end`,"
. " `id_quests`,"
. " `koll`,"
. " `max_hc`,"
. " `stil`,"
. " `BattleFlag`"
. ") VALUES ("
. "'" . $value['id_user'] . "',"
. "'" . $infoshop1['id'] . "',"
. "'" . $infoshop1['id_punct'] . "',"
. "'1',"
. "'" . $infoshop1['iznos'] . "',"
. "'$time_the_lapse',"
. "'" . $infoshop1['id_quests'] . "',"
. "'" . $infoshop1['koll'] . "',"
. "'" . $infoshop1['max_hc'] . "',"
. "'" . $infoshop1['stil'] . "',"
. "'" . $infoshop1['BattleFlag'] . "'"
. ")");
}
}
*
*/
message('Все здоровы, ты классный пацан!');
}
if (isset($_GET['testDonat'])) {
$_GET['name_donaters'] = "Нефтяной Магнат";
$_GET['donat'] = "1000000";
require_once $_SERVER['DOCUMENT_ROOT'] . "/vk.com/bot.php";
}
if (isset($_GET['deportation'])) {
$mc->query("UPDATE `users` SET `location`='2' , `location_list` = '[]' WHERE`location`!='98' && `side`>='2' && `side`<='3' ");
$mc->query("UPDATE `users` SET `location`='1' , `location_list` = '[]' WHERE`location`!='98' && `side`>='0' && `side`<='1' ");
message('Все негры депортированы, ты классный пацан!');
}
if (isset($_GET['findThing']) && $_GET['findThing'] > 0) {
message('вещи найдены!');
$arr = $mc->query("SELECT COUNT(*),`id_user` FROM `userbag` WHERE `id_shop`='" . $_GET['findThing'] . "' GROUP BY `id_user` ORDER BY COUNT(*) DESC")->fetch_all(MYSQLI_ASSOC);
for ($i = 0; $i < count($arr); $i++) {
$tmp = $mc->query("SELECT * FROM `users` WHERE `id`='" . $arr[$i]['id_user'] . "'")->fetch_array(MYSQLI_ASSOC);
echo $arr[$i]['COUNT(*)'] . " .<a onclick="showContent('/profile/" . $tmp['id'] . "')"><font>" . $tmp['name'] . "</font></a><br><br>";
}
}
function arrayValuesToInt($arr) {
$arr2 = [];
foreach ($arr as $key => $value) {
if (is_array($value)) {
$arr2[] = arrayValuesToInt($value);
} else {
$arr2[] = intval($value);
}
}
return $arr2;
}
?>
<?php
$footval = 'adminindex';
include '../system/foot/foot.php';
?>