1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
session_start();
class pageControlerAdmin {
function Authentification() {
$log = $_POST['loggin'];
$pass = $_POST['password'];
if ($log == NULL || $pass == NULL) {
include ("../HTML/admin.html");
} else {
$tableau = adminDAO :: Authentification($log, $pass);
if (($tableau['0']['Login_Utilisateur'] != $log) || $tableau['0']['Pass_Utilisateur'] != $pass) {
include ("../HTML/admin.html");
} else {
$_SESSION['id2'] = $tableau['0']['Id_Utilisateur'];
if ($tableau['0']['SupeUser'] == 1) {
//$_SESSION['id1'] = $tableau['0']['Id_Utilisateur'];
$_SESSION['SupeUser'] = $tableau['0']['SupeUser'];
VueSupeUser :: AfficherAuthentification2($tableau);
} else
if ($tableau['0']['SupeUser'] == 0) {
$_SESSION['SupeUser'] = $tableau['0']['SupeUser'];
VueAdmin :: AfficherAuthentification($tableau);
}
}
}
} |
Partager