OSDN Git Service

Add files via upload
[idb/iDB.git.git] / install.php
index ea45b0b..7fd4692 100644 (file)
@@ -8,11 +8,11 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     Revised BSD License for more details.
 
-    Copyright 2004-2011 iDB Support - http://idb.berlios.de/
-    Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
+    Copyright 2004-2017 iDB Support - http://idb.berlios.de/
+    Copyright 2004-2017 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: 07/21/2011 SVN 725 - Author: cooldude2k $
+    $FileInfo: install.php - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
 *//*
 if(ini_get("register_globals")) {
 require_once('inc/misc/killglobals.php'); }
@@ -33,10 +33,10 @@ if(!in_array("ini_set", $disfunc)) {
 //@ini_set("log_errors","On");
 @ini_set("docref_ext", "");
 @ini_set("docref_root", "http://php.net/"); }
-@error_reporting(E_ALL ^ E_NOTICE);
+if(!defined("E_DEPRECATED")) { define("E_DEPRECATED", 0); }
+@error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
 /* Get rid of session id in urls */
 if(!in_array("ini_set", $disfunc)) {
-//@ini_set("date.timezone","UTC"); 
 @ini_set("default_mimetype","text/html"); 
 @ini_set("zlib.output_compression", false);
 @ini_set("zlib.output_compression_level", -1);
@@ -59,6 +59,19 @@ if(file_exists('extrasettings.php')) {
        require_once('extrasettings.php'); }
 if(file_exists('extendsettings.php')) {
        require_once('extendsettings.php'); }
+if(!isset($Settings['qstr'])) { $Settings['qstr'] = null; }
+if(!isset($Settings['send_pagesize'])) { $Settings['send_pagesize'] = "on"; }
+$deftz = new DateTimeZone(date_default_timezone_get());
+$defcurtime = new DateTime();
+$defcurtime->setTimezone($deftz);
+$utctz = new DateTimeZone("UTC");
+$utccurtime = new DateTime();
+$utccurtime->setTimestamp($defcurtime->getTimestamp());
+$utccurtime->setTimezone($utctz);
+$servcurtime = new DateTime();
+$servcurtime->setTimestamp($defcurtime->getTimestamp());
+$usercurtime = new DateTime();
+$usercurtime->setTimestamp($defcurtime->getTimestamp());
 /* Do not change anything below this line unless you know what you are doing */
 if(!isset($Settings['clean_ob'])) { $Settings['clean_ob'] = "off"; }
 function idb_output_handler($buffer) { return $buffer; }
@@ -84,10 +97,11 @@ if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
        $preact['idb'] = "installing";  }
 $SetupDir['setup'] = "setup/"; $ConvertDir['setup'] = $SetupDir['setup']; $SetupDir['sql'] = "setup/sql/"; 
 $SetupDir['convert'] = "setup/convert/"; $ConvertDir['convert'] = $SetupDir['convert']; $ConvertDir['sql'] = $SetupDir['sql'];
-$Settings['output_type'] = "html"; $Settings['html_type'] = "xhtml10";
+$Settings['output_type'] = "html"; $Settings['html_type'] = "html5";
 $Settings['board_name'] = "Installing iDB"; 
 if(!isset($Settings['charset'])) {
-       $Settings['charset'] = "ISO-8859-15"; }
+       $Settings['charset'] = "ISO-8859-15"; 
+       header("Content-Type: text/html; charset=ISO-8859-15"); }
 if(isset($Settings['charset'])) {
 if($Settings['charset']!="ISO-8859-15"&&$Settings['charset']!="ISO-8859-1"&&
        $Settings['charset']!="UTF-8"&&$Settings['charset']!="CP866"&&
@@ -95,7 +109,8 @@ if($Settings['charset']!="ISO-8859-15"&&$Settings['charset']!="ISO-8859-1"&&
        $Settings['charset']!="KOI8-R"&&$Settings['charset']!="BIG5"&&
        $Settings['charset']!="GB2312"&&$Settings['charset']!="BIG5-HKSCS"&&
        $Settings['charset']!="Shift_JIS"&&$Settings['charset']!="EUC-JP") {
-       $Settings['charset'] = "ISO-8859-15"; } }
+       $Settings['charset'] = "ISO-8859-15"; 
+       header("Content-Type: text/html; charset=ISO-8859-15"); } }
 $SQLCharset = "latin1";
 if(isset($_POST['charset'])) { 
 if($_POST['charset']=="ISO-8859-1") {
@@ -105,9 +120,10 @@ if($_POST['charset']=="ISO-8859-15") {
 if($_POST['charset']=="UTF-8") {
        $SQLCharset = "utf8"; }
        $Settings['charset'] = $_POST['charset']; }
-if(!isset($_SERVER['HTTPS'])) { $_SERVER['HTTPS']=="off"; }
-if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
-if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
+$ServHTTPS = "off";
+if(isset($_SERVER['HTTPS'])) { $ServHTTPS=="off"; }
+if($ServHTTPS=="on") { $prehost = "https://"; }
+if($ServHTTPS!="on") { $prehost = "http://"; }
 $this_dir = null;
 if(dirname($_SERVER['SCRIPT_NAME'])!="."||
        dirname($_SERVER['SCRIPT_NAME'])!=null) {
@@ -129,6 +145,18 @@ require($SetupDir['setup'].'preinstall.php');
 require_once($SettDir['misc'].'utf8.php');
 require_once($SettDir['inc'].'filename.php');
 require_once($SettDir['inc'].'function.php');
+if($_GET['act']=="README"||$_GET['act']=="ReadME") { $_GET['act']="readme"; }
+if($_GET['act']=="readme"||$_GET['act']=="ReadMe") {
+header("Content-Type: text/plain; charset=".$Settings['charset']);
+require("README"); fix_amp(null); die(); }
+if($_GET['act']=="LICENSE"||$_GET['act']=="License") { $_GET['act']="license"; }
+if($_GET['act']=="license"||$_GET['act']=="BSD") {
+header("Content-Type: text/plain; charset=".$Settings['charset']);
+require("LICENSE"); fix_amp(null); die(); }
+if($_GET['act']=="TOS"||$_GET['act']=="ToS") { $_GET['act']="tos"; }
+if($_GET['act']=="tos"||$_GET['act']=="terms") {
+header("Content-Type: text/plain; charset=".$Settings['charset']);
+require("TOS"); fix_amp(null); die(); }
 $Settings['board_name'] = "Installing ".$RName; 
 function get_theme_values($matches) {
        global $ThemeSet;
@@ -145,7 +173,7 @@ foreach($ThemeSet AS $key => $value) {
        $ThemeSet[$key] = preg_replace_callback("/%\{([^\}]*)\}t/s", "get_time", $ThemeSet[$key]); 
        $ThemeSet[$key] = preg_replace("/\{percent\}p/s", "%", $ThemeSet[$key]); }
 require($SetupDir['convert'].'info.php');
-require($SettDir['inc'].'xhtml10.php');
+require($SetupDir['setup'].'html5.php');
 $Error = null; $_GET['time'] = false;
 ?>
 
@@ -156,13 +184,13 @@ $Error = null; $_GET['time'] = false;
 <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']; ?> </a></span>
+<span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker("install",".php","act=Part1","&","=",null,null); ?>">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']; ?> </a></span>
+<td class="TableColumn1"><span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker("install",".php","act=Part1","&","=",null,null); ?>">Install <?php echo $VerInfo['iDB_Ver_Show']; ?> </a></span>
 </td>
 </tr><?php } ?>
 <tr class="TableRow2">
@@ -172,8 +200,8 @@ $Error = null; $_GET['time'] = false;
 </th>
 </tr>
 <?php
-if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
-if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
+if($ServHTTPS=="on") { $prehost = "https://"; }
+if($ServHTTPS!="on") { $prehost = "http://"; }
 $this_dir = null;
 if(dirname($_SERVER['SCRIPT_NAME'])!="."||
        dirname($_SERVER['SCRIPT_NAME'])!=null) {
@@ -211,17 +239,21 @@ if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
 if ($_GET['act']=="Part4"&&$_POST['act']=="Part4") {
    require($SetupDir['setup'].'mkconfig.php'); } } } }
 if ($Error=="Yes") { ?>
-<br />Install Failed with errors. <a href="install.php?act=view">Click here</a> to restart install. &lt;_&lt;
+<br />Install Failed with errors. <a href="<?php echo url_maker("install",".php","act=Part1","&","=",null,null); ?>">Click here</a> to restart install. &lt;_&lt;
 <br /><br />
 </td>
 </tr>
 <?php } ?>
 <tr class="TableRow4">
-<td class="TableColumn4">&nbsp;<a href="index.php?act=ReadMe">Readme.txt</a>&nbsp;</td>
+<td class="TableColumn4">&nbsp;<a href="<?php echo url_maker("install",".php","act=ReadMe","&","=",null,null); ?>">Readme.txt</a>&nbsp;|&nbsp;<a href="<?php echo url_maker("install",".php","act=License","&","=",null,null); ?>">License.txt</a>&nbsp;</td>
 </tr>
 </table></div>
 <div>&nbsp;</div>
 <?php 
 require($SettDir['inc'].'endpage.php'); 
+?>
+</body>
+</html>
+<?php
 fix_amp(null);
 ?>