Файл: vkollektive2014/play_gamescool/bar/admin.del.php
Строк: 42
<?php
include_once '../../connect.php';
include_once '../../head.php';
include_once 'inc/start.php';
if($u['admin'] == 1 || $u['admin'] == 2 || $u['admin'] == 3 || $u['admin'] == 4 || $u['admin'] == 5){
# `name` varchar(164) NOT NULL,
# `cost` int(11) NOT NULL,
# `alc` int(11) NOT NULL,
# `level` int(11) NOT NULL,
# `exp` int(11) NOT NULL,
# `in` varchar(156) NOT NULL,
if(isset($_POST['submit']))
{
mysql_query("DELETE FROM `bar_recept` WHERE `id`='".intval($_POST['de'])."'");
mysql_query("DELETE FROM `bar_my_recept` WHERE `id_r`='".intval($_POST['de'])."'");
mysql_query("DELETE FROM `bar_coctails` WHERE `id_r`='".intval($_POST['de'])."'");
header("Location:admin.del.php?o");
exit;
}
if(isset($_GET['o']))
echo "<div class='".$diz['title2']."'>Рецепт удален!</div>";
echo "
<div class='".$diz['main']."'>
<div class='".$diz['title2']."'>Рецепт</div>
<form method='post' action='admin.del.php?t=".mt_rand()."'>
<select name='de'>
<option value='0'>Пусто</option>";
$a=mysql_query("SELECT * FROM `bar_recept`");
while($arr=mysql_fetch_array($a))
{
echo "<option value='".$arr['id']."'>".$arr['name']."</option>";
}
echo "
</select><br/>
<input type='submit' name='submit' value='Удалить'/></form>";
echo "</div>";
ret($diz['ret'],'Админка','admin.php'); }
ret($diz['ret'],'Мой бар','index.php');
include_once '../../foot.php';
?>