<?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';

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

// menu haut new-supp-modif
$Num_ligne_mrs=htmlentities($_POST['Num_ligne_mrs']);
$Num_Bon=htmlentities($_POST['Num_Bon']);
$Poids_carcasse=htmlentities($_POST['Poids_carcasse']);
$Poids_Mrs=htmlentities($_POST['Poids_Mrs']);
$enleve=htmlentities($_POST['enleve']);
$Date_Decoupe_y=htmlentities($_POST['Date_Decoupe_y']);
$Date_Decoupe_m=htmlentities($_POST['Date_Decoupe_m']);
$Date_Decoupe_d=htmlentities($_POST['Date_Decoupe_d']);
$Date_enlev_mrs_y=htmlentities($_POST['Date_enlev_mrs_y']);
$Date_enlev_mrs_m=htmlentities($_POST['Date_enlev_mrs_m']);
$Date_enlev_mrs_d=htmlentities($_POST['Date_enlev_mrs_d']);
$Num_Client=htmlentities($_POST['Num_Client']);
$Date_Entre_y=htmlentities($_POST['Date_Entre_y']);
$Date_Entre_m=htmlentities($_POST['Date_Entre_m']);
$Date_Entre_d=htmlentities($_POST['Date_Entre_d']);
$id_presta=htmlentities($_POST['id_presta']);
$Num_ident_animal=htmlentities($_POST['Num_ident_animal']);
$Num_entre=htmlentities($_POST['Num_entre']);

//

$Date_Decoupe=date("Y-m-d", mktime(0,0,0,$Date_Decoupe_m,$Date_Decoupe_d,$Date_Decoupe_y));
$Date_enlev_mrs=date("Y-m-d", mktime(0,0,0,$Date_enlev_mrs_m,$Date_enlev_mrs_d,$Date_enlev_mrs_y));
$Date_Entre=date("Y-m-d", mktime(0,0,0,$Date_Entre_m,$Date_Entre_d,$Date_Entre_y));

Echo "<center><font color='red'>Enregistrement ligne : $Num_ligne_mrs</font></center>";

echo $Date_Entre." | ".$Date_Decoupe." | ".$Date_enlev_mrs." <br>";
echo $Num_Client." | ".$Num_ident_animal."<br>";
echo $id_presta."<br>";
echo $Num_Bon." <br>";
echo $Poids_carcasse." | ".$Poids_Mrs."<br>";
echo $enleve." | ".$Num_entre." <br>";


echo "<br><br>";
$sql = "UPDATE table_mrs SET 
`Num_ident_animal` = '$Num_ident_animal' ,
`Num_Clients` = '$Num_Client' ,
`Date_Entre` = '$Date_Entre' ,
`Date_Decoupe` = '$Date_Decoupe' ,
`Poids_carcasse` = '$Poids_carcasse' ,
`Num_Bon_Mrs` = '$Num_Bon' ,
`Date_Bon_Mrs` = '$Date_enlev_mrs' ,
`Poids_Mrs` = '$Poids_Mrs' ,
`Prestataire` = '$id_presta' ,
`Date_enlev_mrs` = '$Date_enlev_mrs' ,
`Enlevement_mrs` = '$enleve' 
 WHERE `Num_ligne_mrs` = '$Num_ligne_mrs'";

echo $sql;
$res = mysqli_query($link, $sql);
echo "<br><br>";
echo $res ;

//Header("Location: modif_dechets.php?limite=0&Num_entre=$Num_entre");
?>
