OSDN Git Service

Small bug fix and add useragents.php
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Wed, 15 Sep 2010 08:07:34 +0000 (08:07 +0000)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Wed, 15 Sep 2010 08:07:34 +0000 (08:07 +0000)
git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@544 2b68903e-0b30-0410-9a39-a2e4f3c5be39

inc/function.php
inc/misc/functions.php
inc/misc/useragents.php [new file with mode: 0644]
inc/versioninfo.php
sql.php

index 1d3ad2b..21477f1 100644 (file)
@@ -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;
index c15c986..629677c 100644 (file)
@@ -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 (file)
index 0000000..d042961
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2010 iDB Support - http://idb.berlios.de/
+    Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
+
+    $FileInfo: useragents.php - Last Update: 09/15/2010 SVN 544 - Author: cooldude2k $
+*/
+// 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("Validator.nu")."/i", $user_agent)) {
+    return "Validator.nu"; }
+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"; }
+if (preg_match("/".preg_quote("Yahoo")."/i", $user_agent)) {
+    return "Yahoo"; }
+if (preg_match("/".preg_quote("Yandex")."/i", $user_agent)) {
+    return "Yandex"; }
+       return false; }
+?>
\ No newline at end of file
index 8b5f40a..cc99f93 100644 (file)
@@ -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 (file)
--- 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 '<?xml-stylesheet type="text/xsl" href="'.url_maker($exfile['index'],$Setti
 <?php die(); } } if($Settings['vercheck']===1) {
 if($_GET['act']=="versioninfo") { header("Content-Type: text/plain; charset=UTF-8");
 header("Location: ".$VerCheckURL."&name=".urlencode($iDBVerName)); die(); } }
+if($_GET['act']=="homepage") { header("Content-Type: text/plain; charset=UTF-8");
+header("Location: ".$Settings['weburl']); die(); }
 if($Settings['enable_pathinfo']=="on") { 
        mrstring(); /* Change Path info to Get Vars :P */ }
 // Check to see if variables are set