diff --git a/controller/animal.php b/controller/animal.php index bda28570c2ce03945daf31a6e8f542d807823232..79858d4dab5f68f578da73bad536db071a18b2a0 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 3dfd3a19ae45b13679c585b47befebcd25817f65..39b3b0f8e3851fedf93d0ef24832396f9b021fa0 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 3cd4386893bdfc554000ea23d8539004bb467a7e..e56df42adf9498be62ce241532751090df61c1fd 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 d4f50154a315c612986e5a044608a5b9ff409477..5f6814fee2ae4c278811005de96a0ef2d5b97df4 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 168efd2d8f6a74176471e768ce8245324dbda5fc..1bfffba9e54dc533e4ea0eee6c5ba1f5d0c42051 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; -}