public function afficherCompteEnt() { $util = new UtilitairePageHtml(); echo $util->genereBandeauApresConnexion(); /*?> <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="vue/css/general.css"> <title></title> <meta charset="UTF-8"> </head> <body> <div id="main"> <br/> Bonjour, <br/><br/> Ici seront affichées les données du compte entreprise. Celle-ci pourra les modifier. </div> <?php echo $util->generePied(); ?> </body> </html> <?php*/ $dao = new Dao(); $id = $_SESSION['idUser']; $tabprofil = $dao->getEnt($id); $profil = $tabprofil[0]; $util = new UtilitairePageHtml(); $dispo = ""; if ($profil->getTypeCreneau() == "journee") { $dispo = "Journée."; } if ($profil->getTypeCreneau() == "matin") { $dispo = "Matinée."; } if ($profil->getTypeCreneau() == "apres_midi") { $dispo = "Après-midi."; } echo ' <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="vue/css/general.css"> <title></title> <meta charset="UTF-8"> </head> <br/><br/> <span class="categorie_profil">Nom de l\'entreprise :</span> ' . $profil->getNomEnt() . ' <br/><br/> <span class="categorie_profil">Ville de l\'entreprise :</span> ' . $profil->getVilleEnt() . ' <br/><br/> <span class="categorie_profil">Code Postal :</span> ' . $profil->getCodePostal() . ' <br/><br/> <span class="categorie_profil">Adresse :</span> ' . $profil->getAdresseEnt() . ' <br/><br/> <span class="categorie_profil">Disponibilité :</span> ' . $dispo . ' <br/><br/> <span class="categorie_profil">Nom du contact :</span> ' . $profil->getPrenomContact() . ' ' . $profil->getNomContact() . ' <br/><br/> <span class="categorie_profil">Email :</span> <a href="mailto:' . $profil->getMailEnt() . '">' . $profil->getMailEnt() . '</a> <br/><br/> <span class="categorie_profil">Téléphone :</span> ' . $profil->getNumTelContact() . ' <br/><br/> <span class="categorie_profil">Recherche :</span> ' . $profil->getFormationsRecherchees() . ' avec ' . $profil->getNbRecruteurs() . ' recruteur(s). <br/><br/> <span class="categorie_profil">Nombre de sessions en parallèle :</span> ' . $profil->getNbStands() . ' <br/><br/> <span class="categorie_profil">Nombre de repas prévus :</span> ' . $profil->getNbRepas() . ' '; //<!-- Nom --> ?> <script> //On surligne les cases non valides function surligne(champ, erreur) { if(erreur) champ.style.backgroundColor = "#fba"; else champ.style.backgroundColor = ""; } function verifString(champ, txt, longMax) { if(champ.value.length > longMax) { surligne(champ, true); champ.value = ""; document.getElementById(txt).innerHTML = longMax + " caractères maximum autorisé"; return true; } else { surligne(champ, false); document.getElementById(txt).innerHTML = ""; return false; } } function verifNombre(champ, txt, longMax) { if(champ.value.length > longMax || (!/^\d+$/.test(champ.value) && champ.value.length != 0)) { surligne(champ, true); document.getElementById(txt).innerHTML = "Un nombre de taille maximum " + longMax + " est attendu"; champ.value = ""; return true; } else { surligne(champ, false); document.getElementById(txt).innerHTML = ""; return false; } } function verifCodePostal(champ, txt) { if(champ.value.length != 5 || !/^\d+$/.test(champ.value)) { surligne(champ, true); document.getElementById(txt).innerHTML = "Le code postal doit être rentré au format 44000"; champ.value = ""; return true; } else { surligne(champ, false); document.getElementById(txt).innerHTML = ""; return false; } } function verifTelephone(champ, txt) { if(champ.value.length != 10 || !/^\d+$/.test(champ.value)) { surligne(champ, true); document.getElementById(txt).innerHTML = "Format invalide"; return true; } else { surligne(champ, false); document.getElementById(txt).innerHTML = ""; return false; } } function verifEmail(champ, txt){ var reg = new RegExp("^[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*@[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*[\.]{1}[a-z]{2,6}$", "i"); if(!reg.test(champ.value)) { surligne(champ, true); document.getElementById(txt).innerHTML = "L\'e-mail n\'est pas valide."; champ.value = ""; return true; } else { surligne(champ, false); document.getElementById(txt).innerHTML = ""; return false; } } function verifMdp(txt){ var passw = document.getElementById("passw"); var passwBis = document.getElementById("passwBis"); if (passw.value != passwBis.value) { surligne(passw, true); surligne(passwBis, true); passw.value = ""; passwBis.value = ""; document.getElementById(txt).innerHTML = "Les 2 valeurs sont différentes"; return true; } else if (passw.value.length > 20 || passw.value.length < 5) { surligne(passw, true); surligne(passwBis, true); passw.value = ""; passwBis.value = ""; document.getElementById(txt).innerHTML = "Le mot de passe doit faire 5 à 20 caractères"; return true; } else { surligne(passw, false); surligne(passwBis, false); document.getElementById(txt).innerHTML = ""; return false; } } </script> <script type="text/javascript"> EnableSubmit = function(val) { var sbmt = document.getElementById("submit"); if (val.checked == true) { sbmt.disabled = false; } else { sbmt.disabled = true; } } </script> <script> VerifSubmit = function() { html = html.replace(/</g, "<").replace(/>/g, ">"); var nb_repas = document.getElementById("nb_repas"); var checkboxRepas = document.getElementById("checkbox_repas"); var passw = document.getElementById("passw"); var passwBis = document.getElementById("passwBis"); if (checkboxRepas.checked == true) { if (nb_repas.value == "" || nb_repas.value == null) { alert("Vous n\'avez pas précisé combien de repas seront à prévoir."); return false; } } if (passw.value != passwBis.value) { alert("Les mots de passe ne coïncident pas."); return false; } if (/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(document.getElementById("mail").value)) { return true; } else { alert("L\'adresse email n'est pas correcte !"); return false; } } </script> <?php echo ' <!--Les scripts pour vérifier chaque case--> <br></br></br></br> ----------------------------------------------------<br/><br/> <h2>Pour effectuer des changements : </h2> <style> #tabModifEnt tr td{ padding: 15px; border: 1px solid navy; } </style> <form action="index.php" method="post" onSubmit="return VerifSubmit();"> <TABLE id="tabModifEnt"> <CAPTION> Organisation </CAPTION> <TR> <TD> <label for="disponibiliteSociete"/> Disponibilité <br/> <select required name="disponibiliteSociete"/>'; if ($profil->getTypeCreneau() == "matin") { echo '<option value="matin" selected >Matin</option> <option value="apres_midi">Après-midi</option> <option value="journee"> Journée</option> '; } if ($profil->getTypeCreneau() == "apres_midi") { echo '<option value="matin">Matin</option> <option value="apres_midi" selected >Après-midi</option> <option value="journee"> Journée</option> '; } if ($profil->getTypeCreneau() == "journee") { echo '<option value="matin">Matin</option> <option value="apres_midi">Après-midi</option> <option value="journee" selected> Journée</option> '; } echo '</select> <br/><br/> <label for="nbRecruteursSociete"/> Nombre de recruteurs <br/> <input required type="number" name="nbRecruteursSociete" min="1" max="20" value="' . $profil->getNbRecruteurs() . '" > <br/><br/> <label for="nbStandsSociete"/> Nombre de sessions en parallèle <br/> <input required type="number" name="nbStandsSociete" min="1" max="10" value="' . $profil->getNbStands() . '" > <br/><br/> <label for="nbRepasSociete"/> Nombre de repas prévus <br/> <input required type="number" min="0" max="10" name="nbRepasSociete" value="' . $profil->getNbRepas() . '" onblur="verifNombre(this, \'messageNbRepas\', 3)"> <p id="messageNbRepas" style="color:red"></p> <TD> <input type="submit" name="modification_entreprise_organisation" value="confirmer"/> </TD> </TABLE> </form></br> <form action="index.php" method="post"> <TABLE id="tabModifEnt"> '; $compteur = 0; $dateNow = new DateTime("now"); $tabConfig = $dao->getConfiguration(); $dateLimitEnt = new DateTime($tabConfig['dateFinInscriptionEnt']); $dateDebutEnt = new DateTime((string) $tabConfig['dateDebutInscriptionEnt']); $formationsRecherchees = explode(",", $profil->getFormationsRecherchees()); $listeFormations = $dao->getListeFormations(); $listeDepartements = array(); if ($dateNow < $dateLimitEnt && $dateNow >= $dateDebutEnt) { echo '<CAPTION> Formations recherchées </CAPTION> <TR> <TD> '; foreach ($listeFormations as $formation) { if (!in_array($formation->getDepartement(), $listeDepartements)) { array_push($listeDepartements, $formation->getDepartement()); } } foreach ($listeDepartements as $departement) { echo '<span><b>Département ' . $departement . ' :</b></span> <br/>'; foreach ($listeFormations as $formation) { if ($formation->getDepartement() == $departement) { echo '<input type="checkbox" name="formation[' . $compteur . ']" value="' . $formation->getInitiales() . '" onClick="EnableSubmit(this)" '; if (in_array($formation->getInitiales(), $formationsRecherchees)) { echo 'checked '; } echo '><a id="lienFormation" href="' . $formation->getLien() . '" target="_blank">' . $formation->getDescription() . ' </a></option> <br/>'; $compteur = $compteur + 1; } } } echo '<TD> <input type="submit" name="modification_entreprise_formations" value="confirmer"/> </TD> </TABLE> </form></br>'; } echo '<form action="index.php" method="post" > <TABLE id="tabModifEnt"> <CAPTION> Informations sur la société </CAPTION> <TR> <TD> <label for="nomSociete"/> Nom <br/> <input required type="text" name="nomSociete" value="' . $profil->getNomEnt() . '" onblur="verifString(this, \'messageNom\', 20)"> <p id="messageNom" style="color:red"></p> <label for="villeSociete"/> Ville <br/> <input required type="text" name="villeSociete" value="' . $profil->getVilleEnt() . '" onblur="verifString(this, \'messageVille\', 20)"> <p id="messageVille" style="color:red"></p> <label for="codePostalSociete"/> Code postal <br/> <input required type="text" name="codePostalSociete" value="' . $profil->getCodePostal() . '" onblur="verifCodePostal(this, \'messageCP\')"> <p id="messageCP" style="color:red"></p> <label for="adresseSociete"/> Adresse <br/> <input required type="text" name="adresseSociete" value="' . $profil->getAdresseEnt() . '" onblur="verifString(this, \'messageAdresse\', 30)"> </TD> <p id="messageAdresse" style="color:red"></p> <TD> <input type="submit" name="modification_entreprise_informations" value="confirmer"/> </TD> </TABLE> </form> <br/> <form action="index.php" method="post" > <TABLE id="tabModifEnt"> <CAPTION> Contact </CAPTION> <TR> <TD> <label for="nomContactSociete"/> Nom du contact <br/> <input required type="text" name="nomContactSociete" value="' . $profil->getNomContact() . '" onblur="verifString(this, \'messageNomContact\', 20)"> <p id="messageNomContact" style="color:red"></p> <label for="prenomContactSociete"/> Prénom du contact <br/> <input required type="text" name="prenomContactSociete" value="' . $profil->getPrenomContact() . '" onblur="verifString(this, \'messagePrenomContact\', 20)" > <p id="messagePrenomContact" style="color:red"></p> <label for="emailSociete"/> Email <br/> <input required type="text" name="emailSociete" value="' . $profil->getMailEnt() . '" onblur="verifEmail(this, \'messageEmail\')"> <p id="messageEmail" style="color:red"></p> <label for="numTelSociete"/> Téléphone <br/> <input required type="text" name="numTelSociete" value="' . $profil->getNumTelContact() . '" onblur="verifTelephone(this, \'messageTel\')"> </TD> <p id="messageTel" style="color:red"></p> <TD> <input type="submit" name="modification_entreprise_contact" value="confirmer"/> </TD> </TABLE> </form> <br/> <form action="index.php" method="post" > <TABLE id="tabModifEnt"> <CAPTION> Modifier le mot de passe </CAPTION> <TR> <TD> <label for="mdpActuel"/> Mot de passe actuel <br/> <input required type="password" name="mdpActuel" onblur="verifString(this, \'messageMdpAncien\', 20)"> <p id="messageMdpAncien" style="color:red"></p> <label for="mdpNouveau1"/> Nouveau mot de passe <br/> <input required type="password" name="mdpNouveau1" id="passw"> <br/><br/> <label for="mdpNouveau2"/> Confirmez <br/> <input required type="password" name="mdpNouveau2" onblur="verifMdp(\'messageMdp\')" id="passwBis"> </TD> <p id="messageMdp" style="color:red"></p> <TD> <input type="submit" name="modification_entreprise_motdepasse" value="confirmer"/> </TD> </TABLE> </form> <br/><br/><br/> </html></body> </html>'; echo $util->generePied(); }
public static function afficherForm($listeFormations) { // array[nomFormation, creneauDebut, creneauFin] $dao = new Dao(); $tabConfig = $dao->getConfiguration(); $classFormation = "Formation"; ?> <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="vue/css/general.css"> <title></title> <meta charset="UTF-8"> </head> <body> <div id="main"> <br/> <table id="tabFormation"> <tr> <td colspan=4 id="titre"><b> Formations <b></td> </tr> <tr> <td colspan= 1> Nom de la formation </td> <td colspan= 1> Debut des entretiens</td> <td colspan= 1> Fin des entretiens</td> <td colspan= 1> Nombre d'entretiens </td> </tr> <?php //affichage formation + horaire foreach ($listeFormations as $formation) { echo "<tr id='formation'>"; echo "<td>"; echo $formation[0]; //nom formation echo "</td>"; echo "<td>"; echo $classFormation::calculHoraire($formation[1], $tabConfig, "debut"); //creneau debut echo "</td>"; echo "<td>"; echo $classFormation::calculHoraire($formation[2], $tabConfig, "fin"); //creneau fin echo "</td>"; echo "<td>"; $nbEntretiens = $formation[2] - $formation[1] + 1; echo $nbEntretiens; // nb Entretiens echo "</td>"; echo "</tr>"; } ?> </table> <?php }
public function genereVueAuthentification() { $util = new UtilitairePageHtml(); echo $util->genereBandeauAvantConnexion(); ?> <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="vue/css/general.css"> <title></title> <meta charset="UTF-8"> </head> <body> <div id="login"> <form method="POST" action="index.php"> <table> <tr> <td><label>E-mail</label></td> <td> : </td> <td><input type="text" name="identifiant"/><br/></td> </tr> <tr> <td><label>Mot de passe</label></td> <td> : </td> <td><input type="password" name="password"/<br/></td> </tr> <tr> <td><a href="index.php?oubliMdp=1">Mot de passe oublié ?</a></td> <th colspan="2"><br/><input type="submit" name="submit_login" value="Connexion"></td> </tr> </table> </form> <p> <span style="font-size:16px; color: #8A2908; font-weight: bold;">Entreprises, étudiants, nous vous proposons d'échanger à l'occasion de cette journée "Rencontres Alternance".</span> <!-- police sup, couleur #8A2908, gras--> <br/><br/> <table style="width: 80%; margin: auto; text-align: center;"> <tr> <td> <?php $dao = new Dao(); $dateNow = new DateTime("now"); $tabConfig = $dao->getConfiguration(); $textDateDebutEtu = explode("-", $tabConfig['dateDebutInscriptionEtu']); $textDateDebutEnt = explode("-", $tabConfig['dateDebutInscriptionEnt']); $dateDebutEnt = new DateTime((string) $tabConfig['dateDebutInscriptionEnt']); $dateLimitEnt = new DateTime((string) $tabConfig['dateDebutInscriptionEtu']); $dateDebutEtu = new DateTime((string) $tabConfig['dateDebutInscriptionEtu']); $dateLimitEtu = new DateTime((string) $tabConfig['dateFinInscription']); if ($dateNow >= $dateLimitEtu) { echo '<span style="opacity: 0.5">Inscription étudiant terminée</span>'; } elseif ($dateNow < $dateDebutEtu) { echo '<span style="opacity: 0.5">Inscription étudiant à venir le ' . $textDateDebutEtu[2] . '/' . $textDateDebutEtu[1] . '</span>'; } else { echo '<a href="index.php?inscriptionEtu=1">Inscription étudiant</a> <br/><br/> <b><span style="color: #8A2908; font-size: 12px;"> Venez échanger avec vos futurs employeurs !</span></b>'; // gras } ?> <br/><br/> <?php if ($dateNow >= $dateLimitEnt) { echo '<span style="opacity: 0.5">Inscription entreprise terminée</span>'; } elseif ($dateNow < $dateDebutEnt) { echo '<span style="opacity: 0.5">Inscription entreprise à venir le ' . $textDateDebutEnt[2] . '/' . $textDateDebutEnt[1] . '</span>'; } else { echo '<a href="index.php?inscriptionEnt=1">Inscription entreprise</a> <br/><br/> <b><span style="color: #8A2908; font-size: 12px;">Venez à la rencontre de vos futurs collaborateurs en alternance !</span></b></td>'; // gras } ?> </tr> </table> <span style="font-size: 14px;"><br/><br/><br/><!-- couleur #8A2908 --> Nous restons à votre disposition pour toutes informations complémentaires : <br/><br/> - Tifenn Corbel - Relations entreprises : 02 28 09 20 74 - 02 40 30 60 87 - 06 86 11 02 85 <br/><br/> - Sylvie Gaborit - Formation continue et apprentissage : 02 40 30 60 62 - 02 28 09 22 09</span> </div> <br/><br/> <a style="font-size: 14px;" href="mailto:Tifenn.Corbel@univ-nantes.fr">Contacter l'administrateur</a> <br/><br/><br/> <?php echo $util->generePied(); ?> </body> </html> <?php }