%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 ''; printf('',$app['server']->getIndex()); echo ''; if (get_request('redirect','GET',false,false)) { printf('',rawurlencode(get_request('redirect', 'GET'))); } echo '
'; echo ''; printf('', $app['server']->getValue('login','auth_text') ?: ($app['server']->getValue('login','attr') == 'dn' ? _('Login DN') : $_SESSION[APPCONFIG]->getFriendlyName($app['server']->getValue('login','attr')))); printf('', $app['server']->getValue('login','attr',false) == 'dn' ? $app['server']->getValue('login','bind_id') : ''); echo ''; printf('',_('Password')); echo ''; echo ''; # If Anon bind allowed, then disable the form if the user choose to bind anonymously. if ($app['server']->isAnonBindAllowed()) { printf('', _('Anonymous')); } printf('', _('Authenticate')); echo '
%s:
 
%s:
 
%s
'; echo '
'; echo '
'; echo ''; if ($app['server']->isAnonBindAllowed()) { printf('', JSDIR); } }