Optimization of the code and respect of the coding standard, the project is finished

master
Emre KARTAL 2 years ago
parent e2bd0457ab
commit f721a028c8

@ -10,14 +10,25 @@ RewriteEngine On
# Règles de réécriture d'url # Règles de réécriture d'url
#--------------------------------- #---------------------------------
# Visiteur
RewriteRule ^login$ index.php?action=redirectionLogin [L] RewriteRule ^login$ index.php?action=redirectionLogin [L]
RewriteRule ^inscription$ index.php?action=redirectionInscription [L] RewriteRule ^inscription$ index.php?action=redirectionInscription [L]
RewriteRule ^VueListePublic$ index.php?action=redirectionListePublic [L] RewriteRule ^VueListePublic$ index.php?action=redirectionListePublic [L]
RewriteRule ^previousPage$ index.php?action=pagePrécédente [L]
RewriteRule ^nextPage$ index.php?action=pageSuivante [L]
RewriteRule ^check$ index.php?action=check [L]
# Utilisateur
RewriteRule ^logout$ index.php?action=logout [L] RewriteRule ^logout$ index.php?action=logout [L]
RewriteRule ^MonProfil$ index.php?action=redirectionProfil [L] RewriteRule ^MonProfil$ index.php?action=redirectionProfil [L]
RewriteRule ^supprimerCompte$ index.php?action=supprimerCompte [L] RewriteRule ^supprimerCompte$ index.php?action=supprimerCompte [L]
RewriteRule ^previousPage$ index.php?action=pagePrécédente [L]
RewriteRule ^nextPage$ index.php?action=pageSuivante [L]
RewriteRule ^Users$ index.php?action=voirUser [L]
RewriteRule ^listePrive$ index.php?action=listePrive [L] RewriteRule ^listePrive$ index.php?action=listePrive [L]
RewriteRule ^previousPagePrive$ index.php?action=pagePrécédentePrive [L]
RewriteRule ^nextPagePrive$ index.php?action=pageSuivantePrive [L]
RewriteRule ^checkPrive$ index.php?action=checkPrive [L]
# Admin
RewriteRule ^users$ index.php?action=redirectionVueUtilisateur [L] RewriteRule ^users$ index.php?action=redirectionVueUtilisateur [L]

@ -91,7 +91,7 @@ class Validation {
} }
static function cleanText(string &$txt) { static function cleanText(string &$txt) {
$txt = preg_replace('/[^A-Za-z\-\^0-9\ ]/', '', $txt); $txt = preg_replace('/[^A-Za-z\-\^0-9\ \à\é\^]/', '', $txt);
if($txt == null || $txt == '') if($txt == null || $txt == '')
{ {
return null; return null;

@ -16,7 +16,6 @@ class CtrlUtilisateur {
switch($action) { switch($action) {
case NULL: case NULL:
$this->ConsulterListePrive($dVueErreur); $this->ConsulterListePrive($dVueErreur);
break; break;
@ -65,6 +64,14 @@ class CtrlUtilisateur {
$this->SupprimerListePrive($dVueErreur); $this->SupprimerListePrive($dVueErreur);
break; break;
case "pagePrécédentePrive":
$this->listePrécédente($dVueErreur);
break;
case "pageSuivantePrive":
$this->listeSuivante($dVueErreur);
break;
default: default:
$dVueErreur[] = "Erreur d'appel php"; $dVueErreur[] = "Erreur d'appel php";
require ($rep.$vues['erreur']); require ($rep.$vues['erreur']);
@ -129,20 +136,20 @@ class CtrlUtilisateur {
function ConsulterListePrive(array $dVueErreur) { function ConsulterListePrive(array $dVueErreur) {
global $rep,$vues; global $rep,$vues;
$listesPrive = MdlUtilisateur::RecupererListePrive(); $listesPrive = MdlUtilisateur::RecupererListePrive();
$taches = MdlVisiteur::RecupererTache(); $taches = MdlUtilisateur::RecupererTache();
$action=NULL; $action=NULL;
require ($rep.$vues['listPrive']); require ($rep.$vues['listPrive']);
} }
function SupprimerTachePrive(array $dVueErreur){ function SupprimerTachePrive(array $dVueErreur){
global $rep,$vues; global $rep,$vues;
$tache = MdlVisiteur::SupprimerTache(); $tache = MdlUtilisateur::SupprimerTache();
$this->ConsulterListePrive($dVueErreur); $this->ConsulterListePrive($dVueErreur);
} }
function SupprimerListePrive(array $dVueErreur){ function SupprimerListePrive(array $dVueErreur){
global $rep,$vues; global $rep,$vues;
$liste = MdlVisiteur::SupprimerListe(); $liste = MdlUtilisateur::SupprimerListe();
$this->ConsulterListePrive($dVueErreur); $this->ConsulterListePrive($dVueErreur);
} }
@ -150,14 +157,14 @@ class CtrlUtilisateur {
public function AjouterTachePrive(array $dVueErreur){ public function AjouterTachePrive(array $dVueErreur){
global $rep,$vues; global $rep,$vues;
try{ try{
$tache = MdlVisiteur::AjouterTache($dVueErreur); $tache = MdlUtilisateur::AjouterTache($dVueErreur);
$this->ConsulterListePrive($dVueErreur); $this->ConsulterListePrive($dVueErreur);
} }
catch (Exception $e) catch (Exception $e)
{ {
$ErreurLog=$e->getMessage(); $ErreurLog=$e->getMessage();
$listesPrive= MdlUtilisateur::RecupererListePrive(); $listesPrive= MdlUtilisateur::RecupererListePrive();
$taches = MdlVisiteur::RecupererTache(); $taches = MdlUtilisateur::RecupererTache();
$action=NULL; $action=NULL;
require ($rep.$vues['listPrive']); require ($rep.$vues['listPrive']);
} }
@ -167,14 +174,14 @@ class CtrlUtilisateur {
public function ModifierListePrive(array $dVueErreur){ public function ModifierListePrive(array $dVueErreur){
global $rep,$vues; global $rep,$vues;
try{ try{
$tache = MdlVisiteur::ModifierListe($dVueErreur); $tache = MdlUtilisateur::ModifierListe($dVueErreur);
$this->ConsulterListePrive($dVueErreur); $this->ConsulterListePrive($dVueErreur);
} }
catch (Exception $e) catch (Exception $e)
{ {
$ErreurLog=$e->getMessage(); $ErreurLog=$e->getMessage();
$listesPrive= MdlUtilisateur::RecupererListePrive(); $listesPrive= MdlUtilisateur::RecupererListePrive();
$taches = MdlVisiteur::RecupererTache(); $taches = MdlUtilisateur::RecupererTache();
$action=NULL; $action=NULL;
require ($rep.$vues['listPublic']); require ($rep.$vues['listPublic']);
} }
@ -183,7 +190,7 @@ class CtrlUtilisateur {
public function checkPrive(array $dVueErreur) public function checkPrive(array $dVueErreur)
{ {
global $rep,$vues; global $rep,$vues;
$tache = MdlVisiteur::check(); $tache = MdlUtilisateur::check();
$this->ConsulterListePrive($dVueErreur); $this->ConsulterListePrive($dVueErreur);
} }
@ -198,14 +205,12 @@ class CtrlUtilisateur {
{ {
$ErreurLog=$e->getMessage(); $ErreurLog=$e->getMessage();
$listes = MdlUtilisateur::RecupererListePrive(); $listes = MdlUtilisateur::RecupererListePrive();
$taches = MdlVisiteur::RecupererTache(); $taches = MdlUtilisateur::RecupererTache();
$action=NULL; $action=NULL;
require ($rep.$vues['listPrive']); require ($rep.$vues['listPrive']);
} }
} }
public function listePrécédente(array $dVueErreur){ public function listePrécédente(array $dVueErreur){
if($_COOKIE['pageUser'] > 1){ if($_COOKIE['pageUser'] > 1){
setcookie('pageUser', $_COOKIE['pageUser'] - 1, time() + 24*3600); setcookie('pageUser', $_COOKIE['pageUser'] - 1, time() + 24*3600);

@ -160,10 +160,7 @@ class CtrlVisiteur {
function SupprimerListe(array $dVueErreur){ function SupprimerListe(array $dVueErreur){
global $rep,$vues; global $rep,$vues;
$liste = MdlVisiteur::SupprimerListe(); $liste = MdlVisiteur::SupprimerListe();
$listes = MdlVisiteur::RecupererListePublic(); $this->ConsulterListePublic($dVueErreur);
$taches = MdlVisiteur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPublic']);
} }
public function AjouterTache(array $dVueErreur){ public function AjouterTache(array $dVueErreur){

@ -14,7 +14,7 @@ class FrontControleur {
$string_actor=' '; $string_actor=' ';
$listeActions=array( $listeActions=array(
'Utilisateur' => array('logout','redirectionProfil','supprimerCompte', 'listePrive','AjouterListePrive', 'checkPrive', 'SupprimerListePrive', 'AjouterTachePrive', 'ModifierListePrive', 'SupprimerTachePrive'), 'Utilisateur' => array('logout','redirectionProfil','pageSuivantePrive','pagePrécédentePrive','supprimerCompte','modifMdp' ,'listePrive','AjouterListePrive', 'checkPrive', 'SupprimerListePrive', 'AjouterTachePrive', 'ModifierListePrive', 'SupprimerTachePrive'),
'Admin' => array('redirectionVueUtilisateur','SupprimerUtilisateur') 'Admin' => array('redirectionVueUtilisateur','SupprimerUtilisateur')
); );

@ -54,6 +54,26 @@ class MdlUtilisateur
return $listeGtw->CountListe(intval($id)); return $listeGtw->CountListe(intval($id));
} }
public function ModifierListe(&$dVueErreur){
$userGtw = new ListeGateway();
$id = $_POST['idListe'];
$nom = Validation::cleanText($_POST['nom-modif-liste']);
$description = Validation::cleanText($_POST['description-modif-liste']);
if($nom == NULL && $description==null){
return null;
}
if($description == NULL){
$userGtw->EditerNom($id, $nom);
}
else if($nom == NULL){
$userGtw->EditerDescription($id, $description);
}
else{
$userGtw->Editer($id, $nom, $description);
}
}
public static function suppressionUtilisateur(){ public static function suppressionUtilisateur(){
$userGtw = new UtilisateurGateway(); $userGtw = new UtilisateurGateway();
@ -85,12 +105,12 @@ class MdlUtilisateur
} }
public static function AjouterListePrive(&$dVueErreur){ public static function AjouterListePrive(&$dVueErreur){
$taskGtw = new ListeGateway(); $listGtw = new ListeGateway();
$nom=$_POST['nom-ajout-liste']; $nom=$_POST['nom-ajout-liste'];
$description=$_POST['description-ajout-liste']; $description=$_POST['description-ajout-liste'];
$idCreateur =Validation::cleanInt($_SESSION['id']); $idCreateur =Validation::cleanInt($_SESSION['id']);
Validation::val_form_add($nom,$description,$dVueErreur); Validation::val_form_add($nom,$description,$dVueErreur);
$taskGtw->Ajouter($nom, $description,0, $idCreateur); $listGtw->Ajouter($nom, $description,0, $idCreateur);
} }
public static function RecupererListePrive(){ public static function RecupererListePrive(){
@ -101,5 +121,38 @@ class MdlUtilisateur
return $listeGtw->getListePrive(1,10); return $listeGtw->getListePrive(1,10);
} }
public static function RecupererTache(){
$taskGtw = new TacheGateway();
return $taskGtw->getTache();
}
public static function SupprimerListe(){
$listeGtw = new ListeGateway();
$taskGtw = new TacheGateway();
$id = $_GET['idListe'];
$taskGtw->SupprimerViaListe($id);
$listeGtw->Supprimer($id);
}
public static function check(){
$taskGtw = new TacheGateway();
$id = $_POST['idTache'];
$taskGtw->isDone($id);
}
public static function SupprimerTache(){
$taskGtw = new TacheGateway();
$id = $_GET['idTache'];
$taskGtw->Supprimer($id);
}
public function AjouterTache(&$dVueErreur){
$taskGtw = new TacheGateway();
$id = $_POST['idListe'];
$nom = $_POST['nom-ajout'];
$description = $_POST['description-ajout'];
Validation::val_form_add($nom,$description,$dVueErreur);
$taskGtw->AjouterTache($nom, $description,false,$id);
}
} }

@ -16,31 +16,31 @@ class MdlVisiteur
$userGtw->AjouterUtilisateur($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["mail"],$hash); $userGtw->AjouterUtilisateur($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["mail"],$hash);
} }
public static function RecupererListePublic(){ public static function RecupererListePublic(){
$userGtw = new ListeGateway(); $listGtw = new ListeGateway();
if(isset($_COOKIE["page"])) if(isset($_COOKIE["page"]))
return $userGtw->getListePublic(($_COOKIE["page"]-1)*10,10); return $listGtw->getListePublic(($_COOKIE["page"]-1)*10,10);
else else
return $userGtw->getListePublic(1,10); return $listGtw->getListePublic(1,10);
} }
public static function RecupererTache(){ public static function RecupererTache(){
$userGtw = new TacheGateway(); $taskGtw = new TacheGateway();
return $userGtw->getTache(); return $taskGtw->getTache();
} }
public static function SupprimerTache(){ public static function SupprimerTache(){
$userGtw = new TacheGateway(); $taskGtw = new TacheGateway();
$id = $_GET['idTache']; $id = $_GET['idTache'];
$userGtw->Supprimer($id); $taskGtw->Supprimer($id);
} }
public static function SupprimerListe(){ public static function SupprimerListe(){
$userGtw = new ListeGateway(); $listGtw = new ListeGateway();
$taskGtw = new TacheGateway(); $taskGtw = new TacheGateway();
$id = $_GET['idListe']; $id = $_GET['idListe'];
$taskGtw->SupprimerViaListe($id); $taskGtw->SupprimerViaListe($id);
$userGtw->Supprimer($id); $listGtw->Supprimer($id);
} }
public function AjouterTache(&$dVueErreur){ public function AjouterTache(&$dVueErreur){
@ -53,19 +53,22 @@ public static function RecupererListePublic(){
} }
public function ModifierListe(&$dVueErreur){ public function ModifierListe(&$dVueErreur){
$userGtw = new ListeGateway(); $listGtw = new ListeGateway();
$id = $_POST['idListe']; $id = $_POST['idListe'];
$nom = Validation::cleanText($_POST['nom-modif-liste']); $nom = Validation::cleanText($_POST['nom-modif-liste']);
$description = Validation::cleanText($_POST['description-modif-liste']); $description = Validation::cleanText($_POST['description-modif-liste']);
if($nom == NULL && $description==null){
return null;
}
if($description == NULL){ if($description == NULL){
$userGtw->EditerNom($id, $nom); $listGtw->EditerNom($id, $nom);
} }
else if($nom == NULL){ else if($nom == NULL){
$userGtw->EditerDescription($id, $description); $listGtw->EditerDescription($id, $description);
} }
else{ else{
$userGtw->Editer($id, $nom, $description); $listGtw->Editer($id, $nom, $description);
} }
} }
@ -77,9 +80,9 @@ public static function RecupererListePublic(){
$listGtw->Ajouter($nom, $description,1, 1); $listGtw->Ajouter($nom, $description,1, 1);
} }
public function check(){ public static function check(){
$taskGtw = new TacheGateway(); $taskGtw = new TacheGateway();
$id = $_POST['idTache']; $id = Validation::cleanInt($_POST['idTache']);
$taskGtw->isDone($id); $taskGtw->isDone($id);
} }

@ -47,13 +47,6 @@ class ListeGateway{
$this->con->executeQuery($query,array('id' => array($id, PDO::PARAM_INT))); $this->con->executeQuery($query,array('id' => array($id, PDO::PARAM_INT)));
} }
public function getListe(int $offset, int $limit){
$query = "SELECT * FROM ToDoList_Liste LIMITS $offset,$limit";
$this->con->executeQuery($query);
$listes=$this->con->getResults();
return $listes;
}
public function getListePublic($offset,$limit){ public function getListePublic($offset,$limit){
$query = "SELECT * FROM ToDoList_Liste WHERE estPublic LIMIT $offset, $limit"; $query = "SELECT * FROM ToDoList_Liste WHERE estPublic LIMIT $offset, $limit";
$this->con->executeQuery($query); $this->con->executeQuery($query);

@ -27,7 +27,7 @@ class UtilisateurGateway{
$query="SELECT * FROM ToDoList_Admin WHERE idAdmin=:id"; $query="SELECT * FROM ToDoList_Admin WHERE idAdmin=:id";
$this->con->executeQuery($query, array( $this->con->executeQuery($query, array(
'id' => array($id, PDO::PARAM_INT))); 'id' => array($id, PDO::PARAM_INT)));
$results=$this->con->getResults(); $results=$this->con->getResults();
if($results!=null){ if($results!=null){
return true; return true;
}else{ }else{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

@ -26,7 +26,6 @@ body::before {
z-index: -1; z-index: -1;
} }
/* Model */ /* Model */
.model { .model {

@ -200,7 +200,7 @@
$total = $total + 1; $total = $total + 1;
?> ?>
<li class="list-group-item border-0 d-flex align-items-center ps-0"> <li class="list-group-item border-0 d-flex align-items-center ps-0">
<form name="action" action="index.php?action=checkPrive" method="POST"> <form name="action" action="checkPrive" method="POST">
<input class="form-check-input me-3" id="task-<?= $tache->getId() ?>" type="checkbox" onChange="submit();" <input class="form-check-input me-3" id="task-<?= $tache->getId() ?>" type="checkbox" onChange="submit();"
<?php if($tache->getEstValide() == 1) echo "checked" ?>> <?php if($tache->getEstValide() == 1) echo "checked" ?>>
<label for="task-<?= $tache->getId() ?>"> <?= $tache->getNom() ?> : <?= $tache->getDescription() ?></label> <label for="task-<?= $tache->getId() ?>"> <?= $tache->getNom() ?> : <?= $tache->getDescription() ?></label>
@ -209,7 +209,7 @@
</form> </form>
<a href="index.php?action=SupprimerTachePrive&idTache=<?= $tache->getId() ?>"> <a href="index.php?action=SupprimerTachePrive&idTache=<?= $tache->getId() ?>">
<button class="btn btn-default"> <button class="btn btn-default">
<img src="./vue/Images/trash2.png" width="20" /> <img src="./vue/Images/trash.png" width="20" />
</button> </button>
</a> </a>
</li> </li>
@ -240,21 +240,21 @@
<nav aria-label="Page navigation example"> <nav aria-label="Page navigation example">
<center> <center>
<p>Page n°<?php echo $_COOKIE['page'] ?></p> <p>Page n°<?php echo $_COOKIE['pageUser'] ?></p>
</center> </center>
<ul class="pagination justify-content-center"> <ul class="pagination justify-content-center">
<li class="page-item"> <li class="page-item">
<a class="page-link" href="previousPage">Previous</a> <a class="page-link" href="previousPagePrive">Previous</a>
</li> </li>
<li class="page-item"> <li class="page-item">
<a class="page-link" href="nextPage">Next</a> <a class="page-link" href="nextPagePrive">Next</a>
</li> </li>
</ul> </ul>
</nav> </nav>
</body> </body>
<!-- Footer --> <!-- Footer -->
<footer class="text-center text-lg-start bg-light "> <footer class="text-center text-lg-start bg-light sticky-bottom">
<br> <br>
<!-- Section: Links --> <!-- Section: Links -->
<section class=""> <section class="">

@ -179,7 +179,7 @@
?> ?>
<li class="list-group-item border-0 d-flex align-items-center ps-0"> <li class="list-group-item border-0 d-flex align-items-center ps-0">
<form name="action" action="index.php?action=check" method="POST"> <form name="action" action="check" method="POST">
<input class="form-check-input me-3" id="task-<?= $tache->getId() ?>" type="checkbox" onChange="submit();" <input class="form-check-input me-3" id="task-<?= $tache->getId() ?>" type="checkbox" onChange="submit();"
<?php if($tache->getEstValide() == 1) echo "checked" ?>> <?php if($tache->getEstValide() == 1) echo "checked" ?>>
<label for="task-<?= $tache->getId() ?>"> <?= $tache->getNom() ?> : <?= $tache->getDescription() ?></label> <label for="task-<?= $tache->getId() ?>"> <?= $tache->getNom() ?> : <?= $tache->getDescription() ?></label>
@ -188,7 +188,7 @@
</form> </form>
<a href="index.php?action=SupprimerTache&idTache=<?= $tache->getId() ?>"> <a href="index.php?action=SupprimerTache&idTache=<?= $tache->getId() ?>">
<button class="btn btn-default"> <button class="btn btn-default">
<img src="./vue/Images/trash2.png" width="20" /> <img src="./vue/Images/trash.png" width="20" />
</button> </button>
</a> </a>
</li> </li>
@ -220,7 +220,7 @@
<center> <center>
<p>Page n°<?php echo $_COOKIE['page'] ?></p> <p>Page n°<?php echo $_COOKIE['page'] ?></p>
</center> </center>
<ul class="pagination justify-content-center"> <ul class="pagination justify-content-center ">
<li class="page-item"> <li class="page-item">
<a class="page-link" href="previousPage">Previous</a> <a class="page-link" href="previousPage">Previous</a>
</li> </li>
@ -232,7 +232,7 @@
</body> </body>
<!-- Footer --> <!-- Footer -->
<footer class="text-center text-lg-start bg-light "> <footer class="text-center text-lg-start bg-light sticky-bottom">
<br> <br>
<!-- Section: Links --> <!-- Section: Links -->
<section class=""> <section class="">

@ -15,7 +15,6 @@
</head> </head>
<body> <body>
<div class="model"> <div class="model">
<h1>Un problème est survenue !</h1> <h1>Un problème est survenue !</h1>
<?php <?php
@ -27,6 +26,5 @@
?> ?>
<a href="VueListePublic">Revenir</a> <a href="VueListePublic">Revenir</a>
</div> </div>
</body>
</body>
</html> </html>

@ -1,87 +1,87 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Page d'inscription</title> <title>Page d'inscription</title>
<link rel="shortcut icon" href="./vue/Images/gif.gif" type="../Images/gif"> <link rel="shortcut icon" href="./vue/Images/gif.gif" type="../Images/gif">
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS only --> <!-- CSS only -->
<link rel="stylesheet" href="./vue/css/style.css"> <link rel="stylesheet" href="./vue/css/style.css">
<link rel="stylesheet" href="./vue/css/reset.css"> <link rel="stylesheet" href="./vue/css/reset.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head> </head>
<body> <body>
<div class="main"> <div class="main">
<div class="model"> <div class="model">
<div class="main-logo"> <div class="main-logo">
<img src="./vue/Images/Logo.png" alt="logo"> <img src="./vue/Images/Logo.png" alt="logo">
</div> </div>
<div class="login-card-header"> <div class="login-card-header">
<h1>Inscrivez-vous</h1> <h1>Inscrivez-vous</h1>
</div> </div>
<?php <?php
if(isset($ErreurLog)){?> if(isset($ErreurLog)){?>
<center><p class="ErreurText"> <?php echo $ErreurLog?></p></center><?php <center><p class="ErreurText"> <?php echo $ErreurLog?></p></center><?php
} }
?> ?>
<form method="POST" class="login-card-form"> <form method="POST" class="login-card-form">
<div class="row"> <div class="row">
<div class="col-md-6 mb-4">
<?php
if(isset($dVueErreur['nom'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['nom']?></p></center><?php
}
?>
<div>
<input type="text" name="nom-Form" placeholder="Nom" required autofocus>
</div>
</div>
<div class="col-md-6 mb-4"> <div class="col-md-6 mb-4">
<?php <?php
if(isset($dVueErreur['nom'])){?> if(isset($dVueErreur['prenom'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['nom']?></p></center><?php <center><p class="ErreurText"> <?php echo $dVueErreur['prenom']?></p></center><?php
} }
?> ?>
<div> <div>
<input type="text" name="nom-Form" placeholder="Nom" required autofocus> <input type="text" name="prenom-Form" placeholder="Prenom" required autofocus>
</div>
</div>
<div class="col-md-6 mb-4">
<?php
if(isset($dVueErreur['prenom'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['prenom']?></p></center><?php
}
?>
<div>
<input type="text" name="prenom-Form" placeholder="Prenom" required autofocus>
</div>
</div> </div>
</div> </div>
<div class="form-item"> </div>
<?php <div class="form-item">
if(isset($dVueErreur['pseudo'])){?> <?php
<center><p class="ErreurText"> <?php echo $dVueErreur['pseudo']?></p></center><?php if(isset($dVueErreur['pseudo'])){?>
} <center><p class="ErreurText"> <?php echo $dVueErreur['pseudo']?></p></center><?php
?> }
<input type="text" name="pseudo-Form" placeholder="Pseudo" required autofocus> ?>
</div> <input type="text" name="pseudo-Form" placeholder="Pseudo" required autofocus>
</div>
<div class="form-item"> <div class="form-item">
<?php <?php
if(isset($dVueErreur['mail'])){?> if(isset($dVueErreur['mail'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['mail']?></p></center><?php <center><p class="ErreurText"> <?php echo $dVueErreur['mail']?></p></center><?php
} }
?> ?>
<input type="text" name="mail" placeholder="Mail" required autofocus> <input type="text" name="mail" placeholder="Mail" required autofocus>
</div> </div>
<div class="form-item"> <div class="form-item">
<?php <?php
if(isset($dVueErreur['password'])){?> if(isset($dVueErreur['password'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['password']?></p></center><?php <center><p class="ErreurText"> <?php echo $dVueErreur['password']?></p></center><?php
} }
?> ?>
<input type="password" name="password" placeholder="Password" required > <input type="password" name="password" placeholder="Password" required >
</div> </div>
<button type="submit" class="btn btn-primary">S'inscrire</button> <button type="submit" class="btn btn-primary">S'inscrire</button>
<!-- action !!!!!!!!!! --> <!-- action !!!!!!!!!! -->
<input type="hidden" name="action" value="validationFormulaire"> <input type="hidden" name="action" value="validationFormulaire">
<p class="text-center text-muted mt-5 mb-0">Déjà un compte? <p class="text-center text-muted mt-5 mb-0">Déjà un compte?
<a href="login" class="fw-bold text-body"><u>Connectez-vous</u></a></p> <a href="login" class="fw-bold text-body"><u>Connectez-vous</u></a></p>
</form> </form>
</div>
</div> </div>
</body> </div>
</body>
</html> </html>
Loading…
Cancel
Save