You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
<?php
|
|
class UserCtrl
|
|
{
|
|
private $model;
|
|
private $view;
|
|
private $con;
|
|
|
|
public function __construct(Connection $con){
|
|
$this->con = $con;
|
|
$this->model = new UserModel($this->con);
|
|
// try{
|
|
// $action=$_REQUEST['action'];
|
|
// switch($action){
|
|
|
|
// // voir les listes privees
|
|
// case 'voir_liste_priv':
|
|
// $this->loadListePriv();
|
|
// break;
|
|
|
|
// // ajouter une liste privee
|
|
// case 'creer_liste_priv':
|
|
// $this->newListPrivate();
|
|
// break;
|
|
|
|
// }
|
|
// } catch(Exception $e) {
|
|
// require("../view/erreur.php");
|
|
// }
|
|
}
|
|
|
|
public function loadListePriv(){
|
|
$name = "Liste privée";
|
|
$taskmdl = new TaskModel($this->con);
|
|
$TabTask = $taskmdl->loadPublicLists();
|
|
var_dump($TabTask);
|
|
// $TabList[] = new ListTask(0, "Projet PHP");
|
|
// $TabList[] = new ListTask(1, "Projet Blazor");
|
|
// $TabListPriv = $this->model->loadPrivateLists();
|
|
// require("../view/liste.php");
|
|
require("../view/task.php");
|
|
}
|
|
|
|
public function newListPrivate(){
|
|
$nom=$_POST['listeNom'];
|
|
insertL(new ListTask(0, $nom, $_SESSION['login']));
|
|
}
|
|
}
|
|
?>
|