Revision 1529
Added by Dietmar almost 13 years ago
index.php | ||
---|---|---|
4 | 4 |
* @category backend |
5 | 5 |
* @package install |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 | 7 |
* @copyright 2009-2011, Website Baker Org. e.V. |
9 | 8 |
* @link http://www.websitebaker2.org/ |
10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
... | ... | |
36 | 35 |
} |
37 | 36 |
} |
38 | 37 |
|
38 |
$installFlag = true; |
|
39 | 39 |
// Check if the page has been reloaded |
40 | 40 |
if(!isset($_GET['sessions_checked']) OR $_GET['sessions_checked'] != 'true') { |
41 | 41 |
// Set session variable |
... | ... | |
47 | 47 |
// Check if session variable has been saved after reload |
48 | 48 |
if(isset($_SESSION['session_support'])) { |
49 | 49 |
$session_support = $_SESSION['session_support']; |
50 |
} else { |
|
50 |
} else { |
|
51 |
$installFlag = false; |
|
51 | 52 |
$session_support = '<font class="bad">Disabled</font>'; |
52 | 53 |
} |
53 | 54 |
} |
54 |
|
|
55 | 55 |
// Check if AddDefaultCharset is set |
56 | 56 |
$e_adc=false; |
57 | 57 |
$sapi=php_sapi_name(); |
... | ... | |
67 | 67 |
} |
68 | 68 |
} |
69 | 69 |
|
70 |
?> |
|
71 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
70 |
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
72 | 71 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
73 | 72 |
<head> |
74 | 73 |
<title>Website Baker Installation Wizard</title> |
... | ... | |
95 | 94 |
</head> |
96 | 95 |
<body> |
97 | 96 |
|
98 |
<table cellpadding="0" cellspacing="0" border="0" width="850" align="center">
|
|
97 |
<table cellpadding="0" cellspacing="0" border="0" width="998px" align="center">
|
|
99 | 98 |
<tr> |
100 | 99 |
<td width="60" valign="top"> |
101 | 100 |
<img src="../templates/wb_theme/images/logo.png" alt="Logo" /> |
102 | 101 |
</td> |
103 | 102 |
<td width="5"> </td> |
104 |
<td style="font-size: 20px;">
|
|
105 |
<font style="color: #FFF;">Installation Wizard</font>
|
|
103 |
<td> |
|
104 |
<h1 style="border:none; margin-top:1em;font-size:150%;">Installation Wizard</h1>
|
|
106 | 105 |
</td> |
107 | 106 |
</tr> |
108 | 107 |
</table> |
... | ... | |
113 | 112 |
<input type="hidden" name="password_fieldname" value="admin_password" /> |
114 | 113 |
<input type="hidden" name="remember" id="remember" value="true" /> |
115 | 114 |
|
116 |
<table cellpadding="0" cellspacing="0" border="0" width="850" align="center" style="margin-top: 10px;">
|
|
115 |
<table cellpadding="0" cellspacing="0" border="0" width="998px" align="center" style="margin-top: 10px;">
|
|
117 | 116 |
<tr> |
118 | 117 |
<td class="content"> |
119 | 118 |
|
... | ... | |
143 | 142 |
{ |
144 | 143 |
?><font class="good">Yes</font><?php |
145 | 144 |
} else { |
145 |
$installFlag = false; |
|
146 | 146 |
?><font class="bad">No</font><?php |
147 | 147 |
} |
148 | 148 |
?> |
... | ... | |
155 | 155 |
if(ini_get('safe_mode')=='' || strpos(strtolower(ini_get('safe_mode')), 'off')!==FALSE || ini_get('safe_mode')==0) { |
156 | 156 |
?><font class="good">Disabled</font><?php |
157 | 157 |
} else { |
158 |
$installFlag = false; |
|
158 | 159 |
?><font class="bad">Enabled</font><?php |
159 | 160 |
} |
160 | 161 |
?> |
... | ... | |
165 | 166 |
<td width="60"> |
166 | 167 |
<?php |
167 | 168 |
if($e_adc) { |
169 |
$installFlag = false; |
|
168 | 170 |
?><font class="bad">No</font><?php |
169 | 171 |
} else { |
170 | 172 |
?><font class="good">Yes</font><?php |
... | ... | |
173 | 175 |
</td> |
174 | 176 |
<td colspan="4"> </td> |
175 | 177 |
</tr> |
176 |
<?php if($e_adc) { ?> |
|
178 |
<?php if($e_adc) { |
|
179 |
$installFlag = false; |
|
180 |
?> |
|
177 | 181 |
<tr> |
178 | 182 |
<td colspan="6" style="font-size: 10px;" class="bad">Please note: AddDefaultCharset is set to <?php echo $e_adc;?> in apache.conf.<br />If you have to use umlauts (e.g. ä á) please change this to Off. - Or use <?php echo $e_adc;?> inside website baker, too.</td> |
179 | 183 |
</tr> |
... | ... | |
184 | 188 |
<td colspan="8"><h1>Step 2</h1>Please check the following files/folders are writeable before continuing...</td> |
185 | 189 |
</tr> |
186 | 190 |
<tr> |
187 |
<td style="color: #666666;"><?php print $wb_root ?>/config.php</td> |
|
188 |
<td><?php if(is_writable('../config.php')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../config.php')) { echo '<font class="bad">File Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td> |
|
189 |
<td style="color: #666666;"><?php print $wb_root ?>/pages/</td> |
|
190 |
<td><?php if(is_writable('../pages/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../pages/')) { echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td> |
|
191 |
<td style="color: #666666;"><?php print $wb_root ?>/media/</td> |
|
192 |
<td><?php if(is_writable('../media/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../media/')) { echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td> |
|
193 |
<td style="color: #666666;"><?php print $wb_root ?>/templates/</td> |
|
194 |
<td><?php if(is_writable('../templates/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../templates/')) { echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td> |
|
191 |
<?php |
|
192 |
$config = '<font class="good">Writeable</font>'; |
|
193 |
$configFile = '/config.php'; |
|
194 |
if(!isset($_SESSION['config_rename'])) { |
|
195 |
if( ( file_exists($wb_path.$configFile)==false ) && (file_exists($wb_path.'/config.php.new')==true ) ){ |
|
196 |
if( (is_writeable($wb_path.'/config.php.new')==true) && (rename($wb_path.'/config.php.new',$wb_path.'/config.php')) ) { |
|
197 |
$config = '<font class="good">Writeable</font>'; |
|
198 |
$_SESSION['config_rename'] = true; |
|
199 |
} else { |
|
200 |
$installFlag = false; |
|
201 |
$configFile = '/config.php.new'; |
|
202 |
$config = '<font class="bad">Unwriteable</font>'; |
|
203 |
} |
|
204 |
} elseif( (file_exists($wb_path.'/config.php.new')==true) && ( file_exists($wb_path.$configFile)==true ) ) { |
|
205 |
if( (file_exists($wb_path.$configFile)==true) ) { |
|
206 |
$installFlag = false; |
|
207 |
$config = '<font class="bad">Already installed?</font>'; |
|
208 |
} |
|
209 |
} elseif( (is_writeable($wb_path.'/config.php.new')==false) ) { |
|
210 |
$installFlag = false; |
|
211 |
$configFile = '/config.php.new'; |
|
212 |
$config = '<font class="bad">Unwriteable</font>'; |
|
213 |
} |
|
214 |
} |
|
215 |
?> |
|
216 |
<td width="150px" style="color: #666666;"><?php print $wb_root.$configFile ?></td> |
|
217 |
<td width="150px"><?php echo $config ?></td> |
|
218 |
<td width="140px" style="color: #666666;"><?php print $wb_root ?>/pages/</td> |
|
219 |
<td width="120px"><?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> |
|
220 |
<td width="140px" style="color: #666666;"><?php print $wb_root ?>/media/</td> |
|
221 |
<td width="120px"><?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> |
|
222 |
<td width="140px" style="color: #666666;"><?php print $wb_root ?>/templates/</td> |
|
223 |
<td width="120px"><?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> |
|
195 | 224 |
</tr> |
196 | 225 |
<tr> |
197 | 226 |
<td style="color: #666666;"><?php print $wb_root ?>/modules/</td> |
198 |
<td><?php if(is_writable('../modules/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../modules/')) { echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td> |
|
227 |
<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>
|
|
199 | 228 |
<td style="color: #666666;"><?php print $wb_root ?>/languages/</td> |
200 |
<td><?php if(is_writable('../languages/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../languages/')) { echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td> |
|
229 |
<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>
|
|
201 | 230 |
<td style="color: #666666;"><?php print $wb_root ?>/temp/</td> |
202 |
<td><?php if(is_writable('../temp/')) { echo '<font class="good">Writeable</font>'; } elseif(!file_exists('../temp/')) { echo '<font class="bad">Directory Not Found</font>'; } else { echo '<font class="bad">Unwriteable</font>'; } ?></td> |
|
231 |
<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>
|
|
203 | 232 |
<td> </td> |
204 | 233 |
<td> </td> |
205 | 234 |
</tr> |
... | ... | |
337 | 366 |
<tr> |
338 | 367 |
<td style="color: #666666;">Database Name:<br />[a-zA-Z0-9_-]</td> |
339 | 368 |
<td> |
340 |
<input <?php echo field_error('database_name');?> type="text" tabindex="8" name="database_name" style="width: 98%;" value="<?php if(isset($_SESSION['database_name'])) { echo $_SESSION['database_name']; } else { echo 'wb'; } ?>" />
|
|
369 |
<input <?php echo field_error('database_name');?> type="text" tabindex="8" name="database_name" style="width: 98%;" value="<?php if(isset($_SESSION['database_name'])) { echo $_SESSION['database_name']; } else { echo 'DatabaseName'; } ?>" />
|
|
341 | 370 |
</td> |
342 | 371 |
<td> </td> |
343 | 372 |
<td style="color: #666666;">Password:</td> |
344 | 373 |
<td> |
345 |
<input type="password" tabindex="10" name="database_password" style="width: 98%;"<?php if(isset($_SESSION['database_password'])) { echo ' value = "'.$_SESSION['database_password'].'"'; } ?> />
|
|
374 |
<input type="password" tabindex="10" name="database_password" style="width: 98%;" value="<?php if(isset($_SESSION['database_password'])) { echo $_SESSION['database_password']; } ?>" />
|
|
346 | 375 |
</td> |
347 | 376 |
</tr> |
348 | 377 |
<tr> |
349 | 378 |
<td style="color: #666666;">Table Prefix:<br />[a-zA-Z0-9_]</td> |
350 | 379 |
<td> |
351 |
<input <?php echo field_error('table_prefix');?> type="text" tabindex="11" name="table_prefix" style="width: 250px;"<?php if(isset($_SESSION['table_prefix'])) { echo ' value = "'.$_SESSION['table_prefix'].'"'; } ?> />
|
|
380 |
<input <?php echo field_error('table_prefix');?> type="text" tabindex="11" name="table_prefix" style="width: 250px;" value="<?php if(isset($_SESSION['table_prefix'])) { echo $_SESSION['table_prefix']; } else { echo 'wb_'; } ?>" />
|
|
352 | 381 |
</td> |
353 | 382 |
<td> </td> |
354 | 383 |
<td colspan="2"> |
... | ... | |
364 | 393 |
<tr> |
365 | 394 |
<td style="color: #666666;" colspan="1">Website Title:</td> |
366 | 395 |
<td colspan="4"> |
367 |
<input <?php echo field_error('website_title');?> type="text" tabindex="13" name="website_title" style="width: 99%;" value="<?php if(isset($_SESSION['website_title'])) { echo $_SESSION['website_title']; } ?>" /> |
|
396 |
<input <?php echo field_error('website_title');?> type="text" tabindex="13" name="website_title" style="width: 99%;" value="<?php if(isset($_SESSION['website_title'])) { echo $_SESSION['website_title']; } else { echo 'Enter your website title'; } ?>" />
|
|
368 | 397 |
</td> |
369 | 398 |
</tr> |
370 | 399 |
<tr> |
... | ... | |
378 | 407 |
<td> </td> |
379 | 408 |
<td style="color: #666666;">Password:</td> |
380 | 409 |
<td> |
381 |
<input <?php echo field_error('admin_password');?> type="password" tabindex="16" name="admin_password" style="width: 98%;"<?php if(isset($_SESSION['admin_password'])) { echo ' value = "'.$_SESSION['admin_password'].'"'; } ?> />
|
|
410 |
<input <?php echo field_error('admin_password');?> type="password" tabindex="16" name="admin_password" style="width: 98%;" value="" />
|
|
382 | 411 |
</td> |
383 | 412 |
</tr> |
384 | 413 |
<tr> |
385 | 414 |
<td style="color: #666666;">Email:</td> |
386 | 415 |
<td> |
387 |
<input <?php echo field_error('admin_email');?> type="text" tabindex="15" name="admin_email" style="width: 98%;"<?php if(isset($_SESSION['admin_email'])) { echo ' value = "'.$_SESSION['admin_email'].'"'; } ?> />
|
|
416 |
<input <?php echo field_error('admin_email');?> type="text" tabindex="15" name="admin_email" style="width: 98%;" value="<?php if(isset($_SESSION['admin_email'])) { echo $_SESSION['admin_email']; } ?>" />
|
|
388 | 417 |
</td> |
389 | 418 |
<td> </td> |
390 | 419 |
<td style="color: #666666;">Re-Password:</td> |
391 | 420 |
<td> |
392 |
<input <?php echo field_error('admin_repassword');?> type="password" tabindex="17" name="admin_repassword" style="width: 98%;"<?php if(isset($_SESSION['admin_repassword'])) { echo ' value = "'.$_SESSION['admin_repassword'].'"'; } ?> />
|
|
421 |
<input <?php echo field_error('admin_repassword');?> type="password" tabindex="17" name="admin_repassword" style="width: 98%;" value="" />
|
|
393 | 422 |
</td> |
394 | 423 |
</tr> |
395 | 424 |
<tr> |
... | ... | |
401 | 430 |
<tr valign="top"> |
402 | 431 |
<td>Please note: </td> |
403 | 432 |
<td> |
404 |
Website Baker is released under the
|
|
433 |
Website Baker is released under the |
|
405 | 434 |
<a href="http://www.gnu.org/licenses/gpl.html" target="_blank" tabindex="19">GNU General Public License</a> |
406 | 435 |
<br /> |
407 | 436 |
By clicking install, you are accepting the license. |
... | ... | |
410 | 439 |
</table> |
411 | 440 |
</td> |
412 | 441 |
<td colspan="1" align="right"> |
413 |
<input type="submit" tabindex="20" name="submit" value="Install Website Baker" class="submit" /> |
|
442 |
<?php if($installFlag == true) { ?> |
|
443 |
<input type="submit" tabindex="20" name="submit" value="Install WebsiteBaker" /> |
|
444 |
<?php } else { ?> |
|
445 |
<input type="button" tabindex="20" name="submit" value="Check your Settings in Step1 or Step2" class="submit" /> |
|
446 |
<?php } ?> |
|
414 | 447 |
</td> |
415 | 448 |
</tr> |
416 | 449 |
</table> |
Also available in: Unified diff
add new backend theme handling (Tks to Stefek)