This commit is contained in:
		@@ -1,17 +1,151 @@
 | 
				
			|||||||
<%-- 
 | 
					<div id="contenu">
 | 
				
			||||||
    Document   : ProfilJSP
 | 
					<%
 | 
				
			||||||
    Created on : 18 oct. 2021, 11:09:44
 | 
					$type = '';
 | 
				
			||||||
    Author     : Chelloug.Eliass
 | 
					 if ($_REQUEST['action']=="supprimer") 
 | 
				
			||||||
--%>
 | 
							{ 	echo '<h2>SUPPRESSION DU POMPIER '.$lesInfosPompier['nom'].' '.$lesInfosPompier['prenom'].'</h2>';
 | 
				
			||||||
 | 
							 	echo '<form name="frmA" 	action="index.php?choixTraitement=pompiers&action=validerSupprimer&type='.$type.'&agent='.$lesInfosPompier['id'].'" method="post">';} 
 | 
				
			||||||
 | 
					 	if ($_REQUEST['action']=="modifier") 
 | 
				
			||||||
 | 
							{ 	echo '<h2>MODIFICATION DU POMPIER '.$lesInfosPompier['nom'].' '.$lesInfosPompier['prenom'].'</h2>'; 	
 | 
				
			||||||
 | 
								echo '<form name="frmA" 	action="index.php?choixTraitement=pompiers&action=validerModifier&type='.$type.'&agent='.$lesInfosPompier['id'].'&cis='.$lesInfosPompier['pCis'].'" method="post">';}
 | 
				
			||||||
 | 
					 	if ($_REQUEST['action']=="ajouter") 
 | 
				
			||||||
 | 
							{ 	echo "<h2>AJOUT D'UN NOUVEAU POMPIER</h2>";
 | 
				
			||||||
 | 
								echo '
 | 
				
			||||||
 | 
								<form name="frmA" 	action="index.php?choixTraitement=pompiers&action=validerAjouter&type='.$type.'" method="post" onsubmit="return valider(this)">';}
 | 
				
			||||||
 | 
						echo ("	
 | 
				
			||||||
 | 
					    <table style='border: 0px solid white;'>
 | 
				
			||||||
 | 
						<tr>
 | 
				
			||||||
 | 
						<td style='border :0px;'>
 | 
				
			||||||
 | 
						<fieldset><legend>Coordonnées</legend>
 | 
				
			||||||
 | 
							<table>");
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
 | 
					$titre="Prénom";
 | 
				
			||||||
<!DOCTYPE html>
 | 
					 if ($_REQUEST['action']=="supprimer")  //-------------------------------------------------------- cas suppression
 | 
				
			||||||
<html>
 | 
					 {	echo ("
 | 
				
			||||||
    <head>
 | 
								<tr><th style='width:130px;'>Nom</th>	<td style='width:130px;'>".$lesInfosPompier['nom']."</td></tr>
 | 
				
			||||||
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 | 
								<tr><th>".$titre."</th>					<td>".$lesInfosPompier['prenom']."</td></tr>
 | 
				
			||||||
        <title>JSP Page</title>
 | 
								<tr><th>Adresse</th>					<td>".$lesInfosPompier['pAdresse']."</td></tr>
 | 
				
			||||||
    </head>
 | 
								<tr><th>Code postal</th>				<td>".$lesInfosPompier['pCp']."</td></tr>
 | 
				
			||||||
    <body>
 | 
								<tr><th>Ville</th>						<td>".$lesInfosPompier['pVille']."</td></tr>
 | 
				
			||||||
        <h1>Hello World!</h1>
 | 
								<tr><th>Téléphone</th>	<td>".$lesInfosPompier['pBip']."</td></tr>					
 | 
				
			||||||
    </body>
 | 
								<tr><th>Adresse électronique</th><td>".$lesInfosPompier['pMail']."</td></tr>
 | 
				
			||||||
</html>
 | 
								<tr><th>Téléphone</th>	<td>".$lesInfosPompier['pTel']."</td></tr>
 | 
				
			||||||
 | 
								<tr><th>Nom de compte</th>				<td>".$lesInfosPompier['pLogin']."</td></tr>
 | 
				
			||||||
 | 
								<tr><th>Grade</th>						<td>".$lesInfosPompier['wGrade']."</td></tr>
 | 
				
			||||||
 | 
								<tr><th>Statut</th>						<td>".$lesInfosPompier['wStatut']."</td></tr>
 | 
				
			||||||
 | 
					        </table>
 | 
				
			||||||
 | 
					    </fieldset>");	
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					 else	//------------------------------------------------------------------------------------ cas ajout ou modification
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						$checked = '';
 | 
				
			||||||
 | 
						$display = 'none';
 | 
				
			||||||
 | 
						$mdp = '';
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						echo ("
 | 
				
			||||||
 | 
								<tr><th style='width:130px;'>Nom</th>			<td style='width:130px;'><INPUT type = 'text' name = 'ztNom'value=".$lesInfosPompier['nom']."></td></tr>
 | 
				
			||||||
 | 
								<tr><th>".$titre."</th>							<td><INPUT type = 'text' name = 'ztPrenom' value=".$lesInfosPompier['prenom']."></td></tr>
 | 
				
			||||||
 | 
								<tr><th>Adresse</th>							<td><INPUT type = 'text' name = 'ztAdresse' value=".$lesInfosPompier['pAdresse']."></td></tr>
 | 
				
			||||||
 | 
								<tr><th>Code postal</th>						<td><INPUT type = 'text' name = 'ztCP' value=".$lesInfosPompier['pCp']."></td></tr>
 | 
				
			||||||
 | 
								<tr><th>Ville</th>								<td><INPUT type = 'text' name = 'ztVille' value=".$lesInfosPompier['pVille']."></td></tr>				
 | 
				
			||||||
 | 
								<tr><th>Adresse électronique</th>		<td><INPUT type = 'text' name = 'ztMail' value=".$lesInfosPompier['pMail']."></p></td></tr>
 | 
				
			||||||
 | 
								<tr><th>Bipper</th>								<td><INPUT type = 'text' name = 'ztTel' value=".$lesInfosPompier['pBip']."></p></td></tr>
 | 
				
			||||||
 | 
								<tr><th>Nom de compte</th>						<td><INPUT type = 'text' name = 'ztLogin' value=".$lesInfosPompier['pLogin']."></p></tr>
 | 
				
			||||||
 | 
								<tr><th>Nouveau mot de passe ?</th>				<td>oui<INPUT type= 'radio' id='motdepasse' name= 'oui'".$checked." onchange='afficherBloc(\"code\")'>
 | 
				
			||||||
 | 
																				non<INPUT type= 'radio' id='motdepasse' name= 'oui'".$checked." onchange='afficherBloc(\"code\")' checked><span id='code' style='display:".$display.";'>
 | 
				
			||||||
 | 
																				<INPUT type = 'text' name = 'ztMdp' value=".$mdp."></p></td></tr></span>
 | 
				
			||||||
 | 
					        </table>								
 | 
				
			||||||
 | 
					    </fieldset>");
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						echo ("		
 | 
				
			||||||
 | 
									<td style='border :0px;'>
 | 
				
			||||||
 | 
									<fieldset><legend>Centre d'Incendie et de Secours</legend> 
 | 
				
			||||||
 | 
										<table>
 | 
				
			||||||
 | 
											<tr><th style='width:130px;'>Code</th>		<td>".$lesInfosPompier['pCis']."</td> </tr>
 | 
				
			||||||
 | 
											<tr><th>Nom</th>							<td>".$lesInfosPompier['cNom']."</td> </tr>
 | 
				
			||||||
 | 
											<tr><th>Adresse</th>						<td>".$lesInfosPompier['cAdresse']."</td> </tr>
 | 
				
			||||||
 | 
											<tr><th>Téléphone</th>		<td>".$lesInfosPompier['cTel']."</td> </tr>
 | 
				
			||||||
 | 
											<tr><th>Groupement</th>						<td>".$lesInfosPompier['cGroupement']."</td> </tr>
 | 
				
			||||||
 | 
										</table>
 | 
				
			||||||
 | 
									</fieldset>
 | 
				
			||||||
 | 
									<fieldset><legend>Fonction</legend> 
 | 
				
			||||||
 | 
										<table>
 | 
				
			||||||
 | 
											<tr><th>Type</th>							<td>
 | 
				
			||||||
 | 
											<select name='lstTypes' id='type-select' "); if($_SESSION['statut']!=2){echo("disabled=true ");} echo(">");
 | 
				
			||||||
 | 
						            if (!isset($_REQUEST['lstTypes'])) {$choix = 'premier';} else {$choix =$_REQUEST['lstTypes'];}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						            foreach ($lesTypes as $unType)
 | 
				
			||||||
 | 
									{	
 | 
				
			||||||
 | 
										if($unType['pIndice'] == $choix or $choix == 'premier')
 | 
				
			||||||
 | 
											{echo "<option selected value=\"".$unType['pIndice']."\">".$unType['pLibelle']."</option>\n	";
 | 
				
			||||||
 | 
											$choix = $unType['pIndice'];
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										else
 | 
				
			||||||
 | 
											{echo "<option value=\"".$unType['pIndice']."\">".$unType['pLibelle']."</option>\n";}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
						echo ("  
 | 
				
			||||||
 | 
						        </select></td> </tr>
 | 
				
			||||||
 | 
											<tr><th>Grade</th>							<td>
 | 
				
			||||||
 | 
											<select name='lstGrades' id='grade-select' "); if($_SESSION['statut']!=2){echo("disabled=true ");} echo(">"); 
 | 
				
			||||||
 | 
						            if (!isset($_REQUEST['lstGrades'])) {$choix = 'premier';} else {$choix =$_REQUEST['lstGrades'];}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						            foreach ($lesGrades as $unGrade)
 | 
				
			||||||
 | 
									{	
 | 
				
			||||||
 | 
										if($unGrade['pIndice'] == $choix or $choix == 'premier')
 | 
				
			||||||
 | 
											{echo "<option selected value=\"".$unGrade['pIndice']."\">".$unGrade['pLibelle']."</option>\n	";
 | 
				
			||||||
 | 
											$choix = $unGrade['pIndice'];
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										else
 | 
				
			||||||
 | 
											{echo "<option value=\"".$unGrade['pIndice']."\">".$unGrade['pLibelle']."</option>\n";}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
						echo ("  
 | 
				
			||||||
 | 
						        </select></td> </tr>
 | 
				
			||||||
 | 
											<tr><th>Statut</th>							<td>
 | 
				
			||||||
 | 
											<select name='lstStatut' id='statut-select' "); if($_SESSION['statut']!=2){echo("disabled=true ");} echo(">"); 
 | 
				
			||||||
 | 
						            if (!isset($_REQUEST['lstStatut'])) {$choix = 'premier';} else {$choix =$_REQUEST['lstStatut'];}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						            foreach ($lesStatuts as $unStatut)
 | 
				
			||||||
 | 
									{	
 | 
				
			||||||
 | 
										if($unStatut['pIndice'] == $choix or $choix == 'premier')
 | 
				
			||||||
 | 
											{echo "<option selected value=\"".$unStatut['pIndice']."\">".$unStatut['pLibelle']."</option>\n	";
 | 
				
			||||||
 | 
											$choix = $unStatut['pIndice'];
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										else
 | 
				
			||||||
 | 
											{echo "<option value=\"".$unStatut['pIndice']."\">".$unStatut['pLibelle']."</option>\n		";}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
						echo ("   
 | 
				
			||||||
 | 
						        </select></td> </tr>
 | 
				
			||||||
 | 
										
 | 
				
			||||||
 | 
										</table>
 | 
				
			||||||
 | 
									</fieldset></td>
 | 
				
			||||||
 | 
								</tr>
 | 
				
			||||||
 | 
								</table>
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								<fieldset><legend>Observations</legend>
 | 
				
			||||||
 | 
								<table style='border: 0px solid white;'>
 | 
				
			||||||
 | 
									<tr> 
 | 
				
			||||||
 | 
										 <td><textarea name='ztObs' cols='70' rows='1'>".$lesInfosPompier['pCommentaire']."</textarea></td>
 | 
				
			||||||
 | 
									</tr>
 | 
				
			||||||
 | 
								</table>
 | 
				
			||||||
 | 
								</fieldset>
 | 
				
			||||||
 | 
							</div>");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
					echo ("	
 | 
				
			||||||
 | 
						</td>
 | 
				
			||||||
 | 
						</tr>
 | 
				
			||||||
 | 
						</fieldset>
 | 
				
			||||||
 | 
						</table>");
 | 
				
			||||||
 | 
					%>         
 | 
				
			||||||
 | 
					            <table style='border: 0px solid white; '>
 | 
				
			||||||
 | 
					            	<tr>
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					                <td style='border: 0px solid white; witdh:130px; text-align:right;'>
 | 
				
			||||||
 | 
					                	<input type="hidden" 	name="zTypeAdm"		value="<?php if ($type=="adm") {echo ("true");} else {echo ("false");} ?>"> 
 | 
				
			||||||
 | 
					                	<input type="hidden" 	name="zOk"			value="OK"> 
 | 
				
			||||||
 | 
										<input type="image" 	name="btValider" 	alt="Valider" 	src="images/valider.jpg" value="OK" >
 | 
				
			||||||
 | 
										<input type="image"		name="btAnnuler" 	alt="Annuler" 	src="images/annuler.jpg" value="nonOK" 	onclick="annuler('frmA');">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                </td>
 | 
				
			||||||
 | 
					                </tr>
 | 
				
			||||||
 | 
					            </table>         
 | 
				
			||||||
 | 
					    </form>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user