Файл: play_gamescool/bar/admin.del2.php
Строк: 44
<?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_ingridient` WHERE `id`='".intval($_POST['de'])."'");
header("Location:admin.del2.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.del2.php?t=".mt_rand()."'>
<select name='de'>
<option value='0'>Пусто</option>";
$a=mysql_query("SELECT * FROM `bar_ingridient`");
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';
?>