Пример #1
0
        } else {
            header('Location: https://' . URL_PROFILE . '/dashboard.php');
            die;
        }
    } else {
        $loggers['audit']->notice("Failed login attempt (username: {$_POST['username']})");
        header('Location:views/login.php?status=fail');
        die;
    }
} else {
    if ($_GET['page'] === 'validate_or_reset') {
        if (isset($_GET['lang']) && \Ventus\Utilities\I18n\Translate::isAllowedLanguage($_GET['lang'])) {
            $l10n->setLanguage($_GET['lang']);
            $SESSION->lang = $l10n->getLanguage();
        }
        $id = $pro->verifyConfirmationLink($_GET['cid']);
        $loggers['audit']->info("Attempted verification of user account (confirmation ID: {$_GET['cid']})");
        $l10n->addResource(__DIR__ . '/l10n/confirm-request.json');
        require_once 'views/confirm-request.php';
    } else {
        if ($_GET['page'] === 'activate-user') {
            $success = $pro->activateUserAccount($_POST);
            if ($success === 1) {
                $loggers['audit']->info("User activated (username: {$_POST['user_name']})");
                echo 'success';
            } else {
                $loggers['audit']->notice("Failed to activate user (username: {$_POST['user_name']})");
                echo 'failure';
            }
        } else {
            if ($_GET['page'] === 'reset_pass') {