本文整理匯總了PHP中Guest::check方法的典型用法代碼示例。如果您正苦於以下問題:PHP Guest::check方法的具體用法?PHP Guest::check怎麽用?PHP Guest::check使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Guest
的用法示例。
在下文中一共展示了Guest::check方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: exit
exit('Error: Wrong parameter type for albumID!');
}
if (isset($_POST['photoID']) && preg_match('/^[0-9]{14}$/', $_POST['photoID']) !== 1) {
exit('Error: Wrong parameter type for photoID!');
}
# Function for switch statement
if (isset($_POST['function'])) {
$fn = $_POST['function'];
} else {
$fn = $_GET['function'];
}
if (isset($_SESSION['login']) && $_SESSION['login'] === true && (isset($_SESSION['identifier']) && $_SESSION['identifier'] === $settings['identifier'])) {
###
# Admin Access
# Full access to Lychee. Only with correct password/session.
###
define('LYCHEE_ACCESS_ADMIN', true);
$admin = new Admin($database, $plugins, $settings);
$admin->check($fn);
} else {
###
# Guest Access
# Access to view all public folders and photos in Lychee.
###
define('LYCHEE_ACCESS_GUEST', true);
$guest = new Guest($database, $plugins, $settings);
$guest->check($fn);
}
} else {
exit('Error: Called function not found!');
}