1
|
<?php
|
2
|
/**
|
3
|
*
|
4
|
* @category backend
|
5
|
* @package install
|
6
|
* @author WebsiteBaker Project
|
7
|
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
8
|
* @link http://www.websitebaker2.org/
|
9
|
* @license http://www.gnu.org/licenses/gpl.html
|
10
|
* @platform WebsiteBaker 2.8.x
|
11
|
* @requirements PHP 5.2.2 and higher
|
12
|
* @version $Id: index.php 1609 2012-02-09 22:51:44Z Luisehahne $
|
13
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/install/index.php $
|
14
|
* @lastmodified $Date: 2012-02-09 23:51:44 +0100 (Thu, 09 Feb 2012) $
|
15
|
*
|
16
|
*/
|
17
|
|
18
|
// Start a session
|
19
|
if(!defined('SESSION_STARTED')) {
|
20
|
session_name('wb_session_id');
|
21
|
session_start();
|
22
|
define('SESSION_STARTED', true);
|
23
|
}
|
24
|
|
25
|
$mod_path = dirname(str_replace('\\', '/', __FILE__));
|
26
|
$doc_root = rtrim(realpath($_SERVER['DOCUMENT_ROOT']),'/');
|
27
|
$mod_name = basename($mod_path);
|
28
|
$wb_path = dirname(dirname(realpath( __FILE__)));
|
29
|
$wb_root = str_replace(realpath($doc_root),'',$wb_path);
|
30
|
|
31
|
// Function to highlight input fields which contain wrong/missing data
|
32
|
function field_error($field_name='') {
|
33
|
if(!defined('SESSION_STARTED') || $field_name == '') return;
|
34
|
if(isset($_SESSION['ERROR_FIELD']) && $_SESSION['ERROR_FIELD'] == $field_name) {
|
35
|
return ' class="wrong"';
|
36
|
}
|
37
|
}
|
38
|
|
39
|
$installFlag = true;
|
40
|
// Check if the page has been reloaded
|
41
|
if(!isset($_GET['sessions_checked']) OR $_GET['sessions_checked'] != 'true') {
|
42
|
// Set session variable
|
43
|
$_SESSION['session_support'] = '<font class="good">Enabled</font>';
|
44
|
// Reload page
|
45
|
header('Location: index.php?sessions_checked=true');
|
46
|
exit(0);
|
47
|
} else {
|
48
|
// Check if session variable has been saved after reload
|
49
|
if(isset($_SESSION['session_support'])) {
|
50
|
$session_support = $_SESSION['session_support'];
|
51
|
} else {
|
52
|
$installFlag = false;
|
53
|
$session_support = '<font class="bad">Disabled</font>';
|
54
|
}
|
55
|
}
|
56
|
// Check if AddDefaultCharset is set
|
57
|
$e_adc=false;
|
58
|
$sapi=php_sapi_name();
|
59
|
if(strpos($sapi, 'apache')!==FALSE || strpos($sapi, 'nsapi')!==FALSE) {
|
60
|
flush();
|
61
|
$apache_rheaders=apache_response_headers();
|
62
|
foreach($apache_rheaders AS $h) {
|
63
|
if(strpos($h, 'html; charset')!==FALSE) {
|
64
|
preg_match('/charset\s*=\s*([a-zA-Z0-9- _]+)/', $h, $match);
|
65
|
$apache_charset=$match[1];
|
66
|
$e_adc=$apache_charset;
|
67
|
}
|
68
|
}
|
69
|
}
|
70
|
|
71
|
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
72
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
73
|
<head>
|
74
|
<title>WebsiteBaker Installation Wizard</title>
|
75
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
76
|
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
|
77
|
<script language="javascript" type="text/javascript">
|
78
|
|
79
|
function confirm_link(message, url) {
|
80
|
if(confirm(message)) location.href = url;
|
81
|
}
|
82
|
function change_os(type) {
|
83
|
if(type == 'linux') {
|
84
|
document.getElementById('operating_system_linux').checked = true;
|
85
|
document.getElementById('operating_system_windows').checked = false;
|
86
|
document.getElementById('file_perms_box').style.display = 'none';
|
87
|
} else if(type == 'windows') {
|
88
|
document.getElementById('operating_system_linux').checked = false;
|
89
|
document.getElementById('operating_system_windows').checked = true;
|
90
|
document.getElementById('file_perms_box').style.display = 'none';
|
91
|
}
|
92
|
}
|
93
|
</script>
|
94
|
</head>
|
95
|
<body>
|
96
|
<div class="body">
|
97
|
<table summary="" cellpadding="0" cellspacing="0">
|
98
|
<tr style="background: #a9c9ea;">
|
99
|
<td valign="top">
|
100
|
<img src="../templates/wb_theme/images/logo.png" alt="Logo" />
|
101
|
</td>
|
102
|
<td>
|
103
|
<h1 style="border:none; margin-top:1em;font-size:150%;">Installation Wizard</h1>
|
104
|
</td>
|
105
|
</tr>
|
106
|
</table>
|
107
|
|
108
|
<form name="website_baker_installation_wizard" action="save.php" method="post">
|
109
|
<input type="hidden" name="url" value="" />
|
110
|
<input type="hidden" name="username_fieldname" value="admin_username" />
|
111
|
<input type="hidden" name="password_fieldname" value="admin_password" />
|
112
|
<input type="hidden" name="remember" id="remember" value="true" />
|
113
|
|
114
|
<div style="padding: 5px; text-align: center; font-weight: bold;">
|
115
|
Welcome to the WebsiteBaker Installation Wizard.
|
116
|
</div>
|
117
|
<?php
|
118
|
if(isset($_SESSION['message']) AND $_SESSION['message'] != '') {
|
119
|
?><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
|
120
|
}
|
121
|
?>
|
122
|
<table summary="" cellpadding="0" cellspacing="0" border="0">
|
123
|
<tr>
|
124
|
<td colspan="6" class="step-row"><h1 class="step-row">Step 1</h1> Please check the following requirements are met before continuing...</td>
|
125
|
</tr>
|
126
|
<?php if($session_support != '<font class="good">Enabled</font>') { ?>
|
127
|
<tr>
|
128
|
<td colspan="6" class="error">Please note: PHP Session Support may appear disabled if your browser does not support cookies.</td>
|
129
|
</tr>
|
130
|
<?php } ?>
|
131
|
<tr>
|
132
|
<td style="color: #666666;">PHP Version > 5.2.1</td>
|
133
|
<td>
|
134
|
<?php
|
135
|
if (version_compare(PHP_VERSION, '5.2.1', '>'))
|
136
|
{
|
137
|
?><font class="good">Yes</font><?php
|
138
|
} else {
|
139
|
$installFlag = false;
|
140
|
?><font class="bad">No</font><?php
|
141
|
}
|
142
|
?>
|
143
|
</td>
|
144
|
<td style="color: #666666;">PHP Session Support</td>
|
145
|
<td><?php echo $session_support; ?></td>
|
146
|
</tr>
|
147
|
<tr>
|
148
|
<td style="color: #666666;">Server DefaultCharset</td>
|
149
|
<td>
|
150
|
<?php
|
151
|
$chrval = (($e_adc != '') && (strtolower($e_adc) != 'utf-8') ? true : false);
|
152
|
if($chrval == false) {
|
153
|
?><font class="good">
|
154
|
<?php echo (($e_adc=='') ? 'OK' : $e_adc) ?>
|
155
|
</font>
|
156
|
<?php
|
157
|
} else {
|
158
|
?><font class="bad"><?php echo $e_adc ?></font><?php
|
159
|
}
|
160
|
|
161
|
?>
|
162
|
</td>
|
163
|
<td style="color: #666666;">PHP Safe Mode</td>
|
164
|
<td>
|
165
|
<?php
|
166
|
if(ini_get('safe_mode')=='' || strpos(strtolower(ini_get('safe_mode')), 'off')!==FALSE || ini_get('safe_mode')==0) {
|
167
|
?><font class="good">Disabled</font><?php
|
168
|
} else {
|
169
|
$installFlag = false;
|
170
|
?><font class="bad">Enabled</font><?php
|
171
|
}
|
172
|
?>
|
173
|
</td>
|
174
|
</tr>
|
175
|
<?php if($chrval == true) {
|
176
|
?>
|
177
|
<tr>
|
178
|
<td colspan="6" style="font-size: 10px;" class="bad">
|
179
|
<p class="warning">
|
180
|
<b>Please note:</b> Yor webserver is configured to deliver <b><?php echo $e_adc;?></b> charset only.<br />
|
181
|
To display national special characters (e.g.: ä á) in clear manner, switch off this preset please(or let it do by your hosting provider).<br />
|
182
|
In any case you can choose <b><?php echo $e_adc;?></b> in the settings of WebsiteBaker.<br />
|
183
|
But this solution does not guarranty a correct displaying of the content from all modules!
|
184
|
</p>
|
185
|
</td>
|
186
|
</tr>
|
187
|
<?php } ?>
|
188
|
</table>
|
189
|
<table summary="" cellpadding="3" cellspacing="0">
|
190
|
<tr>
|
191
|
<td colspan="8" class="step-row"><h1 class="step-row">Step 2</h1> Please check the following files/folders are writeable before continuing...</td>
|
192
|
</tr>
|
193
|
<?php
|
194
|
$config = '<font class="good">Writeable</font>';
|
195
|
$config_content = "<?php\n";
|
196
|
$configFile = '/config.php';
|
197
|
if(!isset($_SESSION['config_rename']) )
|
198
|
{
|
199
|
// cnfig.php or config.php.new
|
200
|
if( (file_exists($wb_path.$configFile)==true))
|
201
|
{
|
202
|
// next operation only if file is writeable
|
203
|
if(is_writeable($wb_path.$configFile))
|
204
|
{
|
205
|
// already installed? it's not empty
|
206
|
if ( filesize($wb_path.$configFile) > 128)
|
207
|
{
|
208
|
$installFlag = false;
|
209
|
$config = '<font class="bad">Not empty!!?</font>';
|
210
|
// try to open and to write
|
211
|
} elseif( !$handle = fopen($wb_path.$configFile, 'w') )
|
212
|
{
|
213
|
$installFlag = false;
|
214
|
$config = '<font class="bad">Not Writeable</font>';
|
215
|
} else {
|
216
|
if (fwrite($handle, $config_content) === FALSE) {
|
217
|
$installFlag = false;
|
218
|
$config = '<font class="bad">Not Writeable</font>';
|
219
|
} else {
|
220
|
$config = '<font class="good">Writeable</font>';
|
221
|
$_SESSION['config_rename'] = true;
|
222
|
}
|
223
|
// Close file
|
224
|
fclose($handle);
|
225
|
}
|
226
|
} else {
|
227
|
$installFlag = false;
|
228
|
$config = '<font class="bad">Not Writeable</font>';
|
229
|
}
|
230
|
// it's config.php.new
|
231
|
} elseif((file_exists($wb_path.'/config.php.new')==true))
|
232
|
{
|
233
|
$configFile = '/config.php.new';
|
234
|
$installFlag = false;
|
235
|
$config = '<font class="bad">Please rename</font>';
|
236
|
} else
|
237
|
{
|
238
|
$installFlag = false;
|
239
|
$config = '<font class="bad">Missing!!?</font>';
|
240
|
}
|
241
|
}
|
242
|
?>
|
243
|
<tr>
|
244
|
<td style="color: #666666;"><?php print $wb_root.$configFile ?></td>
|
245
|
<td colspan="2" ><?php echo $config ?></td>
|
246
|
</tr>
|
247
|
<tr>
|
248
|
<td style="color: #666666;"><?php print $wb_root ?>/pages/</td>
|
249
|
<td><?php if(is_writable('../pages/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../pages/')) {$installFlag = false; echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td>
|
250
|
<td style="color: #666666;"><?php print $wb_root ?>/media/</td>
|
251
|
<td><?php if(is_writable('../media/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../media/')) {$installFlag = false; echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td>
|
252
|
<td style="color: #666666;"><?php print $wb_root ?>/templates/</td>
|
253
|
<td><?php if(is_writable('../templates/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../templates/')) {$installFlag = false; echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td>
|
254
|
</tr>
|
255
|
<tr>
|
256
|
<td style="color: #666666;"><?php print $wb_root ?>/modules/</td>
|
257
|
<td><?php if(is_writable('../modules/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../modules/')) {$installFlag = false; echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td>
|
258
|
<td style="color: #666666;"><?php print $wb_root ?>/languages/</td>
|
259
|
<td><?php if(is_writable('../languages/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../languages/')) {$installFlag = false; echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td>
|
260
|
<td style="color: #666666;"><?php print $wb_root ?>/temp/</td>
|
261
|
<td><?php if(is_writable('../temp/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../temp/')) {$installFlag = false; echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td>
|
262
|
<td> </td>
|
263
|
<td> </td>
|
264
|
</tr>
|
265
|
</table>
|
266
|
<table summary="" cellpadding="3" cellspacing="0" >
|
267
|
<tr>
|
268
|
<td colspan="2" class="step-row"><h1 class="step-row">Step 3</h1> Please check URL settings, and select a default timezone and a default backend language...</td>
|
269
|
</tr>
|
270
|
<tr>
|
271
|
<td class="name">
|
272
|
Absolute URL:
|
273
|
</td>
|
274
|
<td class="value">
|
275
|
<?php
|
276
|
// Try to guess installation URL
|
277
|
$guessed_url = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"];
|
278
|
$guessed_url = rtrim(dirname($guessed_url), 'install');
|
279
|
?>
|
280
|
<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 $guessed_url; } ?>" />
|
281
|
</td>
|
282
|
</tr>
|
283
|
<tr>
|
284
|
<td class="name">
|
285
|
Default Timezone:
|
286
|
</td>
|
287
|
<td>
|
288
|
<select <?php echo field_error('default_timezone');?> tabindex="3" name="default_timezone" style="width: 100%;">
|
289
|
<?php
|
290
|
$TIMEZONES['-12'] = 'GMT - 12 Hours';
|
291
|
$TIMEZONES['-11'] = 'GMT -11 Hours';
|
292
|
$TIMEZONES['-10'] = 'GMT -10 Hours';
|
293
|
$TIMEZONES['-9'] = 'GMT -9 Hours';
|
294
|
$TIMEZONES['-8'] = 'GMT -8 Hours';
|
295
|
$TIMEZONES['-7'] = 'GMT -7 Hours';
|
296
|
$TIMEZONES['-6'] = 'GMT -6 Hours';
|
297
|
$TIMEZONES['-5'] = 'GMT -5 Hours';
|
298
|
$TIMEZONES['-4'] = 'GMT -4 Hours';
|
299
|
$TIMEZONES['-3.5'] = 'GMT -3.5 Hours';
|
300
|
$TIMEZONES['-3'] = 'GMT -3 Hours';
|
301
|
$TIMEZONES['-2'] = 'GMT -2 Hours';
|
302
|
$TIMEZONES['-1'] = 'GMT -1 Hour';
|
303
|
$TIMEZONES['0'] = 'GMT';
|
304
|
$TIMEZONES['1'] = 'GMT +1 Hour';
|
305
|
$TIMEZONES['2'] = 'GMT +2 Hours';
|
306
|
$TIMEZONES['3'] = 'GMT +3 Hours';
|
307
|
$TIMEZONES['3.5'] = 'GMT +3.5 Hours';
|
308
|
$TIMEZONES['4'] = 'GMT +4 Hours';
|
309
|
$TIMEZONES['4.5'] = 'GMT +4.5 Hours';
|
310
|
$TIMEZONES['5'] = 'GMT +5 Hours';
|
311
|
$TIMEZONES['5.5'] = 'GMT +5.5 Hours';
|
312
|
$TIMEZONES['6'] = 'GMT +6 Hours';
|
313
|
$TIMEZONES['6.5'] = 'GMT +6.5 Hours';
|
314
|
$TIMEZONES['7'] = 'GMT +7 Hours';
|
315
|
$TIMEZONES['8'] = 'GMT +8 Hours';
|
316
|
$TIMEZONES['9'] = 'GMT +9 Hours';
|
317
|
$TIMEZONES['9.5'] = 'GMT +9.5 Hours';
|
318
|
$TIMEZONES['10'] = 'GMT +10 Hours';
|
319
|
$TIMEZONES['11'] = 'GMT +11 Hours';
|
320
|
$TIMEZONES['12'] = 'GMT +12 Hours';
|
321
|
$TIMEZONES['13'] = 'GMT +13 Hours';
|
322
|
foreach($TIMEZONES AS $hour_offset => $title) {
|
323
|
?>
|
324
|
<option value="<?php echo $hour_offset; ?>"<?php if(isset($_SESSION['default_timezone']) AND $_SESSION['default_timezone'] == $hour_offset) { echo ' selected="selected"'; } elseif(!isset($_SESSION['default_timezone']) AND $hour_offset == 0) { echo ' selected="selected"'; } ?>><?php echo $title; ?></option>
|
325
|
<?php
|
326
|
}
|
327
|
?>
|
328
|
</select>
|
329
|
</td>
|
330
|
</tr>
|
331
|
<tr>
|
332
|
<td class="name">
|
333
|
Default Language:
|
334
|
</td>
|
335
|
<td>
|
336
|
<select <?php echo field_error('default_language');?> tabindex="3" name="default_language" style="width: 100%;">
|
337
|
<?php
|
338
|
$DEFAULT_LANGUAGE = array(
|
339
|
'BG'=>'Bulgarian', 'CA'=>'Catalan', 'CS'=>'Čeština', 'DA'=>'Danish', 'DE'=>'Deutsch', 'EN'=>'English',
|
340
|
'ES'=>'Spanish', 'ET'=>'Eesti', 'FI'=>'Suomi', 'FR'=>'Français',
|
341
|
'HR'=>'Hrvatski', 'HU'=>'Magyar','IT'=>'Italiano', 'LV'=>'Latviesu',
|
342
|
'NL'=>'Nederlands', 'NO'=>'Norsk', 'PL'=>'Polski', 'PT'=>'Portuguese (Brazil)', 'RU'=>'Russian', 'SE'=>'Svenska','SK'=>'Slovensky','TR'=>'Turkish'
|
343
|
);
|
344
|
foreach($DEFAULT_LANGUAGE as $lang_id => $lang_title) {
|
345
|
?>
|
346
|
<option value="<?php echo $lang_id; ?>"<?php if(isset($_SESSION['default_language']) AND $_SESSION['default_language'] == $lang_id) { echo ' selected="selected"'; } elseif(!isset($_SESSION['default_language']) AND $lang_id == 'EN') { echo ' selected="selected"'; } ?>><?php echo $lang_title; ?></option>
|
347
|
<?php
|
348
|
}
|
349
|
?>
|
350
|
</select>
|
351
|
</td>
|
352
|
</tr>
|
353
|
</table>
|
354
|
<table border="0" summary="" cellpadding="0" cellspacing="0">
|
355
|
<tr>
|
356
|
<td class="step-row" colspan="3"><h1 class="step-row">Step 4</h1> Please specify your operating system information below...</td>
|
357
|
</tr>
|
358
|
<tr>
|
359
|
<td class="name">
|
360
|
Server Operating System:
|
361
|
</td>
|
362
|
<td style="">
|
363
|
<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"'; } ?> />
|
364
|
<span style="cursor: pointer;" onclick="javascript: change_os('linux');">Linux/Unix based</span>
|
365
|
<br />
|
366
|
<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"'; } ?> />
|
367
|
<span style="cursor: pointer;" onclick="javascript: change_os('windows');">Windows</span>
|
368
|
</td>
|
369
|
</tr>
|
370
|
<tr>
|
371
|
<td class="name"> </td>
|
372
|
<td class="value">
|
373
|
<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'; } ?>;">
|
374
|
<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'; } ?> />
|
375
|
<label style=" margin: 0; " for="world_writeable">
|
376
|
World-writeable file permissions (777)
|
377
|
</label>
|
378
|
<br />
|
379
|
<p class="warning">(Please note: only recommended for testing environments)</p>
|
380
|
</div>
|
381
|
</td>
|
382
|
</tr>
|
383
|
</table>
|
384
|
<table summary="" cellpadding="0" cellspacing="0">
|
385
|
<tr>
|
386
|
<td colspan="2" class="step-row"><h1 class="step-row">Step 5</h1> Please enter your MySQL database server details below...</td>
|
387
|
</tr>
|
388
|
<tr>
|
389
|
<td class="name">Host Name</td>
|
390
|
<td class="value">
|
391
|
<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'; } ?>" />
|
392
|
</td>
|
393
|
</tr>
|
394
|
<tr>
|
395
|
<td class="name">Database Name ([a-zA-Z0-9_-])</td>
|
396
|
<td class="value">
|
397
|
<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'; } ?>" />
|
398
|
</td>
|
399
|
</tr>
|
400
|
<tr>
|
401
|
<td class="name">Table Prefix ([a-zA-Z0-9_])</td>
|
402
|
<td class="value">
|
403
|
<input <?php echo field_error('table_prefix')?> type="text" tabindex="11" name="table_prefix" value="<?php if(isset($_SESSION['table_prefix'])) { echo $_SESSION['table_prefix']; } else { echo 'wb_'; } ?>" />
|
404
|
</td>
|
405
|
</tr>
|
406
|
<tr>
|
407
|
<td class="name">Username:</td>
|
408
|
<td class="value">
|
409
|
<input <?php echo field_error('database_username');?> type="text" tabindex="9" name="database_username" value="<?php if(isset($_SESSION['database_username'])) { echo $_SESSION['database_username']; } else { echo 'root'; } ?>" />
|
410
|
</td>
|
411
|
</tr>
|
412
|
<tr>
|
413
|
<td class="name">Password:</td>
|
414
|
<td class="value">
|
415
|
<input type="password" tabindex="10" name="database_password" value="<?php if(isset($_SESSION['database_password'])) { echo $_SESSION['database_password']; } ?>" />
|
416
|
</td>
|
417
|
</tr>
|
418
|
<tr>
|
419
|
<td class="name hide" colspan="2">
|
420
|
<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"'; } ?> />
|
421
|
<label for="install_tables" style="color: #666666;">Install Tables</label>
|
422
|
<br />
|
423
|
<span style="font-size: 1px; color: #666666;">(Please note: May remove existing tables and data)</span>
|
424
|
</td>
|
425
|
</tr>
|
426
|
</table>
|
427
|
<table summary="" cellpadding="0" cellspacing="0" >
|
428
|
<tbody>
|
429
|
<tr>
|
430
|
<td colspan="2" class="step-row"><h1 class="step-row">Step 6</h1> Please enter your website title below...</td>
|
431
|
</tr>
|
432
|
<tr>
|
433
|
<td class="name">Website Title:</td>
|
434
|
<td class="value">
|
435
|
<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'; } ?>" />
|
436
|
</td>
|
437
|
</tr>
|
438
|
</tbody>
|
439
|
</table>
|
440
|
<table summary="" cellpadding="0" cellspacing="0" border="0">
|
441
|
<tr>
|
442
|
<td colspan="2" class="step-row"><h1 class="step-row">Step 7</h1> Please enter your Administrator account details below...</td>
|
443
|
</tr>
|
444
|
<tr>
|
445
|
<td class="name">Loginname:</td>
|
446
|
<td class="value">
|
447
|
<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'; } ?>" />
|
448
|
</td>
|
449
|
</tr>
|
450
|
<tr>
|
451
|
<td class="name">Email:</td>
|
452
|
<td class="value">
|
453
|
<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']; } ?>" />
|
454
|
</td>
|
455
|
</tr>
|
456
|
<tr>
|
457
|
<td class="name">Password:</td>
|
458
|
<td class="value">
|
459
|
<input <?php echo field_error('admin_password');?> type="password" tabindex="16" name="admin_password" value="" />
|
460
|
</td>
|
461
|
</tr>
|
462
|
<tr>
|
463
|
<td class="name">Re-Password:</td>
|
464
|
<td class="value">
|
465
|
<input <?php echo field_error('admin_repassword');?> type="password" tabindex="17" name="admin_repassword" value="" />
|
466
|
</td>
|
467
|
</tr>
|
468
|
</table>
|
469
|
<table summary="" cellpadding="0" cellspacing="0">
|
470
|
<tr valign="top">
|
471
|
<td><strong>Please note: </strong></td>
|
472
|
</tr>
|
473
|
<tr valign="top">
|
474
|
<td>
|
475
|
<p class="warning">
|
476
|
WebsiteBaker is released under the
|
477
|
<a href="http://www.gnu.org/licenses/gpl.html" target="_blank" tabindex="19">GNU General Public License</a>
|
478
|
<br />
|
479
|
By clicking install, you are accepting the license.
|
480
|
</p>
|
481
|
</td>
|
482
|
</tr>
|
483
|
<tr valign="top">
|
484
|
<td>
|
485
|
<p class="center">
|
486
|
<?php if($installFlag == true) { ?>
|
487
|
<input type="submit" tabindex="20" name="install" value="Install WebsiteBaker" />
|
488
|
<?php } else { ?>
|
489
|
<input type="button" tabindex="20" name="restart" value="Check your Settings in Step1 or Step2" class="submit" onclick="javascript: window.location = '<?php print $_SERVER['SCRIPT_NAME'] ?>';" />
|
490
|
<?php } ?>
|
491
|
</p>
|
492
|
</td>
|
493
|
</tr>
|
494
|
</table>
|
495
|
|
496
|
</form>
|
497
|
|
498
|
<div style="padding: 10px 0px 10px 0px; text-align:center;">
|
499
|
<!-- 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. -->
|
500
|
<a href="http://www.websitebaker2.org/" style="color: #000000;" target="_blank">WebsiteBaker</a>
|
501
|
is released under the
|
502
|
<a href="http://www.gnu.org/licenses/gpl.html" style="color: #000000;" target="_blank">GNU General Public License</a>
|
503
|
<!-- 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. -->
|
504
|
</div >
|
505
|
</div>
|
506
|
|
507
|
</body>
|
508
|
</html>
|