<?php
  switch($Etape)
  {
    case 0:
      echo "<form name='info'>";
	  echo "Type client " . Cree_Entree_Type("TypeClient",43,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'>Emails</button>";
      echo "</form>";
    break;
    case 1:
	  if ($TypeClient == "")
	  {
		$result = Client::getClientWithEMail();
	  }
	  else
	  {
		$result = Client::getClientWithEMail($TypeClient);
	  }
	  $out = "";
	  $first = true;
	  foreach ($result as $row)
	  {
	    if ($first)
		{
		  $first = false;
		}
		else
		{
		  $out.= ";";
		}
	    $out .= $row["Email"];
	  }
	  echo $out;
	  
    break;
  }
?>
