From c350f1c7479f1817917bba84fde8935dba60cb6b Mon Sep 17 00:00:00 2001 From: "nicolas.franco" Date: Thu, 22 Dec 2022 13:20:10 +0100 Subject: [PATCH] connection and resgister view --- controller/VisitorCtrl.php | 15 ++++-- tests/test.php | 7 +-- view/ajouter | 0 view/authentification.css | 28 ---------- view/connection.php | 75 +++++++++++++++++++++++++++ view/home.php | 2 +- view/{ => html}/authentification.html | 0 view/{ => html}/list.html | 0 view/html/navbar_menu.html | 59 +++++++++++++++++++++ view/{ => html}/newList.html | 0 view/register.php | 75 +++++++++++++++++++++++++++ 11 files changed, 224 insertions(+), 37 deletions(-) delete mode 100644 view/ajouter delete mode 100644 view/authentification.css create mode 100644 view/connection.php rename view/{ => html}/authentification.html (100%) rename view/{ => html}/list.html (100%) create mode 100644 view/html/navbar_menu.html rename view/{ => html}/newList.html (100%) create mode 100644 view/register.php diff --git a/controller/VisitorCtrl.php b/controller/VisitorCtrl.php index 98b4645..3061db2 100644 --- a/controller/VisitorCtrl.php +++ b/controller/VisitorCtrl.php @@ -22,6 +22,15 @@ class VisitorCtrl $this->connection(); # charge la vue de connexion break; + + case 'pageRegister': + $this->go_connection(); + break; + + case 'register': + $this->connection(); + # charge la vue de connexion + break; case 'pageListe': $this->go_list(); @@ -63,16 +72,12 @@ class VisitorCtrl } function loadHome(){ - # instancie tableau / donnees - # requere vue - # dans vue check if isset - # display content $public_lists = $this->taskModel.loadPublicList(); require("../view/home.php"); } function go_connection(){ - + } function connection(){ diff --git a/tests/test.php b/tests/test.php index 1f1f733..4cfcabb 100644 --- a/tests/test.php +++ b/tests/test.php @@ -43,10 +43,11 @@ $mt= new TaskModel($con); // $mt->addList('002','todo2','nifranco'); // $mt->modifList('2','nom','22do'); //mt->supList('2'); -$public_lists = $mt->loadPublicLists(); -$user = true; +$public_lists = $mt->loadPrivateLists('nifranco'); +$user = false; require("../view/home.php"); - +//require("../view/register.php"); +//require("../view/connection.php"); /* ------------- TEST ANNA ----------------*/ diff --git a/view/ajouter b/view/ajouter deleted file mode 100644 index e69de29..0000000 diff --git a/view/authentification.css b/view/authentification.css deleted file mode 100644 index f132e62..0000000 --- a/view/authentification.css +++ /dev/null @@ -1,28 +0,0 @@ -body{ - text-align : center; -} - -form{ - display : flex; - flex-flow : column nowrap; - align-items : center; -} - -input{ - width : 90%; - border-radius : 5px; - color : #595959; -} - -label{ - margin-top : 20px; -} - -#envoyer{ - width : 150px; - height : 30px; -} - -#btnEnvoi{ - margin: 20px; -} \ No newline at end of file diff --git a/view/connection.php b/view/connection.php new file mode 100644 index 0000000..57586de --- /dev/null +++ b/view/connection.php @@ -0,0 +1,75 @@ + + + + + + + + + + + +
+ + + +
+ + + +
+

Welcome back!

+
+ +
+ + +
+ + +
+ + +
+ + + +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/view/home.php b/view/home.php index 0a41631..8540f2c 100644 --- a/view/home.php +++ b/view/home.php @@ -37,7 +37,7 @@ if($user){ echo ''; } else { - echo ''; + echo ''; echo ''; } ?> diff --git a/view/authentification.html b/view/html/authentification.html similarity index 100% rename from view/authentification.html rename to view/html/authentification.html diff --git a/view/list.html b/view/html/list.html similarity index 100% rename from view/list.html rename to view/html/list.html diff --git a/view/html/navbar_menu.html b/view/html/navbar_menu.html new file mode 100644 index 0000000..b8ba2d0 --- /dev/null +++ b/view/html/navbar_menu.html @@ -0,0 +1,59 @@ + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+ +
+
+ + + + + \ No newline at end of file diff --git a/view/newList.html b/view/html/newList.html similarity index 100% rename from view/newList.html rename to view/html/newList.html diff --git a/view/register.php b/view/register.php new file mode 100644 index 0000000..5a5fa54 --- /dev/null +++ b/view/register.php @@ -0,0 +1,75 @@ + + + + + + + + + + + +
+ + + +
+ + + +
+

Make private lists with a personnal account

+
+ +
+ + +
+ + +
+ + +
+ + + +
+
+ +
+
+ + + + + \ No newline at end of file