forked from nilsding/waschi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilter.php
More file actions
30 lines (21 loc) · 820 Bytes
/
filter.php
File metadata and controls
30 lines (21 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
#################################
# Waschi Waschmaschinenverbund #
# Version: 0.5-0002 #
# (c) 2013 by MeikoDis #
# License: GNU-AGPL v3 #
#################################
function in_filter($words){
$limit=18; //Zeichenlimit
if(strlen($words) > $limit) return true;
if($words=="") return true;
$filter = array(",",".","<",">","--","\"","'","&","|","(",")",":","[","]",";","\\","/","!","=","{","}","#","$"); // Zeichen, die die Übersendung nicht zulassen.
$noe=count($filter);
$counter=0;
foreach($filter as $bad){
if(!stristr($words, $bad)) $counter++;
}
if($counter == $noe) return false;
else return true;
}
?>