-
Notifications
You must be signed in to change notification settings - Fork 0
/
controleur.php
44 lines (35 loc) · 901 Bytes
/
controleur.php
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
<?php
require_once 'vue.php';
require_once 'modele.php';
class Controleur {
#dutinfopw201619 gysezypu BAIL POUR LA BDD
#http://database-etudiants.iut.univ-paris8.fr/phpmyadmin/
public $vue;
public $modele;
private $action;
public function __construct (){
$this->vue = new Vue();
$this->modele = new Modele();
if(isset($_GET['action'])) {
$this->action = $_GET['action'];
}
else {
$this->action = "bienvenue";
}
}
function liste() {
$this->vue->affiche_liste($this->modele->getListe());
}
function start() {
$this->vue->menu();
switch($this->action) {
case "bienvenue" :
echo "bienvenue";
break;
case "liste" :
$this->liste();
break;
}
}
}
?>