<?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, $BarreCode ;
// entete de la page
include 'menu/header.php';
// menu haut new-supp-modif

echo "<center><div class='titre-text'>Saisie d'une Entr&#233es d'Abattoirs</div><br>" ;

echo "<form id='form1' name='form1' method='POST' action='ajout_abattoir.php'>";
echo "<table class='t-text' width='600' border='1' cellspacing='2' cellpadding='2'>";
echo "<tr>";
echo "<td width='100'>Num Abattoir</td>";
echo "<td width='100'><select style='width:100px' name='id_abat' id='id_abat'>";
echo "<option value=0> ??  </option>";
$myart =new abattoir;
$select = 'select * FROM abattoir';
$result = mysqli_query($link, $select);
$myart->getnum($result);
while ($myart->z < $myart->num) {
  $myart->readrow($result);
  $id_abat=$myart->id_abat ;
  $Num_Abattoir=$myart->Num_Abattoir ;
  $Num_abat =$myart->Num_abat ;
  $Nom_abattoir=$myart->Nom_abattoir ;
  $Ville_Abat=$myart->Ville_Abat;
  if ($CB_Num_abatt == $Num_abat){
  echo "<option value='$id_abat' selected >$Ville_Abat</option>";
  } else {
  echo "<option value='$id_abat'>$Ville_Abat</option>";
  }


}
echo "</select>";
echo "</td>";
echo "<td width='100'>Date Entre</td>";
echo "<td><input type='date' name='DateEntre' required>";

echo "</td></tr>";
echo "<tr>";
echo "<td>Client :</td>";
echo "<td><select style='width:100px' name='Num_Client' id='Num_Client' STYLE='width:90' >";
echo "<option value=0> ??  </option>";
$myart =new clients;
$select = "select * FROM clients" ;
$select.=" Where IdNumClient='".$IdNumClient."'";
// 	echo $select;  // code to execute endwhile
$result = mysqli_query($link, $select);
$myart->getnum($result);
while ($myart->z < $myart->num) {
  $myart->readrow($result);
  $Num_Client=$myart->Num_Client ;
  $Let_Client=$myart->Let_Client ;
  $Nom_Client=$myart->Nom_Client ;
echo "<option value='$Num_Client'>$Let_Client | $Nom_Client</option>";
}



echo "</select></td>";
echo "<td>Date abatage</td>";
echo "<td><input type='date' name='DateAbattage' required></td>";
echo "</tr>";
echo "<tr>";


echo "<td>Categorie Plu</td>";
echo "<td><select style='width:100px' name='Num_CatPlu' id='Num_CatPlu'>";
echo "<option value=0> ??  </option>";
$myart =new categorieplu;
$select = 'select * FROM categorieplu';
$result = mysqli_query($link, $select);
$myart->getnum($result);
while ($myart->z < $myart->num) {
  $myart->readrow($result);
  $Num_CatPlu=$myart->Num_CatPlu ;
  $CategoriePlu=$myart->CategoriePlu ;
  echo "<option value='$Num_CatPlu'>$Num_CatPlu | $CategoriePlu</option>";
}
echo "<input type='hidden' name='plu' value='950'/>";
//<select style="width:150px;font-family:calibri;font-size:16px;font-style: bold;margin-right:50px;background:none;color:white;border:none">
echo "</select></td>";

echo "<td>Date D&eacute;coupe</td>";
echo "<td><input type='date' name='DateDecoupe' required></td>";
echo "</tr>";

echo "<tr>";
echo "<td>Num Identification</td>";
echo "<td><input name='NumIdent' type='text' value='$Cb_Num_ident_animal' id='NumIdent' accesskey='2' tabindex='2' size='12' maxlength='12'></td>";

echo "<td>Num abatage</td>";
echo "<td><input name='NumAbat' type='text' value='$Cb_Num_abat' id='NumAbat' accesskey='2' tabindex='2' size='10' maxlength='10'></td>";
echo "</tr>";

echo "<tr>";
echo "<td>Num Ticket :</td>";
echo "<td><input name='NumTicket' type='text' id='NumTicket' accesskey='2' tabindex='2' size='10' maxlength='10'></td>";
echo "<td>Temp&eacute;rature Entr&eacute;e</td>";
echo "<td><input name='TempRecep' type='text' id='TempRecep' accesskey='2' tabindex='2' size='10' maxlength='5'></td>";
echo "</tr>";

echo "<tr>";
echo "<td>Quantitative ? : </td>";
echo "<td colspan='1'>oui <input name='qtv' type='radio' id='qtv' accesskey='2' tabindex='2' value='1'>
non <input name='qtv' type='radio' id='qtv' accesskey='2' tabindex='2' value='0' checked></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>Poids Froid</td>";
echo "<td><input name='Poids' type='text' Value='$Cb_Poid_fd' id='Poids' accesskey='2' tabindex='2' size='10' maxlength='10'></td>";

echo "<td>Poids Chaud</td>";
echo "<td><input name='Poids_chd' type='text' id='Poids_chd' accesskey='2' tabindex='2' size='10' maxlength='10'></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='10' maxlength='10'></td>";
echo "</tr>";
echo "<td colspan='4'><div align='center'>
      <input type='submit' value='Creation Lot'>
      </div></td>";
echo "<tr>";
echo "</table></form>";



include 'menu/footer.php';
?>
