<!-- Derniere modification le 29 mars 2022 par Laureline Grand -->

<?php
	if ($action==="modifier") 
		{echo '<h2>MODIFICATION DE L\'UTILISATEUR</h2>';
		 echo "<form name='frmVisiteur' action='index.php?choixTraitement=utilisateur&action=validerModifier' method='post'>";}
?>	
<!-- Affichage des valeurs dans un tableau r&eacute;capitulatif.  -->

        <div>
<?php
echo("
			<fieldset><legend>Coordonnées de l'utilisateur
			<td style='width:10px;text-align:center;'></td>
			</legend>
				<table>
					
					<tr> <th style='width:100px;text-align:center;'>Nom</th>
					<td><input style='width:100px class='controle' type='text' name='zNom' value='".$lesInfosProfil['uNom']."'></td> </tr>
					<tr> <th style='width:100px;text-align:center;'>Prénom</th>
					<td><input style='width:100px class='controle' type='text' name='zPrenom' value='".$lesInfosProfil['uPrenom']."'></td> </tr>
					<tr> <th style='width:100px;text-align:center;'>Adresse</th>
					<td><input style='width:100px class='controle' type='text' name='zAdresse' value='".$lesInfosProfil['uAdresse']."'></td> </tr>					
					<tr> <th style='width:100px;text-align:center;'>Code postal</th>
					<td><input type='image'	name='cp' src='images/cp.gif'><input class='controle' type='text' name='zCP' value='".$lesInfosProfil['uCP']."'></td> </tr>			
					<tr> <th style='width:100px;text-align:center;'>Ville</th>
					<td><input style='width:100px' class='controle' type='text' name='zVille' value='".$lesInfosProfil['uVille']."'></td> </tr>			
					<tr> <th style='width:100px;text-align:center;'>Statut</th>
					<td><select name='lstStatue' style='width:153px;' onchange='submit();' >");
					if (!isset($_REQUEST['lstStatut'])) {$choix = 'premier';}
					$i=1;
					foreach ($infoStatut as $unStatut)
					{
						if($unStatut['pIndice'] == $choix or $choix == 'premier')
							{echo "<option value=\"".$unStatut['pIndice']."\">".$unStatut['pLibelle']."</option>\n ";
							$choix = $unStatut['pIndice'];
							
							$nop=$i;
							}
						else
							{echo"<option value=\"".$unStatut['pIndice']."\">".$unStatut['pLibelle']."</option>\n";
							$i=$i+1;}
					}
				if($_REQUEST['action']<>"liste") {$action = $REQUEST['action'];} else {$action = "voir";}
									echo("</td> </tr>
					<tr> <th style='width:100px;text-align:center;'>Nom de compte</th>
					<td><input style='width:100px class='controle' type='text' name='zLogin' value='".$lesInfosProfil['uLogin']."'></td> </tr>
					<tr> <th style='width:100px;text-align:center;'>Nouveau mot de passe ?</th>
					<td><input type='radio' id='non' name='rdbMDP' value='non' checked><label for='non'>Non</label><input type='radio' id='oui' name='rdbMDP' value='oui' ><label for='oui'>Oui </label><input style='width:100px class='controle' type='text' name='zMDP' ></td> </tr>
					<tr> <th style='width:100px;text-align:center;'>Region</th>
					<td><select name='lstRegion' style='width:153px;' onchange='submit();' >");
					if (!isset($_REQUEST['lstRegion'])) {$choix = 'premier';}
					$i=1;
					foreach ($infoRegion as $uneRegion)
					{
						if($uneRegion['pIndice'] == $choix or $choix == 'premier')
							{echo "<option value=\"".$uneRegion['pIndice']."\">".$uneRegion['pLibelle']."</option>\n ";
							$choix = $uneRegion['pIndice'];
							
							$nop=$i;
							}
						else
							{echo"<option value=\"".$uneRegion['pIndice']."\">".$uneRegion['pLibelle']."</option>\n";
							$i=$i+1;}
					}
				if($_REQUEST['action']<>"liste") {$action = $REQUEST['action'];} else {$action = "voir";}
									echo("</td> </tr>		
				</table>
					
			</fieldset>	
");
			
//Laboratoire
echo("
			<fieldset><legend>Laboratoire
			<td style='width:10px;text-align:center;'></td>
			</legend>
				<table>
					
					<select name='lstLabo' style='width:153px'> 				
					
				</table>			
				
					
			</fieldset>	
")
?>
                
                
        </div>

        <p align="left">
            <input type="hidden" 	name="zOk" value="OK">
            <input type="image" 	name="btValider" alt="Valider" src="images/valider.jpg"  	onclick="this.form.submit();">
            <input type="image" 	name="btAnnuler" alt="Annuler" src="images/annuler.jpg" 	onclick="annuler('frmParam');">
        </p>   
    </form>