%s %s',_('Authenticate to server'),$app['server']->getName());
echo '
';
# Check for a secure connection
if (! isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) != 'on') {
echo '
';
printf('
%s: %s.',
_('You are not using \'https\'. Web browser will transmit login information in clear text.'),
_('Warning'),_('This web connection is unencrypted'));
echo '
';
echo '
';
}
# HTTP Basic Auth Form.
if ($app['server']->getAuthType() == 'http') {
ob_end_clean();
# When we pop up the basic athentication, we come back to this script, so try the login again.
if ($app['server']->isLoggedIn('user')) {
system_message(array(
'title'=>_('Authenticate to server'),
'body'=>_('Successfully logged into server.'),
'type'=>'info'),
sprintf('cmd.php?server_id=%s&refresh=SID_%s',$app['server']->getIndex(),$app['server']->getIndex()));
die();
}
header(sprintf('WWW-Authenticate: Basic realm="%s"',$_SESSION[APPCONFIG]->getValue('session','http_realm')));
if ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0')
{
header('HTTP/1.0 401 Unauthorized');
} // http 1.0 method
else
{
header('Status: 401 Unauthorized');
} // http 1.1 method
return;
# HTML Login Form
} else {
echo '';
echo '
';
echo '';
if ($app['server']->isAnonBindAllowed())
{
printf('', JSDIR);
}
}