From 5ded5781a35705c0fcf0bbedc7fb28552899e82e Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Sat, 30 Apr 2016 18:18:30 +0200 Subject: [PATCH] Amélioration du placeholder --- api/client/fiche.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/api/client/fiche.php b/api/client/fiche.php index 97d4604..7e6b661 100644 --- a/api/client/fiche.php +++ b/api/client/fiche.php @@ -57,13 +57,8 @@ if ($droit < 2) { exit(); } -function loginLille1Valide($login) { - // Vérifie si le login est correct - return true; // :p -} - -if (isset($_POST['loginLille1']) && loginLille1Valide($_POST['loginLille1'])) { - $loginLille1 = $_POST['loginLille1']; +if (isset($_POST['idCarte'])) { + $idCarte = $_POST['idCarte']; } else { ?> { @@ -74,10 +69,10 @@ if (isset($_POST['loginLille1']) && loginLille1Valide($_POST['loginLille1'])) { } // On checke si le loginLille1 est connu dans la base de données -if ($loginLille1 != 'petite.jaja') { +if ($idCarte != 'AHS0DIEX') { ?> { - "status": "etudiant_inconnu" + "status": "client_inconnu" } { "status": "ok", - "loginLille1": "petite.jaja", - "idCarteEtudiant": "AHS0DIEX", + "idCarte": "AHS0DIEX", "solde": 48.3, = 3) { -- libgit2 0.21.2