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

echo "<center><br>";

$Num_entre=$_GET['Num_entre'];
echo "<br>Num Entre : ".$Num_entre."<br>" ;

$id_presta=htmlentities($_POST['id_presta']);
$DateEntre_y = $_POST['DateEntre_y'];
$DateEntre_m = $_POST['DateEntre_m'];
$DateEntre_d = $_POST['DateEntre_d'];

$num_ligne=htmlentities($_POST['num_ligne']);

$Poids=htmlentities($_POST['poids_dechets']);
$Num_categorie=htmlentities($_POST['Num_categorie']);
$Observations=htmlentities($_POST['Observations']);
$Num_bon=htmlentities($_POST['Num_bon_dechets']);

$mrs=htmlentities($_POST['mrs']);

$Date_Entre=date("d/m/y", mktime(0,0,0,$DateEntre_m,$DateEntre_d,$DateEntre_y));

$Date_Es=date("Y-m-d", mktime(0,0,0,$DateEntre_m,$DateEntre_d,$DateEntre_y));

$jour=$DateEntre_d; 
$mois=$DateEntre_m;
$annee=$DateEntre_y;
$anne_a = date("y", mktime(0,0,0,$mois,$jour,$annee));
$semaine = date("W", mktime(0,0,0,$mois,$jour,$annee));


Echo "<center><font color='red'>Enregistrement</font></center>";

echo "<br>";
echo "num_ligne : ".$num_ligne." <br>";
echo "Date Es : ".$Date_Es." date Entre : ".$Date_Entre." /y= ".$DateEntre_y."  /m= ".$DateEntre_m." /d= ".$DateEntre_d."<br>";
echo "Num four : ".$id_presta." <br>";

echo "Num_Categorie : ".$Num_categorie." <br>";
echo "Num Bon : ".$Num_bon." <br>";
echo "Poids Froid : ".$Poids." <br>";
echo "Observations : ".$Observations." <br>";
echo "semaine : ".$semaine." <br>";
echo "Mrs : ".$mrs." <br>";

$sql = "UPDATE table_dechets SET 
`Num_bon_dechets`='$Num_bon', `Num_prestataire`='$id_presta', `num_cate_dechets`='$Num_categorie', `mrs`='$mrs', `poids_dechets`='$Poids', `sem_dechets`='$semaine', `date_enleve_dechets`='$Date_Es', `observations`='$Observations' 
WHERE `num_ligne_dechets`='$num_ligne' ";

echo "requet : ".$sql." <br>";

$res = mysqli_query($link, $sql);
echo "resultat requet : ".$res." <br>";




Header("Location: dechets.php?limite=0");
?>
