Small update
[iDB.git] / setup / setup.php
blob07f2bf6e74b3e329fa707a7705b3de1e11ff7bc2
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.
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-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
13 iDB Installer made by Game Maker 2k - http://idb.berlios.net/
15 $FileInfo: setup.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
17 $File3Name = basename($_SERVER['SCRIPT_NAME']);
18 if ($File3Name=="setup.php"||$File3Name=="/setup.php") {
19 require('index.php');
20 exit(); }
21 if(!isset($SetupDir['setup'])) { $SetupDir['setup'] = "setup/"; }
22 if(!isset($SetupDir['convert'])) { $SetupDir['convert'] = "setup/convert/"; }
24 <tr class="TableRow3">
25 <td class="TableColumn3">
26 <?php
27 $checkfile="settings.php";
28 $iDBRDate = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
29 $iDBRSVN = $VER2[2]." ".$SubVerN;
30 $LastUpdateS = "Last Update: ".$iDBRDate." ".$iDBRSVN;
31 $pretext = "<?php\n/*\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n Revised BSD License for more details.\n\n Copyright 2004-".$SVNDay[2]." iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1\n Copyright 2004-".$SVNDay[2]." Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2\n iDB Installer made by Game Maker 2k - http://idb.berlios.net/\n\n \$FileInfo: settings.php & settingsbak.php - ".$LastUpdateS." - Author: cooldude2k \$\n*/\n";
32 $pretext2 = array("/* Board Setting Section Begins */\n\$Settings = array();","/* Board Setting Section Ends \n Board Info Section Begins */\n\$SettInfo = array();","/* Board Setting Section Ends \n Board Dir Section Begins */\n\$SettDir = array();","/* Board Dir Section Ends */");
33 $settcheck = "\$File3Name = basename(\$_SERVER['SCRIPT_NAME']);\nif (\$File3Name==\"settings.php\"||\$File3Name==\"/settings.php\"||\n \$File3Name==\"settingsbak.php\"||\$File3Name==\"/settingsbak.php\") {\n header('Location: index.php');\n exit(); }\n";
34 $BoardSettingsBak = $pretext.$settcheck;
35 $BoardSettings = $pretext.$settcheck;
36 $fp = fopen("settings.php","w+");
37 fwrite($fp, $BoardSettings);
38 fclose($fp);
39 // cp("settings.php","settingsbak.php");
40 $fp = fopen("settingsbak.php","w+");
41 fwrite($fp, $BoardSettingsBak);
42 fclose($fp);
43 if (!is_writable($checkfile)) {
44 echo "<br />Settings is not writable.";
45 chmod("settings.php",0755); $Error="Yes";
46 chmod("settingsbak.php",0755);
47 } else { /* settings.php is writable install iDB. ^_^ */ }
48 if(!function_exists("mysql_connect")&&!function_exists("mysqli_connect")&&
49 !function_exists("pg_connect")&&!function_exists("sqlite_open")&&!class_exists('SQLite3')&&
50 !function_exists("cubrid_connect")) { $Error="Yes";
51 echo "<span class=\"TableMessage\">You need to enbale a database php extension to install ".$VerInfo['iDB_Ver_Show']." on this server.<br />\n";
52 echo "You can use MySQL, MySQLi, PostgreSQL, or SQLite</span>"; }
53 if ($Error!="Yes") {
54 $StatSQL = sql_connect_db($_POST['DatabaseHost'],$_POST['DatabaseUserName'],$_POST['DatabasePassword']);
55 if(!$StatSQL) { $Error="Yes";
56 echo "<span class=\"TableMessage\">";
57 echo "<br />".sql_errorno($StatSQL)."\n</span>\n"; } }
58 if ($Error!="Yes") {
59 $iDBRDate = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
60 $iDBRSVN = $VER2[2]." ".$SubVerN;
61 $LastUpdateS = "Last Update: ".$iDBRDate." ".$iDBRSVN;
62 $pretext = "<?php\n/*\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n Revised BSD License for more details.\n\n Copyright 2004-".$SVNDay[2]." iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1\n Copyright 2004-".$SVNDay[2]." Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2\n iDB Installer made by Game Maker 2k - http://idb.berlios.net/\n\n \$FileInfo: settings.php & settingsbak.php - ".$LastUpdateS." - Author: cooldude2k \$\n*/\n";
63 $BoardSettings=$pretext."\$Settings = array();\n\$Settings['sqlhost'] = '".$_POST['DatabaseHost']."';\n\$Settings['sqluser'] = '".$_POST['DatabaseUserName']."';\n\$Settings['sqlpass'] = '".$_POST['DatabasePassword']."';\n?>";
64 $fp = fopen("./settings.php","w+");
65 fwrite($fp, $BoardSettings);
66 fclose($fp);
67 // cp("settings.php","settingsbak.php");
68 $fp = fopen("./settingsbak.php","w+");
69 fwrite($fp, $BoardSettings);
70 fclose($fp);
71 $gettzinfofromjs = date_default_timezone_get();
72 if(isset($_COOKIE['getusertz']) && in_array($_COOKIE['getusertz'], DateTimeZone::listIdentifiers())) {
73 $gettzinfofromjs = $_COOKIE['getusertz']; }
74 // http://www.tutorialspoint.com/php/php_function_timezone_identifiers_list.htm
75 $timezone_identifiers = DateTimeZone::listIdentifiers();
76 //$timezone_identifiers = timezone_identifiers_list();
77 $zonelist['africa'] = array();
78 $zonelist['america'] = array();
79 $zonelist['antarctica'] = array();
80 $zonelist['arctic'] = array();
81 $zonelist['asia'] = array();
82 $zonelist['atlantic'] = array();
83 $zonelist['australia'] = array();
84 $zonelist['europe'] = array();
85 $zonelist['indian'] = array();
86 $zonelist['pacific'] = array();
87 $zonelist['etcetera'] = array();
88 for ($i=0; $i < count($timezone_identifiers); $i++) {
89 $zonelookup = explode("/", $timezone_identifiers[$i]);
90 if(count($zonelookup)==1) { array_push($zonelist['etcetera'], array($timezone_identifiers[$i], $timezone_identifiers[$i])); }
91 if(count($zonelookup)>1) {
92 if($zonelookup[0]=="Africa") {
93 if(count($zonelookup)==2) {
94 array_push($zonelist['africa'], array($zonelookup[1], $timezone_identifiers[$i])); }
95 if(count($zonelookup)==3) {
96 array_push($zonelist['africa'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
97 if($zonelookup[0]=="America") {
98 if(count($zonelookup)==2) {
99 array_push($zonelist['america'], array($zonelookup[1], $timezone_identifiers[$i])); }
100 if(count($zonelookup)==3) {
101 array_push($zonelist['america'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
102 if($zonelookup[0]=="Antarctica") {
103 if(count($zonelookup)==2) {
104 array_push($zonelist['antarctica'], array($zonelookup[1], $timezone_identifiers[$i])); }
105 if(count($zonelookup)==3) {
106 array_push($zonelist['antarctica'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
107 if($zonelookup[0]=="Arctic") {
108 if(count($zonelookup)==2) {
109 array_push($zonelist['arctic'], array($zonelookup[1], $timezone_identifiers[$i])); }
110 if(count($zonelookup)==3) {
111 array_push($zonelist['arctic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
112 if($zonelookup[0]=="Asia") {
113 if(count($zonelookup)==2) {
114 array_push($zonelist['asia'], array($zonelookup[1], $timezone_identifiers[$i])); }
115 if(count($zonelookup)==3) {
116 array_push($zonelist['asia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
117 if($zonelookup[0]=="Atlantic") {
118 if(count($zonelookup)==2) {
119 array_push($zonelist['atlantic'], array($zonelookup[1], $timezone_identifiers[$i])); }
120 if(count($zonelookup)==3) {
121 array_push($zonelist['atlantic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
122 if($zonelookup[0]=="Australia") {
123 if(count($zonelookup)==2) {
124 array_push($zonelist['australia'], array($zonelookup[1], $timezone_identifiers[$i])); }
125 if(count($zonelookup)==3) {
126 array_push($zonelist['australia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
127 if($zonelookup[0]=="Europe") {
128 if(count($zonelookup)==2) {
129 array_push($zonelist['europe'], array($zonelookup[1], $timezone_identifiers[$i])); }
130 if(count($zonelookup)==3) {
131 array_push($zonelist['europe'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
132 if($zonelookup[0]=="Indian") {
133 if(count($zonelookup)==2) {
134 array_push($zonelist['indian'], array($zonelookup[1], $timezone_identifiers[$i])); }
135 if(count($zonelookup)==3) {
136 array_push($zonelist['indian'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
137 if($zonelookup[0]=="Pacific") {
138 if(count($zonelookup)==2) {
139 array_push($zonelist['pacific'], array($zonelookup[1], $timezone_identifiers[$i])); }
140 if(count($zonelookup)==3) {
141 array_push($zonelist['pacific'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
145 <form style="display: inline;" method="post" id="install" action="<?php echo url_maker("install",".php","act=Part4","&","=",null,null); ?>">
146 <table style="text-align: left;">
147 <tr style="text-align: left;">
148 <td style="width: 50%;"><label class="TextBoxLabel" for="NewBoardName">Insert Board Name:</label></td>
149 <td style="width: 50%;"><input type="text" name="NewBoardName" class="TextBox" id="NewBoardName" size="20" /></td>
150 </tr><tr>
151 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseName">Insert Database Name:</label></td>
152 <td style="width: 50%;"><input type="text" name="DatabaseName" class="TextBox" id="DatabaseName" size="20" />
153 <?php /*<select id="dblist" name="dblist" class="TextBox" onchange="document.install.DatabaseName.value=this.value">
154 <option value=" ">none on list</option>
155 <?php $dblist = sql_list_dbs();
156 $num = count($dblist); $i = 0;
157 while ($i < $num) {
158 echo "<option value=\"".$dblist[$i]."\">";
159 echo $dblist[$i]."</option>\n";
160 ++$i;
161 } ?></select><?php */ ?></td>
162 </tr><tr>
163 <td style="width: 50%;"><label class="TextBoxLabel" for="tableprefix">Insert Table Prefix:<br /></label></td>
164 <td style="width: 50%;"><input type="text" name="tableprefix" class="TextBox" id="tableprefix" value="idb_" size="20" /></td>
165 </tr><tr>
166 <td style="width: 50%;"><label class="TextBoxLabel" for="AdminUser">Insert Admin User Name:</label></td>
167 <td style="width: 50%;"><input type="text" name="AdminUser" class="TextBox" id="AdminUser" size="20" /></td>
168 </tr><tr>
169 <td style="width: 30%;"><label class="TextBoxLabel" for="AdminEmail">Insert Admin Email:</label></td>
170 <td style="width: 70%;"><input type="email" class="TextBox" name="AdminEmail" size="20" id="AdminEmail" /></td>
171 </tr><tr>
172 <td style="width: 50%;"><label class="TextBoxLabel" for="AdminPassword">Insert Admin Password:</label></td>
173 <td style="width: 50%;"><input type="password" name="AdminPasswords" class="TextBox" id="AdminPassword" size="20" maxlength="30" /></td>
174 </tr><tr>
175 <td style="width: 50%;"><label class="TextBoxLabel" for="ReaPassword">ReInsert Admin Password:</label></td>
176 <td style="width: 50%;"><input type="password" class="TextBox" name="ReaPassword" size="20" id="ReaPassword" maxlength="30" /></td>
177 </tr><tr>
178 <td style="width: 50%;"><label class="TextBoxLabel" for="BoardURL">Insert The Board URL:</label></td>
179 <td style="width: 50%;"><input type="url" class="TextBox" name="BoardURL" size="20" id="BoardURL" value="<?php echo $prehost.$_SERVER['HTTP_HOST'].$this_dir; ?>" /></td>
180 </tr><tr>
181 <td style="width: 50%;"><label class="TextBoxLabel" for="WebURL">Insert The WebSite URL:</label></td>
182 <td style="width: 50%;"><input type="url" class="TextBox" name="WebURL" size="20" id="WebURL" value="<?php echo $prehost.$_SERVER['HTTP_HOST']."/"; ?>" /></td>
183 </tr><?php if($_POST['DatabaseType']=="mysql"||$_POST['DatabaseType']=="mysqli") { ?><tr>
184 <td style="width: 50%;"><label class="TextBoxLabel" for="sqlcollate">MySQL Collate:</label></td>
185 <td style="width: 50%;"><select size="1" class="TextBox" name="sqlcollate" id="sqlcollate">
186 <?php if($_POST['charset']=="ISO-8859-1"||$_POST['charset']=="ISO-8859-15") { ?>
187 <option value="latin1_general_ci">Latin1 Case-Insensitive</option>
188 <option value="latin1_general_cs">Latin1 Case-Sensitive</option>
189 <option value="latin1_bin">Latin1 Binary</option>
190 <option value="ascii_generel_ci">ASCII Case-Insensitive</option>
191 <option value="ascii_bin">ASICC Binary</option>
192 <?php } if($_POST['charset']=="UTF-8") { ?>
193 <option value="utf8_unicode_ci">UTF-8 Unicode Case-Insensitive</option>
194 <option value="utf8_general_ci">UTF-8 General Case-Insensitive</option>
195 <option value="utf8_bin">UTF-8 Binary</option>
196 <option value="utf8mb4_unicode_ci">UTF-8 Multibyte Unicode Case-Insensitive</option>
197 <option value="utf8mb4_general_ci">UTF-8 Multibyte General Case-Insensitive</option>
198 <option value="utf8mb4_bin">UTF-8 Multibyte Binary</option>
199 <?php } ?>
200 </select></td>
201 </tr><?php } ?><tr>
202 <td style="width: 50%;"><label class="TextBoxLabel" title="Can save some bandwidth." for="UseGzip">Enable HTTP Compression:</label></td>
203 <td style="width: 50%;"><select size="1" class="TextBox" name="GZip" id="UseGzip">
204 <option value="off">No</option>
205 <option value="on">Yes</option>
206 <option value="gzip">Only GZip</option>
207 <option value="deflate">Only Deflate</option>
208 </select></td>
209 </tr><tr>
210 <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLType">HTML Type to use:</label></td>
211 <td style="width: 50%;"><select size="1" class="TextBox" name="HTMLType" id="HTMLType">
212 <!--<option value="xhtml10">XHTML 1.0</option>-->
213 <!--<option value="xhtml11">XHTML 1.1</option>-->
214 <option value="html5">HTML 5</option>
215 <option value="xhtml5">XHTML 5</option>
216 </select></td>
217 </tr><tr>
218 <td style="width: 50%;"><label class="TextBoxLabel" for="OutPutType">Output file as:</label></td>
219 <td style="width: 50%;"><select size="1" class="TextBox" name="OutPutType" id="OutPutType">
220 <option value="html">HTML</option>
221 <option value="xhtml">XHTML</option>
222 </select></td>
223 </tr><tr>
224 <td style="width: 50%;"><label class="TextBoxLabel" title="Store userinfo as a cookie so you dont need to login again." for="storecookie">Store as cookie?</label></td>
225 <td style="width: 50%;"><select id="storecookie" name="storecookie" class="TextBox">
226 <option value="true">Yes</option>
227 <option value="false">No</option>
228 </select></td>
229 </tr><tr>
230 <td style="width: 50%;"><label class="TextBoxLabel" for="usehashtype">Hash user passwords with?</label></td>
231 <td style="width: 50%;"><select id="usehashtype" name="usehashtype" class="TextBox">
232 <?php // PHP 5 hash algorithms to functions :o
233 if(function_exists('hash')&&function_exists('hash_algos')) {
234 if(in_array("md2",hash_algos())) { ?>
235 <option value="md2">MD2</option>
236 <?php } if(in_array("md4",hash_algos())) { ?>
237 <option value="md4">MD4</option>
238 <?php } if(in_array("md5",hash_algos())) { ?>
239 <option value="md5">MD5</option>
240 <?php } if(in_array("gost",hash_algos())) { ?>
241 <option value="gost">GOST</option>
242 <?php } if(in_array("joaat",hash_algos())) { ?>
243 <option value="joaat">JOAAT</option>
244 <?php } if(in_array("sha1",hash_algos())) { ?>
245 <option value="sha1">SHA1</option>
246 <?php } if(in_array("sha224",hash_algos())) { ?>
247 <option value="sha224">SHA224</option>
248 <?php } if(in_array("sha256",hash_algos())) { ?>
249 <option value="sha256" selected="selected">SHA256</option>
250 <?php } if(in_array("sha384",hash_algos())) { ?>
251 <option value="sha384">SHA384</option>
252 <?php } if(in_array("sha512",hash_algos())) { ?>
253 <option value="sha512">SHA512</option>
254 <?php } if(in_array("sha3-224",hash_algos())) { ?>
255 <option value="sha3-224">SHA3-224</option>
256 <?php } if(in_array("sha3-256",hash_algos())) { ?>
257 <option value="sha3-256">SHA3-256</option>
258 <?php } if(in_array("sha3-384",hash_algos())) { ?>
259 <option value="sha3-384">SHA3-384</option>
260 <?php } if(in_array("sha3-512",hash_algos())) { ?>
261 <option value="sha3-512">SHA3-512</option>
262 <?php } if(in_array("ripemd128",hash_algos())) { ?>
263 <option value="ripemd128">RIPEMD128</option>
264 <?php } if(in_array("ripemd160",hash_algos())) { ?>
265 <option value="ripemd160">RIPEMD160</option>
266 <?php } if(in_array("ripemd256",hash_algos())) { ?>
267 <option value="ripemd256">RIPEMD256</option>
268 <?php } if(in_array("ripemd320",hash_algos())) { ?>
269 <option value="ripemd320">RIPEMD320</option>
270 <?php } } if(function_exists('password_hash')) { ?>
271 <option value="bcrypt">BCRYPT</option>
272 <?php }
273 if(!function_exists('hash')&&!function_exists('hash_algos')) { ?>
274 <option value="md5">MD5</option>
275 <option value="sha1" selected="selected">SHA1</option>
276 <?php } ?>
277 </select></td>
278 </tr><tr>
279 <td style="width: 50%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
280 <td style="width: 50%;"><select id="YourOffSet" name="YourOffSet" class="TextBox">
281 <optgroup label="Africa">
282 <?php
283 $optsel="";
284 for ($i=0; $i < count($zonelist['africa']); $i++) {
285 if($gettzinfofromjs==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
286 echo "<option".$optsel." value=\"".$zonelist['africa'][$i][1]."\">".str_replace("_", " ", $zonelist['africa'][$i][0])."</option>\n";
287 $optsel=""; }
289 </optgroup>
290 <optgroup label="America">
291 <?php
292 $optsel="";
293 for ($i=0; $i < count($zonelist['america']); $i++) {
294 if($gettzinfofromjs==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
295 echo "<option".$optsel." value=\"".$zonelist['america'][$i][1]."\">".str_replace("_", " ", $zonelist['america'][$i][0])."</option>\n";
296 $optsel=""; }
298 </optgroup>
299 <optgroup label="Antarctica">
300 <?php
301 $optsel="";
302 for ($i=0; $i < count($zonelist['antarctica']); $i++) {
303 if($gettzinfofromjs==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
304 echo "<option".$optsel." value=\"".$zonelist['antarctica'][$i][1]."\">".str_replace("_", " ", $zonelist['antarctica'][$i][0])."</option>\n";
305 $optsel=""; }
307 </optgroup>
308 <optgroup label="Arctic">
309 <?php
310 $optsel="";
311 for ($i=0; $i < count($zonelist['arctic']); $i++) {
312 if($gettzinfofromjs==$zonelist['arctic'][$i][1]) { $optsel = " selected=\"selected\""; }
313 echo "<option".$optsel." value=\"".$zonelist['arctic'][$i][1]."\">".str_replace("_", " ", $zonelist['arctic'][$i][0])."</option>\n";
314 $optsel=""; }
316 </optgroup>
317 <optgroup label="Asia">
318 <?php
319 for ($i=0; $i < count($zonelist['asia']); $i++) {
320 if($gettzinfofromjs==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
321 echo "<option".$optsel." value=\"".$zonelist['asia'][$i][1]."\">".str_replace("_", " ", $zonelist['asia'][$i][0])."</option>\n";
322 $optsel=""; }
324 </optgroup>
325 <optgroup label="Atlantic">
326 <?php
327 $optsel="";
328 for ($i=0; $i < count($zonelist['atlantic']); $i++) {
329 if($gettzinfofromjs==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
330 echo "<option".$optsel." value=\"".$zonelist['atlantic'][$i][1]."\">".str_replace("_", " ", $zonelist['atlantic'][$i][0])."</option>\n";
331 $optsel=""; }
333 </optgroup>
334 <optgroup label="Australia">
335 <?php
336 $optsel="";
337 for ($i=0; $i < count($zonelist['australia']); $i++) {
338 if($gettzinfofromjs==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
339 echo "<option".$optsel." value=\"".$zonelist['australia'][$i][1]."\">".str_replace("_", " ", $zonelist['australia'][$i][0])."</option>\n";
340 $optsel=""; }
342 </optgroup>
343 <optgroup label="Europe">
344 <?php
345 $optsel="";
346 for ($i=0; $i < count($zonelist['europe']); $i++) {
347 if($gettzinfofromjs==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
348 echo "<option".$optsel." value=\"".$zonelist['europe'][$i][1]."\">".str_replace("_", " ", $zonelist['europe'][$i][0])."</option>\n";
349 $optsel=""; }
351 </optgroup>
352 <optgroup label="Indian">
353 <?php
354 $optsel="";
355 for ($i=0; $i < count($zonelist['indian']); $i++) {
356 if($gettzinfofromjs==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
357 echo "<option".$optsel." value=\"".$zonelist['indian'][$i][1]."\">".str_replace("_", " ", $zonelist['indian'][$i][0])."</option>\n";
358 $optsel=""; }
360 </optgroup>
361 <optgroup label="Pacific">
362 <?php
363 $optsel="";
364 for ($i=0; $i < count($zonelist['pacific']); $i++) {
365 if($gettzinfofromjs==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
366 echo "<option".$optsel." value=\"".$zonelist['pacific'][$i][1]."\">".str_replace("_", " ", $zonelist['pacific'][$i][0])."</option>\n";
367 $optsel=""; }
369 </optgroup>
370 <optgroup label="Etcetera">
371 <?php
372 $optsel="";
373 for ($i=0; $i < count($zonelist['etcetera']); $i++) {
374 if($gettzinfofromjs==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
375 echo "<option".$optsel." value=\"".$zonelist['etcetera'][$i][1]."\">".str_replace("_", " ", $zonelist['etcetera'][$i][0])."</option>\n";
376 $optsel=""; }
378 </optgroup>
379 </select></td>
380 </tr><tr>
381 <td style="width: 50%;"><label class="TextBoxLabel" for="iDBTimeFormat">Insert time format string:</label></td>
382 <td style="width: 50%;"><input type="text" class="TextBox" name="iDBTimeFormat" size="20" id="iDBTimeFormat" value="<?php echo "g:i A"; ?>" /></td>
383 </tr><tr>
384 <td style="width: 50%;"><label class="TextBoxLabel" for="iDBDateFormat">Insert date format string:</label></td>
385 <td style="width: 50%;"><input type="text" class="TextBox" name="iDBDateFormat" size="20" id="iDBDateFormat" value="<?php echo "F j Y"; ?>" /></td>
386 </tr><tr>
387 <td style="width: 50%;"><label class="TextBoxLabel" for="TestReferer">Test Referering URL:</label></td>
388 <td style="width: 50%;"><select id="TestReferer" name="TestReferer" class="TextBox">
389 <option selected="selected" value="off">Off</option>
390 <option value="on">On</option>
391 </select></td>
392 </tr><tr>
393 <td style="width: 50%;"><label class="TextBoxLabel" for="iDBHTTPLogger">Log Every HTTP Requests:</label></td>
394 <td style="width: 50%;"><select id="iDBHTTPLogger" name="iDBHTTPLogger" class="TextBox">
395 <option value="off">Off</option>
396 <option value="on">On</option>
397 </select></td>
398 </tr><tr>
399 <td style="width: 50%;"><label class="TextBoxLabel" for="iDBLoggerFormat">Insert The Format for HTTP Logger:</label></td>
400 <td style="width: 50%;"><input type="text" class="TextBox" name="iDBLoggerFormat" size="20" id="iDBLoggerFormat" value="<?php echo "%h %l %u %t &quot;%r&quot; %&gt;s %b &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot;"; ?>" /></td>
401 </tr><tr>
402 <td style="width: 50%;"><label class="TextBoxLabel" for="DefaultTheme">Default Theme</label></td>
403 <td style="width: 50%;"><select id="DefaultTheme" name="DefaultTheme" class="TextBox"><?php
404 $skindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
405 if ($handle = opendir($skindir)) { $dirnum = null;
406 while (false !== ($file = readdir($handle))) {
407 $selected = null;
408 if ($dirnum==null) { $dirnum = 0; }
409 if (file_exists($skindir.$file."/info.php")) {
410 if ($file != "." && $file != "..") {
411 require($skindir.$file."/info.php");
412 if($file=="iDB") {
413 $themelist[$dirnum] = "<option value=\"".$file."\" selected=\"selected\">".$ThemeInfo['ThemeName']."</option>"; }
414 if($file!="iDB") {
415 $themelist[$dirnum] = "<option value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>"; }
416 ++$dirnum; } } }
417 closedir($handle); asort($themelist);
418 $themenum=count($themelist); $themei=0;
419 while ($themei < $themenum) {
420 echo $themelist[$themei]."\n";
421 ++$themei; }
422 } ?></select></td>
423 </tr><tr>
424 <td style="width: 50%;"><label class="TextBoxLabel" for="SQLThemes">Store Themes in SQL Database:</label></td>
425 <td style="width: 50%;"><select id="SQLThemes" name="SQLThemes" class="TextBox">
426 <option selected="selected" value="off">Off</option>
427 <option value="on">On</option>
428 </select></td>
429 </tr><tr>
430 <td style="width: 50%;"><label class="TextBoxLabel" title="Might not work" for="unlink">Delete Installer?</label></td>
431 <td style="width: 50%;"><select id="unlink" name="unlink" class="TextBox">
432 <option value="true">Yes</option>
433 <option value="false">No</option>
434 </select></td>
435 </tr></table>
436 <table style="text-align: left;">
437 <tr style="text-align: left;">
438 <td style="width: 100%;">
439 <input type="hidden" name="charset" value="<?php echo $_POST['charset']; ?>" style="display: none;" />
440 <input type="hidden" name="SetupType" value="install" style="display: none;" />
441 <input type="hidden" name="DatabaseType" value="<?php echo $Settings['sqltype']; ?>" style="display: none;" />
442 <input type="hidden" name="act" value="Part4" style="display: none;" />
443 <input type="submit" class="Button" value="Install Board" name="Install_Board" />
444 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
445 </td></tr></table>
446 </form>
447 </td>
448 </tr>
449 <?php } ?>