<?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>";
Echo "<table cellspacing=0 cellpadding=0 align=center border=0>";
Echo "<tbody>";
echo "<a href='saisie_dechets.php'><b>Nouveau</b></a> <b> | </b>";
echo "<a href=''><b>Consulter</b></a> <b> | </b>";
echo "<a href=''><b>Supprimer</b></a> <b> | </b>";
echo "<a href=''><b>Modifier</b></a>";
Echo "</td></tr>";
Echo "</tbody>";
Echo "</table>";
echo "<center><HR size='1' width='500'>";
echo "<b>Saisie bon d'equarissage</b>";
echo "<center><HR size='1' width='500'>";
//
//$date_e=date("d/m/Y", strtotime($Date_Entre));
//echo  date("d/m/Y", strtotime($Date_Entre))." ".$date_e;
//

echo "<form id='form1' name='form1' method='post' action='ajout_dechets.php'>";
echo "<table class='t-text' width='500' border='1' cellspacing='2' cellpadding='2'>";
echo "<tr>";
echo "<td width='100'>Prestataire : </td>";
echo "<td width='100'><select style='width:100px' name='id_presta' id='id_presta'>";

$myart =new fournisseurs;
$select = 'select * FROM fournisseurs WHERE `num_cate_four`=1';
$result = mysqli_query($link, $select);
$myart->getnum($result);
while ($myart->z < $myart->num) {
  $myart->readrow($result);
  $id_presta=$myart->Num_fournisseur ;
  $Ident_four=$myart->Ident_four ;
echo "<option value='$id_presta'>$Ident_four</option>";
}
echo "</select>";
echo "</td>";
echo "<td width='100'>Date enl&#232;vement</td>";
echo "<td>";
  $class = '';
  $fyear='2010';
  $lyear='2050';
  $name = 'DateEntre';

  $yr=date("Y");
  $mo=date("m");
  $dy=date("d");

  
 // Jour 
  
  $s="<SELECT NAME=\"${name}_d\" class='$class'>\n"; 
  $s.="<OPTION VALUE=$dy>$dy</OPTION>\n";
  $sclt=""; 
  for ($i=1;$i<=31;$i++) 
  { 
  $i2="0$i"; 
  $i2=substr($i2, -2); 
  if ($i2==$dy) 
  $sclt=" SELECTED"; 
  else 
  $sclt=""; 
  $s.="<OPTION VALUE=\"$i2\"$sclt>$i</OPTION>\n";
  } 
  $s.="</SELECT> / "; 

 // Mois 
  
  $s.="<SELECT NAME=\"${name}_m\" class='$class'>\n"; 
  $s.="<OPTION VALUE=$mo>$mo</OPTION>\n";
  $sclt=""; 
  for ($i=1;$i<=12;$i++) 
  { 
  $i2="0$i"; 
  $i2=substr($i2, -2); 
  if ($i2==$mo) 
  $sclt=" SELECTED"; 
  else 
  $sclt=""; 
  $mon2=date("M", mktime(0, 0, 0, $i, 1, 2001));
  $s.="<OPTION VALUE=\"$i2\"$sclt>$mon2</OPTION>\n";
  } 
  $s.="</SELECT> / "; 

 // Année 
  
  $s.="<SELECT NAME=\"${name}_y\" class='$class'>\n"; 
  $s.="<OPTION VALUE=$yr>$yr</OPTION>\n";
  $sclt=""; 
  for ($i=$fyear;$i<=$lyear;$i++)
  { 
  $i2="$i"; 
  if ($i2==$yr) 
  $sclt=" SELECTED"; 
  else 
  $sclt=""; 
  $s.="<OPTION VALUE=\"$i\"$sclt>$i</OPTION>\n"; 
  } 
  $s.="</SELECT>\n"; 
    echo"$s";
echo "</td></tr>";
echo "<tr>";
echo "<td>cat&#233;gorie :</td>";
echo "<td><select style='width:100px' name='Num_categorie' id='Num_categorie' STYLE='width:90' >";

$myart =new categorie_dechets ;
$select = 'select * FROM categorie_dechets';
$result = mysqli_query($link, $select);
$myart->getnum($result);
while ($myart->z < $myart->num) {
  $myart->readrow($result);
  $Num_cate_dechets=$myart->num_cate_dechets ;
  $categorie_dechets=$myart->categorie_dechets ;
echo "<option value='$Num_cate_dechets'>$categorie_dechets</option>";
}



echo "</select></td>";

echo "<td>Num Bon : </td>";
echo "<td><input name='Num_bon_dechets' type='text' id='Num_bon_dechets' accesskey='2' tabindex='2' size='12' maxlength='12'>
     </td>";
 
echo "</td>";
echo "</tr>";

echo "<tr>";
echo "<td>Poids :</td>";
echo "<td><input name='poids_dechets' type='text' id='poids_dechets' accesskey='2' tabindex='2' size='10' maxlength='10'></td>";
echo "<td>M.R.S ? : </td>";
echo "<td colspan='1'>oui <input name='mrs' type='radio' id='mrs' accesskey='2' tabindex='2' value='1'>
non <input name='mrs' type='radio' id='mrs' accesskey='2' tabindex='2' value='0' checked></td>";
echo "</tr>";


echo "<tr>";
echo "<td>Observations</td>";
echo "<td colspan='4'><input name='Observations' type='text' id='Observations' accesskey='2' tabindex='2' size='30' maxlength='30'></td>";
echo "</tr>";
echo "<td colspan='4'><div align='center'>
	  <form id='form1' name='form1' method='post' action='ajout_dechets.php'>
      <input type='submit' value='Creation Dechets'>
      </form></div></td>";
echo "<tr>";
echo "</table></form>";



include 'menu/footer.php';
?>
