game/adminion/mod/dungeon_list.php

48 lines
2.6 KiB
PHP
Raw Normal View History

2022-12-19 20:22:19 +00:00
<?
if(!defined('GAME')){
die();
}
if(isset($_GET['delete_dungeon_id'])){
$delete_dungeon_id = intval($_GET['delete_dungeon_id']);
mysql_query("DELETE FROM `dungeon_room` WHERE `id`='".$delete_dungeon_id."'");
die("<script>window.location = 'index.php?mod=dungeon_list';</script>");
}
$Query = mysql_query("SELECT * FROM dungeon_room ORDER BY active, dungeon_id ASC");
$dungeon_list = '';
while($row = mysql_fetch_assoc($Query)){
$dungeon_list .= '<tr>
<td align="center">' . $row['dungeon_id'] . '</td>
<td><a href="?mod=dungeon_edit&dungeon_id=' . $row['id'] . '">' . $row['dungeon_name'] . '</a></td>
<td align="center">' . $row['id'] . '</td>
<td align="center">' . ( $row['dungeon_room'] == 0 ? '' : $row['dungeon_room']) . '</td>
<td align="center">' . ( $row['shop'] == 0 ? '' : $row['shop']) . '</td>
2023-01-10 16:29:32 +00:00
<td>' . ( $row['active'] == 1 ? '<span style="color:green">Вкл</span>' : '<span style="color:brown">Выкл</span>') . '</td>
<td>' . ( $row['quest'] == 1 ? '<span style="color:green">Вкл</span>' : '<span style="color:brown">Выкл</span>'). '</td>
<td><a href="?mod=dungeon_list&delete_dungeon_id=' . $row['id'] . '">Удалить</a></td>
<td><a href="?mod=dungeon_edit&dungeon_id=' . $row['id'] . '">Изменить</a></td>
<td><a target="_blank" href="?mod=dungeon&r=' . $row['dungeon_id'] . '">Карта</a></td>
2022-12-19 20:22:19 +00:00
</tr>';
}
?><script src="https://<? echo $c['img']; ?>/js/jx/jquery.js" type="text/javascript"></script>
<div align="left">
2023-01-10 16:29:32 +00:00
<h3 style="text-align:left;">Список пещер</h3>
2022-12-19 20:22:19 +00:00
</div>
2023-01-10 16:29:32 +00:00
<div style="margin-left:8px; margin-bottom:15px"> Пещеры:
2022-12-19 20:22:19 +00:00
<table class="tblbr2" border="1" cellspacing="0" cellpadding="5" bordercolor="#C1E1EE">
<tr>
2023-01-10 16:29:32 +00:00
<td bgcolor="#C0C2C0"><div align="center"><strong>Пещера</strong></div></td>
<td bgcolor="#C0C2C0"><div align="center"><strong>Название пещеры</strong></div></td>
<td bgcolor="#C0C2C0"><div align="center"><strong>Комната<br/>входа</strong></div></td>
<td bgcolor="#C0C2C0"><div align="center"><strong>Локация<br/>пещеры</strong></div></td>
<td bgcolor="#C0C2C0"><div align="center"><strong>Рыцарский<br/>Магазин</strong></div></td>
<td bgcolor="#C0C2C0"><div align="center"><strong>Доступ</strong></div></td>
<td bgcolor="#C0C2C0"><div align="center"><strong>Квесты</strong></div></td>
2022-12-19 20:22:19 +00:00
2023-01-10 16:29:32 +00:00
<td bgcolor="#C0C2C0" colspan="3"><div align="center">Возможности</div></td>
2022-12-19 20:22:19 +00:00
</tr>
<?php echo $dungeon_list; ?>
</table>
</div>
2023-01-10 16:29:32 +00:00
<a href="../../adminion/mod/?mod=dungeon_edit" title="Добавить пещеру">Добавить пещеру</a>