<?php
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$set['title']='Бармен онлайн';
include_once '../sys/inc/thead.php';
title();
aut();

if(!isset($user)){
  echo "Вы не зарегистрированы";
  include_once '../sys/inc/tfoot.php';
  break;
}

include_once 'inc/start.php';
if($user_id!=1){
header("Location:index.php");
exit;
}
#  `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 '../sys/inc/tfoot.php';
?>
