Revision 1737
Added by Luisehahne about 13 years ago
| index.php | ||
|---|---|---|
| 68 | 68 |
} |
| 69 | 69 |
} |
| 70 | 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 |
} |
|
| 71 | 78 |
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 72 | 79 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 73 | 80 |
<head> |
| 74 | 81 |
<title>WebsiteBaker Installation Wizard</title> |
| 75 | 82 |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
| 76 | 83 |
<link href="stylesheet.css" rel="stylesheet" type="text/css" /> |
| 77 |
<script language="javascript" type="text/javascript">
|
|
| 84 |
<script type="text/javascript"> |
|
| 78 | 85 |
|
| 79 | 86 |
function confirm_link(message, url) {
|
| 80 | 87 |
if(confirm(message)) location.href = url; |
| ... | ... | |
| 337 | 344 |
<td> |
| 338 | 345 |
<select <?php echo field_error('default_language');?> tabindex="3" name="default_language" style="width: 100%;">
|
| 339 | 346 |
<?php |
| 347 |
$sAutoLanguage = 'EN'; // default, if no information from client available |
|
| 348 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
|
| 349 |
if(preg_match('/([a-z]{2})(?:-[a-z]{2})*/i', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches)) {
|
|
| 350 |
$sAutoLanguage = strtoupper($matches[1]); |
|
| 351 |
} |
|
| 352 |
} |
|
| 353 |
$sAutoLanguage = isset($_SESSION['default_language']) ? $_SESSION['default_language'] : $sAutoLanguage; |
|
| 340 | 354 |
$DEFAULT_LANGUAGE = array( |
| 341 | 355 |
'BG'=>'Bulgarian', 'CA'=>'Catalan', 'CS'=>'Čeština', 'DA'=>'Danish', 'DE'=>'Deutsch', 'EN'=>'English', |
| 342 | 356 |
'ES'=>'Spanish', 'ET'=>'Eesti', 'FI'=>'Suomi', 'FR'=>'Français', |
| ... | ... | |
| 345 | 359 |
); |
| 346 | 360 |
foreach($DEFAULT_LANGUAGE as $lang_id => $lang_title) {
|
| 347 | 361 |
?> |
| 348 |
<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>
|
|
| 362 |
<option value="<?php echo $lang_id; ?>"<?php if($sAutoLanguage == $lang_id) { echo ' selected="selected"'; } ?> ><?php echo $lang_title; ?></option>
|
|
| 349 | 363 |
<?php |
| 350 | 364 |
} |
| 351 | 365 |
?> |
| ... | ... | |
| 361 | 375 |
<td class="name"> |
| 362 | 376 |
Server Operating System: |
| 363 | 377 |
</td> |
| 364 |
<td style=""> |
|
| 365 |
<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"'; } ?> />
|
|
| 366 |
<span style="cursor: pointer;" onclick="javascript: change_os('linux');">Linux/Unix based</span>
|
|
| 378 |
<td style="<?php echo $operating_system ?>">
|
|
| 379 |
<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"'; } ?> />
|
|
| 380 |
<span style="cursor: pointer;" onclick="javascript:change_os('linux');">Linux/Unix based</span>
|
|
| 367 | 381 |
<br /> |
| 368 |
<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"'; } ?> />
|
|
| 369 |
<span style="cursor: pointer;" onclick="javascript: change_os('windows');">Windows</span>
|
|
| 382 |
<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"'; } ?> />
|
|
| 383 |
<span style="cursor: pointer;" onclick="javascript:change_os('windows');">Windows</span>
|
|
| 370 | 384 |
</td> |
| 371 | 385 |
</tr> |
| 372 | 386 |
<tr> |
Also available in: Unified diff
! set stored passwords in $session to empty string
! installer now detect browser language and operating_system