<?php
include("include/data.php");
Init_boutique();
global $base, $MySQL_Host, $MySQL_User, $MySQL_Passw, $myart, $A_NumArt,$i, $result, $NbLigne, 
$mygroupeart, $mysousgroupeart, $semaine, $limitesuivante, $limiteprecedente, $limite, $total, 
$page, $Nom_Client, $NumAbat;
// entete de la page
include 'menu/header.php';

//Poids_Mrs=54&
//Num_ligne_mrs=15&
//Num_bon_mrs=78473-20&
//y=2015&
//m=10&
//d=27

$date = date("d-m-Y");


// menu haut new-supp-modif
$Num_ligne_mrs=htmlentities($_POST['Num_ligne_mrs']);
$Num_bon_mrs=htmlentities($_POST['Num_bon_mrs']);
$Date_Bon_Mrs_s_y=htmlentities($_POST['y']);
$Date_Bon_Mrs_s_m=htmlentities($_POST['m']);
$Date_Bon_Mrs_s_d=htmlentities($_POST['d']);
$Poids_Mrs=htmlentities($_POST['Poids_Mrs']);
$id_presta_s=htmlentities($_POST['id_presta_s']);

$Date_Bon_Mrs=date("Y-m-d", mktime(0,0,0,$Date_Bon_Mrs_s_m,$Date_Bon_Mrs_s_d,$Date_Bon_Mrs_s_y));

Echo "<center><font color='red'>Enregistrement ligne : $Num_ligne_mrs</font></center>";
echo "Num ligne mrs : ".$Num_ligne_mrs." <br>";
echo " date bon : ".$Date_Bon_Mrs." <br>";
echo "Prestataire : ".$id_presta_s." <br>";
echo " date Entre Sql ".$Date_Bon_Mrs." /y=".$Date_Bon_Mrs_s_y."  /m=".$Date_Bon_Mrs_s_d." /d=".$Date_Bon_Mrs_s_m."<br>";
echo "Num Bon Mrs : ".$Num_bon_mrs." <br>";
echo "Poids Mrs : ".$Poids_Mrs." <br>";
echo "Enleve ? :".$enleve." <br>";

echo "<br><br>";
$sql = "UPDATE table_mrs SET 
`Num_Bon_Mrs` = '$Num_bon_mrs',
`Date_Bon_Mrs` = '$Date_Bon_Mrs',
`Poids_Mrs` = '$Poids_Mrs',
`Prestataire`= '$id_presta_s',
`Date_enlev_mrs` = '$Date_Bon_Mrs',
`Enlevement_mrs` = '1' 
WHERE 
`Num_ligne_mrs` ='$Num_ligne_mrs'";
echo $sql;
$res = mysqli_query($link, $sql);
echo "<br>$res<br>";

$page=$_SERVER["HTTP_REFERER"] ;

Header("Location: $page ");

?>
