- /* Ask for classic admin password authentification. */
- elseif ((!isset($_SESSION['admin_auth']) || $_SESSION['admin_auth'] != true)
- && empty($cfg['admin_http_auth_user'])) {
- require(JIRAFEAU_ROOT . 'lib/template/header.php'); ?>
- <form method="post" class="form login">
- <fieldset>
- <table>
- <tr>
- <td class = "label"><label for = "enter_password">
- <?php echo t('ADMIN_PSW') . ':'; ?></label>
- </td>
- <td class = "field"><input type = "password"
- name = "admin_password" id = "admin_password"
- size = "40" />
- </td>
- </tr>
- <tr class = "nav">
- <td></td>
- <td class = "nav next">
- <input type = "submit" name = "key" value =
- "<?php echo t('LOGIN'); ?>" />
- </td>
- </tr>
- </table>
- </fieldset>
- </form>
- <?php
- require(JIRAFEAU_ROOT.'lib/template/footer.php');
- exit;
- }
- /* Check authenticated user if HTTP authentification is enable. */
- elseif ((!isset($_SESSION['admin_auth']) || $_SESSION['admin_auth'] != true)
- && !empty($cfg['admin_http_auth_user'])) {
- if ($cfg['admin_http_auth_user'] == $_SERVER['PHP_AUTH_USER']) {
- $_SESSION['admin_auth'] = true;
- }
- }
-
- /* Be sure that no one can access further without admin_auth. */
- if (!isset($_SESSION['admin_auth']) || $_SESSION['admin_auth'] != true) {
- $_SESSION['admin_auth'] = false;
- require(JIRAFEAU_ROOT . 'lib/template/header.php');
- echo '<div class="error"><p>'.
- t('NO_ADMIN_AUTH') .
- '</p></div>';
- require(JIRAFEAU_ROOT.'lib/template/footer.php');
- exit;
- }