Project

General

Profile

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.websitebaker.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 1802 2012-10-31 17:38:34Z Luisehahne $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/install/index.php $
14
 * @lastmodified    $Date: 2012-10-31 18:38:34 +0100 (Wed, 31 Oct 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
$sapi_type = php_sapi_name();
72

    
73
if(!isset($_SESSION['operating_system'])) {
74
    $operating_system = ((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'windows' : 'linux');
75
} else {
76
    $operating_system = $_SESSION['operating_system'];
77
}
78
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
79
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
80
<head>
81
<title>WebsiteBaker Installation Wizard</title>
82
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
83
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
84
<script type="text/javascript">
85

    
86
function confirm_link(message, url) {
87
	if(confirm(message)) location.href = url;
88
}
89
function change_os(type) {
90
	if(type == 'linux') {
91
		document.getElementById('operating_system_linux').checked = true;
92
		document.getElementById('operating_system_windows').checked = false;
93
		document.getElementById('file_perms_box').style.display = 'none';
94
	} else if(type == 'windows') {
95
		document.getElementById('operating_system_linux').checked = false;
96
		document.getElementById('operating_system_windows').checked = true;
97
		document.getElementById('file_perms_box').style.display = 'none';
98
	}
99
}
100
</script>
101
</head>
102
<body>
103
<div class="body">
104
<table summary="" cellpadding="0" cellspacing="0">
105
<tr style="background: #a9c9ea;">
106
	<td valign="top">
107
		<img src="../templates/wb_theme/images/logo.png" alt="Logo" />
108
	</td>
109
	<td>
110
		<h1 style="border:none; margin-top:1em;font-size:150%;">Installation Wizard</h1>
111
	</td>
112
</tr>
113
</table>
114

    
115
<form name="website_baker_installation_wizard" action="save.php" method="post">
116
<input type="hidden" name="url" value="" />
117
<input type="hidden" name="username_fieldname" value="admin_username" />
118
<input type="hidden" name="password_fieldname" value="admin_password" />
119
<input type="hidden" name="remember" id="remember" value="true" />
120

    
121
		<div style="padding: 5px; text-align: center; font-weight: bold;">
122
			Welcome to the WebsiteBaker Installation Wizard.
123
		</div>
124
		<?php
125
		if(isset($_SESSION['message']) AND $_SESSION['message'] != '') {
126
			?><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
127
		}
128
		?>
129
		<table summary="" cellpadding="0" cellspacing="0" border="0">
130
		<tr>
131
			<td colspan="6" class="step-row"><h1 class="step-row">Step 1</h1>&nbsp;Please check the following requirements are met before continuing...</td>
132
		</tr>
133
		<?php if($session_support != '<font class="good">Enabled</font>') { ?>
134
		<tr>
135
			<td colspan="6" class="error">Please note: PHP Session Support may appear disabled if your browser does not support cookies.</td>
136
		</tr>
137
		<?php } ?>
138
		<tr>
139
			<td style="color: #666666;">PHP Version > 5.2.1</td>
140
			<td>
141
				<?php
142
			   if (version_compare(PHP_VERSION, '5.2.1', '>'))
143
			   {
144
					?><font class="good">Yes</font><?php
145
				} else {
146
					$installFlag = false;
147
					?><font class="bad">No</font><?php
148
				}
149
				?>
150
			</td>
151
			<td style="color: #666666;">PHP Session Support</td>
152
			<td><?php echo $session_support; ?></td>
153
		</tr>
154
	<tr>
155
		<td style="color: #666666;">Server DefaultCharset</td>
156
			<td>
157
				<?php
158
					$chrval = (($e_adc != '') && (strtolower($e_adc) != 'utf-8') ? true : false);
159
					if($chrval == false) {
160
						?><font class="good">
161
						<?php echo (($e_adc=='') ? 'OK' : $e_adc) ?>
162
						</font>
163
						<?php
164
					} else {
165
						?><font class="bad"><?php echo $e_adc ?></font><?php
166
					}
167

    
168
				?>
169
			</td>
170
			<td style="color: #666666;">PHP Safe Mode</td>
171
			<td>
172
				<?php
173
				if(ini_get('safe_mode')=='' || strpos(strtolower(ini_get('safe_mode')), 'off')!==FALSE || ini_get('safe_mode')==0) {
174
					?><font class="good">Disabled</font><?php
175
				} else {
176
					$installFlag = false;
177
					?><font class="bad">Enabled</font><?php
178
				}
179
				?>
180
			</td>
181
		</tr>
182
		<?php if($chrval == true) {
183
		?>
184
		<tr>
185
			<td colspan="6" style="font-size: 10px;" class="bad">
186
<p class="warning">
187
<b>Please note:</b> Yor webserver is configured to deliver <b><?php echo $e_adc;?></b> charset only.<br />
188
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 />
189
In any case you can choose <b><?php echo $e_adc;?></b> in the settings of WebsiteBaker.<br />
190
But this solution does not guarranty a correct displaying of the content from all modules!
191
</p>
192
</td>
193
</tr>
194
<?php } ?>
195
</table>
196
<table summary="" cellpadding="3" cellspacing="0">
197
<tr>
198
	<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>
199
</tr>
200
<?php
201
	$config = '<font class="good">Writeable</font>';
202
	$config_content = "<?php\n";
203
	$configFile = '/config.php';
204
	if(!isset($_SESSION['config_rename']) )
205
	{
206
// cnfig.php or config.php.new
207
		if( (file_exists($wb_path.$configFile)==true))
208
		{
209
// next operation only if file is writeable
210
			if(is_writeable($wb_path.$configFile))
211
			{
212
// already installed? it's not empty
213
				if ( filesize($wb_path.$configFile) > 128)
214
				{
215
					$installFlag = false;
216
					$config = '<font class="bad">Already installed? Check!</font>';
217
// try to open and to write
218
				} elseif( !$handle = fopen($wb_path.$configFile, 'w') )
219
				{
220
					$installFlag = false;
221
	                $config = '<font class="bad">Not Writeable</font>';
222
				} else {
223
					if (fwrite($handle, $config_content) === FALSE) {
224
						$installFlag = false;
225
		                $config = '<font class="bad">Not Writeable</font>';
226
					} else {
227
						$config = '<font class="good">Writeable</font>';
228
						$_SESSION['config_rename'] = true;
229
					}
230
					// Close file
231
					fclose($handle);
232
					}
233
			} else {
234
				$installFlag = false;
235
                $config = '<font class="bad">Not Writeable</font>';
236
			}
237
// it's config.php.new
238
		} elseif((file_exists($wb_path.'/config.php.new')==true))
239
		{
240
			$configFile = '/config.php.new';
241
			$installFlag = false;
242
			$config = '<font class="bad">Please rename to config.php</font>';
243
		} else
244
		{
245
			$installFlag = false;
246
			$config = '<font class="bad">Missing!!?</font>';
247
		}
248
	}
249
?>
250
		<tr>
251
			<td colspan="2" style="color: #666666;"><?php print $wb_root.$configFile ?></td>
252
			<td colspan="2"><?php echo $config ?></td>
253
		</tr>
254
		<tr>
255
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>/pages/</td>
256
			<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>
257
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>/media/</td>
258
			<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>
259
		</tr>
260
		<tr>
261
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>/templates/</td>
262
			<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>
263
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>/modules/</td>
264
			<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>
265
		</tr>
266
		<tr>
267
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>/languages/</td>
268
			<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>
269
			<td colspan="2" style="color: #666666;"><?php print $wb_root ?>/temp/</td>
270
			<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>
271
		</tr>
272
		</table>
273
		<table summary="" cellpadding="3" cellspacing="0" >
274
		<tr>
275
			<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>
276
		</tr>
277
		<tr>
278
			<td class="name">
279
				Absolute URL:
280
			</td>
281
			<td class="value">
282
				<?php
283
				// Try to guess installation URL
284
				$guessed_url = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"];
285
				$guessed_url = rtrim(dirname($guessed_url), 'install');
286
				?>
287
				<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; } ?>" />
288
			</td>
289
		</tr>
290
		<tr>
291
			<td class="name">
292
				Default Timezone:
293
			</td>
294
			<td>
295
				<select <?php echo field_error('default_timezone');?> tabindex="3" name="default_timezone" style="width: 100%;">
296
					<?php
297
					$TIMEZONES['-12'] = 'GMT - 12 Hours';
298
					$TIMEZONES['-11'] = 'GMT -11 Hours';
299
					$TIMEZONES['-10'] = 'GMT -10 Hours';
300
					$TIMEZONES['-9'] = 'GMT -9 Hours';
301
					$TIMEZONES['-8'] = 'GMT -8 Hours';
302
					$TIMEZONES['-7'] = 'GMT -7 Hours';
303
					$TIMEZONES['-6'] = 'GMT -6 Hours';
304
					$TIMEZONES['-5'] = 'GMT -5 Hours';
305
					$TIMEZONES['-4'] = 'GMT -4 Hours';
306
					$TIMEZONES['-3.5'] = 'GMT -3.5 Hours';
307
					$TIMEZONES['-3'] = 'GMT -3 Hours';
308
					$TIMEZONES['-2'] = 'GMT -2 Hours';
309
					$TIMEZONES['-1'] = 'GMT -1 Hour';
310
					$TIMEZONES['0'] = 'GMT';
311
					$TIMEZONES['1'] = 'GMT +1 Hour';
312
					$TIMEZONES['2'] = 'GMT +2 Hours';
313
					$TIMEZONES['3'] = 'GMT +3 Hours';
314
					$TIMEZONES['3.5'] = 'GMT +3.5 Hours';
315
					$TIMEZONES['4'] = 'GMT +4 Hours';
316
					$TIMEZONES['4.5'] = 'GMT +4.5 Hours';
317
					$TIMEZONES['5'] = 'GMT +5 Hours';
318
					$TIMEZONES['5.5'] = 'GMT +5.5 Hours';
319
					$TIMEZONES['6'] = 'GMT +6 Hours';
320
					$TIMEZONES['6.5'] = 'GMT +6.5 Hours';
321
					$TIMEZONES['7'] = 'GMT +7 Hours';
322
					$TIMEZONES['8'] = 'GMT +8 Hours';
323
					$TIMEZONES['9'] = 'GMT +9 Hours';
324
					$TIMEZONES['9.5'] = 'GMT +9.5 Hours';
325
					$TIMEZONES['10'] = 'GMT +10 Hours';
326
					$TIMEZONES['11'] = 'GMT +11 Hours';
327
					$TIMEZONES['12'] = 'GMT +12 Hours';
328
					$TIMEZONES['13'] = 'GMT +13 Hours';
329
					foreach($TIMEZONES AS $hour_offset => $title) {
330
						?>
331
							<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>
332
						<?php
333
					}
334
					?>
335
				</select>
336
			</td>
337
		</tr>
338
		<tr>
339
			<td class="name">
340
				Default Language:
341
			</td>
342
			<td>
343
				<select <?php echo field_error('default_language');?> tabindex="3" name="default_language" style="width: 100%;">
344
					<?php
345
                	$sAutoLanguage = 'EN'; // default, if no information from client available
346
                	if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
347
                		if(preg_match('/([a-z]{2})(?:-[a-z]{2})*/i', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches)) {
348
                			$sAutoLanguage = strtoupper($matches[1]);
349
                		}
350
                	}
351
                	$sAutoLanguage = isset($_SESSION['default_language']) ? $_SESSION['default_language'] : $sAutoLanguage;
352
					$DEFAULT_LANGUAGE = array(
353
						'BG'=>'Bulgarian', 'CA'=>'Catalan', 'CS'=>'&#268;e&scaron;tina', 'DA'=>'Danish', 'DE'=>'Deutsch', 'EN'=>'English',
354
						'ES'=>'Spanish', 'ET'=>'Eesti', 'FI'=>'Suomi', 'FR'=>'Fran&ccedil;ais',
355
						'HR'=>'Hrvatski', 'HU'=>'Magyar','IT'=>'Italiano', 'LV'=>'Latviesu',
356
						'NL'=>'Nederlands', 'NO'=>'Norsk', 'PL'=>'Polski', 'PT'=>'Portuguese (Brazil)', 'RU'=>'Russian', 'SE'=>'Svenska','SK'=>'Slovensky','TR'=>'Turkish'
357
					);
358
					foreach($DEFAULT_LANGUAGE as $lang_id => $lang_title) {
359
						?>
360
							<option value="<?php echo $lang_id; ?>"<?php if($sAutoLanguage == $lang_id) { echo ' selected="selected"'; }  ?> ><?php echo $lang_title; ?></option>
361
						<?php
362
					}
363
					?>
364
				</select>
365
			</td>
366
		</tr>
367
		</table>
368
		<table border="0" summary="" cellpadding="0" cellspacing="0">
369
		<tr>
370
			<td class="step-row" colspan="3"><h1 class="step-row">Step 4</h1>&nbsp;Please specify your operating system information below...</td>
371
		</tr>
372
		<tr>
373
			<td class="name">&nbsp;
374
				Server Operating System:
375
			</td>
376
			<td style="<?php echo $operating_system ?>">
377
				<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"'; } ?> />
378
				<span style="cursor: pointer;" onclick="javascript:change_os('linux');">Linux/Unix based</span>
379
				<br />
380
				<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"'; } ?> />
381
				<span style="cursor: pointer;" onclick="javascript:change_os('windows');">Windows</span>
382
			</td>
383
		</tr>
384
		<tr>
385
			<td class="name">&nbsp;</td>
386
			<td class="value">
387
				<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'; } ?>;">
388
					<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'; } ?> />
389
 					<label style=" margin: 0;  " for="world_writeable">
390
						World-writeable file permissions (777)
391
					</label>
392
				<br />
393
					<p class="warning">(Please note: only recommended for testing environments)</p>
394
				</div>
395
			</td>
396
		</tr>
397
		</table>
398
		<table summary="" cellpadding="0" cellspacing="0">
399
    		<tr>
400
    			<td colspan="2" class="step-row"><h1 class="step-row">Step 5</h1>&nbsp;Please enter your MySQL database server details below...</td>
401
    		</tr>
402
    		<tr>
403
    			<td class="name">Host Name</td>
404
    			<td class="value">
405
    				<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'; } ?>" />
406
    			</td>
407
    		</tr>
408
    		<tr>
409
    			<td class="name">Database Name&nbsp;([a-zA-Z0-9_-])</td>
410
    			<td class="value">
411
    				<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'; } ?>" />
412
    			</td>
413
    		</tr>
414
		<tr>
415
			<td class="name">Table Prefix&nbsp;([a-zA-Z0-9_])</td>
416
			<td class="value">
417
				<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_'; } ?>" />
418
			</td>
419
		</tr>
420
		<tr>
421
    			<td class="name">Username:</td>
422
    			<td class="value">
423
    				<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'; } ?>" />
424
    			</td>
425
		</tr>
426
		<tr>
427
    			<td class="name">Password:</td>
428
    			<td class="value">
429
    				<input type="password" tabindex="11" name="database_password" value="<?php if(isset($_SESSION['database_password'])) { echo $_SESSION['database_password']; } ?>" />
430
    			</td>
431
		</tr>
432
		<tr>
433
			<td class="name hide" colspan="2">
434
				<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"'; } ?> />
435
				<label for="install_tables" style="color: #666666;">Install Tables</label>
436
				<br />
437
				<span style="font-size: 1px; color: #666666;">(Please note: May remove existing tables and data)</span>
438
			</td>
439
		</tr>
440
		</table>
441
		<table summary="" cellpadding="0" cellspacing="0" >
442
		<tbody>
443
		<tr>
444
			<td colspan="2" class="step-row"><h1 class="step-row">Step 6</h1>&nbsp;Please enter your website title below...</td>
445
		</tr>
446
		<tr>
447
			<td class="name">Website Title:</td>
448
			<td class="value">
449
				<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'; } ?>" />
450
			</td>
451
		</tr>
452
		</tbody>
453
		</table>
454
		<table summary="" cellpadding="0" cellspacing="0" border="0">
455
		<tr>
456
			<td colspan="2" class="step-row"><h1 class="step-row">Step 7</h1> Please enter your Administrator account details below...</td>
457
		</tr>
458
		<tr>
459
			<td class="name">Loginname:</td>
460
			<td class="value">
461
				<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'; } ?>" />
462
			</td>
463
		</tr>
464
		<tr>
465
			<td class="name">Email:</td>
466
			<td class="value">
467
				<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']; } ?>" />
468
			</td>
469
		</tr>
470
		<tr>
471
			<td class="name">Password:</td>
472
			<td class="value">
473
				<input <?php echo field_error('admin_password');?> type="password" tabindex="16" name="admin_password" value="" />
474
			</td>
475
		</tr>
476
		<tr>
477
			<td class="name">Re-Password:</td>
478
			<td class="value">
479
				<input <?php echo field_error('admin_repassword');?> type="password" tabindex="17" name="admin_repassword" value=""  />
480
			</td>
481
		</tr>
482
		</table>
483
		<table summary="" cellpadding="0" cellspacing="0">
484
				<tr valign="top">
485
					<td><strong>Please note: &nbsp;</strong></td>
486
				</tr>
487
				<tr valign="top">
488
					<td>
489
						<p class="warning">
490
						WebsiteBaker is released under the
491
						<a href="http://www.gnu.org/licenses/gpl.html" target="_blank" tabindex="19">GNU General Public License</a>
492
						<br />
493
						By clicking install, you are accepting the license.
494
						</p>
495
					</td>
496
				</tr>
497
				<tr valign="top">
498
			<td>
499
			<p class="center">
500
				<?php if($installFlag == true) { ?>
501
				<input type="submit" tabindex="20" name="install" value="Install WebsiteBaker" />
502
				<?php } else { ?>
503
				<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'] ?>';" />
504
				<?php } ?>
505
			</p>
506
			</td>
507
		</tr>
508
		</table>
509

    
510
</form>
511

    
512
	<div style="padding: 10px 0px 10px 0px; text-align:center;">
513
		<!-- 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. -->
514
		<a href="http://www.websitebaker.org/" style="color: #000000;" target="_blank">WebsiteBaker</a>
515
		is	released under the
516
		<a href="http://www.gnu.org/licenses/gpl.html" style="color: #000000;" target="_blank">GNU General Public License</a>
517
		<!-- 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. -->
518
	</div >
519
</div>
520

    
521
</body>
522
</html>
(2-2/5)