debut user controller

list-Gtw-Mdl
Nicolas FRANCO 2 years ago
parent 1f52b95934
commit 1508f6b416

@ -1,14 +1,54 @@
<?php
class CtrlUser{
function __construct(){
global $rep,$vues;
class CtrlUser
{
private $model;
private $view;
private $con;
public function __construct(TaskModel $model, HomeView $view,
Connection $con){
session_start();
$dVueErreur = array();
$this->model = $model;
$this->view = $view;
$this->con = $con;
}
function seConncter($login,$mdp){
//
try{
$action=$_REQUEST['action'];
switch($action){
// pas d'action afficher la home page avec toutes les listes
case NULL:
$this->home();
break;
// ajouter une liste publique
case 'creer_liste_pub'
$this->newList('private');
break;
// ajouter une liste privee
case 'creer_liste_priv'
$this->newList('public');
break;
// supprimer une liste
case 'supprimer_liste'
$this->delList();
break;
// changer nom de la liste
case 'changer_nom'
$this->changeListName();
break;
// ajouter une tache
// completer tache
}
}
}
?>

@ -1,7 +1,5 @@
<?php
class FrontCtrl
class FrontController
{
$listeAction_User=array();
$listeAction_Visiteur;
}
?>

Loading…
Cancel
Save