diff --git a/ControllerAdmin.php b/ControllerAdmin.php index e25de16..0fe73e7 100644 --- a/ControllerAdmin.php +++ b/ControllerAdmin.php @@ -14,8 +14,8 @@ class controllerAdmin { case "ajoutSource": $this->ajoutSource($_REQUEST["linkSource"]); break; - case "suprimerSource": - $this->suprimerSource($_REQUEST["idSource"]); + case "supprimerSource": + $this->supprimerSource($_REQUEST["idSource"]); break; case "setNbArticlesParPage": $this->setNbArticlesParPage($_REQUEST["nbSourceParPage"]); @@ -43,7 +43,7 @@ class controllerAdmin { //require('menuAdmin.php'); } - function suprimerSource($idSource) { + function supprimerSource($idSource) { global $con; $mdl = new GatewaySources($con); $mdl->deleteSources($idSource); diff --git a/adminConnexion.php b/adminConnexion.php deleted file mode 100644 index d0a447e..0000000 --- a/adminConnexion.php +++ /dev/null @@ -1,8 +0,0 @@ - - -
-
-

-

-
- \ No newline at end of file diff --git a/gatewayAdmins.php b/gatewayAdmins.php index 1fdda53..132339b 100644 --- a/gatewayAdmins.php +++ b/gatewayAdmins.php @@ -18,6 +18,17 @@ class GatewayAdmin ); } + public function getAdmin($username,$password) + { + $query = "SELECT * FROM admin WHERE username = '$username' AND password = '$password'"; + $this->con->executeQuery($query, array()); + $results=$this->con->getResults(); + Foreach ($results as $admin){ + $listeAdmin[] = new Admin($admin["username"],$admin["password"]); + } + return $listeAdmin; + } + } ?> diff --git a/gatewayNews.php b/gatewayNews.php index b11c7d5..1d1522a 100644 --- a/gatewayNews.php +++ b/gatewayNews.php @@ -1,5 +1,6 @@ val_form($_POST['name'],$_POST['password'],$error); + Foreach ($error as $key) { + print($key); + } +?> \ No newline at end of file diff --git a/vues/adminConnexion.php b/vues/adminConnexion.php new file mode 100644 index 0000000..9ec462c --- /dev/null +++ b/vues/adminConnexion.php @@ -0,0 +1,8 @@ + + +
+
+ + +
+ \ No newline at end of file