diff --git a/class/animal.php b/class/animal.php index 532e31f071c0b8a6823542d76f1b8197dfeb1674..fe79944fcfaa0e08e518250530165236d8aea01b 100644 --- a/class/animal.php +++ b/class/animal.php @@ -2,6 +2,7 @@ class Animal extends Objet { + private $id; private $nom; private $proprio; private $race; @@ -13,6 +14,16 @@ class Animal extends Objet private $taille; private $code; + public function id() + { + return $this->id; + } + + public function setId($id) + { + $this->id = $id; + } + public function nom() { return $this->nom; diff --git a/controller/animal.php b/controller/animal.php new file mode 100644 index 0000000000000000000000000000000000000000..98300abc7ac1fb2daa7feac90ffce661fa883584 --- /dev/null +++ b/controller/animal.php @@ -0,0 +1,31 @@ +<?php +/* + Controller animal, handle CRUD for animal. +*/ + +// Implemented actions +$actions = array("listeAnimal", "addAnimal", "editAnimal"); + +// Check action is correct +if(!in_array($action, $actions)) { + $action = "listeAnimal"; +} + +switch($action) { + case "listeAnimal": + $listArray = Animal::getAll(); + $listParams = array("title" => "Liste des animaux de la clinique", + "keys" => array("nom", "proprio", "race", "poids", "genre", "sterile", "date de naissance", "date de décès", "taille", "code d'identification")); + include 'view/list.php'; + break; + case "addAnimal": + + break; + case "editAnimal": + + break; + default: + include 'view/404.php'; + break; +} + diff --git a/controller/fact.php b/controller/fact.php new file mode 100644 index 0000000000000000000000000000000000000000..15ef8b2fbb227821029ee97f2aa86eed322ab4af --- /dev/null +++ b/controller/fact.php @@ -0,0 +1,31 @@ +<?php +/* + Controller Facture, handle CRUD for factures. +*/ + +// Implemented actions +$actions = array("listeFact", "addFact", "editFact"); + +// Check action is correct +if(!in_array($action, $actions)) { + $action = "listeFact"; +} + +switch($action) { + case "listeFact": + $listArray = Employe::getAll(); + $listParams = array("title" => "Liste des factures", + "keys" => array("id", "employe", "animal", "date_edition", "date_paiement", "moyen_paiement", "prix_total")); + include 'view/list.php'; + break; + case "addFact": + + break; + case "editFact": + + break; + default: + include 'view/404.php'; + break; +} + diff --git a/controller/ord.php b/controller/ord.php new file mode 100644 index 0000000000000000000000000000000000000000..20933379801dba07ccc18f22d08c3af825442364 --- /dev/null +++ b/controller/ord.php @@ -0,0 +1,31 @@ +<?php +/* + Controller Ordonnance, handle CRUD for ordonnances. +*/ + +// Implemented actions +$actions = array("listeOrd", "addOrd", "editOrd"); + +// Check action is correct +if(!in_array($action, $actions)) { + $action = "listeOrd"; +} + +switch($action) { + case "listeOrd": + $listArray = Employe::getAll(); + $listParams = array("title" => "Liste des ordonnances", + "keys" => array("id", "animal", "veterinaire", "date", "prix")); + include 'view/list.php'; + break; + case "addOrd": + + break; + case "editOrd": + + break; + default: + include 'view/404.php'; + break; +} + diff --git a/controller/rdv.php b/controller/rdv.php new file mode 100644 index 0000000000000000000000000000000000000000..0fff0e9016ca628c7a4c010fb2227bfef637294d --- /dev/null +++ b/controller/rdv.php @@ -0,0 +1,31 @@ +<?php +/* + Controller Rdv, handle CRUD for meeting. +*/ + +// Implemented actions +$actions = array("listeRdv", "addRdv", "editRdv"); + +// Check action is correct +if(!in_array($action, $actions)) { + $action = "listeRdv"; +} + +switch($action) { + case "listeRdv": + $listArray = Employe::getAll(); + $listParams = array("title" => "Liste des rendez-vous", + "keys" => array("id", "animal", "veterinaire", "date", "duree")); + include 'view/list.php'; + break; + case "addPersonnel": + + break; + case "addClient": + + break; + default: + include 'view/404.php'; + break; +} + diff --git a/controller/stats.php b/controller/stats.php new file mode 100644 index 0000000000000000000000000000000000000000..168efd2d8f6a74176471e768ce8245324dbda5fc --- /dev/null +++ b/controller/stats.php @@ -0,0 +1,37 @@ +<?php +/* + Controller personne, handle CRUD for personnel and client. +*/ + +// 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; +} +