<?php 
        include "include/pages/tab/afficherListePersonne.tab.inc.php";
    }
} else {
    $id = $_GET['id'];
    if (!intval($id) || !$personneManager->isPerNumExistant($id)) {
        throw new ExceptionPerso("Merci de ne pas modifier l'url dans la barre d'adresse !", ExceptionPerso::ERR_URL);
    }
    if ($personneManager->isEtudiant($id)) {
        $etudiantManager = new EtudiantManager($pdo);
        $departementManager = new DepartementManager($pdo);
        $detailPersonne = $etudiantManager->getEtudiant($id);
        $detailsDepartement = $departementManager->getDetailsDepartement($detailPersonne->getDepNum());
        ?>
 <h1> D&eacute;tail sur l'étudiant <?php 
        echo $detailPersonne->getPerNom();
        ?>
 </h1><?php 
    } else {
        $salarieManager = new SalarieManager($pdo);
        $fonctionManager = new FonctionManager($pdo);
        $detailPersonne = $salarieManager->getSalarie($id);
        $fonction = $fonctionManager->getFonctionLibelle($detailPersonne->getFonNum());
        ?>
 <h1> D&eacute;tail sur le salari&eacute; <?php 
        echo $detailPersonne->getPerNom();
        ?>
 </h1><?php 
    }
    include "include/pages/tab/afficherDetailsPersonne.tab.inc.php";
}
    <fieldset>
      <legend>Informations sur votre statut de salari&eacute;</legend>

      <div class="pure-control-group">
        <label for="sal_telprof">T&eacute;l&eacute;phone professionnel :</label>
        <input type='tel' id="sal_telprof" name='sal_telprof' value="<?php 
echo $salarie->getSalTelProf();
?>
" required>
      </div>

      <div class="pure-control-group">
        <label for="fon_num">Fonction :</label>
        <select name="fon_num" id="fon_num">
          <?php 
$fonctionManager = new FonctionManager($pdo);
$fonctions = $fonctionManager->getAllFonctions();
foreach ($fonctions as $fonction) {
    if ($salarie->getFonNum() == $fonction->getFonNum()) {
        ?>
<option value="<?php 
        echo $fonction->getFonNum();
        ?>
" selected> <?php 
        echo $fonction->getFonLibelle();
        ?>
 </option> <?php 
    } else {
        ?>
<option value="<?php 
        echo $fonction->getFonNum();
<?php

$db = new Mypdo();
$managerDi = new DivisionManager($db);
$managerDe = new DepartementManager($db);
$managerF = new FonctionManager($db);
$managerV = new VilleManager($db);
$managerE = new EtudiantManager($db);
$managerS = new SalarieManager($db);
if ($managerP->existePseudo($_POST['login'])) {
    ?>
    <img src="image/erreur.png" alt="Erreur" /> Le pseudo <b>"<?php 
    echo $_POST['login'];
    ?>
"</b> est déjà pris
    <a href="index.php?page=51" class="bouton">Retour à l'ajout de personne</a><?php 
} else {
    //on a besoin des variables suivant pour la prochaine page
    $_SESSION['nom'] = $_POST['nom'];
    $_SESSION['prenom'] = $_POST['prenom'];
    $_SESSION['tel'] = $_POST['tel'];
    $_SESSION['mail'] = $_POST['mail'];
    $_SESSION['login'] = $_POST['login'];
    $_SESSION['passwd'] = $_POST['passwd'];
    //si modification d'un etudiant
    if ($_POST['categorie'] == 'etudiant') {
        $listeDivisions = $managerDi->getListeDivision();
        ?>

    <h1>Modifier un étudiant</h1>
    <div class="divCentre" id="ajout">