From 1cca5ccbea4e1c13e443f3e0fc3f3f2d924b31c8 Mon Sep 17 00:00:00 2001
From: clement <clemmercier45@gmail.com>
Date: Tue, 17 Jun 2014 17:02:54 +0200
Subject: [PATCH] c

---
 controller/animal.php | 10 +++++-----
 controller/fact.php   | 16 +++++++++++-----
 controller/ord.php    | 10 +++++-----
 controller/rdv.php    | 10 +++++-----
 4 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/controller/animal.php b/controller/animal.php
index 4cdb3e8..bda2857 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 f276e8c..3dfd3a1 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 4d5a672..3cd4386 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 3ae87da..d4f5015 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:
-- 
GitLab