2 set_include_path(get_include_path() . PATH_SEPARATOR
. '../lib');
4 include_once("aur.inc.php");
6 $disable_http_login = config_get_bool('options', 'disable_http_login');
7 if (!$disable_http_login ||
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) {
9 $login_error = $login['error'];
12 $referer = in_request('referer');
14 $referer = $_SERVER['HTTP_REFERER'];
16 html_header('AUR ' . __("Login"));
18 <div id
="dev-login" class="box">
19 <h2
>AUR
<?
= __('Login') ?
></h2
>
20 <?php
if (isset($_COOKIE["AURSID"])): ?
>
22 <?
= __("Logged-in as: %s", '<strong>' . username_from_sid($_COOKIE["AURSID"]) . '</strong>'); ?
>
23 <a href
="<?= get_uri('/logout/'); ?>">[<?
= __("Logout"); ?
>]</a
>
25 <?php
elseif (!$disable_http_login ||
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])): ?
>
26 <form method
="post" action
="<?= get_uri('/login') ?>">
28 <legend
><?
= __('Enter login credentials') ?
></legend
>
29 <?php
if (!empty($login_error)): ?
>
30 <ul
class="errorlist"><li
><?
= $login_error ?
></li
></ul
>
33 <label
for="id_username"><?
= __('User name or primary email address') . ':'; ?
></label
>
34 <input id
="id_username" type
="text" name
="user" size
="30" maxlength
="<?= max(config_get_int('options', 'username_max_len'), 254); ?>" value
="<?php if (isset($_POST['user'])) { print htmlspecialchars($_POST['user'], ENT_QUOTES); } ?>" autofocus
="autofocus" />
37 <label
for="id_password"><?
= __('Password') . ':'; ?
></label
>
38 <input id
="id_password" type
="password" name
="passwd" size
="30" />
41 <input type
="checkbox" name
="remember_me" id
="id_remember_me" />
42 <label
for="id_remember_me"><?
= __("Remember me"); ?
></label
>
45 <input type
="submit" class="button" value
="<?php print __("Login
"); ?>" />
46 <a href
="<?= get_uri('/passreset/') ?>">[<?
= __('Forgot Password') ?
>]</a
>
47 <?php
if (config_get('sso', 'openid_configuration')):
48 $sso_login_url = get_uri('/sso/login');
50 $sso_login_url .= '?redirect=' . urlencode($referer);
52 <a href
="<?= htmlspecialchars($sso_login_url, ENT_QUOTES) ?>">[<?
= __('Login through SSO') ?
>]</a
>
54 <?php
if (isset($referer)): ?
>
55 <input id
="id_referer" type
="hidden" name
="referer" value
="<?= htmlspecialchars($referer, ENT_QUOTES) ?>" />
62 <?php
printf(__("HTTP login is disabled. Please %sswitch to HTTPs%s if you want to login."),
63 '<a href="' . get_uri('/login', true) . '">', '</a>'); ?
>
68 html_footer(AURWEB_VERSION
);