本文整理匯總了PHP中Guardian::GetPassword方法的典型用法代碼示例。如果您正苦於以下問題:PHP Guardian::GetPassword方法的具體用法?PHP Guardian::GetPassword怎麽用?PHP Guardian::GetPassword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Guardian
的用法示例。
在下文中一共展示了Guardian::GetPassword方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Session
if (isset($_COOKIE["cookie_username"]) && isset($_COOKIE["cookie_password"]) && isset($_COOKIE["cookie_userid"])) {
$guardian->SetId($_COOKIE["cookie_userid"]);
$guardian->SetUsername($_COOKIE["cookie_username"]);
$guardian->SetEncryptedPassword($_COOKIE["cookie_password"]);
} else {
$guardian->SetUsername("guest");
$guardian->SetPassword("guest");
}
}
$guardian->SetModuleName($module_name);
if ($module_name != "error") {
if (!$guardian->CheckPermission()) {
echo "<script language='Javascript'>window.location = \"/" . $WEB_SITE . "pages/pgError.php\";</script>";
} else {
$session = new Session();
$session->SetDatabase($database);
if ($guardian->GetId() != "") {
$session_id = $session->Login($guardian->GetId(), $guardian->GetUsername(), $guardian->GetEncryptedPassword());
} else {
$session_id = $session->Login($guardian->GetId(), $guardian->GetUsername(), $guardian->GetPassword());
}
$guardian->SetId($session_id);
$guardian->SetLoggedIn($session->logged_in);
}
}
/*
echo $_SERVER['QUERY_STRING']."<br>";
echo $_SERVER['SCRIPT_NAME']."<br>";
echo $_SERVER['HTTP_HOST']."<br>";
echo $_SERVER['REQUEST_URI']."<br>";
*/