From e76facae2c4db6e686d65ef395854ad0ecdbe71c Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Tue, 27 Apr 2010 10:25:41 +0000 Subject: [PATCH] Yet another small update. git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@470 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- inc/function.php | 4 ++-- inc/misc/functions.php | 10 +++++----- inc/versioninfo.php | 6 +++--- install.php | 26 +++++++++++++++++++------- sql.php | 18 +++++++++--------- 5 files changed, 38 insertions(+), 26 deletions(-) diff --git a/inc/function.php b/inc/function.php index b48d8ac..1acc566 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: 04/20/2010 SVN 468 - Author: cooldude2k $ + $FileInfo: function.php - Last Update: 04/27/2010 SVN 470 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="function.php"||$File3Name=="/function.php") { @@ -151,7 +151,7 @@ if(getenv('PATH_INFO')==null) { $myscript = $_SERVER["SCRIPT_NAME"]; $myphpath = $_SERVER["PHP_SELF"]; $mypathinfo = str_replace($myscript, "", $myphpath); -putenv("PATH_INFO=".$mypathinfo); } } +@putenv("PATH_INFO=".$mypathinfo); } } // Change raw post data to POST array // Not sure why I made but alwell. :P function parse_post_data() diff --git a/inc/misc/functions.php b/inc/misc/functions.php index 43a5e2a..ca4b971 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: 04/20/2010 SVN 468 - Author: cooldude2k $ + $FileInfo: functions.php - Last Update: 04/27/2010 SVN 470 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="functions.php"||$File3Name=="/functions.php") { @@ -224,7 +224,7 @@ if($dst=="on") { if($dstake!="done") { $TCHour = $TCHour + $tsa['hour']; $TCMinute = $TCMinute + $tsa['minute']; return date($format,mktime($TCHour,$TCMinute,$TCSecond,$TCMonth,$TCDay,$TCYear)); } - $Names['SB'] = "Stephanie Braun"; + $Names['SB'] = "Stephanie"; define("_stephanie_", $Names['SB']); // Change Time Stamp to a readable time function TimeChange($format,$timestamp,$offset,$minoffset=null,$dst=null) { @@ -268,10 +268,10 @@ return date($format,mktime(gmdate('h')+$tsa['hour'],gmdate('i')+$tsa['minute'],g // Get Server offset function GetSeverZone() { $TestHour1 = date("H"); -putenv("OTZ=".getenv("TZ")); -putenv("TZ=GMT"); +@putenv("OTZ=".getenv("TZ")); +@putenv("TZ=GMT"); $TestHour2 = date("H"); -putenv("TZ=".getenv("OTZ")); +@putenv("TZ=".getenv("OTZ")); $TestHour3 = $TestHour1-$TestHour2; return $TestHour3; } // Get Server offset alt version diff --git a/inc/versioninfo.php b/inc/versioninfo.php index 8db029a..c8fab24 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: 04/26/2010 SVN 467 - Author: cooldude2k $ + $FileInfo: versioninfo.php - Last Update: 04/27/2010 SVN 470 - 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] = 3; $VER1[2] = 8; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 467; $RName = "iDB"; $SFName = "IntDB"; -$SVNDay[0] = 04; $SVNDay[1] = 26; $SVNDay[2] = 2010; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; +$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 470; $RName = "iDB"; $SFName = "IntDB"; +$SVNDay[0] = 04; $SVNDay[1] = 27; $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/install.php b/install.php index 7371664..a18fc1d 100644 --- a/install.php +++ b/install.php @@ -8,29 +8,41 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Revised BSD License for more details. - Copyright 2004-2009 iDB Support - http://idb.berlios.de/ - Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/ + Copyright 2004-2010 iDB Support - http://idb.berlios.de/ + Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/ iDB Installer made by Game Maker 2k - http://idb.berlios.de/support/category.php?act=view&id=2 - $FileInfo: install.php - Last Update: 01/26/2010 SVN 451 - Author: cooldude2k $ + $FileInfo: install.php - Last Update: 04/27/2010 SVN 470 - Author: cooldude2k $ *//* if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } -*/ +*//* Some ini setting changes uncomment if you need them. + Display PHP Errors */ //ini_set("display_errors", true); //ini_set("display_startup_errors", true); -error_reporting(E_ALL ^ E_NOTICE); +@error_reporting(E_ALL ^ E_NOTICE); /* Get rid of session id in urls */ //ini_set("session.use_trans_sid", false); //ini_set("session.use_cookies", true); //ini_set("session.use_only_cookies", true); //ini_set("url_rewriter.tags",""); -set_time_limit(30); ignore_user_abort(true); +@set_time_limit(30); @ignore_user_abort(true); /* Change session garbage collection settings */ //ini_set("session.gc_probability", 1); //ini_set("session.gc_divisor", 100); //ini_set("session.gc_maxlifetime", 1440); -ob_start(); +/* Change session hash type here */ +//@ini_set('session.hash_function', 1); +//@ini_set('session.hash_bits_per_character', 6); +/* Do not change anything below this line unless you know what you are doing */ +$Settings['clean_ob'] = "off"; +if($Settings['clean_ob']=="on") { +/* Check for other output handlers/buffers are open + and close and get the contents in an array */ +$numob = count(ob_list_handlers()); $iob = 0; +while ($iob < $numob) { + $old_ob_var[$iob] = ob_get_clean(); + ++$iob; } } ob_start(); if(ini_get("register_globals")) { if(!isset($SettDir['misc'])) { $SettDir['misc'] = "inc/misc/"; } require_once($SettDir['misc'].'killglobals.php'); } diff --git a/sql.php b/sql.php index 4b3aa56..b6036b3 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: 04/12/2010 SVN 466 - Author: cooldude2k $ + $FileInfo: sql.php - Last Update: 04/27/2010 SVN 470 - Author: cooldude2k $ */ /* Some ini setting changes uncomment if you need them. Display PHP Errors */ @@ -32,6 +32,10 @@ //@ini_set("session.gc_probability", 1); //@ini_set("session.gc_divisor", 100); //@ini_set("session.gc_maxlifetime", 1440); +/* Change session hash type here */ +//@ini_set('session.hash_function', 1); +//@ini_set('session.hash_bits_per_character', 6); +/* Do not change anything below this line unless you know what you are doing */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="sql.php"||$File3Name=="/sql.php") { header('Location: index.php'); @@ -384,15 +388,11 @@ if(!isset($_SESSION['CheckCookie'])) { if(isset($_COOKIE['SessPass'])&&isset($_COOKIE['MemberName'])) { require($SettDir['inc'].'prelogin.php'); } } require($SettDir['inc'].'groupsetup.php'); -if($Settings['board_offline']=="on"&&$GroupInfo['CanViewOffLine']!="yes"&& - $_GET['act']!="login"&&$_POST['act']!="loginmember"&&$_GET['act']!="login_now") { +if($Settings['board_offline']=="on"&&$GroupInfo['CanViewOffLine']!="yes") { header("Content-Type: text/plain; charset=".$Settings['charset']); sql_free_result($peresult); -ob_clean(); -if(!isset($Settings['offline_message'])) { - $Settings['offline_message'] = "Sorry the board is off line.\n". - "If you are a admin you can login by the admin cp.\n". - $Settings['idburl'].url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); } -echo $Settings['offline_message']; +ob_clean(); if(!isset($Settings['offline_text'])) { +echo "Sorry the board is off line.\nIf you are a admin you can login by the admin cp."; } +if(isset($Settings['offline_text'])) { echo $Settings['offline_text']; } //echo "\n".sql_errorno($SQLStat); gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } $dayconv = array('second' => 1, 'minute' => 60, 'hour' => 3600, 'day' => 86400, 'week' => 604800, 'month' => 2630880, 'year' => 31570560, 'decade' => 15705600); -- 2.11.0