Project

General

Profile

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: 2107 $
30
 * @link         $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/install/index.php $
31
 * @lastmodified $Date: 2014-11-25 13:43:04 +0100 (Tue, 25 Nov 2014) $
32
 * @since        File available since 2012-04-01
33
 * @description  xyz
34
 */
35
// PHP less then 5.4.0 is prohibited ---
36
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
37
    $sMsg = '<p style="color: #ff0000;">WebsiteBaker 2.8.4 and above is not able to run with PHP-Version less then 5.4.0!!<br />'
38
          . 'Please change your PHP-Version to any kind from 5.4.0 and up!<br />'
39
          . 'If you have problems to solve that, ask your hosting provider for it.<br  />'
40
          . 'The very best solution is the use of PHP-5.4 and up</p>';
41
    die($sMsg);
42
}
43
include(__DIR__.'/InstallHelper.php');
44
// Start a session
45
if(!defined('SESSION_STARTED')) {
46
	session_name('wb_session_id');
47
	session_start();
48
	define('SESSION_STARTED', true);
49
}
50

    
51
$doc_root = str_replace('\\','/',rtrim(realpath($_SERVER['DOCUMENT_ROOT']),'/').'/');
52
$wb_path = str_replace('\\','/',rtrim(dirname(dirname(realpath( __FILE__))),'/')).'/';
53
$wb_root = str_replace(($doc_root),'',$wb_path);
54

    
55
// Function to highlight input fields which contain wrong/missing data
56
function field_error($field_name='') {
57
	if(!defined('SESSION_STARTED') || $field_name == '') return;
58
	if(isset($_SESSION['ERROR_FIELD']) && $_SESSION['ERROR_FIELD'] == $field_name) {
59
		return ' class="wrong"';
60
	}
61
}
62

    
63
$installFlag = true;
64
// Check if the page has been reloaded
65
if(!isset($_GET['sessions_checked']) OR $_GET['sessions_checked'] != 'true') {
66
	// Set session variable
67
	$_SESSION['session_support'] = '<font class="good">Enabled</font>';
68
	// Reload page
69
	header('Location: index.php?sessions_checked=true');
70
	exit(0);
71
} else {
72
	// Check if session variable has been saved after reload
73
	if(isset($_SESSION['session_support'])) {
74
		$session_support = $_SESSION['session_support'];
75
	} else {
76
		$installFlag = false;
77
		$session_support = '<font class="bad">Disabled</font>';
78
	}
79
}
80
$getMagicQuotesGpc = '<font class="good">Disabled</font>';
81
if ( function_exists('get_magic_quotes_gpc')  && filter_var(strtolower(get_magic_quotes_gpc()), FILTER_VALIDATE_BOOLEAN ) ) {
82
    $getMagicQuotesGpc = '<font class="bad">Enabled</font>';
83
    $installFlag = false;
84
}
85

    
86
// Check if AddDefaultCharset is set
87
$e_adc=false;
88
$sapi=php_sapi_name();
89
if(strpos($sapi, 'apache')!==FALSE || strpos($sapi, 'nsapi')!==FALSE) {
90
	flush();
91
	$apache_rheaders=apache_response_headers();
92
	foreach($apache_rheaders AS $h) {
93
		if(strpos($h, 'html; charset')!==FALSE) {
94
			preg_match('/charset\s*=\s*([a-zA-Z0-9- _]+)/', $h, $match);
95
			$apache_charset=$match[1];
96
			$e_adc=$apache_charset;
97
		}
98
	}
99
}
100

    
101
//$sapi_type = php_sapi_name();
102
if(!isset($_SESSION['operating_system'])) {
103
	$operating_system = ((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'windows' : 'linux');
104
} else {
105
	$operating_system = $_SESSION['operating_system'];
106
}
107

    
108
function checkConfigFile ($sWbPath,$sType ) {
109
	$config = '';
110
	$sConfigContent	= "<?php\n";
111
	$sConfigFile = $sWbPath.$sType.'.php';
112

    
113
// config.php or config.php.new
114
		if ((file_exists($sConfigFile)==true)) {
115
// next operation only if file is writeable
116
			if (is_writeable($sConfigFile)) {
117
// already installed? it's not empty
118
				if (filesize($sConfigFile) > 100) {
119
					$config = '<font class="bad">Already installed? Check!</font>';
120
// try to open and to write
121
				} elseif (!$handle = fopen($sConfigFile, 'w')) {
122
					$config = '<font class="bad">Not Writeable</font>';
123
				} else {
124
					if (fwrite($handle, $sConfigContent) === FALSE) {
125
						$config = '<font class="bad">Not Writeable</font>';
126
					} else {
127
						$config = '';
128
						$_SESSION[$sType.'_rename'] = true;
129
					}
130
					// Close file
131
					fclose($handle);
132
				}
133
			} else {
134
				$config = '<font class="bad">Not Writeable</font>';
135
			}
136
// it's config.php.new
137
		} elseif ((file_exists($sConfigFile.'.new')==true)) {
138
			$config = '<font class="bad">Please rename to '.$sType.'.php</font>';
139
		} else {
140
			$config = '<font class="bad">Missing!!?</font>';
141
		}
142
	return $config;
143
}
144

    
145

    
146
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
147
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
148
<head>
149
<title>WebsiteBaker Installation Wizard</title>
150
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
151
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
152
<script type="text/javascript">
153

    
154
function confirm_link(message, url) {
155
	if(confirm(message)) location.href = url;
156
}
157
function change_os(type) {
158
	if(type == 'linux') {
159
		document.getElementById('operating_system_linux').checked = true;
160
		document.getElementById('operating_system_windows').checked = false;
161
		document.getElementById('file_perms_box').style.display = 'none';
162
	} else if(type == 'windows') {
163
		document.getElementById('operating_system_linux').checked = false;
164
		document.getElementById('operating_system_windows').checked = true;
165
		document.getElementById('file_perms_box').style.display = 'none';
166
	}
167
}
168
</script>
169
</head>
170
<body>
171
<div class="body">
172
<table summary="" cellpadding="0" cellspacing="0">
173
<tr style="background: #a9c9ea;">
174
	<td valign="top">
175
		<img src="../templates/WbTheme/images/logo.png" alt="Logo" />
176
	</td>
177
	<td>
178
		<h1 style="border:none; margin-top:1em;font-size:150%;">Installation Wizard</h1>
179
	</td>
180
</tr>
181
</table>
182

    
183
<form name="website_baker_installation_wizard" action="save.php" method="post" accept-charset="UTF-8">
184
<input type="hidden" name="url" value="" />
185
<input type="hidden" name="username_fieldname" value="admin_username" />
186
<input type="hidden" name="password_fieldname" value="admin_password" />
187
<input type="hidden" name="remember" id="remember" value="true" />
188

    
189
		<div style="padding: 5px; text-align: center; font-weight: bold;">
190
			Welcome to the WebsiteBaker Installation Wizard.
191
		</div>
192
		<?php
193
		if(isset($_SESSION['message']) AND $_SESSION['message'] != '') {
194
			?><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
195
		}
196
		?>
197
		<table summary="" cellpadding="0" cellspacing="0" border="0">
198
		<tr>
199
			<td colspan="6" class="step-row"><h1 class="step-row">Step 1</h1>&nbsp;Please check the following requirements are met before continuing...</td>
200
		</tr>
201
		<?php if($session_support != '<font class="good">Enabled</font>') { ?>
202
		<tr>
203
			<td colspan="6" class="error">Please note: PHP Session Support may appear disabled if your browser does not support cookies.</td>
204
		</tr>
205
		<?php } ?>
206
		<tr>
207
			<td style="color: #666666;">PHP Session Support</td>
208
			<td>
209
				<?php echo $session_support; ?>
210
			</td>
211
			<td style="color: #666666;">
212
                &nbsp;
213
            </td>
214
			<td>
215
                &nbsp;
216
            </td>
217
		</tr>
218
	<tr>
219
		<td style="color: #666666;">PHP Interface</td>
220
			<td>
221
				<?php
222
						?><font class="good">
223
						<?php echo $sapi ?>
224
						</font>
225
			</td>
226
		<td style="color: #666666;">Server DefaultCharset</td>
227
			<td >
228
				<?php
229
					$chrval = (($e_adc != '') && (strtolower($e_adc) != 'utf-8') ? true : false);
230
					if($chrval == false) {
231
						?><font class="good">
232
						<?php echo (($e_adc=='') ? 'OK' : $e_adc) ?>
233
						</font>
234
						<?php
235
					} else {
236
						?><font class="bad"><?php echo $e_adc ?></font><?php
237
					}
238
				?>
239
			</td>
240
		</tr>
241
		<?php if($chrval == true) {
242
		?>
243
		<tr>
244
			<td colspan="6" style="font-size: 10px;" class="bad">
245
<p class="warning">
246
<b>Please note:</b> Yor webserver is configured to deliver <b><?php echo $e_adc;?></b> charset only.<br />
247
To display national special characters (e.g.: &auml; &aacute;) in clear manner, switch off this preset please(or let it do by your hosting provider).<br />
248
In any case you can choose <b><?php echo $e_adc;?></b> in the settings of WebsiteBaker.<br />
249
But this solution does not guarranty a correct displaying of the content from all modules!
250
</p>
251
</td>
252
</tr>
253
<?php } ?>
254
<tr>
255
	<td style="line-height: 0.4em;" colspan="4">&nbsp;</td>
256
</tr>
257
</table>
258
<table summary="" cellpadding="3" cellspacing="0">
259
<tr>
260
	<td colspan="6" class="step-row"><h1 class="step-row">Step 2</h1>&nbsp;Please check the following files/folders are writeable before continuing...</td>
261
</tr>
262
<?php
263
	$sTmp = '';
264
	$config = '';
265
	$sConfigFile = 'config.php.new';
266
	if( ($sTmp = checkConfigFile($wb_path,'config')) === '' ) {
267
		$config = '<font class="good">Writeable</font>';
268
	} else {
269
		$config = $sTmp;
270
	}
271
	$sConfigFile = preg_match('/(?:rename)/i',$config) ? $sConfigFile : 'config.php';
272
	$installFlag = $installFlag && ($sTmp == '');
273
?>
274
		<tr>
275
			<td colspan="2" style="color: #666666;"><?php print $wb_root.$sConfigFile ?></td>
276
			<td colspan="2"><?php echo $config ?></td>
277
		</tr>
278
<?php
279
	$sTmp = '';
280
	$config = '';
281
	$sSetupIniFile = 'setup.ini.php.new';
282
	if( ($sTmp = checkConfigFile($wb_path,'setup.ini')) === '' ) {
283
		$config = '<font class="good">Writeable</font>';
284
	} else {
285
		$config = $sTmp;
286
	}
287
	$sSetupIniFile = preg_match('/(?:rename)/i',$config) ? $sSetupIniFile : 'setup.ini.php';
288
	$installFlag = $installFlag && ($sTmp == '');
289
?>
290
		<tr>
291
			<td colspan="2" style="color: #666666;"><?php print $wb_root.$sSetupIniFile ?></td>
292
			<td colspan="2"><?php echo $config ?></td>
293
		</tr>
294
		<tr>
295
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>pages/</td>
296
			<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>
297
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>media/</td>
298
			<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>
299
		</tr>
300
		<tr>
301
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>templates/</td>
302
			<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>
303
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>modules/</td>
304
			<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>
305
		</tr>
306
		<tr>
307
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>languages/</td>
308
			<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>
309
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>temp/</td>
310
			<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>
311
		</tr>
312
		<tr>
313
			<td style="line-height: 0.4em;" colspan="4">&nbsp;</td>
314
		</tr>
315
		</table>
316
<?php if($installFlag==true) { ?>
317
	
318
		<table summary="" cellpadding="3" cellspacing="0" >
319
		<tr>
320
			<td colspan="2" class="step-row"><h1 class="step-row">Step 3</h1>&nbsp;Please check URL settings, and select a default timezone and a default backend language...</td>
321
		</tr>
322
		<tr>
323
			<td class="name">
324
				Absolute URL:
325
			</td>
326
			<td class="value">
327
				<?php
328
				// Try to guess installation URL
329
				$guessed_url = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"];
330
				$guessed_url = rtrim(dirname($guessed_url), 'install');
331
				?>
332
				<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; } ?>" />
333
			</td>
334
		</tr>
335
		<tr>
336
			<td class="name">
337
				Default Timezone:
338
			</td>
339
			<td>
340
				<select <?php echo field_error('default_timezone');?> tabindex="3" name="default_timezone" style="width: 100%;">
341
<?php
342
/*
343
 build list of TimeZone options
344
*/
345
    $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);
346
    $sOutput = PHP_EOL;
347
    foreach($aZones as $fOffset) {
348
        $sItemTitle = 'GMT '.(($fOffset>0)?'+':'').(($fOffset==0)?'':(string)$fOffset.' Hours');
349
        $sOutput .= '<option value="'.(string)$fOffset.'"';
350
        if (
351
            (isset($_SESSION['default_timezone']) AND $_SESSION['default_timezone'] == (string)$fOffset) ||
352
            (!isset($_SESSION['default_timezone']) AND $fOffset == 0)
353
        ) {
354
            $sOutput .= ' selected="selected"';
355
        }
356
        $sOutput .= '>'.$sItemTitle.'</option>'.PHP_EOL;
357
    }
358
// output Timezone options
359
    echo $sOutput;
360
?>
361
				</select>
362
			</td>
363
		</tr>
364
		<tr>
365
			<td class="name">
366
				Default Language:
367
			</td>
368
			<td>
369
				<select <?php echo field_error('default_language');?> tabindex="3" name="default_language" style="width: 100%;">
370
<?php
371
/*
372
 Find all available languages in /language/ folder and build option list from
373
*/
374
    $sLangDir = str_replace('\\', '/', dirname(__DIR__).'/languages/');
375
    $aAvailableLanguages = InstallHelper::getAvailableLanguages($sLangDir);
376
    $sOutput = PHP_EOL;
377
    foreach ($aAvailableLanguages as $sLangCode => $sLangName) {
378
        $sOutput .= '<option value="'.$sLangCode.'"';
379
        if (
380
            (isset($_SESSION['default_language']) AND $_SESSION['default_language'] == $sLangCode) ||
381
            (!isset($_SESSION['default_language']) AND $sLangCode == 'EN')
382
        ) {
383
            $sOutput .= ' selected="selected"';
384
        }
385
        $sOutput .= '>'.$sLangName.'</option>'.PHP_EOL;
386
    }
387
// output Language options
388
    echo $sOutput;
389
?>
390
				</select>
391
			</td>
392
		</tr>
393
		<tr>
394
			<td style="line-height: 0.4em;" colspan="2">&nbsp;</td>
395
		</tr>
396
		</table>
397
		<table border="0" summary="" cellpadding="0" cellspacing="0">
398
		<tr>
399
			<td class="step-row" colspan="3"><h1 class="step-row">Step 4</h1>&nbsp;Please specify your operating system information below...</td>
400
		</tr>
401
		<tr>
402
			<td class="name">&nbsp;
403
				Server Operating System:
404
			</td>
405
			<td style="<?php echo $operating_system ?>">
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($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($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">&nbsp;</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
		<tr>
427
			<td style="line-height: 0.4em;" colspan="2">&nbsp;</td>
428
		</tr>
429
		</table>
430
		<table summary="" cellpadding="0" cellspacing="0">
431
    		<tr>
432
    			<td colspan="2" class="step-row"><h1 class="step-row">Step 5</h1>&nbsp;Please enter your MySQL database server details below...</td>
433
    		</tr>
434
    		<tr>
435
    			<td class="name">Host Name</td>
436
    			<td class="value">
437
    				<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'; } ?>" />
438
    			</td>
439
    		</tr>
440
    		<tr>
441
    			<td class="name">Database Name&nbsp;([a-zA-Z0-9_-])</td>
442
    			<td class="value">
443
    				<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'; } ?>" />
444
    			</td>
445
    		</tr>
446
		<tr>
447
			<td class="name">Table Prefix&nbsp;([a-zA-Z0-9_])</td>
448
			<td class="value">
449
				<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_'; } ?>" />
450
			</td>
451
		</tr>
452
		<tr>
453
    			<td class="name">Username:</td>
454
    			<td class="value">
455
    				<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'; } ?>" />
456
    			</td>
457
		</tr>
458
		<tr>
459
    			<td class="name">Password:</td>
460
    			<td class="value">
461
    				<input type="password" tabindex="11" name="database_password" value="<?php if(isset($_SESSION['database_password'])) { echo $_SESSION['database_password']; } ?>" />
462
    			</td>
463
		</tr>
464
		<tr>
465
			<td class="name hide" colspan="2">
466
				<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"'; } ?> />
467
				<label for="install_tables" style="color: #666666;">Install Tables</label>
468
				<br />
469
				<span style="font-size: 1px; color: #666666;">(Please note: May remove existing tables and data)</span>
470
			</td>
471
		</tr>
472
		<tr>
473
			<td style="line-height: 0.4em;" colspan="2">&nbsp;</td>
474
		</tr>
475
		</table>
476
		<table summary="" cellpadding="0" cellspacing="0" >
477
		<tbody>
478
		<tr>
479
			<td colspan="2" class="step-row"><h1 class="step-row">Step 6</h1>&nbsp;Please enter your website title below...</td>
480
		</tr>
481
		<tr>
482
			<td class="name">Website Title:</td>
483
			<td class="value">
484
				<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'; } ?>" />
485
			</td>
486
		</tr>
487
		<tr>
488
			<td style="line-height: 0.4em;" colspan="2">&nbsp;</td>
489
		</tr>
490
		</tbody>
491
		</table>
492
		<table summary="" cellpadding="0" cellspacing="0" border="0">
493
		<tr>
494
			<td colspan="2" class="step-row"><h1 class="step-row">Step 7</h1> Please enter your Administrator account details below...</td>
495
		</tr>
496
		<tr>
497
			<td class="name">Loginname:</td>
498
			<td class="value">
499
				<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'; } ?>" />
500
			</td>
501
		</tr>
502
		<tr>
503
			<td class="name">Email:</td>
504
			<td class="value">
505
				<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']; } ?>" />
506
			</td>
507
		</tr>
508
		<tr>
509
			<td class="name">Password:</td>
510
			<td class="value">
511
				<input <?php echo field_error('admin_password');?> type="password" maxlength="30" tabindex="16" name="admin_password" value="" />
512
			</td>
513
		</tr>
514
		<tr>
515
			<td class="name">Re-Password:</td>
516
			<td class="value">
517
				<input <?php echo field_error('admin_repassword');?> type="password" maxlength="30" tabindex="17" name="admin_repassword" value=""  />
518
			</td>
519
		</tr>
520
		<tr>
521
			<td style="line-height: 0.4em;" colspan="2">&nbsp;</td>
522
		</tr>
523
		</table>
524
<?php } ?>
525

    
526
		<table summary="" cellpadding="0" cellspacing="0">
527
				<tr valign="top">
528
					<td><strong>Please note: &nbsp;</strong></td>
529
				</tr>
530
				<tr valign="top">
531
					<td>
532
						<p class="warning">
533
						WebsiteBaker is released under the
534
						<a href="http://www.gnu.org/licenses/gpl.html" target="_blank" tabindex="19">GNU General Public License</a>
535
						<br />
536
						By clicking install, you are accepting the license.
537
						</p>
538
					</td>
539
				</tr>
540
				<tr valign="top">
541
			<td>
542
			<p class="center">
543
				<?php if($installFlag == true) { ?>
544
				<input type="submit" tabindex="20" name="install" value="Install WebsiteBaker" />
545
				<?php } else { ?>
546
				<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'] ?>';" />
547
				<?php } ?>
548
			</p>
549
			</td>
550
		</tr>
551
		</table>
552

    
553
</form>
554

    
555
	<div style="padding: 10px 0px 10px 0px; text-align:center;">
556
		<!-- 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. -->
557
		<a href="http://www.websitebaker.org/" style="color: #000000;" target="_blank">WebsiteBaker</a>
558
		is	released under the
559
		<a href="http://www.gnu.org/licenses/gpl.html" style="color: #000000;" target="_blank">GNU General Public License</a>
560
		<!-- 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. -->
561
	</div >
562
</div>
563

    
564
</body>
565
</html>
(3-3/6)