1
|
<?php
|
2
|
/**
|
3
|
*
|
4
|
* @category backend
|
5
|
* @package install
|
6
|
* @author WebsiteBaker Project
|
7
|
* @copyright WebsiteBaker Org. e.V.
|
8
|
* @link http://websitebaker.org/
|
9
|
* @license http://www.gnu.org/licenses/gpl.html
|
10
|
* @platform WebsiteBaker 2.8.3
|
11
|
* @requirements PHP 5.3.6 and higher
|
12
|
* @version $Id: index.php 2 2017-07-02 15:14:29Z Manuela $
|
13
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/branches/main/install/index.php $
|
14
|
* @lastmodified $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
|
15
|
*
|
16
|
*/
|
17
|
|
18
|
// Start a session
|
19
|
if (version_compare(PHP_VERSION, '5.6', '<')) { die('Sorry, at last PHP-5.6 required !!'); }
|
20
|
if(!defined('SESSION_STARTED')) {
|
21
|
session_name('wb-installer');
|
22
|
session_start();
|
23
|
define('SESSION_STARTED', true);
|
24
|
}
|
25
|
|
26
|
$mod_path = dirname(str_replace('\\', '/', __FILE__));
|
27
|
$doc_root = str_replace('\\','/',rtrim(realpath($_SERVER['DOCUMENT_ROOT']),'/'));
|
28
|
$mod_name = basename($mod_path);
|
29
|
$wb_path = str_replace('\\','/',dirname(dirname(realpath( __FILE__))));
|
30
|
if (!defined('WB_PATH')) { define('WB_PATH', $wb_path); }
|
31
|
$wb_root = str_replace($doc_root,'',$wb_path);
|
32
|
|
33
|
// begin new routine
|
34
|
$sInstallFolderRel = dirname(dirname($_SERVER['SCRIPT_NAME']));
|
35
|
$sProtokol = ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' ) ? 'http' : 'https') . '://';
|
36
|
$sUrl = $sProtokol.$_SERVER['HTTP_HOST'].($_SERVER['SERVER_PORT'] == 80 ? '' : $_SERVER['SERVER_PORT'].':').$sInstallFolderRel;// end new routine
|
37
|
$sScriptPath = str_replace('\\', '/', ($_SERVER['SCRIPT_FILENAME']));
|
38
|
$sScriptUrl = $sUrl.str_replace($wb_path, '', $sScriptPath);
|
39
|
|
40
|
// Function to highlight input fields which contain wrong/missing data
|
41
|
function field_error($field_name='') {
|
42
|
if(!defined('SESSION_STARTED') || $field_name == '') return;
|
43
|
if(isset($_SESSION['ERROR_FIELD']) && $_SESSION['ERROR_FIELD'] == $field_name) {
|
44
|
return ' class="wrong"';
|
45
|
}
|
46
|
}
|
47
|
|
48
|
$installFlag = true;
|
49
|
// Check if the page has been reloaded
|
50
|
if(!isset($_GET['sessions_checked']) OR $_GET['sessions_checked'] != 'true') {
|
51
|
// Set session variable
|
52
|
$_SESSION['session_support'] = '<span class="good">Enabled</span>';
|
53
|
// Reload page
|
54
|
header('Location: index.php?sessions_checked=true');
|
55
|
exit(0);
|
56
|
} else {
|
57
|
// Check if session variable has been saved after reload
|
58
|
if(isset($_SESSION['session_support'])) {
|
59
|
$session_support = $_SESSION['session_support'];
|
60
|
} else {
|
61
|
$installFlag = false;
|
62
|
$session_support = '<span class="bad">Disabled</span>';
|
63
|
}
|
64
|
}
|
65
|
// Check if AddDefaultCharset is set
|
66
|
$e_adc=false;
|
67
|
$sapi=php_sapi_name();
|
68
|
if(strpos($sapi, 'apache')!==FALSE || strpos($sapi, 'nsapi')!==FALSE) {
|
69
|
flush();
|
70
|
$apache_rheaders=apache_response_headers();
|
71
|
foreach($apache_rheaders AS $h) {
|
72
|
if(strpos($h, 'html; charset')!==FALSE) {
|
73
|
preg_match('/charset\s*=\s*([a-zA-Z0-9- _]+)/', $h, $match);
|
74
|
$apache_charset=$match[1];
|
75
|
$e_adc=$apache_charset;
|
76
|
}
|
77
|
}
|
78
|
}
|
79
|
|
80
|
?><!DOCTYPE HTML>
|
81
|
<html lang="de">
|
82
|
<head>
|
83
|
<meta charset="utf-8" />
|
84
|
<title>WebsiteBaker Installation Wizard</title>
|
85
|
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
|
86
|
<script>
|
87
|
|
88
|
function confirm_link(message, url) {
|
89
|
if(confirm(message)) location.href = url;
|
90
|
}
|
91
|
function change_os(type) {
|
92
|
if(type == 'linux') {
|
93
|
document.getElementById('operating_system_linux').checked = true;
|
94
|
document.getElementById('operating_system_windows').checked = false;
|
95
|
document.getElementById('file_perms_box').style.display = 'none';
|
96
|
} else if(type == 'windows') {
|
97
|
document.getElementById('operating_system_linux').checked = false;
|
98
|
document.getElementById('operating_system_windows').checked = true;
|
99
|
document.getElementById('file_perms_box').style.display = 'none';
|
100
|
}
|
101
|
}
|
102
|
</script>
|
103
|
</head>
|
104
|
<body>
|
105
|
<div class="body">
|
106
|
<table>
|
107
|
<tbody>
|
108
|
<tr style="background: #a9c9ea;">
|
109
|
<td valign="top">
|
110
|
<img src="../templates/DefaultTheme/images/logo.png" alt="Logo" />
|
111
|
</td>
|
112
|
<td>
|
113
|
<h1 style="border:none; margin-top:1em;font-size:150%;">Installation Wizard</h1>
|
114
|
</td>
|
115
|
</tr>
|
116
|
</tbody>
|
117
|
</table>
|
118
|
|
119
|
<form name="website_baker_installation_wizard" action="save.php" method="post">
|
120
|
<input type="hidden" name="url" value="" />
|
121
|
<input type="hidden" name="username_fieldname" value="admin_username" />
|
122
|
<input type="hidden" name="password_fieldname" value="admin_password" />
|
123
|
<input type="hidden" name="remember" id="remember" value="true" />
|
124
|
|
125
|
<div class="welcome">
|
126
|
Welcome to the WebsiteBaker Installation Wizard.
|
127
|
</div>
|
128
|
<?php
|
129
|
if(isset($_SESSION['message']) AND $_SESSION['message'] != '') {
|
130
|
?><div style="width: 700px; padding: 10px; margin-bottom: 5px; border: 1px solid #FF0000; background-color: #FFDBDB;"><b>Error:</b> <?php echo $_SESSION['message']; ?></div><?php
|
131
|
}
|
132
|
?>
|
133
|
<table>
|
134
|
<thead>
|
135
|
<tr>
|
136
|
<th colspan="4" class="step-row"><h1 class="step-row">Step 1
|
137
|
</h1> Please check the following requirements are met before continuing...
|
138
|
</th>
|
139
|
</tr>
|
140
|
</thead>
|
141
|
<tbody>
|
142
|
<?php if($session_support != '<span class="good">Enabled</span>') { ?>
|
143
|
<tr>
|
144
|
<td colspan="6" class="error">Please note: PHP Session Support may appear disabled if your browser does not support cookies.</td>
|
145
|
</tr>
|
146
|
<?php } ?>
|
147
|
<tr>
|
148
|
<td style="color: #666666;">PHP Version >= 5.3.6</td>
|
149
|
<td>
|
150
|
<?php
|
151
|
if (version_compare(PHP_VERSION, '5.3.6', '>='))
|
152
|
{
|
153
|
?><span class="good"><?php echo PHP_VERSION;?></span><?php
|
154
|
} else {
|
155
|
$installFlag = false;
|
156
|
?><span class="bad"><?php echo PHP_VERSION;?></span><?php
|
157
|
}
|
158
|
?>
|
159
|
</td>
|
160
|
<td style="color: #666666;">PHP Session Support</td>
|
161
|
<td><?php echo $session_support; ?></td>
|
162
|
</tr>
|
163
|
<tr>
|
164
|
<td style="color: #666666;">Server DefaultCharset</td>
|
165
|
<td>
|
166
|
<?php
|
167
|
$chrval = (($e_adc != '') && (strtolower($e_adc) != 'utf-8') ? true : false);
|
168
|
if($chrval == false) {
|
169
|
?><span class="good">
|
170
|
<?php echo (($e_adc=='') ? 'OK' : $e_adc) ?>
|
171
|
</span>
|
172
|
<?php
|
173
|
} else {
|
174
|
?><span class="bad"><?php echo $e_adc ?></span><?php
|
175
|
}
|
176
|
|
177
|
?>
|
178
|
</td>
|
179
|
<td style="color: #666666;">PHP Safe Mode</td>
|
180
|
<td>
|
181
|
<?php
|
182
|
if(ini_get('safe_mode')=='' || strpos(strtolower(ini_get('safe_mode')), 'off')!==FALSE || ini_get('safe_mode')==0) {
|
183
|
?><span class="good">Disabled</span><?php
|
184
|
} else {
|
185
|
$installFlag = false;
|
186
|
?><span class="bad">Enabled</span><?php
|
187
|
}
|
188
|
?>
|
189
|
</td>
|
190
|
</tr>
|
191
|
<?php if($chrval == true) {
|
192
|
?>
|
193
|
<tr>
|
194
|
<td colspan="6" style="font-size: 10px;" class="bad">
|
195
|
<p class="warning">
|
196
|
<b>Please note:</b> Yor webserver is configured to deliver <b><?php echo $e_adc;?></b> charset only.<br />
|
197
|
To display national special characters (e.g.: ä á) in clear manner, switch off this preset please(or let it do by your hosting provider).<br />
|
198
|
In any case you can choose <b><?php echo $e_adc;?></b> in the settings of WebsiteBaker.<br />
|
199
|
But this solution does not guarranty a correct displaying of the content from all modules!
|
200
|
</p>
|
201
|
</td>
|
202
|
</tr>
|
203
|
<?php } ?>
|
204
|
</tbody>
|
205
|
</table>
|
206
|
<table>
|
207
|
<thead>
|
208
|
<tr>
|
209
|
<th colspan="4" class="step-row">
|
210
|
<h1 class="step-row">Step 2</h1> Please check the following files/folders are writeable before continuing...
|
211
|
</th>
|
212
|
</tr>
|
213
|
</thead>
|
214
|
<tbody>
|
215
|
<?php
|
216
|
$config = '<span class="good">Writeable</span>';
|
217
|
$config_content = "<?php\n";
|
218
|
$configFile = '/config.php';
|
219
|
if(!isset($_SESSION['config_rename']) )
|
220
|
{
|
221
|
// cnfig.php or config.php.new
|
222
|
if( (file_exists($wb_path.$configFile)==true))
|
223
|
{
|
224
|
// next operation only if file is writeable
|
225
|
if(is_writeable($wb_path.$configFile))
|
226
|
{
|
227
|
// already installed? it's not empty
|
228
|
if ( filesize($wb_path.$configFile) > 128)
|
229
|
{
|
230
|
$installFlag = false;
|
231
|
$config = '<span class="bad">Not empty! WebsiteBaker already installed?</span>';
|
232
|
// try to open and to write
|
233
|
} elseif( !$handle = fopen($wb_path.$configFile, 'w') )
|
234
|
{
|
235
|
$installFlag = false;
|
236
|
$config = '<span class="bad">Not Writeable</span>';
|
237
|
} else {
|
238
|
if (fwrite($handle, $config_content) === FALSE) {
|
239
|
$installFlag = false;
|
240
|
$config = '<span class="bad">Not Writeable</span>';
|
241
|
} else {
|
242
|
$config = '<span class="good">Writeable</span>';
|
243
|
$_SESSION['config_rename'] = true;
|
244
|
}
|
245
|
// Close file
|
246
|
fclose($handle);
|
247
|
}
|
248
|
} else {
|
249
|
$installFlag = false;
|
250
|
$config = '<span class="bad">Not Writeable</span>';
|
251
|
}
|
252
|
// it's config.php.new
|
253
|
} elseif((file_exists($wb_path.'/config.php.new')==true))
|
254
|
{
|
255
|
$configFile = '/config.php.new';
|
256
|
$installFlag = false;
|
257
|
$config = '<span class="bad">Please rename to config.php</span>';
|
258
|
} else
|
259
|
{
|
260
|
$installFlag = false;
|
261
|
$config = '<span class="bad">Missing!!?</span>';
|
262
|
}
|
263
|
}
|
264
|
?>
|
265
|
<tr>
|
266
|
<td style="color: #666666;"><?php print $wb_root.$configFile ?></td>
|
267
|
<td colspan="3" ><?php echo $config ?></td>
|
268
|
</tr>
|
269
|
<tr>
|
270
|
<td style="color: #666666;"><?php print $wb_root ?>/pages/</td>
|
271
|
<td><?php if(is_writable('../pages/')) { echo '<span class="good">Writeable</span>'; } elseif(!file_exists('../pages/')) {$installFlag = false; echo '<span class="bad">Directory Not Found</span>'; } else { echo '<span class="bad">Unwriteable</span>'; } ?></td>
|
272
|
<td style="color: #666666;"><?php print $wb_root ?>/media/</td>
|
273
|
<td><?php if(is_writable('../media/')) { echo '<span class="good">Writeable</span>'; } elseif(!file_exists('../media/')) {$installFlag = false; echo '<span class="bad">Directory Not Found</span>'; } else { echo '<span class="bad">Unwriteable</span>'; } ?></td>
|
274
|
</tr>
|
275
|
<tr>
|
276
|
<td style="color: #666666;"><?php print $wb_root ?>/templates/</td>
|
277
|
<td><?php if(is_writable('../templates/')) { echo '<span class="good">Writeable</span>'; } elseif(!file_exists('../templates/')) {$installFlag = false; echo '<span class="bad">Directory Not Found</span>'; } else { echo '<span class="bad">Unwriteable</span>'; } ?></td>
|
278
|
<td style="color: #666666;"><?php print $wb_root ?>/modules/</td>
|
279
|
<td><?php if(is_writable('../modules/')) { echo '<span class="good">Writeable</span>'; } elseif(!file_exists('../modules/')) {$installFlag = false; echo '<span class="bad">Directory Not Found</span>'; } else { echo '<span class="bad">Unwriteable</span>'; } ?></td>
|
280
|
</tr>
|
281
|
<tr>
|
282
|
<td style="color: #666666;"><?php print $wb_root ?>/languages/</td>
|
283
|
<td><?php if(is_writable('../languages/')) { echo '<span class="good">Writeable</span>'; } elseif(!file_exists('../languages/')) {$installFlag = false; echo '<span class="bad">Directory Not Found</span>'; } else { echo '<span class="bad">Unwriteable</span>'; } ?></td>
|
284
|
<td style="color: #666666;"><?php print $wb_root ?>/temp/</td>
|
285
|
<td><?php if(is_writable('../temp/')) { echo '<span class="good">Writeable</span>'; } elseif(!file_exists('../temp/')) {$installFlag = false; echo '<span class="bad">Directory Not Found</span>'; } else { echo '<span class="bad">Unwriteable</span>'; } ?></td>
|
286
|
</tr>
|
287
|
<tr>
|
288
|
<td style="color: #666666;"><?php print $wb_root ?>/var/</td>
|
289
|
<td><?php if(is_writable('../var/')) { echo '<span class="good">Writeable</span>'; } elseif(!file_exists('../languages/')) {$installFlag = false; echo '<span class="bad">Directory Not Found</span>'; } else { echo '<span class="bad">Unwriteable</span>'; } ?></td>
|
290
|
<td colspan="2"> </td>
|
291
|
</tr>
|
292
|
</tbody>
|
293
|
</table>
|
294
|
<?php if($installFlag == true) { ?>
|
295
|
<table>
|
296
|
<thead>
|
297
|
<tr>
|
298
|
<th colspan="4" class="step-row">
|
299
|
<h1 class="step-row">Step 3</h1> Please check URL settings, and select a default timezone and a default backend language...
|
300
|
</th>
|
301
|
</tr>
|
302
|
</thead>
|
303
|
<tbody>
|
304
|
<tr>
|
305
|
<td class="name">Absolute URL:</td>
|
306
|
<td class="value">
|
307
|
<input <?php echo field_error('wb_url');?> type="text" tabindex="1" name="wb_url" style="width: 99%;" value="<?php if(isset($_SESSION['wb_url'])) { echo $_SESSION['wb_url']; } else { echo $sUrl; } ?>" />
|
308
|
</td>
|
309
|
<td colspan="4"> </td>
|
310
|
</tr>
|
311
|
<tr>
|
312
|
<td class="name">Default Timezone:</td>
|
313
|
<td class="value"><select <?php echo field_error('default_timezone');?> tabindex="3" name="default_timezone" style="width: 100%;">
|
314
|
<?php
|
315
|
/*
|
316
|
build list of TimeZone options
|
317
|
*/
|
318
|
$aZones = array(-12,-11,-10,-9,-8,-7,-6,-5,-4,-3.5,-3,-2,-1,0,1,2,3,3.5,4,4.5,5,5.5,6,6.5,7,8,9,9.5,10,11,12,13);
|
319
|
$sOutput = PHP_EOL;
|
320
|
foreach($aZones as $fOffset) {
|
321
|
$sItemTitle = 'GMT '.(($fOffset>0)?'+':'').(($fOffset==0)?'':(string)$fOffset.' Hours');
|
322
|
$sOutput .= '<option value="'.(string)$fOffset.'"';
|
323
|
if (
|
324
|
(isset($_SESSION['default_timezone']) AND $_SESSION['default_timezone'] == (string)$fOffset) ||
|
325
|
(!isset($_SESSION['default_timezone']) AND $fOffset == 0)
|
326
|
) {
|
327
|
$sOutput .= ' selected="selected"';
|
328
|
}
|
329
|
$sOutput .= '>'.$sItemTitle.'</option>'.PHP_EOL;
|
330
|
}
|
331
|
// output Timezone options
|
332
|
echo $sOutput;
|
333
|
?>
|
334
|
</select>
|
335
|
</td>
|
336
|
</tr>
|
337
|
<tr>
|
338
|
<td class="name">Default Language: </td>
|
339
|
<td class="value">
|
340
|
<?php
|
341
|
/*
|
342
|
Find all available languages in /language/ folder and build option list from
|
343
|
*/
|
344
|
// -----
|
345
|
$getLanguage = function($sFile) {
|
346
|
$aRetval = null;
|
347
|
$language_code = $language_name = '';
|
348
|
include $sFile;
|
349
|
if ($language_code && $language_name) {
|
350
|
$aRetval = ['code' => $language_code, 'name' => $language_name];
|
351
|
}
|
352
|
return $aRetval;
|
353
|
};
|
354
|
// -----
|
355
|
$aMatches = [];
|
356
|
$sDefaultLang = isset($_SESSION['default_language']) ? $_SESSION['default_language'] : 'EN';
|
357
|
$sLangDir = str_replace('\\', '/', dirname(__DIR__).'/languages/');
|
358
|
$sOldWorkingDir = getcwd();
|
359
|
chdir($sLangDir);
|
360
|
foreach(glob('??.php') as $sFilename) {
|
361
|
if (preg_match('/[A-Z]{2}\.php$/s', $sFilename) && is_readable($sLangDir.$sFilename)) {
|
362
|
if (!($aMatch = $getLanguage($sLangDir.$sFilename))) {
|
363
|
continue;
|
364
|
}
|
365
|
$aMatch['status'] = ($aMatch['code'] == $sDefaultLang);
|
366
|
$aMatches[] = $aMatch;
|
367
|
}
|
368
|
}
|
369
|
chdir($sOldWorkingDir);
|
370
|
// create HTML-output
|
371
|
if (sizeof($aMatches) > 0) {
|
372
|
$sOutput = '<select '.field_error('default_language').' tabindex="3" name="default_language" style="width: 100%;">'.PHP_EOL;
|
373
|
foreach ($aMatches as $aMatch) {
|
374
|
$sOutput .= '<option value="'.$aMatch['code'].'" '
|
375
|
. ($aMatch['status'] ? 'selected="selected"' : '').'>'
|
376
|
. $aMatch['name'].'</option>'.PHP_EOL;
|
377
|
}
|
378
|
$sOutput .= '</select>'.PHP_EOL;
|
379
|
// output HTML
|
380
|
echo $sOutput;
|
381
|
unset($sOutput);
|
382
|
} else {
|
383
|
echo 'WARNING: No language definition files available!!!';
|
384
|
$installFlag = false;
|
385
|
}
|
386
|
unset($aMatches, $aMatch, $getLanguage);
|
387
|
?>
|
388
|
</td>
|
389
|
<td colspan="4"> </td>
|
390
|
</tr>
|
391
|
</tbody>
|
392
|
</table>
|
393
|
|
394
|
<table>
|
395
|
<thead>
|
396
|
<tr>
|
397
|
<th class="step-row" colspan="4">
|
398
|
<h1 class="step-row">Step 4</h1> Please specify your operating system information below...
|
399
|
</th>
|
400
|
</tr>
|
401
|
</thead>
|
402
|
<tbody>
|
403
|
<tr>
|
404
|
<td class="name">Server Operating System: </td>
|
405
|
<td style="">
|
406
|
<input type="radio" tabindex="4" name="operating_system" id="operating_system_linux" onclick="document.getElementById('file_perms_box').style.display = 'none';" value="linux"<?php if(!isset($_SESSION['operating_system']) OR $_SESSION['operating_system'] == 'linux') { echo ' checked="checked"'; } ?> />
|
407
|
<span style="cursor: pointer;" onclick="javascript: change_os('linux');">Linux/Unix based</span>
|
408
|
<br />
|
409
|
<input type="radio" tabindex="5" name="operating_system" id="operating_system_windows" onclick="document.getElementById('file_perms_box').style.display = 'none';" value="windows"<?php if(isset($_SESSION['operating_system']) AND $_SESSION['operating_system'] == 'windows') { echo ' checked="checked"'; } ?> />
|
410
|
<span style="cursor: pointer;" onclick="javascript: change_os('windows');">Windows</span>
|
411
|
</td>
|
412
|
</tr>
|
413
|
<tr>
|
414
|
<td class="name"> </td>
|
415
|
<td class="value">
|
416
|
<div id="file_perms_box" style="line-height:2em; position: relative; width: 100%;float:left; margin: 0; padding: 0; display: <?php if(isset($_SESSION['operating_system']) AND $_SESSION['operating_system'] == 'windows') { echo 'none'; } else { echo 'none'; } ?>;">
|
417
|
<input type="checkbox" tabindex="6" name="world_writeable" id="world_writeable" value="true"<?php if(isset($_SESSION['world_writeable']) AND $_SESSION['world_writeable'] == true) { echo ' checked="checked'; } ?> />
|
418
|
<label style=" margin: 0; " for="world_writeable">
|
419
|
World-writeable file permissions (777)
|
420
|
</label>
|
421
|
<br />
|
422
|
<p class="warning">(Please note: only recommended for testing environments)</p>
|
423
|
</div>
|
424
|
</td>
|
425
|
</tr>
|
426
|
</tbody>
|
427
|
</table>
|
428
|
<table>
|
429
|
<thead>
|
430
|
<tr>
|
431
|
<th colspan="4" class="step-row">
|
432
|
<h1 class="step-row">Step 5</h1> Please enter your MySQL database server details below...
|
433
|
</th>
|
434
|
</tr>
|
435
|
</thead>
|
436
|
<tbody>
|
437
|
<tr>
|
438
|
<td class="name">Host Name</td>
|
439
|
<td class="value">
|
440
|
<input <?php echo field_error('database_host');?> type="text" tabindex="7" name="database_host" value="<?php if(isset($_SESSION['database_host'])) { echo $_SESSION['database_host']; } else { echo 'localhost'; } ?>" />
|
441
|
</td>
|
442
|
</tr>
|
443
|
<tr>
|
444
|
<td class="name">Database Name: </td>
|
445
|
<td class="value" style="white-space: nowrap;">
|
446
|
<input <?php echo field_error('database_name')?> type="text" tabindex="8" name="database_name" value="<?php if(isset($_SESSION['database_name'])) { echo $_SESSION['database_name']; } else { echo 'DatabaseName'; } ?>" />
|
447
|
<span style="display: inline;"> ([a-zA-Z0-9_-])</span>
|
448
|
</td>
|
449
|
</tr>
|
450
|
<tr>
|
451
|
<td class="name">Table Prefix: </td>
|
452
|
<td class="value" style="white-space: nowrap;">
|
453
|
<input <?php echo field_error('table_prefix')?> type="text" tabindex="9" name="table_prefix" value="<?php if(isset($_SESSION['table_prefix'])) { echo $_SESSION['table_prefix']; } else { echo 'wb_'; } ?>" />
|
454
|
<span style="display: inline;"> ([a-zA-Z0-9_])</span>
|
455
|
</td>
|
456
|
</tr>
|
457
|
<tr>
|
458
|
<td class="name">Username:</td>
|
459
|
<td class="value">
|
460
|
<input <?php echo field_error('database_username');?> type="text" tabindex="10" name="database_username" value="<?php if(isset($_SESSION['database_username'])) { echo $_SESSION['database_username']; } else { echo 'root'; } ?>" />
|
461
|
</td>
|
462
|
</tr>
|
463
|
<tr>
|
464
|
<td class="name">Password:</td>
|
465
|
<td class="value">
|
466
|
<input type="password" tabindex="11" name="database_password" value="<?php if(isset($_SESSION['database_password'])) { echo $_SESSION['database_password']; } ?>" />
|
467
|
</td>
|
468
|
</tr>
|
469
|
<tr>
|
470
|
<td class="name hide" colspan="2">
|
471
|
<input type="checkbox" tabindex="12" name="install_tables" id="install_tables" value="true"<?php if(!isset($_SESSION['install_tables'])) { echo ' checked="checked"'; } elseif($_SESSION['install_tables'] == 'true') { echo ' checked="checked"'; } ?> />
|
472
|
<label for="install_tables" style="color: #666666;">Install Tables</label>
|
473
|
<br />
|
474
|
<span style="font-size: 1px; color: #666666;">(Please note: May remove existing tables and data)</span>
|
475
|
</td>
|
476
|
</tr>
|
477
|
</tbody>
|
478
|
</table>
|
479
|
<table>
|
480
|
<thead>
|
481
|
<tr>
|
482
|
<th colspan="4" class="step-row">
|
483
|
<h1 class="step-row">Step 6</h1> Please enter your website title below...
|
484
|
</th>
|
485
|
</tr>
|
486
|
</thead>
|
487
|
<tbody>
|
488
|
<tr>
|
489
|
<td class="name">Website Title:</td>
|
490
|
<td class="value">
|
491
|
<input <?php echo field_error('website_title');?> type="text" tabindex="13" name="website_title" value="<?php if(isset($_SESSION['website_title'])) { echo $_SESSION['website_title']; } else { echo 'Enter your website title'; } ?>" />
|
492
|
</td>
|
493
|
</tr>
|
494
|
</tbody>
|
495
|
</table>
|
496
|
<table>
|
497
|
<thead>
|
498
|
<tr>
|
499
|
<th colspan="4" class="step-row">
|
500
|
<h1 class="step-row">Step 7</h1> Please enter your Administrator account details below...
|
501
|
</th>
|
502
|
</tr>
|
503
|
</thead>
|
504
|
<tbody>
|
505
|
<tr>
|
506
|
<td class="name">Loginname:</td>
|
507
|
<td class="value">
|
508
|
<input <?php echo field_error('admin_username');?> type="text" tabindex="14" name="admin_username" value="<?php if(isset($_SESSION['admin_username'])) { echo $_SESSION['admin_username']; } else { echo 'admin'; } ?>" />
|
509
|
</td>
|
510
|
</tr>
|
511
|
<tr>
|
512
|
<td class="name">Email:</td>
|
513
|
<td class="value">
|
514
|
<input <?php echo field_error('admin_email');?> type="text" tabindex="15" name="admin_email" value="<?php if(isset($_SESSION['admin_email'])) { echo $_SESSION['admin_email']; } ?>" />
|
515
|
</td>
|
516
|
</tr>
|
517
|
<tr>
|
518
|
<td class="name">Password:</td>
|
519
|
<td class="value">
|
520
|
<input <?php echo field_error('admin_password');?> type="password" tabindex="16" name="admin_password" value="" />
|
521
|
</td>
|
522
|
</tr>
|
523
|
<tr>
|
524
|
<td class="name">Re-Password:</td>
|
525
|
<td class="value">
|
526
|
<input <?php echo field_error('admin_repassword');?> type="password" tabindex="17" name="admin_repassword" value="" />
|
527
|
</td>
|
528
|
</tr>
|
529
|
</tbody>
|
530
|
</table>
|
531
|
<?php } ?>
|
532
|
<table>
|
533
|
<tbody>
|
534
|
<tr valign="top">
|
535
|
<td><strong>Please note: </strong></td>
|
536
|
</tr>
|
537
|
<tr valign="top">
|
538
|
<td>
|
539
|
<p class="warning">
|
540
|
WebsiteBaker is released under the
|
541
|
<a href="http://www.gnu.org/licenses/gpl.html" target="_blank" tabindex="19">GNU General Public License</a>
|
542
|
<br />
|
543
|
By clicking install, you are accepting the license.
|
544
|
</p>
|
545
|
</td>
|
546
|
</tr>
|
547
|
<tr valign="top">
|
548
|
<td>
|
549
|
<p class="center">
|
550
|
<?php if($installFlag == true) { ?>
|
551
|
<input type="submit" tabindex="20" name="install" value="Install WebsiteBaker" />
|
552
|
<?php } else { ?>
|
553
|
<input type="button" tabindex="20" name="restart" value="Check your Settings in Step1 or Step2" class="submit" onclick="window.location = '<?php print $sScriptUrl ?>';" />
|
554
|
<?php } ?>
|
555
|
</p>
|
556
|
</td>
|
557
|
</tr>
|
558
|
</tbody>
|
559
|
</table>
|
560
|
|
561
|
</form>
|
562
|
</div>
|
563
|
|
564
|
<div style="margin: 0 0 3em; padding: 0; text-align:center;">
|
565
|
<!-- Please note: the below reference to the GNU GPL should not be removed, as it provides a link for users to read about warranty, etc. -->
|
566
|
<a href="http://www.websitebaker.org/" style="color: #000000;" target="_blank">WebsiteBaker</a>
|
567
|
is released under the
|
568
|
<a href="http://www.gnu.org/licenses/gpl.html" style="color: #000000;" target="_blank">GNU General Public License</a>
|
569
|
<!-- Please note: the above reference to the GNU GPL should not be removed, as it provides a link for users to read about warranty, etc. -->
|
570
|
</div >
|
571
|
|
572
|
</body>
|
573
|
</html>
|