This commit is contained in:
lopar
2020-07-06 22:54:50 +03:00
parent 69b3fa5ab3
commit 083f4fe438
3 changed files with 103 additions and 38 deletions
+48 -35
View File
@@ -18,19 +18,16 @@ try {
} catch (\Krugozor\Database\Mysql\Exception $e) {
echo "<div class='debug' '>Ошибка: " . $e->getMessage() . "<br> Стек: " . $e->getTraceAsString() . "</div>";
}
try {
if ($user['battle'] != 0) {
header('location: fbattle.php');
die();
}
} catch (Exception $e) {echo '<div class="debug">Не подтянулся $user[\'battle\'], нет ячейки в базе.</div>';}
try {
//БС
if ($user['in_tower'] == 1) {
header('Location: towerin.php');
die();
}
} catch (Exception $e) {echo '<div class="debug">Не подтянулся $user[\'in_tower\'], нет ячейки в базе.</div>';}
if (!empty($user['battle'])) {
header('location: fbattle.php');
die();
//БС
if ($user['in_tower'] == 1) {
header('Location: towerin.php');
die();
}
/* === проверяем соответствие комнаты и скрипта === */
if (in_array($user['room'], [20, 21, 26, 48, 51, 52, 651, 2655, 2601, 2701, 2702, 2111], 1)) {
@@ -283,8 +280,7 @@ function unstack($it_id, $it_count)
try {
$dress = db::c()->query('SELECT * FROM inventory WHERE owner = ?i AND id = ?i', $user['id'], $it_id)->fetch_assoc_array();
}
catch(\Krugozor\Database\Mysql\Exception $e) {
} catch (\Krugozor\Database\Mysql\Exception $e) {
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
}
if (isset($dress['id'])) {
@@ -575,7 +571,7 @@ function setShadow($image)
$shadows = [
'm01', 'm02', 'm03', 'm04', 'm05', 'm06', 'm07', 'm08', 'm09', 'm10',
'f01', 'f02', 'f03', 'f04', 'f05', 'f06', 'f07', 'f08', 'f09', 'f10',
'person'
'person',
];
if (in_array($image, $shadows)) {
$i = $image . '.png';
@@ -605,8 +601,7 @@ if (isset($_GET['modif_bron'])) {
$ids = $_GET['ids'];
try {
$cur = db::c()->query('SELECT free_bron, bron1, bron2, bron3, bron4 FROM inventory WHERE owner = ?i AND id = ?i', $user['id'], $ids)->fetch_assoc();
}
catch (\Krugozor\Database\Mysql\Exception $e) {
} catch (\Krugozor\Database\Mysql\Exception $e) {
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
}
if ($cur['free_bron'] > 0 && $cur[$brons] > 0) {
@@ -901,12 +896,15 @@ if (input::get('edit')) {
border: 2px groove threedface;
background: #E6E6E6 !important;
}
.jGrowl .jGrowl-notification, .jGrowl div.jGrowl-closer {
margin: 10px;
}
.jGrowl div.jGrowl-notification {
min-height: 40px;
}
.jGrowl .jGrowl-notification, .jGrowl .jGrowl-closer {
background-color: #000;
opacity: .85;
@@ -937,7 +935,7 @@ if (input::get('edit')) {
<td style="vertical-align: top; width: 250px">
<?php
$showUser = new User($_SESSION['uid']);
$showUser->showUserDoll(0,1);
$showUser->showUserDoll(0, 1);
?> <!-- Первый столбец -->
<div align="center">
<a href='main.php?edit=1&undress=all'>Снять все</a><BR>
@@ -952,12 +950,18 @@ if (input::get('edit')) {
<img src='i/clear.gif'></a>
<a href='main.php?edit=1&complect=" . $k_name . "'>Надеть \"" . $k_name . "\"</a><BR>";
}
} catch (Exception $e) {echo '<div class="debug">Комплекты не работают, потому что нет таблицы и функции застряли в php5.3.</div>';}
} catch (Exception $e) {
echo '<div class="debug">Комплекты не работают, потому что нет таблицы и функции застряли в php5.3.</div>';
}
?>
<div class="effectList" style="padding-top: 15px; max-height: 150px; width: 220px;">
<?php
try {echo show_eff_inf($user['id'], 2);} catch (Exception $e) {echo '<div class="debug">show_eff_inf() не работаeт, потому что нет таблицы и функции застряли в php5.3.</div>';} ?>
try {
echo show_eff_inf($user['id'], 2);
} catch (Exception $e) {
echo '<div class="debug">show_eff_inf() не работаeт, потому что нет таблицы и функции застряли в php5.3.</div>';
} ?>
</div>
</div>
<br>
@@ -1204,18 +1208,24 @@ if (input::get('edit')) {
<td>
<table class="allzeroes" style="background-color: #d4d2d2;">
<tr>
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == null) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=0" ajax="mZeInventory">Амуниция</a></td>
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 1) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=1" ajax="mZeInventory">Заклинания</a></td>
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 3) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=3" ajax="mZeInventory">Ресурсы</a></td>
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 4) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=4" ajax="mZeInventory">Подарки</a></td>
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 5) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=5" ajax="mZeInventory">Квестовые вещи</a></td>
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 2) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=2" ajax="mZeInventory">Прочее</a></td>
td style="text-align: center;
background-color: <?= ($_SESSION['razdel'] == null) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=0" ajax="mZeInventory">Амуниция</a></td>
td style="text-align: center;
background-color: <?= ($_SESSION['razdel'] == 1) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=1" ajax="mZeInventory">Заклинания</a></td>
td style="text-align: center;
background-color: <?= ($_SESSION['razdel'] == 3) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=3" ajax="mZeInventory">Ресурсы</a></td>
td style="text-align: center;
background-color: <?= ($_SESSION['razdel'] == 4) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=4" ajax="mZeInventory">Подарки</a></td>
td style="text-align: center;
background-color: <?= ($_SESSION['razdel'] == 5) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=5" ajax="mZeInventory">Квестовые вещи</a></td>
td style="text-align: center;
background-color: <?= ($_SESSION['razdel'] == 2) ? '#A5A5A6' : '#C7C7C8' ?>"><a
href="?edit=1&razdel=2" ajax="mZeInventory">Прочее</a></td>
</tr>
</table>
</td>
@@ -1428,7 +1438,9 @@ if (input::get('edit')) {
<?php
try {
$online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time() - 60));
} catch (Exception $e) {echo '<div class="debug">В таблице online нет ячейки real_time так как неясно что она делает. Ошибка обращения в базу.</div>';}
} catch (Exception $e) {
echo '<div class="debug">В таблице online нет ячейки real_time так как неясно что она делает. Ошибка обращения в базу.</div>';
}
?>
<div id=hint3 class=ahint></div>
<table class="allzeroes">
@@ -1441,7 +1453,8 @@ try {
</td>
<td>&nbsp;</td>
<TD style="text-align: right;">
<div class="hint-text">Сейчас в игре: <strong><?= 'неизвестно' /*$online->getNumRows()*/ ?></strong> чел.</div>
<div class="hint-text">Сейчас в игре: <strong><?= 'неизвестно' /*$online->getNumRows()*/ ?></strong> чел.
</div>
<button onclick="gotohref('zayavka.php')">Поединки</button>
<br>
<button onclick="gotohref('main.php?edit=1')">Инвентарь</button>