Файл: tortuga/Adm_panel/del_port.php
Строк: 16
<?
require_once '../core/system.php';
echo admin();
$header = 'Админ-панель!';
require_once H.'core/head.php';
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `teleport` WHERE `id` = '".intval($_GET['id'])."'"),0) == true){
mysql_query("DELETE FROM `teleport` WHERE `id` = '".intval($_GET['id'])."'");
$_SESSION['message'] = "Портал удален!";
header('Location: ?');
exit();
}
$q = mysql_query("SELECT * FROM `teleport` ORDER BY `id` ASC");
echo "<div class='player'>";
while($teleport = mysql_fetch_assoc($q)) {
echo "$teleport[x]:$teleport[y] | <a href='del_port.php?id=$teleport[id]'><img src='/images/icon/error.png'></a><br>";
}
echo "</div>";
echo "<div class='mini-line'></div>";
echo "<div class='player menuList'>";
echo "<li><a href='/Adm_panel/'><img src='/images/icon/arrow.png'>Админ-Панель</a></li>";
echo "</div>";
require_once H.'core/foot.php';
?>