From 5783e51cb57d383bf91829aff2306208e6c9015d Mon Sep 17 00:00:00 2001 From: Anna BOUDOUL Date: Wed, 23 Nov 2022 19:29:50 +0100 Subject: [PATCH] =?UTF-8?q?D=C3=A9but=20index.php=20et=20autres=20trucs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/User.php | 12 +++++++++++- controller/FrontCtrl.php | 3 +++ index.php | 5 +++++ view/erreur.php | 5 +++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 view/erreur.php diff --git a/business/User.php b/business/User.php index 51cac59..8f283c2 100644 --- a/business/User.php +++ b/business/User.php @@ -2,10 +2,12 @@ class User{ private string $login; private string $mdp; + private bool $admin; - function __construct($login, $mdp) { + function __construct($login, $mdp, $admin=False) { $this->login = $login; $this->mdp = $mdp; + $this->admin = $admin; } function get_login() { @@ -23,5 +25,13 @@ function set_mdp($mdp) { $this->mdp = $mdp; } + + function get_admin() { + return $this->admin; + } + + function set_admin($admin) { + $this->admin = $admin; + } } ?> \ No newline at end of file diff --git a/controller/FrontCtrl.php b/controller/FrontCtrl.php index e69de29..69007d5 100644 --- a/controller/FrontCtrl.php +++ b/controller/FrontCtrl.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/index.php b/index.php index 67c94a5..1434728 100644 --- a/index.php +++ b/index.php @@ -1,2 +1,7 @@ \ No newline at end of file diff --git a/view/erreur.php b/view/erreur.php new file mode 100644 index 0000000..447657e --- /dev/null +++ b/view/erreur.php @@ -0,0 +1,5 @@ +"; + } +?> \ No newline at end of file