-
Notifications
You must be signed in to change notification settings - Fork 22
/
install.php
216 lines (213 loc) · 6.98 KB
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<?php
include ("install/installer.php");
$sqlConfigured = file_exists("config/database.php");
$upgrade = false;
if($sqlConfigured)
{
include("config/database.php");
if(!sqlConnect())
$sqlConfigured = false;
else if(getInstalledVersion() != -1)
$upgrade = true;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>ABXD installation</title>
<link rel="stylesheet" href="css/common.css" type="text/css" />
<link rel="stylesheet" href="themes/abxd30/style.css" type="text/css" />
<script src="js/jquery.js"></script>
<script src="install/installer.js"></script>
<script type="text/javascript">
var upgrade=<?php echo $upgrade?"true":"false";?>;
var sqlConfigured=<?php echo $sqlConfigured?"true":"false";?>;
</script>
<style>
.page {
padding: 4px;
}
</style>
</head>
<body style="width:100%;">
<div id="body">
<div id="body-wrapper" style="max-width:900px">
<div id="main" style="padding:8px;">
<img src="img/logo.png" alt="ABXD" style="margin: 2em auto; display: block;" />
<table class="outline margin" id="installUI" style="display: none;">
<tr class="cell0">
<td style="max-height: 500px; height: 500px; vertical-align: top;" id="installPager">
<div class="page" id="page1">
<h3>Welcome to ABXD</h3>
<p>
Welcome to the installer for ABXD.
We've done a few changes in 3.0 to make using ABXD even better, including:
<ul>
<li>Large codebase cleanups — the board should now work better than ever!</li>
<li>A new, flexible permissions system that lets you define user groups or per-user permissions, such as forum access.</li>
<li>Easier theme installation for administrators</li>
<li>[ devs add stuff here ]</li>
</ul>
<p>
Thanks for using ABXD!<br />
- The ABXD developers
</div>
<div class="page" id="page2">
<div class="install-only sql-configured">
<h3>
SQL setup
</h3>
<p>The SQL credentials for your board are already configured, but the board doesn't seem to be installed. Click Install below to install it</p>
<p>If you wish to edit your SQL credentials, edit or remove the file config/database.php</p>
</div>
<div class="install-only sql-not-configured">
<h3>
SQL setup
</h3>
<p>Let's get going. Enter the SQL credentials for the SQL server you want to connect to and click "Check connection" to make sure it works.</p>
<table style="width: 50%;margin-left:auto;margin-right:auto;margin-top:50px; margin-bottom:50px;" class="outline margin">
<tr class="header1">
<th colspan="2">
SQL credentials
</th>
</tr>
<tr class="cell0">
<td>
Server address
</td>
<td>
<input type="text" name="sqlServerAddress" id="sqlServerAddress" value="localhost" />
</td>
</tr>
<tr class="cell1">
<td>
Username
</td>
<td>
<input type="text" name="sqlUserName" id="sqlUserName" value="abxd" />
</td>
</tr>
<tr class="cell0">
<td>
Password
</td>
<td>
<input type="password" name="sqlPassword" id="sqlPassword" value="" />
</td>
</tr>
<tr class="cell1">
<td>
Database name
</td>
<td>
<input type="text" name="sqlDbName" id="sqlDbName" value="abxd" />
</td>
</tr>
<tr class="cell0">
<td>
Table prefix
</td>
<td>
<input type="text" name="sqlTablePrefix" id="sqlTablePrefix" value="" />
</td>
</tr>
</table>
<label><input type="checkbox" name="convert" id="convert" /> Convert database from another forum software</label>
<div id="convertToggle" style="display: none">
<table style="width: 50%;margin-left:auto;margin-right:auto;margin-top:50px; margin-bottom:50px;" class="outline margin">
<tr class="header1">
<th colspan="2">
Database converter
</th>
</tr>
<tr class="cell0">
<td>
Forum software
</td>
<td>
<select name="convertFrom" id="convertFrom">
<?php
foreach($converters as $converter)
echo "<option value=\"$converter\">$converter</option>";
?>
</select>
</td>
</tr>
<tr class="cell0">
<td>
Existing installation database name
</td>
<td>
<input type="text" name="convertDbName" id="convertDbName" value="" />
</td>
</tr>
<tr class="cell0">
<td>
Existing installation table prefix
</td>
<td>
<input type="text" name="convertDbName" id="convertDbName" value="" />
</td>
</tr>
<tr class="cell1">
<td colspan="2">
<p>NOTE: You can set this to the same DB as above, but then make sure to choose a unique
table prefix so there will be no table name conflicts between the other forum software's
and ABXD's tables.</p>
<p>Making a backup is strongly recommended!</b>
</td>
</tr>
</table>
</div>
<p>When you're done, click Install below.</p>
</div>
<div class="upgrade-only">
<h3>Upgrade</h3>
<p>The board is already installed. Click the button below to upgrade it.</p>
<p>If you wish to reinstall instead, delete all the tables in your MySQL database and come back again.</p>
</div>
</div>
<div class="page" id="page3">
<div class="install-only">
<h3>Install</h3>
</div>
<div class="upgrade-only">
<h3>Upgrade</h3>
</div>
<div id="install-output" style="white-space: pre-wrap; font-family: monospace; margin:50px;">Installing...</div>
</div>
<div class="page" id="page4">
<div class="install-only">
<h3>Installed!</h3>
<p>The board is installed now. Now you should go and register an account. The first account registered will be the root admin.</p>
<p><a href="./">Click here to go to your new board!</a></p>
</div>
<div class="upgrade-only">
<h3>Upgraded!</h3>
<p>The board is upgraded now. Congratulations!</p>
<p><a href="./">Click here to go to your new board!</a></p>
</div>
</div>
</td>
</tr>
<tr class="cell0" id="installProgress">
<td>
<div class="pollbarContainer" style="width: 98%; margin: 4pt auto; display: block;">
<div class="pollbar" id="progress" >
[ Actual step number is put here by JS ]
</div>
</div>
</td>
</tr>
<tr class="cell1">
<td style="text-align: right;">
<button disabled id="prevPageButton">← Previous</button>
<button id="nextPageButton">Next →</button>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>