diff options
Diffstat (limited to 'www/inc/funkce.inc.php')
-rw-r--r-- | www/inc/funkce.inc.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/www/inc/funkce.inc.php b/www/inc/funkce.inc.php index de4b592..1f89341 100644 --- a/www/inc/funkce.inc.php +++ b/www/inc/funkce.inc.php @@ -3,8 +3,8 @@ function check($file) { global $gallery_dir, $page; -# if (eregi("[^0-9a-z\_\-\ ]",$file) || !file_exists("$gallery_dir/$file")) { -# if (eregi("CVS",$file) || !file_exists("$gallery_dir/$file")) { +# if (preg_match("/[^0-9a-z\_\-\ ]/i",$file) || !file_exists("$gallery_dir/$file")) { +# if (preg_match("/CVS/i",$file) || !file_exists("$gallery_dir/$file")) { if (!file_exists("$gallery_dir/$file")) { echo "funkce.inc.php/check(): Bad input"; $page->footer(); @@ -16,19 +16,19 @@ function browserCheck() { global $HTTP_USER_AGENT; $HTTP_USER_AGENT=$_SERVER["HTTP_USER_AGENT"]; - if (eregi("(MSIE.[456789]).*Mac.*",$HTTP_USER_AGENT)) { + if (preg_match("/(MSIE.[456789]).*Mac.*/i",$HTTP_USER_AGENT)) { return("macie4+"); - } elseif (eregi("(MSIE.[678])",$HTTP_USER_AGENT)) { + } elseif (preg_match("/(MSIE.[678])/i",$HTTP_USER_AGENT)) { return("ie6+"); - } elseif (eregi("(MSIE.[45])",$HTTP_USER_AGENT)) { + } elseif (preg_match("/(MSIE.[45])/i",$HTTP_USER_AGENT)) { return("ie4+"); - } elseif (eregi("Opera",$HTTP_USER_AGENT)) { + } elseif (preg_match("/Opera/i",$HTTP_USER_AGENT)) { return("opera"); - } elseif (eregi("(Mozilla.4)",$HTTP_USER_AGENT)) { + } elseif (preg_match("/(Mozilla.4)/i",$HTTP_USER_AGENT)) { return("netscape4"); - } elseif (eregi("(Mozilla.[5-9])",$HTTP_USER_AGENT)) { + } elseif (preg_match("/(Mozilla.[5-9])/i",$HTTP_USER_AGENT)) { return("mozilla"); - } elseif (eregi("KMeleon",$HTTP_USER_AGENT)) { + } elseif (preg_match("/KMeleon/i",$HTTP_USER_AGENT)) { return("mozilla"); } else { return("Netscape3"); |