示例#1
0
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 **/
require_once dirname(dirname(__FILE__)) . '/includes/core-minimal.inc.php';
require_once dirname(dirname(__FILE__)) . '/includes/page_template_static.php';
if (!array_key_exists('errormsg', $_SESSION)) {
    // This page is only used to display error.
    // If there is no error, we redirect to index.php
    redirect('index.php');
}
$errors = array_unique($_SESSION['errormsg']);
unset($_SESSION['errormsg']);
header_static(DEFAULT_PAGE_TITLE . ' - ' . _('Error'));
echo '<h2 class="centered">' . _('Error') . '</h2>';
echo '<div class="centered">';
if (count($errors) > 0) {
    echo '<div id="adminError">';
    echo '<span class="msg_error">';
    if (count($errors) > 1) {
        echo '<ul>';
        foreach ($errors as $error_msg) {
            echo '<li>' . $error_msg . '</li>';
        }
        echo '</ul>';
    } else {
        echo $errors[0];
    }
    echo '</span>';
示例#2
0
            // configuration saved
            popup_info(_('Configuration successfully saved'));
            redirect('index.php');
        } else {
            header_static(_('Configuration'));
            echo 'problem : configuration not saved<br>';
            // TODO (class msg...) + gettext
            footer_static();
        }
    } else {
        // conf not valid
        if ($setup) {
            popup_error('Error : ' . $ret);
            redirect('configuration.php?action=init');
        } else {
            header_static(_('Configuration'));
            echo '<p class="msg_error centered">' . $ret . '</p>';
            print_prefs($prefs);
            footer_static();
        }
    }
} else {
    $can_manage_configuration = isAuthorized('manageConfiguration');
    if (isset($_GET['action']) && $_GET['action'] == 'init') {
        try {
            $prefs = new Preferences_admin();
        } catch (Exception $e) {
        }
        $prefs->initialize();
        require_once dirname(__FILE__) . '/includes/page_template.php';
        page_header();
示例#3
0
    if (isset($_SESSION['admin_ovd_user'])) {
        unset($_SESSION['admin_ovd_user']);
    }
    adminAuthenticate($_POST['admin_login'], $_POST['admin_password']);
}
if (array_key_exists('service', $_SESSION) and array_key_exists('admin_login', $_SESSION) and array_key_exists('admin_password', $_SESSION)) {
    if (isset($_SESSION['redirect'])) {
        $buf = base64_decode($_SESSION['redirect']);
        unset($_SESSION['redirect']);
        redirect($buf);
    } else {
        redirect('index.php');
    }
}
$main_title = DEFAULT_PAGE_TITLE;
header_static($main_title . ' - ' . _('Administration'));
?>
<script type="text/javascript">
Event.observe(window, 'load', function() {
	$('admin_login').focus();
});
</script>

<h2 class="centered"><?php 
echo _('Log in');
?>
</h2>

<div id="login_box" class="centered">
	<div id="login_status"></div>
<?php