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