2 set_include_path(get_include_path() . PATH_SEPARATOR
. '../lib');
4 include_once("aur.inc.php");
8 $disable_http_login = config_get_bool('options', 'disable_http_login');
9 if (!$disable_http_login ||
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) {
11 $login_error = $login['error'];
14 html_header('AUR ' . __("Login"));
16 <div id
="dev-login" class="box">
17 <h2
>AUR
<?
= __('Login') ?
></h2
>
18 <?php
if (isset($_COOKIE["AURSID"])): ?
>
20 <?
= __("Logged-in as: %s", '<strong>' . username_from_sid($_COOKIE["AURSID"]) . '</strong>'); ?
>
21 <a href
="<?= get_uri('/logout/'); ?>">[<?
= __("Logout"); ?
>]</a
>
23 <?php
elseif (!$disable_http_login ||
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])): ?
>
24 <form method
="post" action
="<?= get_uri('/login') ?>">
26 <legend
><?
= __('Enter login credentials') ?
></legend
>
27 <?php
if (!empty($login_error)): ?
>
28 <ul
class="errorlist"><li
><?
= $login_error ?
></li
></ul
>
31 <label
for="id_username"><?
= __('User name or email address') . ':'; ?
></label
>
32 <input id
="id_username" type
="text" name
="user" size
="30" maxlength
="<?= config_get_int('options', 'username_max_len'); ?>" value
="<?php if (isset($_POST['user'])) { print htmlspecialchars($_POST['user'], ENT_QUOTES); } ?>" autofocus
="autofocus" />
35 <label
for="id_password"><?
= __('Password') . ':'; ?
></label
>
36 <input id
="id_password" type
="password" name
="passwd" size
="30" />
39 <input type
="checkbox" name
="remember_me" id
="id_remember_me" />
40 <label
for="id_remember_me"><?
= __("Remember me"); ?
></label
>
43 <input type
="submit" class="button" value
="<?php print __("Login
"); ?>" />
44 <a href
="<?= get_uri('/passreset/') ?>">[<?
= __('Forgot Password') ?
>]</a
>
45 <?php
if (in_request('referer') !== ""): ?
>
46 <input id
="id_referer" type
="hidden" name
="referer" value
="<?= in_request('referer') ?>" />
47 <?php
elseif (isset($_SERVER['HTTP_REFERER'])): ?
>
48 <input id
="id_referer" type
="hidden" name
="referer" value
="<?= htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_QUOTES) ?>" />
55 <?php
printf(__("HTTP login is disabled. Please %sswitch to HTTPs%s if you want to login."),
56 '<a href="' . get_uri('/login', true) . '">', '</a>'); ?
>
61 html_footer(AURWEB_VERSION
);