- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
$_FILTER_MODULE = array(
"A","a","B","b","C","c","D","d","E","e",
"F","f","G","g","H","h","I","i","J","j",
"K","k","L","l","M","m","N","n","O","o",
"P","p","Q","q","R","r","S","s","T","t",
"U","u","V","v","W","w","X","x","Y","y",
"Z","z","-");
$_FILTER_ACTION = array(
"A","a","B","b","C","c","D","d","E","e",
"F","f","G","g","H","h","I","i","J","j",
"K","k","L","l","M","m","N","n","O","o",
"P","p","Q","q","R","r","S","s","T","t",
"U","u","V","v","W","w","X","x","Y","y",
"Z","z","-");
define("CHARS_LOGIN", "0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzАаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя-");
define("CHARS_PASS", "0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz");
define("CHARS_FNAME", "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzАаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя-");
define("CHARS_LNAME", "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzАаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя-");
define("CHARS_EMAIL", "0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz@-_.");
$_FILTER_ID = array("0","1","2","3","4","5","6","7","8","9");
$_FILTER_INT = array("0","1","2","3","4","5","6","7","8","9");
function Filter($Str, $Filter) {
$NewStr = NULL;
$k = 0;
for($i = 0; $i<strlen($Str); $i++) {
for($n = 0; $n<sizeof($Filter); $n++) {
if($Str{$i} == $Filter[$n]) {
$NewStr[$k] = $Str[$i];
$k++;
}
}
}
return (string) @implode($NewStr);
}
function is_valid($value, $chars, $min_len, $max_len) {
$value_len = mb_strlen($value);
$chars_len = mb_strlen($chars);
$char_valid = false;
if($value_len > $max_len || $value_len < $min_len) {
return false;
}
for($i = 0; $i < $value_len; $i++) {
$char_valid = false;
for($k = 0; $k < $chars_len; $k++) {
if($value{$i} == $chars{$k}) {
$char_valid = true;
}
}
if($char_valid == false) {
return false;
}
}
return true;
}