<?php // Licence Publique Générale GNU (GNU General Publique License), Copyright 2005-2008 Geffrotin Yann

	if(isset($_SESSION["mailcli"])){ //si les sessions sont pleines
		
		include("../../mon_solde.php");
    
		if(isset($_GET['mailcli'])){	$mail_cli_dest = $_GET['mailcli'];	}
		if(isset($_GET['montant'])){	$Montant = $_GET['montant'];	}
			
      echo '
      <form action="pay_ajouter.php" method="post" onsubmit="return pay_verification();">
      
      <div><h4 class="titre">Nouvelle transaction</h4></div>
      <div><h4>Coordonnées du destinataire :</h4></div>
      
      <p>
        <table>
          <tr>
            <td class="historique" 
              onmouseover="this.style.backgroundColor=\'white\'"
              onmouseout="this.style.backgroundColor=\'#c8d7e3\'" >Courriel du destinataire
            </td>
            <td>
              <input type="text" id="mailcli" name="mailcli" size="30" ';
              if(isset($mail_cli_dest)){ echo ' value="'.$mail_cli_dest.'" ';} echo '/>
            </td>
          </tr>
          
          <tr>
            <td class="historique" 
                onmouseover="this.style.backgroundColor=\'white\'"
                onmouseout="this.style.backgroundColor=\'#c8d7e3\'" >Montant de la transaction
            </td>
            <td>
              <input type="decimal" id="montant" name="montant" size="30" ';
              if(isset($Montant)){ echo ' value="'.$Montant.'" ';} echo '/>
            </td>
          </tr>
          
          <tr>
            <td align="right"> <input type="checkbox" name="anonyme"></td>
            <td>Envoyer ma transaction anonymement</td>
          </tr>
          
          <tr>
            <td></td>
            <td><input type="submit" value="Valider" /><input type="reset" value="Annuler" /></td>
          </tr>
          
        </table>
      </p>
      
      </form>';
      
      //Focus sur le champs du courriel en javascript
      echo '<script type="text/javascript">document.getElementById("mailcli").focus();</script>';
      
      //Inclue le javascript
      echo '<script type="text/javascript" src="pay_verification.js"></script>';
    
      include("../../support/client/liste_clients_exemple.php");
      
	}

?>
