OSDN Git Service

Added new file /idb/inc/versioninfo.php and
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Tue, 17 Jul 2007 10:29:05 +0000 (10:29 +0000)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Tue, 17 Jul 2007 10:29:05 +0000 (10:29 +0000)
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
inc/navbar.php
inc/versioninfo.php [new file with mode: 0644]
mysql.php

index e254f91..b1cf425 100644 (file)
     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 = "<a href=\"http://intdb.sourceforge.net/\" onclick=\"window.open(this.href);return false;\">"; $iDBURL2 = $iDBURL1.$iDB."</a>";
-$DF2kURL1 = "<a href=\"http://df2k.berlios.de/\" onclick=\"window.open(this.href);return false;\">"; $DF2kURL2 = $DF2kURL1.$DF2k."</a>";
-$GM2kURL = "<a href=\"http://upload.idb.s1.jcink.com/\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";
-$iDBURL3 = "<a href=\"http://idb.berlios.de/\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">".$iDB."</a>";
-$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();
index 936703a..09c2932 100644 (file)
@@ -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") { ?>
 <a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Profile</a><?php echo $ThemeSet['LineDivider']; } 
                if($GroupInfo['CanPM']=="yes") { ?>
-<a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">MailBox&nbsp;(<?php echo $PMNumber; ?>)</a><?php echo $ThemeSet['LineDivider']; ?><?php } } ?>
+<a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>" title="<?php echo "You have ".$PMNumber." new messages."; ?>">MailBox</a><?php echo $ThemeSet['LineDivider']; ?><?php } } ?>
 <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Members</a><?php echo $ThemeSet['LineDivider']; ?>
 <a href="<?php echo url_maker($exfile['calendar'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['calendar'],$exqstr['calendar']); ?>">Calendar</a>&nbsp;</span>
 </td></tr>
diff --git a/inc/versioninfo.php b/inc/versioninfo.php
new file mode 100644 (file)
index 0000000..259aa3b
--- /dev/null
@@ -0,0 +1,57 @@
+<?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-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: versioninfo.php - Last Update: 07/17/2007 SVN 47 - Author: cooldude2k $
+*/
+$File3Name = basename($_SERVER['SCRIPT_NAME']);
+if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
+       require('index.php');
+       exit(); }
+       $rssurlon = 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 = 47; $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 = "<a href=\"http://intdb.sourceforge.net/\" onclick=\"window.open(this.href);return false;\">"; $iDBURL2 = $iDBURL1.$iDB."</a>";
+$DF2kURL1 = "<a href=\"http://df2k.berlios.de/\" onclick=\"window.open(this.href);return false;\">"; $DF2kURL2 = $DF2kURL1.$DF2k."</a>";
+$GM2kURL = "<a href=\"http://upload.idb.s1.jcink.com/\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";
+$iDBURL3 = "<a href=\"http://idb.berlios.de/\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">".$iDB."</a>";
+$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
index 6fd2f64..e88029f 100644 (file)
--- 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","<span style='color: ff0000;'>");
 @ini_set("error_append_string","</span>");
 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'])) {