summaryrefslogtreecommitdiff
path: root/Views/Includes/incl_form_admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'Views/Includes/incl_form_admin.php')
-rw-r--r--Views/Includes/incl_form_admin.php26
1 files changed, 18 insertions, 8 deletions
diff --git a/Views/Includes/incl_form_admin.php b/Views/Includes/incl_form_admin.php
index 7f7963d..6176bc4 100644
--- a/Views/Includes/incl_form_admin.php
+++ b/Views/Includes/incl_form_admin.php
@@ -64,7 +64,7 @@ echo(" <!-- Tableau des utilisateurs-->
<!-- En-tête -->
<tr>".PHP_EOL);
// Affichage des en-tête de colonne.
-foreach($header[0] as $header) {
+foreach($header["adminDel"] as $header) {
echo(" <th>".$header."</th>".PHP_EOL);
}
echo(" </tr>".PHP_EOL);
@@ -73,13 +73,23 @@ foreach ($result as $rows) {
echo(" <!-- Utilisateurs -->
<tr>".PHP_EOL);
foreach ($rows as $key => $value) {
- // Traduction du résultat si reponse binaire en Oui / Non.
- if (($key == "isClient" || $key == "isPro" || $key == "isAdmin") && $value == "1") {
- echo(" <td><pre>".$yes."<prepre></td>".PHP_EOL);
- } elseif (($key == "isClient" || $key == "isPro" || $key == "isAdmin") && $value == "0") {
- echo(" <td><pre>".$no."<prepre></td>".PHP_EOL);
- } else {
- echo(" <td><pre>".$value."</pre></td>".PHP_EOL);
+ switch ($key) {
+ case "userStatus":
+ switch ($value) {
+ case 0:
+ echo(" <td><pre>Admin<pre></td>".PHP_EOL);
+ break;
+ case 1:
+ echo(" <td><pre>Pro<pre></td>".PHP_EOL);
+ break;
+ case 2:
+ echo(" <td><pre>Client<pre></td>".PHP_EOL);
+ break;
+ }
+ break;
+ default:
+ echo(" <td><pre>".$value."</pre></td>".PHP_EOL);
+ break;
}
}
echo(" </tr>".PHP_EOL);