OSDN Git Service

Small bug fix to Low View (Lo-Fi).
[idb/iDB.git.git] / install.php
1 <?php
2 /*
3     This program is free software; you can redistribute it and/or modify
4     it under the terms of the Revised BSD License.
5
6     This program is distributed in the hope that it will be useful,
7     but WITHOUT ANY WARRANTY; without even the implied warranty of
8     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9     Revised BSD License for more details.
10
11     Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/
13     iDB Installer made by Game Maker 2k - http://idb.berlios.de/support/category.php?act=view&id=2
14
15     $FileInfo: install.php - Last Update: 5/01/2009 SVN 247 - Author: cooldude2k $
16 */
17 if(@ini_get("register_globals")) {
18 require_once('inc/misc/killglobals.php'); }
19 @error_reporting(E_ALL ^ E_NOTICE);
20 if(@ini_get("register_globals")) { 
21         if(!isset($SettDir['misc'])) { $SettDir['misc'] = "inc/misc/"; }
22         require_once($SettDir['misc'].'killglobals.php'); }
23 if(!isset($preact['idb'])) { $preact['idb'] = null; }
24 if(!isset($_GET['act'])) { $_GET['act'] = null; }
25 if(!isset($_POST['act'])) { $_POST['act'] = null; }
26 if ($_GET['act']==null||$_GET['act']=="view") { $_GET['act']="Part1"; }
27 if ($_POST['act']==null||$_POST['act']=="view") { $_POST['act']="Part1"; }
28 $_TEG = array(null); $_TEG['part'] = preg_replace("/Part(1|2|3|4)/","\\1",$_GET['act']);
29 $_GET['act'] = strtolower($_GET['act']); if(isset($_TEG['part'])) {
30 if($_TEG['part']<=4&&$_TEG['part']>=1) { $_GET['act'] = "Part".$_TEG['part']; } }
31 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
32         $preact['idb'] = "installing";  }
33 $SetupDir['setup'] = "setup/"; $ConvertDir['setup'] = $SetupDir['setup'];
34 $SetupDir['convert'] = "setup/convert/"; $ConvertDir['convert'] = $SetupDir['convert'];
35 $Settings['output_type'] = "html"; $Settings['html_type'] = "xhtml10";
36 $Settings['board_name'] = "Installing iDB"; 
37 if(!isset($Settings['charset'])) {
38         $Settings['charset'] = "ISO-8859-15"; }
39 if(isset($Settings['charset'])) {
40 if($Settings['charset']!="ISO-8859-15"&&$Settings['charset']!="ISO-8859-1"&&
41         $Settings['charset']!="UTF-8"&&$Settings['charset']!="CP866"&&
42         $Settings['charset']!="Windows-1251"&&$Settings['charset']!="Windows-1252"&&
43         $Settings['charset']!="KOI8-R"&&$Settings['charset']!="BIG5"&&
44         $Settings['charset']!="GB2312"&&$Settings['charset']!="BIG5-HKSCS"&&
45         $Settings['charset']!="Shift_JIS"&&$Settings['charset']!="EUC-JP") {
46         $Settings['charset'] = "ISO-8859-15"; } }
47 require($SetupDir['setup'].'preinstall.php');
48 require_once($SettDir['inc'].'filename.php');
49 require_once($SettDir['inc'].'function.php');
50 require($SetupDir['convert'].'info.php');
51 require($SettDir['inc'].'xhtml10.php');
52 $Error = null; $_GET['time'] = false;
53 ?>
54
55 <title> <?php echo "Installing ".$VerInfo['iDB_Ver_Show']." on ".$OSType2; ?> </title>
56 </head>
57 <body>
58 <?php require($SettDir['inc'].'navbar.php'); ?>
59 <div class="Table1Border">
60 <?php if($ThemeSet['TableStyle']=="div") { ?>
61 <div class="TableRow1">
62 <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>
63 </div>
64 <?php } ?>
65 <table class="Table1">
66 <?php if($ThemeSet['TableStyle']=="table") { ?>
67 <tr class="TableRow1">
68 <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>
69 </td>
70 </tr><?php } ?>
71 <tr class="TableRow2">
72 <th class="TableColumn2" style="width: 100%; text-align: left;">
73 <span style="float: left;">&nbsp;Inert your install info: </span>
74 <span style="float: right;">&nbsp;</span>
75 </th>
76 </tr>
77 <?php
78 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
79 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
80 $this_dir = null;
81 if(dirname($_SERVER['SCRIPT_NAME'])!="."||
82         dirname($_SERVER['SCRIPT_NAME'])!=null) {
83 $this_dir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
84 if($this_dir==null||$this_dir==".") {
85 if(dirname($_SERVER['SCRIPT_NAME'])=="."||
86         dirname($_SERVER['SCRIPT_NAME'])==null) {
87 $this_dir = dirname($_SERVER['PHP_SELF'])."/"; } }
88 if($this_dir=="\/") { $this_dir="/"; }
89 $this_dir = str_replace("//", "/", $this_dir);
90 $idbdir = addslashes(str_replace("\\","/",dirname(__FILE__)."/"));
91 function sql_list_dbs() {
92    $result = mysql_query("SHOW DATABASES;");
93    while( $data = mysql_fetch_row($result) ) {
94        $array[] = $data[0];
95    } return $array; }
96 if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
97 if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
98 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
99    require($SetupDir['setup'].'license.php'); } } }
100 if ($_GET['act']=="Part2"&&$_POST['act']=="Part2") {
101 if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
102 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
103    require($SetupDir['setup'].'presetup.php'); } } }
104 if($_POST['SetupType']=="convert") {
105         require($ConvertInfo['ConvertFile']); }
106 if($_POST['SetupType']=="install") {
107 if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
108 if ($_GET['act']=="Part3"&&$_POST['act']=="Part3") {
109 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
110    require($SetupDir['setup'].'setup.php'); } } } }
111 if($_POST['SetupType']=="install") {
112 if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
113 if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
114 if ($_GET['act']=="Part4"&&$_POST['act']=="Part4") {
115    require($SetupDir['setup'].'/mkconfig.php'); } } } }
116 if ($Error=="Yes") { ?>
117 <br />Install Failed with errors. <a href="install.php?act=view">Click here</a> to restart install. &lt;_&lt;
118 <br /><br />
119 </td>
120 </tr>
121 <?php } ?>
122 <tr class="TableRow4">
123 <td class="TableColumn4">&nbsp;<a href="index.php?act=ReadMe">Readme.txt</a>&nbsp;</td>
124 </tr>
125 </table></div>
126 <div>&nbsp;</div>
127 <?php require($SettDir['inc'].'endpage.php'); ?>
128 </body>
129 </html>
130 <?php fix_amp(null); ?>