From 92e6b09aa4bfaf3a750674758a47e8393535d73f Mon Sep 17 00:00:00 2001 From: Allan POINT Date: Tue, 25 Oct 2022 21:58:02 +0200 Subject: [PATCH] connection view --- contoleur/FrontControler.php | 17 +++++++++++++++++ contoleur/gest.php | 6 ++++++ index.php | 11 +++++++++++ vues/connect.php | 9 +++++++++ 4 files changed, 43 insertions(+) create mode 100644 contoleur/FrontControler.php create mode 100644 index.php create mode 100644 vues/connect.php diff --git a/contoleur/FrontControler.php b/contoleur/FrontControler.php new file mode 100644 index 0000000..f7cbceb --- /dev/null +++ b/contoleur/FrontControler.php @@ -0,0 +1,17 @@ + ["wantToConnect"]; + ); + + function start() { + session_start(); + $action = $_REQUEST['action']; + if(in_array($action, $this->action['Gest']){ + $controleur = new GestControler(); + } + } +} diff --git a/contoleur/gest.php b/contoleur/gest.php index 15651b9..327ed9e 100644 --- a/contoleur/gest.php +++ b/contoleur/gest.php @@ -4,6 +4,12 @@ class GestControler { function __construct() { try{ $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "default"; + switch($action){ + case "wantToConnect": + default: + require("vues/connect.php"); + break; + } }catch(Exception $e){ diff --git a/index.php b/index.php new file mode 100644 index 0000000..dacf7da --- /dev/null +++ b/index.php @@ -0,0 +1,11 @@ + + + + + start(); + ?> + + diff --git a/vues/connect.php b/vues/connect.php new file mode 100644 index 0000000..83df947 --- /dev/null +++ b/vues/connect.php @@ -0,0 +1,9 @@ + +
+ + + +
+