} else {
        ?>
    <h1>Modifier un salarié</h1>
    <div class="divCentre" id="ajout">
      <form action="index.php?page=108" method="post" name="ajoutSal">
        <div class="texteFormulaire">
          <p>Téléphone pro :</p>
          <p>Fonction :</p>
        </div>

        <div class="champsFormulaire">

          <!-- choix du telephone professionnel -->
          <input name="telpro" class="zoneTexte" type="text" pattern="[0-9]+" title="Exemple : 0102030405" <?php 
        if (!$managerE->isEtudiant($_SESSION['numPers'])) {
            $salarie = $managerS->getSalarie($_SESSION['numPers']);
            ?>
            value="<?php 
            echo $salarie->sal_telprof;
            ?>
"<?php 
            //on recupere la valeur du telephone pro du salarie
        }
        ?>
           required>

           <!-- choix de la fonction -->
          <select class="zoneTexte" name="listerFonctions"><?php 
        $listeFonctions = $managerF->getListeFonctions();
        foreach ($listeFonctions as $fonction) {
            echo "\n";
					<?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";
}
Exemplo n.º 3
0
        ?>
     	</td>
					<td><?php 
        echo $etudiant->dep_nom;
        ?>
      </td>
					<td><?php 
        echo $etudiant->vil_nom;
        ?>
     	</td>
				</tr>
			</table>
			<?php 
    } else {
        //recuperer la liste des salaries
        $salarie = $managerS->getSalarie($numPersonne);
        if ($managerP->isPersonne($_GET['personne'])) {
            ?>
			<h1>Détail sur le salarié <?php 
            echo $salarie->per_nom;
            ?>
 </h1>
			<table class="tableCli">
				<tr class="hautTableau">
					<td><b>Prénom       </b></td>
					<td><b>Mail         </b></td>
					<td><b>Tel          </b></td>
					<td><b>Tel pro      </b></td>
					<td><b>Fonction     </b></td>
				</tr>