OSDN Git Service

Updated Version Checker.
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Tue, 26 Jan 2010 19:26:52 +0000 (19:26 +0000)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Tue, 26 Jan 2010 19:26:52 +0000 (19:26 +0000)
It shows a green check mark when you have latest version.
It shows a red check mark when you have a old version.
It shows a yellow check mark when you have a new svn version.

git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@451 2b68903e-0b30-0410-9a39-a2e4f3c5be39

inc/admin/main.php
inc/versioninfo.php
install.php
setup/mkconfig.php

index bb9e6d8..5b901f2 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2009 iDB Support - http://idb.berlios.de/
     Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: main.php - Last Update: 12/31/2009 SVN 437 - Author: cooldude2k $
+    $FileInfo: main.php - Last Update: 01/26/2010 SVN 451 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="main.php"||$File3Name=="/main.php") {
@@ -238,6 +238,11 @@ while ($mi < $mnum) {
 $MGroups[$mi]=sql_result($mgresults,$mi,"Name");
 ++$mi; }
 sql_free_result($mgresults);
+if($Settings['vercheck']===1) {
+$AdminCheckURL = $VerCheckURL."&amp;name=".urlencode($iDBVerName)."&amp;redirect=on"; }
+if($Settings['vercheck']===2) {
+$Settings['bid'] = base64_encode(urlencode($Settings['idburl']));
+$AdminCheckURL = $VerCheckURL."&amp;bid=".$Settings['bid']."&amp;vercheck=newtype&amp;redirect=on"; }
 ?>
 <div class="TableMenuBorder">
 <?php if($ThemeSet['TableStyle']=="div") { ?>
@@ -261,7 +266,15 @@ sql_free_result($mgresults);
 <td class="TableMenuColumn3">
 <form style="display: inline;" method="post" id="acptool" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
 <table style="text-align: left;">
-<tr style="text-align: left;">
+<?php if($GroupInfo['ViewDBInfo']=="yes") { 
+?><tr style="text-align: left;">
+       <td style="width: 50%;"><span class="TextBoxLabel">Forum Software Version:</span></td>
+       <td style="width: 50%;"><?php echo $VerInfo['iDB_Ver_Show']; ?>&nbsp;<a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=vercheck",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>" onclick="window.open(this.href);return false;"><img src="<?php echo $AdminCheckURL; ?>" alt="Version Check: Click to see more info." title="Version Check: Click to see more info." /></a></td>
+</tr><?php if($OSType!=""&&isset($OSType)) { 
+?><tr style="text-align: left;">
+       <td style="width: 50%;"><span class="TextBoxLabel">Server Operating System:</span></td>
+       <td style="width: 50%;"><?php echo $OSType; ?></td>
+</tr><?php } } ?><tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="BoardURL">Insert The Board URL:</label></td>
        <td style="width: 50%;"><input type="text" class="TextBox" name="BoardURL" size="20" id="BoardURL" value="<?php echo $Settings['idburl']; ?>" /></td>
 </tr><tr style="text-align: left;">
@@ -295,7 +308,7 @@ while ($gi < $gnum) { ?>
 <?php ++$gi; } ?>
 </select></td>
 </tr><tr style="text-align: left;">
-       <td style="width: 50%;"><label class="TextBoxLabel" for="AdminValidate">Do you want to validate new members:</label></td>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="AdminValidate">Enable validate new members:</label></td>
        <td style="width: 50%;"><select size="1" class="TextBox" name="AdminValidate" id="AdminValidate">
        <option<?php if($Settings['AdminValidate']=="off") { echo " selected=\"selected\""; } ?> value="off">no</option>
        <option<?php if($Settings['AdminValidate']=="on") { echo " selected=\"selected\""; } ?> value="on">yes</option>
@@ -366,7 +379,7 @@ while ($gi < $gnum) { ?>
 <option value="30">40</option>
 </select></td>
 </tr><tr style="text-align: left;">
-       <td style="width: 50%;"><label class="TextBoxLabel" title="Can save some bandwidth." for="UseGzip">Do you want to HTTP Content Compression:</label></td>
+       <td style="width: 50%;"><label class="TextBoxLabel" title="Can save some bandwidth." for="UseGzip">Enable HTTP Compression:</label></td>
        <td style="width: 50%;"><select size="1" class="TextBox" name="UseGzip" id="UseGzip">
        <option<?php if($Settings['use_gzip']=="off") { echo " selected=\"selected\""; } ?> value="off">No</option>
        <option<?php if($Settings['use_gzip']=="on") { echo " selected=\"selected\""; } ?> value="on">Yes</option>
@@ -380,7 +393,7 @@ while ($gi < $gnum) { ?>
        <option<?php if($Settings['html_type']=="xhtml11") { echo " selected=\"selected\""; } ?> value="xhtml11">XHTML 1.1</option>
        </select></td>
 </tr><tr style="text-align: left;">
-       <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLLevel">HTML level only for XHTML 1.0:</label></td>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLLevel">HTML Level only for XHTML 1.0:</label></td>
        <td style="width: 50%;"><select size="1" class="TextBox" name="HTMLLevel" id="HTMLLevel">
        <option<?php if($Settings['html_level']=="Transitional") { echo " selected=\"selected\""; } ?> value="Transitional">Transitional</option>
        <option<?php if($Settings['html_level']=="Strict") { echo " selected=\"selected\""; } ?> value="Strict">Strict</option>
@@ -435,7 +448,7 @@ echo "<option value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
 <option<?php if($Settings['DefaultDST']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
 </select></td>
 </tr><tr style="text-align: left;">
-       <td style="width: 50%;"><label class="TextBoxLabel" for="DefaultTheme">Default CSS Theme for board:</label></td>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="DefaultTheme">Default Theme:</label></td>
        <td style="width: 50%;"><select id="DefaultTheme" name="DefaultTheme" class="TextBox"><?php
 $skindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
 if ($handle = opendir($skindir)) { $dirnum = null;
@@ -474,7 +487,7 @@ if ($handle = opendir($skindir)) { $dirnum = null;
        <option<?php if($Settings['enable_search']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
        </select></td>
 </tr><tr style="text-align: left;">
-       <td style="width: 50%;"><label class="TextBoxLabel" for="TestReferer">Test Referering URL with host name:</label></td>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="TestReferer">Test Referering URL:</label></td>
        <td style="width: 50%;"><select id="TestReferer" name="TestReferer" class="TextBox">
 <option<?php if($Settings['TestReferer']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
 <option<?php if($Settings['TestReferer']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
@@ -619,9 +632,6 @@ require('settings.php'); $admincptitle = " ".$ThemeSet['TitleDivider']." Databas
 <form style="display: inline;" method="post" id="acptool" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=sql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
 <table style="text-align: left;">
 <tr style="text-align: left;">
-       <td style="width: 50%;"><span class="TextBoxLabel">Forum Software Version:</span></td>
-       <td style="width: 50%;"><?php echo $VerInfo['iDB_Ver_Show']; ?></td>
-</tr><tr style="text-align: left;">
        <td style="width: 50%;"><span class="TextBoxLabel">Database Server:</span></td>
        <td style="width: 50%;"><?php echo $DBType['Server']; ?></td>
 </tr><?php if($Settings['sqltype']=="mysql"||
index b470643..462cfca 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: 01/25/2010 SVN 450 - Author: cooldude2k $
+    $FileInfo: versioninfo.php - Last Update: 01/26/2010 SVN 451 - 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] = 6; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 450; $RName = "iDB"; $SFName = "IntDB";
-$SVNDay[0] = 01; $SVNDay[1] = 25; $SVNDay[2] = 2010; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
+$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 451; $RName = "iDB"; $SFName = "IntDB";
+$SVNDay[0] = 01; $SVNDay[1] = 26; $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);
@@ -47,7 +47,8 @@ $PHPQA = "PHP-Quick-Arcade|http://quickarcade.jcink.com/"; $TFBB = "TextFileBB|h
 $PHPQA = explode("|",$PHPQA); $TFBB = explode("|",$TFBB);
 $PHPQA = "<a href=\"".$PHPQA[1]."\" title=\"".$PHPQA[0]."\" onclick=\"window.open(this.href);return false;\">".$PHPQA[0]."</a>";
 $TFBB = "<a href=\"".$TFBB[1]."\" title=\"".$TFBB[0]."\" onclick=\"window.open(this.href);return false;\">".$TFBB[0]."</a>";
-$PHPV1 = phpversion(); $PHPV2 = "PHP ".$PHPV1; $OSType = PHP_OS; // Check OS Name
+$PHPV1 = phpversion(); $PHPV2 = "PHP ".$PHPV1; $OSType = @php_uname("s"); $OSType .= " ".@php_uname("r");
+$OSType .= " ".@php_uname("m"); if($OSType==""||!isset($OSType)) { $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
index acddd22..7371664 100644 (file)
@@ -12,7 +12,7 @@
     Copyright 2004-2009 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: 12/29/2009 SVN 435 - Author: cooldude2k $
+    $FileInfo: install.php - Last Update: 01/26/2010 SVN 451 - Author: cooldude2k $
 *//*
 if(ini_get("register_globals")) {
 require_once('inc/misc/killglobals.php'); }
@@ -96,20 +96,20 @@ require($SettDir['inc'].'xhtml10.php');
 $Error = null; $_GET['time'] = false;
 ?>
 
-<title> <?php echo "Installing ".$VerInfo['iDB_Ver_Show']." on ".$OSType2; ?> </title>
+<title> <?php echo "Installing ".$VerInfo['iDB_Ver_Show']; ?> </title>
 </head>
 <body>
 <?php require($SettDir['inc'].'navbar.php'); ?>
 <div class="Table1Border">
 <?php if($ThemeSet['TableStyle']=="div") { ?>
 <div class="TableRow1">
-<span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="Install.php">Install <?php echo $VerInfo['iDB_Ver_Show']." on ".$OSType2; ?> </a></span>
+<span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="Install.php">Install <?php echo $VerInfo['iDB_Ver_Show']; ?> </a></span>
 </div>
 <?php } ?>
 <table class="Table1">
 <?php if($ThemeSet['TableStyle']=="table") { ?>
 <tr class="TableRow1">
-<td class="TableColumn1" colspan="2"><span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="Install.php">Install <?php echo $VerInfo['iDB_Ver_Show']." on ".$OSType2; ?> </a></span>
+<td class="TableColumn1" colspan="2"><span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="Install.php">Install <?php echo $VerInfo['iDB_Ver_Show']; ?> </a></span>
 </td>
 </tr><?php } ?>
 <tr class="TableRow2">
index 00fe3aa..383f6ee 100644 (file)
@@ -12,7 +12,7 @@
     Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
     iDB Installer made by Game Maker 2k - http://idb.berlios.net/
 
-    $FileInfo: mkconfig.php - Last Update: 01/22/2010 SVN 446 - Author: cooldude2k $
+    $FileInfo: mkconfig.php - Last Update: 01/26/2010 SVN 451 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="mkconfig.php"||$File3Name=="/mkconfig.php") {
@@ -225,7 +225,7 @@ $BoardSettings=$pretext2[0]."\n".
 "\$Settings['rss_ext'] = '.php';\n".
 "\$Settings['js_ext'] = '.js';\n".
 "\$Settings['showverinfo'] = 'on';\n".
-"\$Settings['vercheck'] = 2;\n".
+"\$Settings['vercheck'] = 1;\n".
 "\$Settings['enable_rss'] = 'on';\n".
 "\$Settings['enable_search'] = 'on';\n".
 "\$Settings['sessionid_in_urls'] = 'off';\n".