3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
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.
11 Copyright 2004-2010 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2010 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
15 $FileInfo: install.php - Last Update: 04/27/2010 SVN 470 - Author: cooldude2k $
17 if(ini_get("register_globals")) {
18 require_once('inc/misc/killglobals.php'); }
19 *//* Some ini setting changes uncomment if you need them.
21 //ini_set("display_errors", true);
22 //ini_set("display_startup_errors", true);
23 @error_reporting(E_ALL ^ E_NOTICE);
24 /* Get rid of session id in urls */
25 //ini_set("session.use_trans_sid", false);
26 //ini_set("session.use_cookies", true);
27 //ini_set("session.use_only_cookies", true);
28 //ini_set("url_rewriter.tags","");
29 @set_time_limit(30); @ignore_user_abort(true);
30 /* Change session garbage collection settings */
31 //ini_set("session.gc_probability", 1);
32 //ini_set("session.gc_divisor", 100);
33 //ini_set("session.gc_maxlifetime", 1440);
34 /* Change session hash type here */
35 //@ini_set('session.hash_function', 1);
36 //@ini_set('session.hash_bits_per_character', 6);
37 /* Do not change anything below this line unless you know what you are doing */
38 $Settings['clean_ob'] = "off";
39 if($Settings['clean_ob']=="on") {
40 /* Check for other output handlers/buffers are open
41 and close and get the contents in an array */
42 $numob = count(ob_list_handlers()); $iob = 0;
43 while ($iob < $numob) {
44 $old_ob_var[$iob] = ob_get_clean();
45 ++$iob; } } ob_start();
46 if(ini_get("register_globals")) {
47 if(!isset($SettDir['misc'])) { $SettDir['misc'] = "inc/misc/"; }
48 require_once($SettDir['misc'].'killglobals.php'); }
49 if(!isset($preact['idb'])) { $preact['idb'] = null; }
50 if(!isset($_GET['act'])) { $_GET['act'] = null; }
51 if(!isset($_POST['act'])) { $_POST['act'] = null; }
52 if ($_GET['act']==null||$_GET['act']=="view") { $_GET['act']="Part1"; }
53 if ($_POST['act']==null||$_POST['act']=="view") { $_POST['act']="Part1"; }
54 $_TEG = array(null); $_TEG['part'] = preg_replace("/Part(1|2|3|4)/","\\1",$_GET['act']);
55 $_GET['act'] = strtolower($_GET['act']); if(isset($_TEG['part'])) {
56 if($_TEG['part']<=4&&$_TEG['part']>=1) { $_GET['act'] = "Part".$_TEG['part']; } }
57 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
58 $preact['idb'] = "installing"; }
59 $SetupDir['setup'] = "setup/"; $ConvertDir['setup'] = $SetupDir['setup']; $SetupDir['sql'] = "setup/sql/";
60 $SetupDir['convert'] = "setup/convert/"; $ConvertDir['convert'] = $SetupDir['convert']; $ConvertDir['sql'] = $SetupDir['sql'];
61 $Settings['output_type'] = "html"; $Settings['html_type'] = "xhtml10";
62 $Settings['board_name'] = "Installing iDB";
63 if(!isset($Settings['charset'])) {
64 $Settings['charset'] = "ISO-8859-15"; }
65 if(isset($Settings['charset'])) {
66 if($Settings['charset']!="ISO-8859-15"&&$Settings['charset']!="ISO-8859-1"&&
67 $Settings['charset']!="UTF-8"&&$Settings['charset']!="CP866"&&
68 $Settings['charset']!="Windows-1251"&&$Settings['charset']!="Windows-1252"&&
69 $Settings['charset']!="KOI8-R"&&$Settings['charset']!="BIG5"&&
70 $Settings['charset']!="GB2312"&&$Settings['charset']!="BIG5-HKSCS"&&
71 $Settings['charset']!="Shift_JIS"&&$Settings['charset']!="EUC-JP") {
72 $Settings['charset'] = "ISO-8859-15"; } }
73 $SQLCharset = "latin1";
74 if(isset($_POST['charset'])) {
75 if($_POST['charset']=="ISO-8859-1") {
76 $SQLCharset = "latin1"; }
77 if($_POST['charset']=="ISO-8859-15") {
78 $SQLCharset = "latin1"; }
79 if($_POST['charset']=="UTF-8") {
80 $SQLCharset = "utf8"; }
81 $Settings['charset'] = $_POST['charset']; }
82 if(!isset($_SERVER['HTTPS'])) { $_SERVER['HTTPS']=="off"; }
83 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
84 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
86 if(dirname($_SERVER['SCRIPT_NAME'])!="."||
87 dirname($_SERVER['SCRIPT_NAME'])!=null) {
88 $this_dir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
89 if($this_dir==null||$this_dir==".") {
90 if(dirname($_SERVER['SCRIPT_NAME'])=="."||
91 dirname($_SERVER['SCRIPT_NAME'])==null) {
92 $this_dir = dirname($_SERVER['PHP_SELF'])."/"; } }
93 if($this_dir=="\/") { $this_dir="/"; }
94 $this_dir = str_replace("//", "/", $this_dir);
95 $idbdir = addslashes(str_replace("\\","/",dirname(__FILE__)."/"));
96 if(!isset($_POST['BoardURL'])) {
97 $Settings['idburl'] = $prehost.$_SERVER["HTTP_HOST"].$this_dir; }
98 if(isset($_POST['BoardURL'])) {
99 $Settings['idburl'] = $_POST['BoardURL']; }
100 $Settings['qstr'] = "&";
101 $Settings['qsep'] = "=";
102 require($SetupDir['setup'].'preinstall.php');
103 require_once($SettDir['misc'].'utf8.php');
104 require_once($SettDir['inc'].'filename.php');
105 require_once($SettDir['inc'].'function.php');
106 require($SetupDir['convert'].'info.php');
107 require($SettDir['inc'].'xhtml10.php');
108 $Error = null; $_GET['time'] = false;
111 <title> <?php echo "Installing ".$VerInfo['iDB_Ver_Show']; ?> </title>
114 <?php require($SettDir['inc'].'navbar.php'); ?>
115 <div class="Table1Border">
116 <?php if($ThemeSet['TableStyle']=="div") { ?>
117 <div class="TableRow1">
118 <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>
121 <table class="Table1">
122 <?php if($ThemeSet['TableStyle']=="table") { ?>
123 <tr class="TableRow1">
124 <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>
127 <tr class="TableRow2">
128 <th class="TableColumn2" style="width: 100%; text-align: left;">
129 <span style="float: left;"> Inert your install info: </span>
130 <span style="float: right;"> </span>
134 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
135 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
137 if(dirname($_SERVER['SCRIPT_NAME'])!="."||
138 dirname($_SERVER['SCRIPT_NAME'])!=null) {
139 $this_dir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
140 if($this_dir==null||$this_dir==".") {
141 if(dirname($_SERVER['SCRIPT_NAME'])=="."||
142 dirname($_SERVER['SCRIPT_NAME'])==null) {
143 $this_dir = dirname($_SERVER['PHP_SELF'])."/"; } }
144 if($this_dir=="\/") { $this_dir="/"; }
145 $this_dir = str_replace("//", "/", $this_dir);
146 $idbdir = addslashes(str_replace("\\","/",dirname(__FILE__)."/"));
147 function sql_list_dbs() {
148 $result = sql_query("SHOW DATABASES;",$SQLStat);
149 while( $data = sql_fetch_row($result) ) {
152 if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
153 if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
154 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
155 require($SetupDir['setup'].'license.php'); } } }
156 if ($_GET['act']=="Part2"&&$_POST['act']=="Part2") {
157 if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
158 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
159 require($SetupDir['setup'].'presetup.php'); } } }
160 if($_POST['SetupType']=="convert") {
161 require($ConvertInfo['ConvertFile']); }
162 if($_POST['SetupType']=="install") {
163 if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
164 if ($_GET['act']=="Part3"&&$_POST['act']=="Part3") {
165 if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
166 require($SetupDir['setup'].'setup.php'); } } } }
167 if($_POST['SetupType']=="install") {
168 if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
169 if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
170 if ($_GET['act']=="Part4"&&$_POST['act']=="Part4") {
171 require($SetupDir['setup'].'mkconfig.php'); } } } }
172 if ($Error=="Yes") { ?>
173 <br />Install Failed with errors. <a href="install.php?act=view">Click here</a> to restart install. <_<
178 <tr class="TableRow4">
179 <td class="TableColumn4"> <a href="index.php?act=ReadMe">Readme.txt</a> </td>
183 <?php require($SettDir['inc'].'endpage.php'); ?>
186 <?php fix_amp(null); ?>