From: Kazuki Przyborowski Date: Wed, 15 Sep 2010 08:07:34 +0000 (+0000) Subject: Small bug fix and add useragents.php X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=afbfb11513f79285bdd3f69427b8e218f3416408;p=idb%2FiDB.git.git Small bug fix and add useragents.php git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@544 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- diff --git a/inc/function.php b/inc/function.php index 1d3ad2b..21477f1 100644 --- a/inc/function.php +++ b/inc/function.php @@ -11,7 +11,7 @@ Copyright 2004-2010 iDB Support - http://idb.berlios.de/ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: function.php - Last Update: 06/13/2010 SVN 526 - Author: cooldude2k $ + $FileInfo: function.php - Last Update: 09/15/2010 SVN 544 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="function.php"||$File3Name=="/function.php") { @@ -133,55 +133,6 @@ function unserialize_session($data) { if(!isset($result)) { $result = null; } return $result; } -// User Agent Checker -function user_agent_check($user_agent) { -if (preg_match("/".preg_quote("ia_archiver")."/i", $user_agent)) { - return "Alexa"; } -if (preg_match("/".preg_quote("AltaVista")."/i", $user_agent)) { - return "AltaVista"; } -if (preg_match("/".preg_quote("Ask Jeeves")."/i", $user_agent)) { - return "Ask Jeeves"; } -if (preg_match("/".preg_quote("Baiduspider")."/i", $user_agent)) { - return "Baidu"; } -if (preg_match("/".preg_quote("msnbot")."/i", $user_agent)) { - return "Bing"; } -if (preg_match("/".preg_quote("CSE HTML Validator")."/i", $user_agent)) { - return "CSE HTML Validator"; } -if (preg_match("/".preg_quote("discobot")."/i", $user_agent)) { - return "DiscoveryEngine"; } -if (preg_match("/".preg_quote("Exabot")."/i", $user_agent)) { - return "Exabot"; } -if (preg_match("/".preg_quote("Googlebot")."/i", $user_agent)) { - return "Google"; } -if (preg_match("|".preg_quote("HTML/XML Validator","|")."|i", $user_agent)) { - return "HTML/XML Validator"; } -if (preg_match("/".preg_quote("Lycos")."/i", $user_agent)) { - return "Lycos"; } -if (preg_match("/".preg_quote("montastic-webmonitor")."/i", $user_agent)) { - return "Montastic"; } -if (preg_match("/".preg_quote("Sosospider")."/i", $user_agent)) { - return "Soso"; } -if (preg_match("/".preg_quote("Speedy Spider")."/i", $user_agent)) { - return "Speedy"; } -if (preg_match("/".preg_quote("TotalValidator")."/i", $user_agent)) { - return "Total Validator"; } -if (preg_match("/".preg_quote("Yahoo")."/i", $user_agent)) { - return "Yahoo"; } -if (preg_match("/".preg_quote("Yandex")."/i", $user_agent)) { - return "Yandex"; } -if (preg_match("/".preg_quote("FeedValidator")."/i", $user_agent)) { - return "W3C Validator"; } -if (preg_match("/".preg_quote("W3C_CSS_Validator")."/i", $user_agent)) { - return "W3C Validator"; } -if (preg_match("/".preg_quote("W3C_Validator")."/i", $user_agent)) { - return "W3C Validator"; } -if (preg_match("/".preg_quote("W3C-checklink")."/i", $user_agent)) { - return "W3C Checklink"; } -if (preg_match("/".preg_quote("WDG_SiteValidator")."/i", $user_agent)) { - return "WDG Validator"; } -if (preg_match("/".preg_quote("WDG_Validator")."/i", $user_agent)) { - return "WDG Validator"; } - return false; } // Make the Query String if we are not useing &= function qstring($qstr=";",$qsep="=") { $_GET = array(); $_GET = null; diff --git a/inc/misc/functions.php b/inc/misc/functions.php index c15c986..629677c 100644 --- a/inc/misc/functions.php +++ b/inc/misc/functions.php @@ -11,7 +11,7 @@ Copyright 2004-2010 iDB Support - http://idb.berlios.de/ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: functions.php - Last Update: 09/09/2010 SVN 534 - Author: cooldude2k $ + $FileInfo: functions.php - Last Update: 09/15/2010 SVN 544 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="functions.php"||$File3Name=="/functions.php") { @@ -38,6 +38,7 @@ if($Settings['sqltype']=="pgsql") { require($SettDir['sql']."pgsql.php"); } if($Settings['sqltype']=="sqlite") { require($SettDir['sql']."sqlite.php"); } +require($SettDir['misc']."useragents.php"); /* if ($_GET['act']=="DeleteSession") { session_destroy(); } if ($_GET['act']=="ResetSession") { session_unset(); } diff --git a/inc/misc/useragents.php b/inc/misc/useragents.php new file mode 100644 index 0000000..d042961 --- /dev/null +++ b/inc/misc/useragents.php @@ -0,0 +1,67 @@ + \ No newline at end of file diff --git a/inc/versioninfo.php b/inc/versioninfo.php index 8b5f40a..cc99f93 100644 --- a/inc/versioninfo.php +++ b/inc/versioninfo.php @@ -11,7 +11,7 @@ Copyright 2004-2010 iDB Support - http://idb.berlios.de/ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: versioninfo.php - Last Update: 09/13/2010 SVN 543 - Author: cooldude2k $ + $FileInfo: versioninfo.php - Last Update: 09/15/2010 SVN 544 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") { @@ -27,8 +27,8 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) { return $return_var; } // Version number and date stuff. :P $VER1[0] = 0; $VER1[1] = 4; $VER1[2] = 1; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 543; $RName = "iDB"; $SFName = "IntDB"; -$SVNDay[0] = 09; $SVNDay[1] = 13; $SVNDay[2] = 2010; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; +$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 544; $RName = "iDB"; $SFName = "IntDB"; +$SVNDay[0] = 09; $SVNDay[1] = 15; $SVNDay[2] = 2010; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; $VerInfo['iDB_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,false); $VerInfo['iDB_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,true); $VerInfo['iDB_Full_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[0],$SubVerN,false); diff --git a/sql.php b/sql.php index 02e0dc2..35ea021 100644 --- a/sql.php +++ b/sql.php @@ -11,7 +11,7 @@ Copyright 2004-2010 iDB Support - http://idb.berlios.de/ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: sql.php - Last Update: 07/01/2010 SVN 528 - Author: cooldude2k $ + $FileInfo: sql.php - Last Update: 09/15/2010 SVN 544 - Author: cooldude2k $ */ /* Some ini setting changes uncomment if you need them. Display PHP Errors */ @@ -229,6 +229,8 @@ echo '