<?php include_once ("settings.php");
if($_POST['submit']){

$agent = strip_tags(stripslashes($_POST['01']));
$doc = strip_tags(stripslashes($_POST['doc']));
$zi = strip_tags(stripslashes($_POST['zi']));
$luna = strip_tags(stripslashes($_POST['luna']));
$an = strip_tags(stripslashes($_POST['an']));
$data_doc = $zi.'/'.$luna.'/'.$an;
$firma = strip_tags(stripslashes($_POST['02']));
$sticlaH = strip_tags(stripslashes($_POST['03']));
$navetaH = strip_tags(stripslashes($_POST['04']));
$keg20H = strip_tags(stripslashes($_POST['keg20H']));
$keg30H = strip_tags(stripslashes($_POST['05']));
$keg50H = strip_tags(stripslashes($_POST['06']));
$sticlaT = strip_tags(stripslashes($_POST['07']));
$navetaT = strip_tags(stripslashes($_POST['08']));
$keg30T = strip_tags(stripslashes($_POST['09']));
$keg50T = strip_tags(stripslashes($_POST['10']));
$palet_euro = strip_tags(stripslashes($_POST['11']));
$palet_neuro = strip_tags(stripslashes($_POST['12']));
$vitrina_romaqua = strip_tags(stripslashes($_POST['vitrina_romaqua']));
$vitrina_aquacarpatica = strip_tags(stripslashes($_POST['vitrina_aquacarpatica']));
$obs = strip_tags(stripslashes($_POST['1000']));

if($firma == NULL){
$display .= "Esti obligat sa completezi numele clientului.";
}else{
$addmess = mysqli_query($connect, "INSERT INTO `clienti` (`date` , `agent` , `data_doc` , `doc` , `firma` , `sticlaH` , `navetaH` , `keg30H` , `keg50H` , `sticlaT` , `navetaT` ,`keg30T` , `keg50T` , `palet_euro` , `palet_neuro` , `obs`, `keg20H`, `vitrina_romaqua`, `vitrina_aquacarpatica`, `cui`) VALUES ('".$date."' , '".$agent."' , '".$data_doc."' , '".$doc."' , '".$firma."' , '".$sticlaH."' , '".$navetaH."'  , '".$keg30H."' , '".$keg50H."' , '".$sticlaT."' , '".$navetaT."' , '".$keg30T."' , '".$keg50T."' , '".$palet_euro."' , '".$palet_neuro."' , '".$obs."', '".$keg20H."', '".$vitrina_romaqua."', '".$vitrina_aquacarpatica."', '".$cui."');") or die(mysql_error());

	}
}

echo "<script>alert('Stoc modificat cu succes')</script>";
echo "<script>location.replace('index.php?page=arata')</script>";
?>
