From a8f97c7216c30f8108b701eb9cd413f7e5c3ff79 Mon Sep 17 00:00:00 2001 From: clement <clemmercier45@gmail.com> Date: Tue, 17 Jun 2014 17:28:54 +0200 Subject: [PATCH] c --- controller/animal.php | 4 +++- controller/fact.php | 4 +++- controller/ord.php | 4 +++- controller/rdv.php | 4 +++- controller/stats.php | 32 +------------------------------- 5 files changed, 13 insertions(+), 35 deletions(-) diff --git a/controller/animal.php b/controller/animal.php index bda2857..79858d4 100644 --- a/controller/animal.php +++ b/controller/animal.php @@ -19,7 +19,9 @@ switch($action) { include 'view/list.php'; break; case "add": - + $animal = new Animal(); + $formConf = $animal->getForm(); + include 'view/form.php'; break; case "edit": diff --git a/controller/fact.php b/controller/fact.php index 3dfd3a1..39b3b0f 100644 --- a/controller/fact.php +++ b/controller/fact.php @@ -25,7 +25,9 @@ switch($action) { include 'view/list.php'; break; case "add": - + $facture = new Facture(); + $formConf = $facture->getForm(); + include 'view/form.php'; break; case "edit": diff --git a/controller/ord.php b/controller/ord.php index 3cd4386..e56df42 100644 --- a/controller/ord.php +++ b/controller/ord.php @@ -19,7 +19,9 @@ switch($action) { include 'view/list.php'; break; case "add": - + $ordonnance = new Ordonnance(); + $formConf = $ordonnance->getForm(); + include 'view/form.php'; break; case "edit": diff --git a/controller/rdv.php b/controller/rdv.php index d4f5015..5f6814f 100644 --- a/controller/rdv.php +++ b/controller/rdv.php @@ -19,7 +19,9 @@ switch($action) { include 'view/list.php'; break; case "add": - + $rdv = new Rdv(); + $formConf = $rdv->getForm(); + include 'view/form.php'; break; case "edit": diff --git a/controller/stats.php b/controller/stats.php index 168efd2..1bfffba 100644 --- a/controller/stats.php +++ b/controller/stats.php @@ -1,37 +1,7 @@ <?php /* - Controller personne, handle CRUD for personnel and client. + Controller Statistiques, handle CRUD for statistiques. */ -// Implemented actions -$actions = array("listePersonnel", "listeClient", "addPersonnel", "addClient", "editPersonnel", "editClient"); -// Check action is correct -if(!in_array($action, $actions)) { - $action = "listePersonnel"; -} - -switch($action) { - case "listePersonnel": - $listArray = Employe::getAll(); - $listParams = array("title" => "Liste du personnel", - "keys" => array("id", "nom", "prenom", "isVeterinaire", "idNational")); - include 'view/list.php'; - break; - case "listeClient": - $listArray = Client::getAll(); - $listParams = array("title" => "Liste des clients", - "keys" => array("id", "nom", "prenom", "numTel")); - include 'view/list.php'; - break; - case "addPersonnel": - - break; - case "addClient": - - break; - default: - include 'view/404.php'; - break; -} -- GitLab