<?php
  switch($Etape)
  {
    case 0:
      echo "<form name='info'>";
	  echo "Famille vhc " . Cree_Entree_Type("Famille",46,0,"",MODIFICATION);
      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'>";
      echo "<button type='submit'>Liste</button>";
      echo "</form>";
    break;
    case 1:
      if ($Famille == "")
      {
              $result = Client::getClient();
      }
      else
      {
              $result = Client::getClientByFamilleVHC($Famille);
      }
            echo "<TABLE border='1'>\n";
            echo "<TR><TH>No client</TH><TH>Prénom</TH><TH>Nom</TH><TH>Allocution</TH><TH>Adresse</TH><TH>NPA</TH><TH>Localité</TH><TH>Email</TH><TH>Natel</TH><TH>Accepte email</TH></TR>\n";
	    foreach ($result as $row)
	    {
              echo "<TR><TD>".$row["NoClient"]."</TD><TD>".$row["Prenom"]."</TD><TD>".$row["Nom"]."</TD><TD>".$row["Allocution"]."</TD><TD>".$row["Adresse"]."</TD><TD>".$row["NPA"]."</TD><TD>".$row["Localite"]."</TD><TD>".$row["Email"]."</TD><TD>".$row["Natel"]."</TD><TD>".$row["AccepteEmail"]."</TD></TR>\n";
            }
            echo "/<TABLE>\n";
	  
    break;
  }
?>
