<!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <?php ini_set('error_reporting', E_ALL); ?> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <?php //include '../apiAuthLDAP/index.php'; $connexion = new PdoSuivicours(); $info = $connexion->getInfosEtudiant("usaale04"); print_r($info); ?> </body> </html>
$res = auth($user, $password); if ($res["erreur"] != "erreur") { $_SESSION["user"] = $res["login"]; $_SESSION["nompre"] = $res["nom_prenom"]; $_SESSION["classe"] = $res["classe"]; $_SESSION["statut"] = $res["statut"]; } else { $message = "Erreur d'authentification"; } } if (isset($_SESSION["user"])) { $test = "y'a un soucis"; $posnompre = strpos($_SESSION["nompre"], " "); $prenom = substr($_SESSION["nompre"], 0, $posnompre); $nom = substr($_SESSION["nompre"], $posnompre); $connexion = new PdoSuivicours(); $flag = false; if ($_SESSION["statut"] == "Etudiant") { $info = $connexion->getInfosEtudiant($_SESSION["user"]); } if ($_SESSION["statut"] == "Enseignant") { $info = $connexion->getInfosProf($_SESSION["user"]); $infomat = $connexion->getInfosProfMat($_SESSION["user"]); } if ($info[0] == $_SESSION["user"]) { $test = "L'utilisateur est présent dans la base"; } else { $login = $_SESSION["user"]; $mail = $_SESSION["user"] . "@llb.fr"; if ($_SESSION["statut"] == "Etudiant") { $table = "etudiant";