Файл: waphero.ru/Adm_panel/gold_zapros.php
Строк: 44
<?
include_once '../core/system.php';
echo admin();
$header = 'Запросы на ввод';
include_once '../core/head.php';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `gold_zapros`"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT * FROM `gold_zapros` ORDER BY `id` DESC LIMIT $start, $set[p_str]");
if($k_post == 0)echo "<div class='player grey'>Нет запроссов!</div>";
while($post = mysql_fetch_assoc($q)) {
$ank = mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $post[id_user] LIMIT 1"));
echo "<div class='player'>";
echo "<img src='/images/icon/user.png'> <a href='/user/?id=$ank[id]'>$ank[nick]</a><span class='float-right'><span class='dgreen'>[".vremja($post[time])."]</span></span><br>";
echo "Просит ввести <img src='/images/icon/gold.png'> $post[sum] золота!<br>";
echo "</div>";
echo "<div class='player center'><a class='btn' href='vvod.php?id=$post[id]'><span class='end'><span class='label'>Выполнить</span></span></a>";
echo "<a class='btn' href='?id=$post[id]'><span class='end'><span class='label'>Удалить</span></span></a></div>";
echo "<div class='dot-line'></div>";
}
if ($k_page>1)str('?',$k_page,$page); // Вывод страниц
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>";
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `gold_zapros` WHERE `id` = '".intval($_GET['id'])."'"),0) == true){
mysql_query("DELETE FROM `gold_zapros` WHERE `id` = '".intval($_GET['id'])."'");
$_SESSION['message'] = "Запрос улален!";
header('Location: ?');
exit();
}
include_once '../core/foot.php';
?>