|
|
|
@ -19,6 +19,7 @@ class VisitorController {
|
|
|
|
|
break;
|
|
|
|
|
case "inscription":
|
|
|
|
|
$this->inscription($arrayErrorViews);
|
|
|
|
|
break;
|
|
|
|
|
case "creerListe":
|
|
|
|
|
$this->creerListe($arrayErrorViews);
|
|
|
|
|
break;
|
|
|
|
@ -31,6 +32,9 @@ class VisitorController {
|
|
|
|
|
case "cocherTache":
|
|
|
|
|
$this->cocherTache($arrayErrorViews);
|
|
|
|
|
break;
|
|
|
|
|
case "decocherTache":
|
|
|
|
|
$this->decocherTache($arrayErrorViews);
|
|
|
|
|
break;
|
|
|
|
|
case "supprTache":
|
|
|
|
|
$this->supprTache($arrayErrorViews);
|
|
|
|
|
default :
|
|
|
|
@ -39,14 +43,14 @@ class VisitorController {
|
|
|
|
|
}
|
|
|
|
|
} catch(PDOException $e){
|
|
|
|
|
$dataView[]="Erreur inatendue";
|
|
|
|
|
require(__DIR__.'/../vues/erreur.php');
|
|
|
|
|
require('erreur.php');
|
|
|
|
|
}
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function reinit(){
|
|
|
|
|
global $rep,$vues;
|
|
|
|
|
require($rep.$vues['acceuil']);
|
|
|
|
|
require($rep.$vues['acceuil.php']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function connection(array $vues_erreur){
|
|
|
|
@ -57,7 +61,7 @@ class VisitorController {
|
|
|
|
|
Validation::clear_string($pwd);
|
|
|
|
|
Validation::val_connexion($usrname,$pwd,$vues_erreur);
|
|
|
|
|
|
|
|
|
|
$model = new UserModel();
|
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
|
$worked=$model->connexion();
|
|
|
|
|
/*
|
|
|
|
|
$dVue = array (
|
|
|
|
@ -73,12 +77,13 @@ class VisitorController {
|
|
|
|
|
|
|
|
|
|
public function inscription(array $vues_erreur){
|
|
|
|
|
global $rep,$vues;
|
|
|
|
|
require($rep.$vues['inscription']);
|
|
|
|
|
|
|
|
|
|
$usrname=$_POST['login'];
|
|
|
|
|
$pwd=$_POST['mdp'];
|
|
|
|
|
Validation::val_connexion($usrname,$pwd,$vues_erreur);
|
|
|
|
|
|
|
|
|
|
$model = new UserModel();
|
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
|
$model->inscription();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -88,7 +93,7 @@ class VisitorController {
|
|
|
|
|
|
|
|
|
|
$nom=$_POST['nom'];
|
|
|
|
|
|
|
|
|
|
$model = new ListeModel();
|
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
|
$model->creerListe($nom);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -96,7 +101,7 @@ class VisitorController {
|
|
|
|
|
global $rep, $vues;
|
|
|
|
|
require($rep.$vues['suppressionListe']);
|
|
|
|
|
|
|
|
|
|
$model = new ListeModel();
|
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
|
$model->supprListe();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -106,9 +111,39 @@ class VisitorController {
|
|
|
|
|
|
|
|
|
|
$intitule = $_POST['intitule'];
|
|
|
|
|
|
|
|
|
|
$model = new ListeModel();
|
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
|
$model->creerTache();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function cocherTache(array $vues_erreur){
|
|
|
|
|
global $rep, $vues;
|
|
|
|
|
require($rep.$vues['liste']);
|
|
|
|
|
|
|
|
|
|
$id = $_POST['idTache'];
|
|
|
|
|
|
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
|
$model->cocherTache($id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function decocherTache(array $vues_erreur){
|
|
|
|
|
global $rep, $vues;
|
|
|
|
|
require($rep.$vues['liste']);
|
|
|
|
|
|
|
|
|
|
$id = $_POST['idTache'];
|
|
|
|
|
|
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
|
$model->decocherTache($id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function supprTache(array $vues_erreur){
|
|
|
|
|
global $rep, $vues;
|
|
|
|
|
require($rep.$vues['liste']);
|
|
|
|
|
|
|
|
|
|
$id = $_POST['idTache'];
|
|
|
|
|
|
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
|
$model->supprTache($id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|