From db8ef4766d9d990210b3da65c5a679e3d714028c Mon Sep 17 00:00:00 2001 From: Clecle Date: Tue, 10 Nov 2015 20:55:40 +0100 Subject: [PATCH] Squelette fonction checkParam --- manager/security.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/manager/security.php b/manager/security.php index 6fac1c3..bf2a333 100755 --- a/manager/security.php +++ b/manager/security.php @@ -98,4 +98,36 @@ $_SESSION['droits'] = array(); } }session_init(); + + + /* [2] GESTION DES PARAMÈTRES + ============================================================*/ + + /** Vérifie le bon format, le bon type, ainsi que la bonne valeur des variables envoyées + * + * @param $tabVar tableau contenant l'ensemble des variables a vérifiées + * @param $tabForm tableau contenant l'ensemble des formats attendus + * + * @return 'success' si variables bonnes / 'error' sinon + */ + + function checkParam($tabVar,$tabForm) { + + var $checker; + + if(isset(tabVar) && isset(tabForm)) { + + foreach ($tabVar as $type => $value) { + foreach ($value as $variable) { + // $checker = + + } + } + + } + else { + + return 'missing parameters'; + } + } ?> \ No newline at end of file