Zeile 1796 | Zeile 1796 |
---|
global $output, $mybb, $errors, $lang;
$output->print_header($lang->board_config, 'config');
|
global $output, $mybb, $errors, $lang;
$output->print_header($lang->board_config, 'config');
|
|
|
echo <<<EOF
|
echo <<<EOF
|
<script type="text/javascript">
| <script type="text/javascript">
|
function warnUser(inp, warn) { var parenttr = $('#'+inp.id).closest('tr');
| function warnUser(inp, warn) { var parenttr = $('#'+inp.id).closest('tr');
|
Zeile 1814 | Zeile 1814 |
---|
if(parenttr.is(':last-child')) { parenttr.addClass('last');
|
if(parenttr.is(':last-child')) { parenttr.addClass('last');
|
} } }
| } } }
|
function revertSetting(defval, inpid) {
|
function revertSetting(defval, inpid) {
|
$(inpid).val(defval);
| $(inpid).val(defval);
|
var parenttr = $(inpid).closest('tr'); parenttr.next('.setting_peeker').remove(); if(parenttr.is(':last-child')) { parenttr.addClass('last');
|
var parenttr = $(inpid).closest('tr'); parenttr.next('.setting_peeker').remove(); if(parenttr.is(':last-child')) { parenttr.addClass('last');
|
}
| }
|
} </script>
|
} </script>
|
|
|
EOF;
// If board configuration errors
| EOF;
// If board configuration errors
|
Zeile 1859 | Zeile 1859 |
---|
}
// Attempt auto-detection
|
}
// Attempt auto-detection
|
if($_SERVER['HTTP_HOST'])
| if(!empty($_SERVER['HTTP_HOST']))
|
{ $hostname = $protocol.$_SERVER['HTTP_HOST']; $cookiedomain = $_SERVER['HTTP_HOST']; }
|
{ $hostname = $protocol.$_SERVER['HTTP_HOST']; $cookiedomain = $_SERVER['HTTP_HOST']; }
|
elseif($_SERVER['SERVER_NAME'])
| elseif(!empty($_SERVER['SERVER_NAME']))
|
{ $hostname = $protocol.$_SERVER['SERVER_NAME']; $cookiedomain = $_SERVER['SERVER_NAME']; }
if(my_substr($cookiedomain, 0, 4) == "www.")
|
{ $hostname = $protocol.$_SERVER['SERVER_NAME']; $cookiedomain = $_SERVER['SERVER_NAME']; }
if(my_substr($cookiedomain, 0, 4) == "www.")
|
{
| {
|
$cookiedomain = substr($cookiedomain, 4);
|
$cookiedomain = substr($cookiedomain, 4);
|
}
| }
|
// IP addresses and hostnames are not valid if(my_inet_pton($cookiedomain) !== false || strpos($cookiedomain, '.') === false)
|
// IP addresses and hostnames are not valid if(my_inet_pton($cookiedomain) !== false || strpos($cookiedomain, '.') === false)
|
{
| {
|
$cookiedomain = '';
|
$cookiedomain = '';
|
}
| }
|
else
|
else
|
{
| {
|
$cookiedomain = ".{$cookiedomain}";
|
$cookiedomain = ".{$cookiedomain}";
|
}
| }
|
|
|
if($_SERVER['SERVER_PORT'] && $_SERVER['SERVER_PORT'] != 80 && !preg_match("#:[0-9]#i", $hostname))
| if(!empty($_SERVER['SERVER_PORT']))
|
{
|
{
|
$hostname .= ':'.$_SERVER['SERVER_PORT'];
| $port = ":{$_SERVER['SERVER_PORT']}"; $pos = strrpos($cookiedomain, $port);
if($pos !== false) { $cookiedomain = substr($cookiedomain, 0, $pos); }
if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 && !preg_match("#:[0-9]#i", $hostname)) { $hostname .= $port; }
|
}
|
}
|
|
|
$currentlocation = get_current_location('', '', true); $noinstall = substr($currentlocation, 0, strrpos($currentlocation, '/install/'));
|
$currentlocation = get_current_location('', '', true); $noinstall = substr($currentlocation, 0, strrpos($currentlocation, '/install/'));
|
|
|
$cookiepath = $noinstall.'/'; $bburl = $hostname.$noinstall; $websiteurl = $hostname.'/';
|
$cookiepath = $noinstall.'/'; $bburl = $hostname.$noinstall; $websiteurl = $hostname.'/';
|
$contactemail = $_SERVER['SERVER_ADMIN'];
| if(isset($_SERVER['SERVER_ADMIN']) && filter_var($_SERVER['SERVER_ADMIN'], FILTER_VALIDATE_EMAIL)) { $contactemail = $_SERVER['SERVER_ADMIN']; }
|
}
echo $lang->sprintf($lang->config_step_table, $bbname, $bburl, $websitename, $websiteurl, $cookiedomain, $cookiepath, $contactemail);
| }
echo $lang->sprintf($lang->config_step_table, $bbname, $bburl, $websitename, $websiteurl, $cookiedomain, $cookiepath, $contactemail);
|
Zeile 1928 | Zeile 1943 |
---|
} } $output->print_header($lang->create_admin, 'admin');
|
} } $output->print_header($lang->create_admin, 'admin');
|
|
|
echo <<<EOF
|
echo <<<EOF
|
<script type="text/javascript">
| <script type="text/javascript">
|
function comparePass() { var parenttr = $('#adminpass2').closest('tr');
| function comparePass() { var parenttr = $('#adminpass2').closest('tr');
|
Zeile 1946 | Zeile 1961 |
---|
} } </script>
|
} } </script>
|
|
|
EOF;
if(is_array($errors))
| EOF;
if(is_array($errors))
|