114 lines
7.6 KiB
PHP
114 lines
7.6 KiB
PHP
<!-- Derniere modification le 27 avril 2023 par Pascal Blain -->
|
|
<div id="contenu">
|
|
<?php
|
|
if ($_REQUEST['action']=="supprimer")
|
|
{ echo '<h2>SUPPRESSION DE L\'ELEVE '.$lesInfosEleve['EL_NOM'].' '.$lesInfosEleve['EL_PRENOM'].'</h2>';
|
|
echo '<form name="frmA" action="index.php?choixTraitement=eleves&action=validerSupprimer&type='.$type.'&eleve='.$lesInfosEleve['EL_NUM'].'" method="post">';}
|
|
if ($_REQUEST['action']=="modifier")
|
|
{ echo '<h2>MODIFICATION DE L\'ELEVE '.$lesInfosEleve['EL_NOM'].' '.$lesInfosEleve['EL_PRENOM'].'</h2>';
|
|
echo '<form name="frmA" action="index.php?choixTraitement=eleves&action=validerModifier&type='.$type.'&eleve='.$lesInfosEleve['EL_NUM'].'" method="post">';}
|
|
if ($_REQUEST['action']=="ajouter")
|
|
{ echo "<h2>AJOUT D'UN NOUVEL ELEVE</h2>";
|
|
echo '
|
|
<form name="frmA" action="index.php?choixTraitement=eleves&action=validerAjouter&lstEleves=premier" method="post" onsubmit="return valider(this)">';}
|
|
echo ("
|
|
<fieldset><legend>Coordonnées</legend>
|
|
<table>");
|
|
if ($_REQUEST['action']=="supprimer") //-------------------------------------------------------- cas suppression
|
|
{ echo ("
|
|
<tr><th style='width:130px;'>Nom</th> <td style='width:130px;'>".$lesInfosEleve['EL_NOM']."</td> </tr>
|
|
<tr><th>Prénom</th> <td>".$lesInfosEleve['EL_PRENOM']."</td> </tr>
|
|
<tr><th>Adresse</th> <td>".$lesInfosEleve['EL_RUE']."</td> </tr>
|
|
<tr><th>Code postal</th> <td>".$lesInfosEleve['EL_CP']."</td> </tr>
|
|
<tr><th>Ville</th> <td>".$lesInfosEleve['EL_VILLE']."</td> </tr> <tr><th>Statut</th> <td>".$lesInfosEleve['wStatut']."</td> </tr>
|
|
<tr><th>Adresse électronique</th><td>".$lesInfosEleve['EL_EMAIL']."</td> </tr>
|
|
<tr><th>Téléphone</th> <td>".$lesInfosEleve['EL_TELPERSO']."</td> </tr>
|
|
<tr><th>Nom de compte</th> <td>".$lesInfosEleve['EL_LOGIN']."</td></tr>
|
|
</table>
|
|
</fieldset>");
|
|
}
|
|
else //------------------------------------------------------------------------------------ cas ajout ou modification
|
|
{ if ($_REQUEST['action']=="ajouter")
|
|
{ unset($lesInfosEleve);
|
|
$tel=Null;
|
|
echo ('
|
|
<tr><th style="width:130px;">Code de l\'eleve (initiales, 3 lettres maxi)</th><td style="width:130px;">
|
|
<input class="controle" type="text" name="eleve" id="eleve" onblur="verifTexte(this.form, this, 3)"></td></tr>
|
|
<tr><th style="width:130px;">Nom</th> <td style="width:130px;">
|
|
<input class="controleLong" type="text" name="ztNom" id="Nom" onblur="verifTexte(this.form, this, 55)" required></td> </tr>
|
|
<tr><th>Prénom</th> <td><input class="controleLong" type="text" name="ztPrenom" id="prenom" onblur="verifTexte(this.form, this, 25)"></td> </tr>
|
|
<tr><th>Adresse</th> <td><input class="controleLong" type="text" name="ztAdresse"></td> </tr>
|
|
<tr><th>Code postal</th> <td><input class="controle" type="text" pattern="[0-9]{5}" id="Code postal" name="ztCP"></td> </tr>
|
|
<tr><th>Ville</th> <td><input class="controleLong" type="text" name="ztVille"</td></tr>
|
|
<tr><th>Statut</th> <td><select name = "ldrStatut" style="width:200px;">');
|
|
foreach ($lesStatuts as $unStatut)
|
|
{ echo '
|
|
<option value="'.$unStatut['pIndice'].'">'.$unStatut['pLibelle'].'</option>';
|
|
}
|
|
echo ('
|
|
</select></td></tr>
|
|
<tr><th>Téléphone</th> <td><input class="controleLong" type="tel" pattern="^(?:0|\(?\+33\)?\s?|0033\s?)[1-79](?:[\.\-\s]?\d\d){4}$" name="ztTel" id="Telephone"></td></tr>');
|
|
|
|
|
|
echo ('
|
|
<tr><th>Adresse électronique</th><td><input class="controleLong" type="email" name="ztMail" id="Adresse electronique"></td></tr>
|
|
<tr><th>Nom de compte</th> <td><input class="controleLong" type="text" name="ztLogin" id"NomCompte" onblur="verifTexte(this.form, this, 15)"></td></tr>
|
|
<tr><th>Mot de passe</th> <td><input class="controleLong" type="text" name="ztMdp" id="Mdp"></td></tr>
|
|
');
|
|
}
|
|
else //------------------------------------------------------------- cas modification
|
|
{
|
|
echo ('
|
|
<tr><th style="width:130px;">Nom</th><td style="width:130px;">
|
|
<input class="controleLong" type="text" name="ztNom" id="Nom" onblur="verifTexte(this.form, this, 55)" required value="'.$lesInfosEleve['EL_NOM'].'"></td> </tr>
|
|
<tr><th>Prénom</th> <td><input class="controleLong" type="text" name="ztPrenom" id="prenom" onblur="verifTexte(this.form, this, 25)" value="'.$lesInfosEleve['EL_PRENOM'].'"></td> </tr>
|
|
<tr><th>Adresse</th> <td style="width:150px;"><input class="controleLong" type="text" name="ztAdresse" value="'.$lesInfosEleve['EL_RUE'].'"></td> </tr>
|
|
<tr><th>Code postal</th> <td><input class="controle" type="text" pattern="[0-9]{5}" id="Code postal" name="ztCP" value="'.$lesInfosEleve['EL_CP'].'" >');
|
|
echo ("
|
|
<a href=\"javascript:openCodesPostaux('ztCP','ztVille');\" title='Trouvez un code postal en France'>
|
|
<img src='images/cp.gif' width='16' height='13' alt='codes postaux' title='Séléctionnez votre code postal grâce à www.codes-postaux.org'></a></td> </tr>
|
|
<tr><th>Ville</th> <td><input class='controleLong' type='text' name='ztVille' value='".$lesInfosEleve['EL_VILLE']."'></td></tr>");
|
|
|
|
if ($lesInfosEleve['EL_TELPERSO']>1) {$tel=substr($lesInfosEleve['EL_TELPERSO'],0,2).".".substr($lesInfosEleve['EL_TELPERSO'],3,2).".".substr($lesInfosEleve['EL_TELPERSO'],6,2).".".substr($lesInfosEleve['EL_TELPERSO'],9,2).".".substr($lesInfosEleve['EL_TELPERSO'],12,2);} else {$tel=Null;}
|
|
|
|
echo ("
|
|
<tr><th>Téléphone</th> <td>
|
|
<input class='controleLong' type='tel' pattern='^(?:0|\(?\+33\)?\s?|0033\s?)[1-79](?:[\.\-\s]?\d\d){4}$' name='ztTel' id='Telephone' value='".$tel."'></td> </tr>
|
|
<tr> <th>Statut</th> <td><select name = 'ldrStatut' style='width:200px;'>");
|
|
foreach ($lesStatuts as $unStatut)
|
|
{
|
|
if (isset($lesInfosEleve['EL_STATUT']))
|
|
{if ($unStatut['pIndice']===$lesInfosEleve['EL_STATUT']){$selected = "selected";} else {$selected = null;}}
|
|
echo '
|
|
<option '.$selected.' value="'.$unStatut['pIndice'].'">'.$unStatut['pLibelle'].'</option>';
|
|
}
|
|
echo ("
|
|
</select></td> </tr>
|
|
<tr><th>Adresse électronique</th> <td>
|
|
<input class='controleLong' type='email' name='ztMail' id='Adresse electronique' value='".$lesInfosEleve['EL_EMAIL']."'></td></tr>
|
|
<tr><th>Nom de compte</th> <td>
|
|
<input class='controleLong' type='text' name='ztLogin' id='Nom de compte' onblur='verifTexte(this.form, this, 15)' value='".$lesInfosEleve['EL_LOGIN']."'></td></tr>
|
|
<tr><th>Nouveau mot de passe ?</th> <td><input type='radio' name='brMdp' value='0' checked>Non <input type='radio' name='brMdp' value='1'>Oui</td></tr>");
|
|
}
|
|
echo ("
|
|
</table>
|
|
</fieldset>");
|
|
}
|
|
?>
|
|
<table style='border: 0px solid white; '>
|
|
<tr>
|
|
<td style='border: 0px solid white;'>
|
|
<fieldset><legend>Observations</legend>
|
|
<textarea name='ztObs' cols='70' rows='1'><?php
|
|
if ($_REQUEST['action']!="ajouter") {echo $lesInfosEleve['commentaire'];}?></textarea>
|
|
</fieldset>
|
|
</td>
|
|
<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>
|