<?php
  switch($Etape)
  {
    case 0:
      echo "  <form name='info'>\n";
      echo "   <input type='hidden' name='Type' value=$Type>\n";
      echo "   <input type='hidden' name='Sous_Type' value=$Sous_Type>\n";
      echo "   <input type='hidden' name='Etape' value='1'>\n";
      echo "<TABLE border=1>\n";
      echo "   <TR><TH>NoClient</TH><TD><input type='texte' name='NoClient' readonly><A HREF='find.php?Type=13&Detail=0&Cible=NoClient' target='recherche'>Rechercher</A></TD></TR>\n";
      echo "   <TR><TH>Heures atelier</TH><TD><input type='text' name='Heure'></TD></TR>\n";
      echo "   <TR><TH>Articles atelier</TH><TD><input type='text' size='32' name='ArticlesAtelier'></TD></TR>\n";
      echo "   <TR><TH>Article dépannage</TH><TD><input type='text' name='ArticleDepannage'></TD></TR>\n";
      echo "</TABLE>\n";
      echo "   <button type='submit'>Créer</button>\n";
      echo "  </form>\n";
    break;
    case 1:
      $requette = "INSERT INTO employes".ID_GARAGE." (NoClient, HeureAtelier, ArticlesAtelier, ArticleDepannage, Actif) VALUES ('$NoClient', '$Heure', '$ArticlesAtelier', '$ArticleDepannage', '1')";
      if ($resultat = Connection::executeRawQuery($requette))
      {
      }
      else
      {
        echo "<big>employe $NoClient existe déjà !</big>";
      }
    break;
  }
?>
