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