OSDN Git Service

Updated copyright dates also added anonymous accounts.
[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 iDB Support - http://idb.berlios.de/
12     Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
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: 6/16/2009 SVN 264 - 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 $SQLCharset = "latin1";
48 if(isset($_POST['charset'])) { 
49 if($_POST['charset']=="ISO-8859-1") {
50         $SQLCharset = "latin1"; }
51 if($_POST['charset']=="ISO-8859-15") {
52         $SQLCharset = "latin1"; }
53 if($_POST['charset']=="UTF-8") {
54         $SQLCharset = "utf8"; }
55         $Settings['charset'] = $_POST['charset']; }
56 require($SetupDir['setup'].'preinstall.php');
57 require_once($SettDir['inc'].'filename.php');
58 require_once($SettDir['inc'].'function.php');
59 require($SetupDir['convert'].'info.php');
60 require($SettDir['inc'].'xhtml10.php');
61 $Error = null; $_GET['time'] = false;
62 ?>
63
64 <title> <?php echo "Installing ".$VerInfo['iDB_Ver_Show']." on ".$OSType2; ?> </title>
65 </head>
66 <body>
67 <?php require($SettDir['inc'].'navbar.php'); ?>
68 <div class="Table1Border">
69 <?php if($ThemeSet['TableStyle']=="div") { ?>
70 <div class="TableRow1">
71 <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>
72 </div>
73 <?php } ?>
74 <table class="Table1">
75 <?php if($ThemeSet['TableStyle']=="table") { ?>
76 <tr class="TableRow1">
77 <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>
78 </td>
79 </tr><?php } ?>
80 <tr class="TableRow2">
81 <th class="TableColumn2" style="width: 100%; text-align: left;">
82 <span style="float: left;">&nbsp;Inert your install info: </span>
83 <span style="float: right;">&nbsp;</span>
84 </th>
85 </tr>
86 <?php
87 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
88 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
89 $this_dir = null;
90 if(dirname($_SERVER['SCRIPT_NAME'])!="."||
91         dirname($_SERVER['SCRIPT_NAME'])!=null) {
92 $this_dir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
93 if($this_dir==null||$this_dir==".") {
94 if(dirname($_SERVER['SCRIPT_NAME'])=="."||
95         dirname($_SERVER['SCRIPT_NAME'])==null) {
96 $this_dir = dirname($_SERVER['PHP_SELF'])."/"; } }
97 if($this_dir=="\/") { $this_dir="/"; }
98 $this_dir = str_replace("//", "/", $this_dir);
99 $idbdir = addslashes(str_replace("\\","/",dirname(__FILE__)."/"));
100 function sql_list_dbs() {
101    $result = mysql_query("SHOW DATABASES;");
102    while( $data = mysql_fetch_row($result) ) {
103        $array[] = $data[0];
104    } return $array; }
105 if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
106 if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
107 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
108    require($SetupDir['setup'].'license.php'); } } }
109 if ($_GET['act']=="Part2"&&$_POST['act']=="Part2") {
110 if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
111 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
112    require($SetupDir['setup'].'presetup.php'); } } }
113 if($_POST['SetupType']=="convert") {
114         require($ConvertInfo['ConvertFile']); }
115 if($_POST['SetupType']=="install") {
116 if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
117 if ($_GET['act']=="Part3"&&$_POST['act']=="Part3") {
118 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
119    require($SetupDir['setup'].'setup.php'); } } } }
120 if($_POST['SetupType']=="install") {
121 if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
122 if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
123 if ($_GET['act']=="Part4"&&$_POST['act']=="Part4") {
124    require($SetupDir['setup'].'mkconfig.php'); } } } }
125 if ($Error=="Yes") { ?>
126 <br />Install Failed with errors. <a href="install.php?act=view">Click here</a> to restart install. &lt;_&lt;
127 <br /><br />
128 </td>
129 </tr>
130 <?php } ?>
131 <tr class="TableRow4">
132 <td class="TableColumn4">&nbsp;<a href="index.php?act=ReadMe">Readme.txt</a>&nbsp;</td>
133 </tr>
134 </table></div>
135 <div>&nbsp;</div>
136 <?php require($SettDir['inc'].'endpage.php'); ?>
137 </body>
138 </html>
139 <?php fix_amp(null); ?>