|
|
@ -17,6 +17,7 @@ class VisitorController {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "inscription":
|
|
|
|
case "inscription":
|
|
|
|
$this->inscription($arrayErrorViews);
|
|
|
|
$this->inscription($arrayErrorViews);
|
|
|
|
|
|
|
|
break;
|
|
|
|
case "creerListe":
|
|
|
|
case "creerListe":
|
|
|
|
$this->creerListe($arrayErrorViews);
|
|
|
|
$this->creerListe($arrayErrorViews);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -29,6 +30,9 @@ class VisitorController {
|
|
|
|
case "cocherTache":
|
|
|
|
case "cocherTache":
|
|
|
|
$this->cocherTache($arrayErrorViews);
|
|
|
|
$this->cocherTache($arrayErrorViews);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "decocherTache":
|
|
|
|
|
|
|
|
$this->decocherTache($arrayErrorViews);
|
|
|
|
|
|
|
|
break;
|
|
|
|
case "supprTache":
|
|
|
|
case "supprTache":
|
|
|
|
$this->supprTache($arrayErrorViews);
|
|
|
|
$this->supprTache($arrayErrorViews);
|
|
|
|
default :
|
|
|
|
default :
|
|
|
@ -37,14 +41,14 @@ class VisitorController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch(PDOException $e){
|
|
|
|
} catch(PDOException $e){
|
|
|
|
$dataView[]="Erreur inatendue";
|
|
|
|
$dataView[]="Erreur inatendue";
|
|
|
|
require(__DIR__.'/../vues/erreur.php');
|
|
|
|
require('erreur.php');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
exit(0);
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function reinit(){
|
|
|
|
public function reinit(){
|
|
|
|
global $rep,$vues;
|
|
|
|
global $rep,$vues;
|
|
|
|
require($rep.$vues['acceuil']);
|
|
|
|
require($rep.$vues['acceuil.php']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function connection(array $vues_erreur){
|
|
|
|
public function connection(array $vues_erreur){
|
|
|
@ -55,7 +59,7 @@ class VisitorController {
|
|
|
|
Validation::clear_string($pwd);
|
|
|
|
Validation::clear_string($pwd);
|
|
|
|
Validation::val_connexion($usrname,$pwd,$vues_erreur);
|
|
|
|
Validation::val_connexion($usrname,$pwd,$vues_erreur);
|
|
|
|
|
|
|
|
|
|
|
|
$model = new UserModel();
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
$worked=$model->connexion();
|
|
|
|
$worked=$model->connexion();
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
$dVue = array (
|
|
|
|
$dVue = array (
|
|
|
@ -71,12 +75,13 @@ class VisitorController {
|
|
|
|
|
|
|
|
|
|
|
|
public function inscription(array $vues_erreur){
|
|
|
|
public function inscription(array $vues_erreur){
|
|
|
|
global $rep,$vues;
|
|
|
|
global $rep,$vues;
|
|
|
|
|
|
|
|
require($rep.$vues['inscription']);
|
|
|
|
|
|
|
|
|
|
|
|
$usrname=$_POST['login'];
|
|
|
|
$usrname=$_POST['login'];
|
|
|
|
$pwd=$_POST['mdp'];
|
|
|
|
$pwd=$_POST['mdp'];
|
|
|
|
Validation::val_connexion($usrname,$pwd,$vues_erreur);
|
|
|
|
Validation::val_connexion($usrname,$pwd,$vues_erreur);
|
|
|
|
|
|
|
|
|
|
|
|
$model = new UserModel();
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
$model->inscription();
|
|
|
|
$model->inscription();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -86,7 +91,7 @@ class VisitorController {
|
|
|
|
|
|
|
|
|
|
|
|
$nom=$_POST['nom'];
|
|
|
|
$nom=$_POST['nom'];
|
|
|
|
|
|
|
|
|
|
|
|
$model = new ListeModel();
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
$model->creerListe($nom);
|
|
|
|
$model->creerListe($nom);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -94,7 +99,7 @@ class VisitorController {
|
|
|
|
global $rep, $vues;
|
|
|
|
global $rep, $vues;
|
|
|
|
require($rep.$vues['suppressionListe']);
|
|
|
|
require($rep.$vues['suppressionListe']);
|
|
|
|
|
|
|
|
|
|
|
|
$model = new ListeModel();
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
$model->supprListe();
|
|
|
|
$model->supprListe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -104,9 +109,39 @@ class VisitorController {
|
|
|
|
|
|
|
|
|
|
|
|
$intitule = $_POST['intitule'];
|
|
|
|
$intitule = $_POST['intitule'];
|
|
|
|
|
|
|
|
|
|
|
|
$model = new ListeModel();
|
|
|
|
$model = new VisiteurModel();
|
|
|
|
$model->creerTache();
|
|
|
|
$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);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
?>
|