From c569f640ecbfb00faf8a97e5e7acddd772b9d8e5 Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Tue, 17 Jul 2007 10:29:05 +0000 Subject: [PATCH] Added new file /idb/inc/versioninfo.php and edited /idb/inc/navbar.php (Changed Mailbox to show number of new messages on title) and edited /idb/mysql.php a little git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@47 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- inc/filename.php | 41 +++----------------------------------- inc/navbar.php | 4 ++-- inc/versioninfo.php | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ mysql.php | 9 ++++----- 4 files changed, 66 insertions(+), 45 deletions(-) create mode 100644 inc/versioninfo.php diff --git a/inc/filename.php b/inc/filename.php index e254f91..b1cf425 100644 --- a/inc/filename.php +++ b/inc/filename.php @@ -11,13 +11,13 @@ Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/ Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/ - $FileInfo: filename.php - Last Update: 07/17/2007 SVN 46 - Author: cooldude2k $ + $FileInfo: filename.php - Last Update: 07/17/2007 SVN 47 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="filename.php"||$File3Name=="/filename.php") { require('index.php'); exit(); } - $rssurlon = false; +// Check and set stuff if(dirname($_SERVER['SCRIPT_NAME'])!=".") { $basedir = dirname($_SERVER['SCRIPT_NAME'])."/"; } if(dirname($_SERVER['SCRIPT_NAME'])==".") { @@ -40,42 +40,7 @@ if($Settings['rssurl']!=null&&$Settings['rssurl']!="") { here we make a fake version that always sends false out. :P */ if(!function_exists('get_magic_quotes_gpc')) { function get_magic_quotes_gpc() { return false; } } -// Version info stuff. :P -function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) { - $return_var = $proname." ".$reltype." ".$subver.".".$ver.".".$supver; - if($showsvn==false) { $showsvn = null; } - if($showsvn==true) { $return_var .= " SVN ".$svnver; } - if($showsvn!=true&&$showsvn!=null) { $return_var .= " ".$showsvn." ".$svnver; } - return $return_var; } -// Version number and date stuff. :P -$VER1[0] = 0; $VER1[1] = 1; $VER1[2] = 5; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 46; $RName = "iDB"; $SFName = "IntDB"; -$SVNDay[0] = 07; $SVNDay[1] = 17; $SVNDay[2] = 2007; $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); -$VerInfo['iDB_Full_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[0],$SubVerN,true); -$VerInfo['iDB_Ver_Show'] = $VerInfo['iDB_Ver_SVN']; $VerInfo['iDB_Full_Ver_Show'] = $VerInfo['iDB_Full_Ver_SVN']; -if(isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = $Settings['showverinfo']; } -if(!isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = false; } -// URLs and names and stuff. :P -$CD2k = "Cool Dude 2k"; $GM2k = "Game Maker 2k"; -$iDB = "Internet Discussion Boards"; $iTB = "Internet Tag Boards"; $DF2k = "Discussion Forums 2k"; $TB2k = "Tag Boards 2k"; -$iDBURL1 = ""; $iDBURL2 = $iDBURL1.$iDB.""; -$DF2kURL1 = ""; $DF2kURL2 = $DF2kURL1.$DF2k.""; -$GM2kURL = "".$GM2k.""; -$iDBURL3 = "".$iDB.""; -$PHPQA = "PHP-Quick-Arcade"; $PHPV1 = @phpversion(); $PHPV2 = "PHP ".$PHPV1; $OSType = PHP_OS; // Check OS Name -if($OSType=="WINNT") { $OSType="Windows NT"; } if($OSType=="WIN32") { $OSType="Windows 9x"; } -$OSType2 = $PHPV2." / ".$OSType; $ZENDV1 = @zend_version(); $ZENDV2 = "Zend engine ".$ZENDV1; -// Show or hide the version number -if($idbmisc['showverinfo']==true) { -@header("X-iDB-Powered-By: ".$VerInfo['iDB_Ver_Show']); -@header("Generator: ".$VerInfo['iDB_Ver_Show']); } -if($idbmisc['showverinfo']!=true) { -@header("X-iDB-Powered-By: iDB"); -//@header("X-Powered-By: PHP"); -@header("Generator: iDB"); } +require_once($SettDir['inc'].'versioninfo.php'); //File naming stuff. <_< $exfile = array(); $exfilerss = array(); $exqstr = array(); $exqstrrss = array(); diff --git a/inc/navbar.php b/inc/navbar.php index 936703a..09c2932 100644 --- a/inc/navbar.php +++ b/inc/navbar.php @@ -11,7 +11,7 @@ Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/ Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/ - $FileInfo: navbar.php - Last Update: 07/17/2007 SVN 46 - Author: cooldude2k $ + $FileInfo: navbar.php - Last Update: 07/17/2007 SVN 47 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="navbar.php"||$File3Name=="/navbar.php") { @@ -50,7 +50,7 @@ if($ThemeSet['LogoStyle']!=null) { $logostyle = "style=\"".$ThemeSet['LogoStyle' if($GroupInfo['CanEditProfile']=="yes") { ?> ">Profile -">MailBox () +" title="">MailBox ">Members ">Calendar  diff --git a/inc/versioninfo.php b/inc/versioninfo.php new file mode 100644 index 0000000..259aa3b --- /dev/null +++ b/inc/versioninfo.php @@ -0,0 +1,57 @@ +"; $iDBURL2 = $iDBURL1.$iDB.""; +$DF2kURL1 = ""; $DF2kURL2 = $DF2kURL1.$DF2k.""; +$GM2kURL = "".$GM2k.""; +$iDBURL3 = "".$iDB.""; +$PHPQA = "PHP-Quick-Arcade"; $PHPV1 = @phpversion(); $PHPV2 = "PHP ".$PHPV1; $OSType = PHP_OS; // Check OS Name +if($OSType=="WINNT") { $OSType="Windows NT"; } if($OSType=="WIN32") { $OSType="Windows 9x"; } +$OSType2 = $PHPV2." / ".$OSType; $ZENDV1 = @zend_version(); $ZENDV2 = "Zend engine ".$ZENDV1; +// Show or hide the version number +if($idbmisc['showverinfo']==true) { +@header("X-iDB-Powered-By: ".$VerInfo['iDB_Ver_Show']); +@header("Generator: ".$VerInfo['iDB_Ver_Show']); } +if($idbmisc['showverinfo']!=true) { +@header("X-iDB-Powered-By: iDB"); +//@header("X-Powered-By: PHP"); +@header("Generator: iDB"); } +?> \ No newline at end of file diff --git a/mysql.php b/mysql.php index 6fd2f64..e88029f 100644 --- a/mysql.php +++ b/mysql.php @@ -11,7 +11,7 @@ Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/ Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/ - $FileInfo: mysql.php - Last Update: 07/15/2007 SVN 44 - Author: cooldude2k $ + $FileInfo: mysql.php - Last Update: 07/17/2007 SVN 47 - Author: cooldude2k $ */ @error_reporting(E_ALL ^ E_NOTICE); @ini_set('session.use_trans_sid', false); @@ -22,6 +22,8 @@ if ($File3Name=="mysql.php"||$File3Name=="/mysql.php") { if(@ini_get("register_globals")) { $PreDir['misc'] = "inc/misc/"; require_once($PreDir['misc'].'killglobals.php'); unset($PreDir); } require_once('settings.php'); +if(!isset($Settings['sqldb'])) { @header('Location: install.php'); die(); } +if(!isset($Settings['sqlhost'])) { $Settings['sqlhost'] = "localhost"; } @ini_set("error_prepend_string",""); @ini_set("error_append_string",""); if($Settings['fixpathinfo']==true) { @@ -111,10 +113,7 @@ if(stristr($_SERVER["HTTP_ACCEPT"],"application/javascript") ) { @header("Content-Type: text/javascript; charset=".$Settings['charset']); } } require($SettDir['inc'].'javascript.php'); gzip_page($Settings['use_gzip'],$GZipEncode['Type']); die(); } -if(CheckFiles("install.php")!=true) { - if($Settings['sqldb']==null) { - redirect("location",$basedir."install.php"); } -@ConnectMysql($Settings['sqlhost'],$Settings['sqluser'],$Settings['sqlpass'],$Settings['sqldb']); } +@ConnectMysql($Settings['sqlhost'],$Settings['sqluser'],$Settings['sqlpass'],$Settings['sqldb']); if(CheckFiles("install.php")==true) { $Settings['board_name'] = "Installing iDB"; } if(isset($_SESSION['CheckCookie'])) { -- 2.11.0