-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.controller.php
More file actions
57 lines (49 loc) · 1.67 KB
/
admin.controller.php
File metadata and controls
57 lines (49 loc) · 1.67 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
qrequire_once "models/admin.manager.php";
require_once "models/partenaires.manager.php";
require_once "models/carrousel.manager.php";
require_once "models/billetterie.manager.php";
class AdminController
{
private $adminManager;
private $partenairesManager;
private $carrouselManager;
private $billetManager;
public function __construct()
{
$this->adminManager = new AdminManager();
$this->partenairesManager = new PartenairesManager();
$this->carrouselManager = new CarrouselManager();
$this->billetManager = new BilletManager();
}
public function get_page_festival(){
$artists = $this->adminManager->get_artiste();
require_once "views/festival/festival.view.php";
}
/* public function get_page_login(){
require_once "/htdocs/DPDD/views/view.login.php";
}
public function connexion(){
if(!empty($_POST['login']) && !empty($_POST['mdp'])){
$login = Securite::secureHTML($_POST['login']);
$password = Securite::secureHTML($_POST['mdp']);
if($this->adminManager->isConnexionValid($login,$password)){
$_SESSION['access'] = "admin";
header('Location: '.URL."back/admin");
} else {
header('Location: '.URL."back/login");
}
}
}
public function get_page_admin(){
if(Securite::verifAccessSession()){
require "/htdocs/DPDD/views/view.admin.php";
} else {
header('Location: '.URL."back/login");
}
}
public function deconnexion(){
session_destroy();
header('Location: '.URL."back/login");
} */
}