OSDN Git Service

Add files via upload
[idb/iDB.git.git] / setup / presetup.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-2017 iDB Support - http://idb.berlios.de/
12     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
13     iDB Installer made by Game Maker 2k - http://idb.berlios.net/
14
15     $FileInfo: presetup.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
16 */
17 $File3Name = basename($_SERVER['SCRIPT_NAME']);
18 if ($File3Name=="presetup.php"||$File3Name=="/presetup.php") {
19         require('index.php');
20         exit(); }
21 if(!isset($SetupDir['setup'])) { $SetupDir['setup'] = "setup/"; }
22 if(!isset($SetupDir['convert'])) { $SetupDir['convert'] = "setup/convert/"; }
23 if ($_POST['License']!="Agree") { $Error="Yes";  ?>
24 <tr class="TableRow3">
25 <td class="TableColumn3">
26 <span class="TableMessage">
27 <br />You need to  agree to the tos.<br /></span>
28 <?php }
29 if($Error!="Yes") {
30 ?>
31 <tr class="TableRow3">
32 <td class="TableColumn3">
33 <form style="display: inline;" method="post" id="install" action="<?php echo url_maker("install",".php","act=Part3","&","=",null,null); ?>">
34 <table style="text-align: left;">
35 <tr style="text-align: left;">
36         <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseUserName">Insert Database User Name:</label></td>
37         <td style="width: 50%;"><input type="text" name="DatabaseUserName" class="TextBox" id="DatabaseUserName" size="20" /></td>
38 </tr><tr>
39         <td style="width: 50%;"><label class="TextBoxLabel" for="DatabasePassword">Insert Database Password:</label></td>
40         <td style="width: 50%;"><input type="password" name="DatabasePassword" class="TextBox" id="DatabasePassword" size="20" /></td>
41 </tr><tr>
42         <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseHost">Insert Database Host:</label></td>
43         <td style="width: 50%;"><input type="text" name="DatabaseHost" class="TextBox" id="DatabaseHost" size="20" value="localhost" /></td>
44 </tr><tr>
45         <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseType">Select Database Type:</label></td>
46         <td style="width: 50%;"><select size="1" class="TextBox" name="DatabaseType" id="DatabaseType">
47         <?php if(function_exists("mysql_connect")) { ?>
48         <option value="mysql">MySQL Database</option>
49         <?php } if(function_exists("mysqli_connect")) { ?>
50         <option value="mysqli">MySQLi Database</option>
51         <?php } if(function_exists("pg_connect")) { ?>
52         <option value="pgsql">PostgreSQL Database</option>
53         <?php } if(function_exists("sqlite_open")) { ?>
54         <option value="sqlite">SQLite Database</option>
55         <?php } if(class_exists('SQLite3')) { ?>
56         <option value="sqlite3">SQLite 3 Database</option>
57         <?php } if(function_exists("cubrid_connect")) { ?>
58         <option value="cubrid">CUBRID Database</option>
59         <?php } if(!function_exists("mysql_connect")&&!function_exists("mysqli_connect")&&
60         !function_exists("pg_connect")&&!function_exists("sqlite_open")&&!class_exists('SQLite3')&&
61         !function_exists("cubrid_connect")) { ?>
62         <option value="none">No Database Available</option>
63         <?php } ?>
64         </select></td>
65 </tr><tr>
66         <td style="width: 50%;"><label class="TextBoxLabel" for="charset">Select html charset:</label></td>
67         <td style="width: 50%;"><select size="1" class="TextBox" name="charset" id="charset">
68         <option value="ISO-8859-15">Latin-9 (ISO-8859-15)</option>
69         <option value="ISO-8859-1">Latin-1 (ISO-8859-1)</option>
70         <option value="UTF-8">Unicode (UTF-8)</option>
71         </select></td>
72         <?php if($ConvertInfo['ConvertFile']!=null) { ?>
73 </tr><tr>
74         <td style="width: 50%;"><label class="TextBoxLabel" for="SetupType">Type of install to do:</label></td>
75         <td style="width: 50%;"><select size="1" class="TextBox" name="SetupType" id="SetupType">
76         <option value="convert" selected="selected"><?php echo $ConvertInfo['ConvertName']; ?></option>
77         <option value="install">Install iDB</option>
78         </select></td>
79         <?php } ?>
80 </tr></table>
81 <table style="text-align: left;">
82 <tr style="text-align: left;">
83 <td style="width: 100%;">
84 <?php if($ConvertInfo['ConvertFile']==null) { ?>
85 <input type="hidden" name="SetupType" value="install" style="display: none;" />
86 <?php } ?>
87 <input type="hidden" name="act" value="Part3" style="display: none;" />
88 <input type="submit" class="Button" value="Next Page" name="Install_Board" />
89 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
90 </td></tr></table>
91 </form>
92 </td>
93 </tr>
94 <?php } ?>