|
|
|
@ -13,7 +13,7 @@ class FrontCtrl
|
|
|
|
|
session_start();
|
|
|
|
|
$this->TabVues = $TabVues;
|
|
|
|
|
$this->usrMdl = new UserModel($con);
|
|
|
|
|
$this->action_User = array('deconnexion','loadListePriv','newListPrivate');
|
|
|
|
|
$this->action_User = array('deconnecter','loadListePriv','newListPrivate');
|
|
|
|
|
try{
|
|
|
|
|
|
|
|
|
|
$this->isUser = $this->usrMdl->isConnected();
|
|
|
|
@ -23,12 +23,12 @@ class FrontCtrl
|
|
|
|
|
if(!$this->isUser){ # si pas conncter
|
|
|
|
|
# appel controlleur visiteur avec action connecter
|
|
|
|
|
require("VisitorCtrl.php");
|
|
|
|
|
$visitCtrl = new VisitorCtrl($con, $this->TabVues);
|
|
|
|
|
$visitCtrl->goconnexion();
|
|
|
|
|
$visitCtrl = new VisitorCtrl($con, $this->TabVues,$this->isUser);
|
|
|
|
|
$visitCtrl->go_connection();
|
|
|
|
|
} else { # sinon
|
|
|
|
|
# handle action avec controlleur user
|
|
|
|
|
require("UserCtrl.php");
|
|
|
|
|
$userCtrl = new UserCtrl();
|
|
|
|
|
$userCtrl = new UserCtrl($con, $this->TabVues);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else { # sinon forcement action visiteur
|
|
|
|
|