From 331601f31838821fb6ca7f929dd7ac4843674423 Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Fri, 23 Dec 2022 10:05:40 +0100 Subject: [PATCH] mais wtf --- Style/seeListStyle.css | 120 ++---------------------------- Vues/accueil.php | 6 +- controllers/FrontController.php | 2 +- controllers/VisitorController.php | 7 +- gateway/ListeGateway.php | 14 +--- index.php | 2 +- 6 files changed, 15 insertions(+), 136 deletions(-) diff --git a/Style/seeListStyle.css b/Style/seeListStyle.css index 962d5b4..ffda943 100644 --- a/Style/seeListStyle.css +++ b/Style/seeListStyle.css @@ -71,7 +71,7 @@ h2 { } /* The navigation menu links */ -.sidenav a { +.sidenav input { padding: 6px 8px 6px 16px; text-decoration: none; font-size: 25px; @@ -80,117 +80,7 @@ h2 { } /* When you mouse over the navigation links, change their color */ -.sidenav a:hover { - color: #f1f1f1; -} - -/* Style page content */ -.main { - margin-left: 160px; /* Same as the width of the sidebar */ - padding: 0px 10px; -} - -/* On smaller screens, where height is less than 450px, change the style of the sidebar (less padding and a smaller font size) */ -@media screen and (max-height: 450px) { - .sidenav {padding-top: 15px;} - .sidenav a {font-size: 18px;} -} - -body { - font-family: 'lato', sans-serif; -} -.container { - max-width: 1000px; - margin-left: auto; - margin-right: auto; - padding-left: 10px; - padding-right: 10px; -} - -h2 { - font-size: 26px; - margin: 20px 0; - text-align: center; -} - - li { - border-radius: 3px; - padding: 25px 30px; - display: flex; - justify-content: space-between; - margin-bottom: 25px; - } - .table-header { - background-color: #95A5A6; - font-size: 14px; - text-transform: uppercase; - letter-spacing: 0.03em; - } - .table-row { - background-color: #ffffff; - box-shadow: 0px 0px 9px 0px rgba(0,0,0,0.1); - } - .col-1 { - flex-basis: 15%; - } - .col-2 { - flex-basis: 50%; - } - .col-3 { - flex-basis: 15%; - } - .col-4 { - flex-basis: 10%; - } - .col-5 { - flex-basis: 5%; - } - .col-6 { - flex-basis: 100%; - } - - @media all and (max-width: 767px) { - .table-header { - display: none; - } - li { - display: block; - } - .col { - - flex-basis: 100%; - - } - .col { - display: flex; - padding: 10px 0; - } - } - -/* The sidebar menu */ -.sidenav { - height: 100%; /* Full-height: remove this if you want "auto" height */ - width: 160px; /* Set the width of the sidebar */ - position: fixed; /* Fixed Sidebar (stay in place on scroll) */ - z-index: 1; /* Stay on top */ - top: 0; /* Stay at the top */ - left: 0; - background-color: #111; /* Black */ - overflow-x: hidden; /* Disable horizontal scroll */ - padding-top: 20px; -} - -/* The navigation menu links */ -.sidenav a { - padding: 6px 8px 6px 16px; - text-decoration: none; - font-size: 25px; - color: #818181; - display: block; -} - -/* When you mouse over the navigation links, change their color */ -.sidenav a:hover { +.sidenav input:hover { color: #f1f1f1; } @@ -214,7 +104,7 @@ h2 { } /* Style the links inside the navigation bar */ -.topnav a { +.topnav input { float: right; color: #f2f2f2; text-align: center; @@ -224,13 +114,13 @@ h2 { } /* Change the color of links on hover */ -.topnav a:hover { +.topnav input:hover { background-color: #ddd; color: black; } /* Add a color to the active/current link */ -.topnav a.active { +.topnav input.active { background-color: #04AA6D; color: white; } \ No newline at end of file diff --git a/Vues/accueil.php b/Vues/accueil.php index f23f6d6..6656bbe 100644 --- a/Vues/accueil.php +++ b/Vues/accueil.php @@ -24,9 +24,9 @@
-
- - + + +
diff --git a/controllers/FrontController.php b/controllers/FrontController.php index c636042..107c8d4 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -4,7 +4,7 @@ class FrontController { public function __construct(){ $liste_actions_utilisateur = array('accessPrivateLists','crerListePv'); - $liste_actions_visiteur = array('goHome','changeCompletedTache','accessCreationTachePage','addTache','delTache','modifyList','accessCreationListePage','accessInscription','goSignIn','creerListe','delListe','singIn','singUp','deconnection'); + $liste_actions_visiteur = array('goHome','changeCompletedTache','accessCreationTachePage','addTache','delTache','modifyList','accessCreationListePage','accessInscription','accessSignIn','creerListe','delListe','singIn','singUp','deconnection'); global $rep,$vues,$bd,$dataView,$styles,$assets; session_start(); try{ diff --git a/controllers/VisitorController.php b/controllers/VisitorController.php index 3661e08..93ab86d 100644 --- a/controllers/VisitorController.php +++ b/controllers/VisitorController.php @@ -26,8 +26,7 @@ class VisitorController { case "signUp": $this->Inscription($login, $mdp); break; - case "goSignIn": - echo "je passe ici"; + case "accessSignIn": require($rep.$vues['signIn']); break; @@ -45,7 +44,6 @@ class VisitorController { global $rep,$vues,$dataView,$styles; $model = new MdlListe(); $dataView = $model->getPublicList(); - echo "wtf"; require($rep.$vues['accueil']); $vues_erreur= array(); } @@ -67,7 +65,7 @@ class VisitorController { $vues_erreur= array(); } else{ - require($rep.$vues['singUp']); + require($rep.$vues['signUp']); } $_REQUEST['action']=null; $this->reinit(); @@ -84,6 +82,7 @@ class VisitorController { } $model= new MdlUser(); if($model->existUser($username)){ + echo "aaaaaaaaaaggehdhhdhdhdhdhdhcfhgezshfiueshfiuehiufhsiufheiushfiuhf"; if(password_verify($password,$model->getPasswordHash($username))){ $model->connexion($username); $_REQUEST['action']=null; diff --git a/gateway/ListeGateway.php b/gateway/ListeGateway.php index ea1ec88..35d0b96 100644 --- a/gateway/ListeGateway.php +++ b/gateway/ListeGateway.php @@ -70,7 +70,7 @@ class ListeGateway public function getPublicLists():array{ $listes = []; - $taches = null; + $taches = array(); try { $query = "SELECT * FROM Liste WHERE idCreator IS NULL"; @@ -91,19 +91,9 @@ class ListeGateway } } $listes[] = new Liste($row['id'], $row['name'],false, null, $taches); - $taches = null; - - /*$queryBug = "SELECT count(*) FROM Liste WHERE idCreator IS NULL"; - $this->con->executeQuery($queryBug, array(':idListe' => array($idListe, PDO::PARAM_INT))); - $resultsBug = $this->con->getResults(); - echo "$resultsBug[0][0]"; - if (sizeof($listes)===$resultsBug[0][0]){ - break; - } - */ + $taches = array(); } - echo "haaaaaaaaaaaaaaaa
"; } catch(PDOException $Exception) { echo 'erreur'; diff --git a/index.php b/index.php index b0d15f7..4825bdd 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,6 @@ Autoload::charger(); // Construction du controleur //$cont=new FrontControleur(); -$_REQUEST['action']=NULL; +//$_REQUEST['action']=NULL; $cont= new FrontController(); ?>