diff --git a/controller/animal.php b/controller/animal.php index 4cdb3e816b3088353f77bcf0b9a8c65827fd3bab..bda28570c2ce03945daf31a6e8f542d807823232 100644 --- a/controller/animal.php +++ b/controller/animal.php @@ -4,24 +4,24 @@ */ // Implemented actions -$actions = array("listeAnimal", "addAnimal", "editAnimal"); +$actions = array("liste", "add", "edit"); // Check action is correct if(!in_array($action, $actions)) { - $action = "listeAnimal"; + $action = "liste"; } switch($action) { - case "listeAnimal": + case "liste": $listArray = Animal::getAll(); $listParams = array("title" => "Liste des animaux de la clinique", "keys" => array("nom", "proprio", "race", "poids", "genre", "sterile", "dateNaissance", "dateDeces", "taille", "code")); include 'view/list.php'; break; - case "addAnimal": + case "add": break; - case "editAnimal": + case "edit": break; default: diff --git a/controller/fact.php b/controller/fact.php index f276e8c161788822ca2bf95d9e6511116c142888..3dfd3a19ae45b13679c585b47befebcd25817f65 100644 --- a/controller/fact.php +++ b/controller/fact.php @@ -4,24 +4,30 @@ */ // Implemented actions -$actions = array("listeFact", "addFact", "editFact"); +$actions = array("liste", "add", "edit"); // Check action is correct if(!in_array($action, $actions)) { - $action = "listeFact"; + $action = "liste"; } switch($action) { - case "listeFact": + case "liste": $listArray = Facture::getAll(); $listParams = array("title" => "Liste des factures", "keys" => array("id", "employe", "animal", "dateEdition", "datePaiement", "moyenPaiement", "prixTotal")); include 'view/list.php'; break; - case "addFact": + case "listePersonnel": + $listArray = Employe::getAll(); + $listParams = array("title" => "Liste du personnel", + "keys" => array("id", "nom", "prenom", "isVeterinaire", "idNational")); + include 'view/list.php'; + break; + case "add": break; - case "editFact": + case "edit": break; default: diff --git a/controller/ord.php b/controller/ord.php index 4d5a67295518d328b79f3e6abb4a2989c7750745..3cd4386893bdfc554000ea23d8539004bb467a7e 100644 --- a/controller/ord.php +++ b/controller/ord.php @@ -4,24 +4,24 @@ */ // Implemented actions -$actions = array("listeOrd", "addOrd", "editOrd"); +$actions = array("liste", "add", "edit"); // Check action is correct if(!in_array($action, $actions)) { - $action = "listeOrd"; + $action = "liste"; } switch($action) { - case "listeOrd": + case "liste": $listArray = Ordonnance::getAll(); $listParams = array("title" => "Liste des ordonnances", "keys" => array("id", "animal", "veterinaire", "date", "prix")); include 'view/list.php'; break; - case "addOrd": + case "add": break; - case "editOrd": + case "edit": break; default: diff --git a/controller/rdv.php b/controller/rdv.php index 3ae87da2d24bfabceecbdafcfca148518c581060..d4f50154a315c612986e5a044608a5b9ff409477 100644 --- a/controller/rdv.php +++ b/controller/rdv.php @@ -4,24 +4,24 @@ */ // Implemented actions -$actions = array("listeRdv", "addRdv", "editRdv"); +$actions = array("liste", "add", "edit"); // Check action is correct if(!in_array($action, $actions)) { - $action = "listeRdv"; + $action = "liste"; } switch($action) { - case "listeRdv": + case "liste": $listArray = Rdv::getAll(); $listParams = array("title" => "Liste des rendez-vous", "keys" => array("id", "animal", "veterinaire", "date", "duree")); include 'view/list.php'; break; - case "addPersonnel": + case "add": break; - case "addClient": + case "edit": break; default: