示例#1
0
        if ($admin->password() == md5($password)) {
            $session = new Sessions();
            $session->setAdminLoginSessions($admin->id(), $admin->name(), $admin->email());
            Common::jsonSuccess("Success");
        } else {
            Common::jsonError("Login Error");
        }
    } else {
        Common::jsonError("Login Error");
    }
}
if ($_REQUEST['queryString']) {
    if ($_REQUEST['queryString'] == 'checklogin') {
        if (Sessions::memberIsLogged()) {
            echo 1;
        }
        if (Sessions::clientIsLogged()) {
            echo 1;
        }
        if (Sessions::hotelsIsLogged()) {
            echo 1;
        }
    } else {
        if ($_REQUEST['queryString'] == 'logoutFromAll') {
            Sessions::logoutMember();
            Sessions::logoutClient();
            Sessions::logoutHotels();
            echo 'redirect';
        }
    }
}
示例#2
0
function logout()
{
    $sessions = new Sessions();
    $sessions->logoutMember();
    $sessions->logoutClient();
    $sessions->logoutHotels();
    header("Location: " . HTTP_PATH . "clients/?q=l");
}
示例#3
0
}
if ($path == 'client') {
    $Sessions = new Sessions();
    $members = new Members();
    $members->setMemberId($_REQUEST['id']);
    $members->extractor($members->getMemberFromId());
    unset($_SESSION['HTTP_PATH_SESSION']);
    $Sessions->logoutClient();
    $Sessions->logoutMember();
    $Sessions->setHotelsLoginSessions($hotel->hotelId());
    $_SESSION['HTTP_PATH_SESSION'] = HTTP_PATH;
    if (!$Sessions->redirectIfNotLoggedInHotels()) {
        echo "true";
    }
}
if ($path == 'hotels') {
    $Sessions = new Sessions();
    $hotel = new Hotels();
    $hotel->setHotelId($_REQUEST['id']);
    $hotel->extractor($hotel->getHotelFromId());
    unset($_SESSION['HTTP_PATH_SESSION']);
    $Sessions->logoutClient();
    $Sessions->logoutMember();
    $Sessions->setHotelsLoginSessions($hotel->hotelId());
    $_SESSION['HTTP_PATH_SESSION'] = HTTP_PATH;
    if (!$Sessions->redirectIfNotLoggedInHotels()) {
        echo "true";
    }
    $Sessions->setEnableBackEndAgentRateView();
    $Sessions->setEnableBackEndAgentSpclDiscountView();
}