From 518280333a49bf206a891df71ab2a9f9ec93f331 Mon Sep 17 00:00:00 2001 From: Clecle Date: Tue, 17 Nov 2015 19:02:28 +0100 Subject: [PATCH] =?UTF-8?q?CheckParam()=20avec=20param=C3=A8tres=20variabl?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/security.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/manager/security.php b/manager/security.php index 2bdbd48..56cfe2a 100755 --- a/manager/security.php +++ b/manager/security.php @@ -202,4 +202,39 @@ } + /*function checkParamBIS( ...$checkIt ) { + + + // checkIt[] Tableau | checkIT[][] Types des Variables | checkIt[][][] Formats des variables | checkIt[][][][] Valeur des varialbes + + + $checker = false; + + for( $i = 0; $i < func_num_args(); $i++) { + + for( $j = 0; $j < sizeof( $checkIt[$i] ); $j++) { + + switch ($checkIt[$i][$j]) { + + case 'string': if( is_string( $checkIt[$i][$j][$j][$j] ) ) + $checker = is_string( $checkIt[$i][$j][$j][$j] ) && preg_match( $checkIt[$i][$j][$j], (String) $checkIt[$i][$j][$j][$j] ); + break; + case 'int': if( is_string( $checkIt[$i][$j][$j][$j]) ) + $checker = is_int( $checkIt[$i][$j][$j][$j] ) && preg_match( $checkIt[$i][$j][$j], (String) $checkIt[$i][$j][$j][$j] ); + break; + case 'numeric': if( is_string( $checkIt[$i][$j][$j][$j]]) ) + $checker = is_numeric( $checkIt[$i][$j][$j][$j] ) && preg_match( $checkIt[$i][$j][$j], (String) $checkIt[$i][$j][$j][$j] ); + break; + case 'array': if( is_numeric( $checkIt[$i][$j][$j][$j]) ) + $checker = is_array( $checkIt[$i][$j][$j][$j] ) && count( $checkIt[$i][$j][$j] ) > 0; + break; + } + + } + } + + return $checker; + + }*/ + ?>