Exemplo n.º 1
0
            }
        }
    }
}
// Delete the user's cookie as requested and send them back to the login form.
if (isset($_GET['deletecookie']) && $_GET['deletecookie'] == 'yes') {
    html_remove_all_cookies();
    if (isset($final_uri)) {
        $final_uri = rawurlencode($final_uri);
        header_redirect("index.php?webtag={$webtag}&final_uri={$final_uri}", gettext("Cookies successfully deleted"));
    } else {
        header_redirect("index.php?webtag={$webtag}", gettext("Cookies successfully deleted"));
    }
} else {
    if (isset($_POST['logon']) || isset($_POST['guest_logon'])) {
        if (logon_perform(true)) {
            if (isset($final_uri)) {
                $final_uri = rawurlencode($final_uri);
                header_redirect("index.php?webtag={$webtag}&final_uri={$final_uri}", gettext("You logged in successfully."));
            } else {
                header_redirect("index.php?webtag={$webtag}", gettext("You logged in successfully."));
            }
        } else {
            if (isset($final_uri)) {
                $final_uri = rawurlencode(sprintf("logon.php?webtag={$webtag}&logon_failed=true&final_uri=%s", rawurlencode($final_uri)));
                header_redirect("index.php?webtag={$webtag}&final_uri={$final_uri}", gettext("The username or password you supplied is not valid."));
            } else {
                $final_uri = rawurlencode("logon.php?webtag={$webtag}&logon_failed=true");
                header_redirect("index.php?webtag={$webtag}&final_uri={$final_uri}", gettext("The username or password you supplied is not valid."));
            }
        }
Exemplo n.º 2
0
            }
        }
    }
}
// Delete the user's cookie as requested and send them back to the login form.
if (isset($_GET['delete_cookie']) && $_GET['delete_cookie'] == 'yes') {
    html_remove_all_cookies();
    if (isset($final_uri)) {
        $final_uri = rawurlencode($final_uri);
        header_redirect("index.php?webtag={$webtag}&final_uri={$final_uri}");
    } else {
        header_redirect("index.php?webtag={$webtag}");
    }
} else {
    if (isset($_POST['logon']) || isset($_POST['guest_logon'])) {
        if (logon_perform()) {
            if (isset($final_uri)) {
                $final_uri = rawurlencode($final_uri);
                header_redirect("index.php?webtag={$webtag}&final_uri={$final_uri}");
            } else {
                header_redirect("index.php?webtag={$webtag}");
            }
        } else {
            if (isset($final_uri)) {
                $final_uri = rawurlencode(sprintf("logon.php?webtag={$webtag}&logon_failed=true&final_uri=%s", rawurlencode($final_uri)));
                header_redirect("index.php?webtag={$webtag}&final_uri={$final_uri}");
            } else {
                $final_uri = rawurlencode("logon.php?webtag={$webtag}&logon_failed=true");
                header_redirect("index.php?webtag={$webtag}&final_uri={$final_uri}");
            }
        }