Example #1
0
function redirectByPermission($necess)
{
    if ($_SESSION['nivel'] != 1) {
        if ($necess == 2) {
            if ($_SESSION['nivel'] < 1 || $_SESSION['nivel'] >= 5) {
                gotoLogin('y');
            }
        } elseif ($_SESSION['nivel'] != $necess) {
            gotoLogin('y');
        }
    }
}
Example #2
0
function doLoginCheck()
{
    if (!isLogedIn()) {
        gotoLogin();
    }
}