include/admin_form_materiel.php V0.1 */ // formulaire de creation / modification de materiel $idmat = $_GET["idmat"]; $epn = $_GET["epnr"]; if (FALSE == isset($idmat)) { // Parametre du formulaire pour la CREATION $post_url = "index.php?a=2&b=1&act=1"; $label_bouton = "Créer le poste"; } else { // Parametre du formulaire pour la MODIFICATION $post_url = "index.php?a=2&act=2&idmat=" . $idmat; $label_bouton = "Modifier le poste"; $row = getMateriel($idmat); //Informations matos $nom = stripslashes($row["nom_computer"]); $os = $row["os_computer"]; $usage = $row["usage_computer"]; $comment = stripslashes($row["comment_computer"]); $salle = $row["id_salle"]; $adresseIP = $row["adresse_ip_computer"]; $adresseMAC = $row["adresse_mac_computer"]; $nomhote = $row["nom_hote_computer"]; $fonctionarray = $row["fonction_computer"]; $fonctions = explode(";", $fonctionarray); } $fonction = getAllUsage(); $nbfonction = count($fonction); // type d'os défini
if (FALSE != is_numeric($_GET["idcomp"])) { // initialisation $step1 = 'step'; $step2 = 'step'; $step3 = 'step'; // affichage des etapes $row = getHoraire(date("N", strtotime($_SESSION['resa']['date'])), $epn); switch ($step) { default: // etape 1: choix de l'heure de debut $step1 = 'currentStep'; $submit = 'Etape suivante'; //recuperation des GET $_SESSION['resa']['idcomp'] = $_GET['idcomp']; $_SESSION['resa']['nomcomp'] = $_GET['nomcomp']; $_SESSION['resa']['materiel'] = getMateriel($_GET['idcomp']); $titre = 'Choix de l\'heure de début de la réservation'; $step = getResaComp(1, $_SESSION['resa']['idcomp'], $_SESSION['resa']['date'], getHorDebutSelect(getConfig("unit_config", "unit_default_config", $epn), $row["hor1_begin_horaire"], $row["hor1_end_horaire"], $row["hor2_begin_horaire"], $row["hor2_end_horaire"], $_SESSION['resa']['idcomp'], $_SESSION['resa']['date'], $_SESSION['debut'])); break; case 2: // etape 2 dure $step2 = 'currentStep'; $titre = 'Choix de la durée de la réservation'; $step = getResaComp(2, $_SESSION['resa']['idcomp'], $_SESSION['resa']['date'], getHorDureeSelect(getConfig("unit_config", "unit_default_config", $epn), $row["hor1_begin_horaire"], $row["hor1_end_horaire"], $row["hor2_begin_horaire"], $row["hor2_end_horaire"], $_SESSION['resa']['idcomp'], $_SESSION['resa']['date'], $_SESSION['debut'], $epn)); break; case 3: // etape 3 $step3 = 'currentStep'; $titre = 'Confirmation de votre réservation'; /* $res = getUsageNameById($_SESSION['resa']['idcomp']) ;