This commit is contained in:
Igor Barkov (iwork) 2020-07-21 12:20:44 +03:00
parent 97f04cf4e0
commit 05578025d8

127
main.php
View File

@ -527,42 +527,33 @@ if (input::post('setshadow')) {
<title></title> <title></title>
</head> </head>
<body> <body>
<table width=100%> <div style="text-align: right;">
<tr> <input type=button value="Вернуться" onClick="location.href='main.php?edit=<?= mt_rand() ?>';">
<td><h3>Выбрать образ персонажа</h3></td> </div>
<td align=right><INPUT TYPE=button value="Вернуться"
onClick="location.href='main.php?edit=0.467837356797105';"></td>
</tr>
<tr>
<td align=center style="color:red;">Внимание! Образ персонажа выбирается только один раз.</td>
</tr>
</table>
<table style="padding:5px; margin:auto;"> <table style="padding:5px; margin:auto;">
<caption><b>Общие образы</b></caption> <caption><b style="color: red;">Внимание! Образ персонажа выбирается только один раз.</b></caption>
<tr> <tr>
<td><a href="?edit=1&obraz=m1"><img alt="m01" src="i/shadow/m1.gif"></a></a></td> <td><a href="?edit=1&obraz=m1"><img alt="m01" src="i/shadow/m1.gif"></a>
<td><a href="?edit=1&obraz=m2"><img alt="m02" src="i/shadow/m2.gif"></a></td> <td><a href="?edit=1&obraz=m2"><img alt="m02" src="i/shadow/m2.gif"></a>
<td><a href="?edit=1&obraz=m3"><img alt="m03" src="i/shadow/m3.gif"></a></td> <td><a href="?edit=1&obraz=m3"><img alt="m03" src="i/shadow/m3.gif"></a>
<td><a href="?edit=1&obraz=m4"><img alt="m04" src="i/shadow/m4.gif"></a></td> <td><a href="?edit=1&obraz=m4"><img alt="m04" src="i/shadow/m4.gif"></a>
<td><a href="?edit=1&obraz=m5"><img alt="m05" src="i/shadow/m5.gif"></a></td> <td><a href="?edit=1&obraz=m5"><img alt="m05" src="i/shadow/m5.gif"></a>
<td><a href="?edit=1&obraz=m6"><img alt="m06" src="i/shadow/m6.gif"></a></td> <td><a href="?edit=1&obraz=m6"><img alt="m06" src="i/shadow/m6.gif"></a>
<td><a href="?edit=1&obraz=m7"><img alt="m07" src="i/shadow/m7.gif"></a></td> <td><a href="?edit=1&obraz=m7"><img alt="m07" src="i/shadow/m7.gif"></a>
<td><a href="?edit=1&obraz=m8"><img alt="m08" src="i/shadow/m8.gif"></a></td> <td><a href="?edit=1&obraz=m8"><img alt="m08" src="i/shadow/m8.gif"></a>
<td><a href="?edit=1&obraz=m9"><img alt="m09" src="i/shadow/m9.gif"></a></td> <td><a href="?edit=1&obraz=m9"><img alt="m09" src="i/shadow/m9.gif"></a>
<td><a href="?edit=1&obraz=m10"><img alt="m10" src="i/shadow/m10.gif"></a></td> <td><a href="?edit=1&obraz=m10"><img alt="m10" src="i/shadow/m10.gif"></a>
</tr>
<tr> <tr>
<td><a href="?edit=1&obraz=f1"><img alt="f01" src="i/shadow/f1.gif"></a></a></td> <td><a href="?edit=1&obraz=f1"><img alt="f01" src="i/shadow/f1.gif"></a>
<td><a href="?edit=1&obraz=f2"><img alt="f02" src="i/shadow/f2.gif"></a></td> <td><a href="?edit=1&obraz=f2"><img alt="f02" src="i/shadow/f2.gif"></a>
<td><a href="?edit=1&obraz=f3"><img alt="f03" src="i/shadow/f3.gif"></a></td> <td><a href="?edit=1&obraz=f3"><img alt="f03" src="i/shadow/f3.gif"></a>
<td><a href="?edit=1&obraz=f4"><img alt="f04" src="i/shadow/f4.gif"></a></td> <td><a href="?edit=1&obraz=f4"><img alt="f04" src="i/shadow/f4.gif"></a>
<td><a href="?edit=1&obraz=f5"><img alt="f05" src="i/shadow/f5.gif"></a></td> <td><a href="?edit=1&obraz=f5"><img alt="f05" src="i/shadow/f5.gif"></a>
<td><a href="?edit=1&obraz=f6"><img alt="f06" src="i/shadow/f6.gif"></a></td> <td><a href="?edit=1&obraz=f6"><img alt="f06" src="i/shadow/f6.gif"></a>
<td><a href="?edit=1&obraz=f7"><img alt="f07" src="i/shadow/f7.gif"></a></td> <td><a href="?edit=1&obraz=f7"><img alt="f07" src="i/shadow/f7.gif"></a>
<td><a href="?edit=1&obraz=f8"><img alt="f08" src="i/shadow/f8.gif"></a></td> <td><a href="?edit=1&obraz=f8"><img alt="f08" src="i/shadow/f8.gif"></a>
<td><a href="?edit=1&obraz=f9"><img alt="f09" src="i/shadow/f9.gif"></a></td> <td><a href="?edit=1&obraz=f9"><img alt="f09" src="i/shadow/f9.gif"></a>
<td><a href="?edit=1&obraz=f10"><img alt="f10" src="i/shadow/f10.gif"></a></td> <td><a href="?edit=1&obraz=f10"><img alt="f10" src="i/shadow/f10.gif"></a>
</tr>
</table> </table>
</body> </body>
</html> </html>
@ -915,71 +906,21 @@ if (input::get('edit')) {
</div> </div>
<div id="mZeInventory"> <div id="mZeInventory">
<?php endif ?> <?php endif ?>
<?php
$razdel = $_GET['razdel'] ?? 0;
if (in_array($razdel, [0, 1, 2, 3, 4, 5])) {
$_SESSION['razdel'] = $razdel;
}
?>
<table class="allzeroes" style="background-color: #a5a5a5;"> <table class="allzeroes" style="background-color: #a5a5a5;">
<tr> <tr>
<td> <td align=center>
<table class="allzeroes" style="background-color: #d4d2d2;"> <B>Рюкзак (масса: <?= $getItemsBonuses->getItemsWeight() . '/' . $showUser->strength * 4 ?>)</B>
<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>
</tr>
</table>
</td>
</tr>
<tr>
<td align=center><B>Рюкзак (масса
: <?= $getItemsBonuses->getItemsWeight() . '/' . $showUser->strength * 4 ?>)</B>
</td>
</tr>
<tr> <tr>
<td style="text-align: center"> <td style="text-align: center">
<table BORDER=0 WIDTH=100% CELLSPACING="1" CELLPADDING="2" BGCOLOR="#A5A5A5"> <table BORDER=0 WIDTH=100% CELLSPACING="1" CELLPADDING="2" BGCOLOR="#A5A5A5">
<?php if ($user->money): ?> <?php if ($user->money): ?>
<tr style="background-color: #c7c7c7"> <tr style="background-color: #c7c7c7">
<td style="text-align: center; width: 100px;"><img src="i/sh/money-bag.png"></td> <td style="text-align: center; width: 100px;"><img src="i/sh/money-bag.png">
<td valign="top">Мешок денег (Масса: 0)<br><b><?= $user['money'] ?> кр.</b></td> <td valign="top">Мешок денег (Масса: 0)<br><b><?= $user['money'] ?> кр.</b>
</tr>
<?php endif; <?php endif;
if ($_SESSION['razdel'] == null) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND ( type < 12 OR type = 22 OR type = 23 OR type = 24 ) AND setsale = 0'; $data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND setsale = 0';
}
if ($_SESSION['razdel'] == 1) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND type = 12 AND setsale = 0';
}
if ($_SESSION['razdel'] == 2) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND (type > 12 OR type != 22 OR type != 23 OR type != 24) AND setsale = 0';
}
if ($_SESSION['razdel'] == 3) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND type >= 80 AND type <= 89 AND setsale = 0';
}
if ($_SESSION['razdel'] == 4) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND type = 200 AND setsale = 0';
}
if ($_SESSION['razdel'] == 5) {
$data_query = 'SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot = 0 AND type = 199 AND setsale = 0';
}
$data = db::c()->query($data_query, $_SESSION['uid']); $data = db::c()->query($data_query, $_SESSION['uid']);
$groupNum = []; $groupNum = [];
@ -997,10 +938,8 @@ if (input::get('edit')) {
echo "<tr><td width='100' align='center' bgcolor='#d3d3d3'>"; echo "<tr><td width='100' align='center' bgcolor='#d3d3d3'>";
$ii->printImage(); $ii->printImage();
$ii->printControls(); $ii->printControls();
echo "</td>";
echo "<td valign='top' bgcolor='#d3d3d3'>"; echo "<td valign='top' bgcolor='#d3d3d3'>";
$ii->printInfo(); $ii->printInfo();
echo "</td></tr>";
} }
if ($viewInventory and $getItems) { if ($viewInventory and $getItems) {
@ -1014,12 +953,10 @@ if (input::get('edit')) {
} }
if ($data->getNumRows() == 0) { if ($data->getNumRows() == 0) {
echo "<tr><th colspan='3' align=center bgcolor=#C7C7C7>Пусто</th></tr>"; echo "<tr><th colspan='3' align=center bgcolor=#C7C7C7>Пусто";
} }
?> ?>
</table> </table>
</td>
</tr>
</table> </table>
<?php if (!in_array(input::get('mZeAjax'), ['mZeInventory', 'mZeFilter'])): ?> <?php if (!in_array(input::get('mZeAjax'), ['mZeInventory', 'mZeFilter'])): ?>
</div> </div>