<?php
  switch($Etape)
  {
    case 0:
      echo "<form name='info'>\n";
      echo "<input type='hidden' name='Type' value=$Type>";
      echo "<input type='hidden' name='Sous_Type' value=$Sous_Type>";
      echo "<input type='hidden' name='Etape' value='1'>\n";
      echo "<input type='text' name='Destinataire'>\n";
      echo "<input type='submit' value='Selection'>\n";
      echo "</form>\n";
    break;
    case 1:
      echo "<form name='info'>\n";
      echo "<input type='hidden' name='Type' value=$Type>";
      echo "<input type='hidden' name='Sous_Type' value=$Sous_Type>";
      echo "<input type='hidden' name='Etape' value='1'>\n";
      echo "<input type='text' name='Destinataire'>\n";
      echo "<input type='submit' value='Selection'>\n";
      echo "</form>\n";
      $resultat = Commande::getCommandeByDestinataire($_REQUEST['Destinataire']);
      foreach ($resultat as $ligne)
      {
        echo "<a style=\"color:white;\" href=\"default.php?NoCommande=".$ligne["NoCommande"]."&Type=4&Sous_Type=1&Etape=3&NoVisu=0&Search=".urlencode($_REQUEST['Destinataire'])."\">".$ligne["NoCommande"]."</a><br/>\n";
      }
    break;
  }  
?>