main
Thomas Chazot 2 years ago
parent 9a8628d9c3
commit 4c7b4ee691

@ -49,6 +49,7 @@
<div class="col col-1" data-label="listName"><?php echo $list->getName(); ?></div> <div class="col col-1" data-label="listName"><?php echo $list->getName(); ?></div>
<form method="POST" id="modifyList" name="modifyList" class="col col-2"> <form method="POST" id="modifyList" name="modifyList" class="col col-2">
<input value="Modify" type="submit"/> <input value="Modify" type="submit"/>
<input type="hidden" name="action" value="modifyList"/>
<input type="hidden" name="list" value="<?=$list->getId()?>"/></input> <input type="hidden" name="list" value="<?=$list->getId()?>"/></input>
</form> </form>
</li> </li>

@ -21,6 +21,7 @@
</div> </div>
<button class="button login__submit"> <button class="button login__submit">
<span class="button__text">Log In Now</span> <span class="button__text">Log In Now</span>
<input type="hidden" name="action" value="signIn"/>
<i class="button__icon fas fa-chevron-right"></i> <i class="button__icon fas fa-chevron-right"></i>
</button> </button>
</form> </form>

@ -25,6 +25,7 @@
</div> </div>
<button class="button login__submit"> <button class="button login__submit">
<span class="button__text">Sign up now</span> <span class="button__text">Sign up now</span>
<input type="hidden" name="action" value="signUp"/>
<i class="button__icon fas fa-chevron-right"></i> <i class="button__icon fas fa-chevron-right"></i>
</button> </button>
</form> </form>

@ -4,7 +4,7 @@ class FrontController {
public function __construct(){ public function __construct(){
$liste_actions_utilisateur = array('accessPrivateLists','crerListePv'); $liste_actions_utilisateur = array('accessPrivateLists','crerListePv');
$liste_actions_visiteur = array('goHome','changeCompletedTache','accessCreationTachePage','addTache','delTache','accessListInfos','accessCreationListePage','accessInscription','accessConnectionPage','creerListe','delListe','connection','inscription','deconnection'); $liste_actions_visiteur = array('goHome','changeCompletedTache','accessCreationTachePage','addTache','delTache','modifyList','accessCreationListePage','accessInscription','accessConnectionPage','creerListe','delListe','singIn','singUp','deconnection');
global $rep,$vues,$bd,$dataView,$styles,$assets; global $rep,$vues,$bd,$dataView,$styles,$assets;
session_start(); session_start();
try{ try{
@ -18,7 +18,10 @@ class FrontController {
new UserController(); new UserController();
} }
} else{ } else{
echo "WTFFFFFFFFFFFFF";
new VisitorController(); new VisitorController();
echo "ALED";
} }
} catch (Exception $e){require ($rep.$vues['erreur']);} } catch (Exception $e){require ($rep.$vues['erreur']);}
} }

@ -7,25 +7,29 @@ class VisitorController {
$mdlUsr = new MdlUser(); $mdlUsr = new MdlUser();
$user = new User(); $user = new User();
echo "????????????????????????????";
session_start(); session_start();
$dVueEreur = array (); $dVueEreur = array ();
try { try {
$action = $_REQUEST['action']; $action = $_REQUEST['action'];
echo "pd";
switch($action) { switch($action) {
case NULL: case NULL:
echo "pd1";
$this->Reinit(); $this->Reinit();
break; break;
case "goHome": case "goHome":
echo "pd2";
$this->Reinit(); $this->Reinit();
break; break;
case "connexion": case "signIn":
$this->Connexion($login, $mdp); $this->Connexion($login, $mdp);
break; break;
case "inscription": case "signUp":
$this->Inscription($login, $mdp); $this->Inscription($login, $mdp);
break; break;
@ -36,7 +40,7 @@ class VisitorController {
} }
} }
catch (Exception $e){ catch (Exception $e){
echo "exception c un pd";
} }
} }

Loading…
Cancel
Save