0 or $modele < 0){Html::redirect($CFG_GLPI["root_doc"]."/front/ticket.php");} }else{ Html::redirect($CFG_GLPI["root_doc"]."/front/ticket.php"); } }else if (!isset($modele)){ Html::redirect($CFG_GLPI["root_doc"]."/front/ticket.php"); } if( ($_SESSION['glpiactiveprofile']['name'] == "Self-Service" || $_SESSION['glpiactiveprofile']['name'] == "Utilisateur-standard") && $modele == 7){ Html::redirect($CFG_GLPI["root_doc"]."/front/ticket.php"); } if (Session::getCurrentInterface() == "helpdesk") { Html::helpHeader("DSI : Gestion des accès", '', $_SESSION["glpiname"]); } else { Html::header("DSI : Gestion des accès", '', "", ""); } function get_Users(){ global $DB; $query = "SELECT id,concat(`realname`,' ',`firstname`) AS fullname FROM `glpi_users` WHERE is_deleted = 0 AND realname is not null AND firstname is not null order by fullname"; $result = $DB->query($query); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { $res[] = $row; } return $res; } return null; } function get_Softwares(){ global $DB; $query = "SELECT s.name,sv.name as version FROM `glpi_softwares` s left join `glpi_softwareversions` sv on s.id = sv.softwares_id where is_deleted = 0"; $result = $DB->query($query); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { $res[] = $row; } return $res; } return null; } $title = array("Attribution accès", "Reconfiguration accès", "Retrait accès"); $profile = array("Administrateur", "Utilisateur", "Utilisateur avec approbation"); $type = array("Nouveau", "Reconfiguration", "Retrait"); $famtype = get_Softwares(); $_SESSION['modele'] = $modele ; $currentuserid = $_SESSION["glpiID"]; echo ""; echo ""; echo "

"; echo""; modeles($modele); echo"
Demande et Approbation d’accès ".date("Y-m-d")."
Nom & Prénom Employé : Fonction :
Matricule : * Structure :
Matériel Associé : *
Profil Accès : * Type :
Demandé par : *
"; function modeles($modele){ global $famtype; if(isset($modele)){ switch ($modele) { case 0: echo'
Détail des accès : Remarque
Remarque
 Ajouter
'; break; } } } if (Session::getCurrentInterface() == "helpdesk") { Html::helpFooter(); } else { Html::footer(); } ?>