if ($_SESSION["membre"] instanceof Etudiant) { header("Location: etudiant/"); } else { if ($_SESSION["membre"] instanceof Entreprise) { header("Location: entreprise/"); } } } } $token = Gestionnaire::getInstance()->randomString(40); $_SESSION["token"] = $token; $p = new Page("Gestion des stages :: Accueil"); $p->appendCssUrl("inc/style/styleIndex.css"); $p->appendCssUrl("inc/style/styleOffres.css"); $p->appendJsUrl("inc/script/scriptOffres.js"); $p->appendToHead("<script>var token = \"{$token}\";</script>"); $offres = Gestionnaire::getInstance()->dernieresOffres(3); $p->appendContent(<<<HTML <div id="content"> <section id="prstSite"> <!-- Brève introduction pour sensibiliser les entreprises--> <div> <header> <h2>Proposer une offre de stage n'a jamais été aussi simple</h2> <p>Rentrez facilement en contact avec des étudiants motivés</p> </header> <form action=""> <input type="submit" value="Ajouter une offre de stage" onclick="connexion();return false;"> </form> </div> </section> <article id="prstEtudiants"> <!-- Un avant goût d'un article mettant en valeur les étudiants-->
<?php require_once "../inc/config.inc.php"; session_start(); $g = Gestionnaire::getInstance(); $p = new Page("Gestion des stages :: Etudiants"); $p->appendCssUrl("../inc/style/styleOffres.css"); $p->appendCssUrl("../inc/style/styleCandEtu.css"); $p->appendToHead("<style>table tbody tr:hover:not(.descriptionOffre){cursor:default !important;}</style>"); $p->appendContent("<header><h1>Liste des Etudiants</h1></header>" . $g->listeEtudiantsHTML()); echo $p->toHTML();
$p->appendToHead(<<<CSS <style> h1 { margin-top : 50px; margin-bottom : 20px; text-align : center; } div { width:500px; position:relative; left:50% !important; transform: translateX(-50%) !important; text-align : right; } div :not(a){ font-family:monospace; } input { background-color: rgb(208, 56, 56); padding:8px; color:white; border-radius: 20px; border:none; -webkit-box-shadow: 0px 7px 0px -5px rgba(0,0,0,0.75); -moz-box-shadow: 0px 7px 0px -5px rgba(0,0,0,0.75); box-shadow: 0px 7px 0px -5px rgba(0,0,0,0.75); -webkit-transition: background-color 1s; -moz-box-transition: background-color 1s; transition: background-color 1s; margin: 5px 5px; } input:hover { background-color: white; color: rgb(208, 56, 56); cursor:pointer; } input:active { margin-top: 3px; padding:7px; } </style> CSS );
<?php require_once "../inc/config.inc.php"; session_start(); $g = Gestionnaire::getInstance(); $token = $g->randomString(40); $_SESSION["token"] = $token; $p = new Page("Gestion des stages :: Profil"); $p->appendJsUrl("../inc/script/scriptOffres.js"); $p->appendCssUrl("../inc/style/styleOffres.css"); $p->appendCssUrl("../inc/style/styleProfilEnt.css"); $p->appendToHead("<script>var token = \"{$token}\";</script>"); if (isset($_GET["id"])) { $id = $_GET["id"]; $p->appendToHead("<style>.cliqPostul{display:none;}</style>"); $e = $g->getEntreprise($id); if ($e == NULL) { header("Location: index.php"); } $p->appendContent($e->toHTML()); if (isset($_SESSION["membre"]) && $_SESSION["membre"] instanceof Enseignant) { foreach ($g->getEnseignants() as $ee) { if ($ee != NULL && $ee->getId() == $_SESSION["membre"]->getId()) { $c = $ee->getCommentaire($_GET["id"]); $html = "<h1>Votre commentaire</h1><p style='text-align:center;font-style:italic;margin-bottom:5px;'>Cliquez dessus pour le modifier</p>"; $html .= "<p style='text-align:center;'><<<a href='../enseignant/description.php?id={$e->getId()}'>" . ($c != "" ? $c : "AJOUTER UN COMMENTAIRE") . "</a>>></p>"; $p->appendContent($html); } } } if (isset($_SESSION["membre"]) && ($_SESSION["membre"] instanceof Enseignant || $_SESSION["membre"] instanceof Etudiant)) {
$p->appendToHead(<<<CSS <style> div { margin-top:50px; width:500px; position:relative; left:50% !important; transform: translateX(-50%) !important; } h1 { margin:10px 0; text-align:center; } textarea { position:relative; width:100%; left:50% !important; transform: translateX(-50%) !important; } input { position:relative; width:50%; left:50% !important; transform: translateX(-50%) !important; background-color: rgb(208, 56, 56); padding:8px; color:white; border-radius: 20px; border:none; -webkit-box-shadow: 0px 7px 0px -5px rgba(0,0,0,0.75); -moz-box-shadow: 0px 7px 0px -5px rgba(0,0,0,0.75); box-shadow: 0px 7px 0px -5px rgba(0,0,0,0.75); -webkit-transition: background-color 1s; -moz-box-transition: background-color 1s; transition: background-color 1s; margin: 5px 5px; } input:hover { background-color: white; color: rgb(208, 56, 56); cursor:pointer; } input:active { margin-top: 3px; padding:7px; } </style> CSS );