本文整理匯總了PHP中Gallery::getUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gallery::getUser方法的具體用法?PHP Gallery::getUser怎麽用?PHP Gallery::getUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gallery
的用法示例。
在下文中一共展示了Gallery::getUser方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dirname
$authType = "zp_album_auth_" . $albumobj->get('id');
$hint = $albumobj->getPasswordHint();
$show = $albumobj->getUser();
if (!empty($hash)) {
break;
}
$albumobj = $albumobj->getParent();
}
}
}
if (empty($hash)) {
// check for gallery password
$hash = $_zp_gallery->getPassword();
$authType = 'zp_gallery_auth';
$hint = $_zp_gallery->getPasswordHint();
$show = $_zp_gallery->getUser();
}
if (empty($hash) && GALLERY_SECURITY == 'private' || !empty($hash) && zp_getCookie($authType) != $hash) {
require_once dirname(__FILE__) . "/template-functions.php";
$parms = '';
if (isset($_GET['wmk'])) {
$parms = '&wmk=' . $_GET['wmk'];
}
if (isset($_GET['q'])) {
$parms .= '&q=' . sanitize_numeric($_GET['q']);
}
if (isset($_GET['dsp'])) {
$parms .= '&dsp=' . sanitize_numeric($_GET['dsp']);
}
$action = WEBPATH . '/' . ZENFOLDER . '/full-image.php?userlog=1&a=' . pathurlencode($album8) . '&i=' . urlencode($image8) . $parms;
printPasswordForm($hint, true, $_zp_gallery->getUserLogonField() || $show, $action);
示例2: isset
if ($st == 'manual' || $st == 'random') {
$gallery->setSortDirection(0);
} else {
$gallery->setSortDirection((int) isset($_POST['gallery_sortdirection']));
}
foreach ($_POST as $item => $value) {
if (strpos($item, 'gallery-page_') === 0) {
$item = sanitize(substr(postIndexDecode($item), 13));
$gallery->setUnprotectedPage($item, (int) isset($_POST['gallery_page_unprotected_' . $item]));
}
}
$gallery->setSecurity(sanitize($_POST['gallery_security'], 3));
$gallery->setUserLogonField(isset($_POST['login_user_field']));
setOption('edit_in_place', (int) (sanitize_numeric($_POST['edit_in_place']) && true));
if ($_POST['password_enabled']) {
$olduser = $gallery->getUser();
$newuser = trim(sanitize($_POST['gallery_user'], 3));
if (!empty($newuser)) {
$gallery->setUserLogonField(1);
}
$pwd = trim(sanitize($_POST['gallerypass']));
$fail = '';
if ($olduser != $newuser) {
if (!empty($newuser) && empty($pwd) && empty($pwd2)) {
$fail = '?mismatch=user_gallery';
}
}
if (!$fail && $_POST['gallerypass'] == $_POST['gallerypass_2']) {
$gallery->setUser($newuser);
if (empty($pwd)) {
if (empty($_POST['gallerypass'])) {