本文整理汇总了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!');
}