當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Gallery::setSortDirection方法代碼示例

本文整理匯總了PHP中Gallery::setSortDirection方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gallery::setSortDirection方法的具體用法?PHP Gallery::setSortDirection怎麽用?PHP Gallery::setSortDirection使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Gallery的用法示例。


在下文中一共展示了Gallery::setSortDirection方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getTagOrder

}
$tagsort = getTagOrder();
$mcr_errors = array();
if (isset($_GET['showthumbs'])) {
    // switch the display selector
    $how = sanitize($_GET['showthumbs']);
    setOption('album_tab_default_thumbs_' . (is_object($album) ? $album->name : ''), (int) ($how == 'no'));
}
if (isset($_GET['action'])) {
    $action = sanitize($_GET['action']);
    switch ($action) {
        /** reorder the tag list ******************************************************/
        /******************************************************************************/
        case 'savealbumorder':
            XSRFdefender('savealbumorder');
            $gallery->setSortDirection(0);
            $gallery->setSortType('manual');
            $gallery->save();
            $notify = postAlbumSort(NULL);
            if (isset($_POST['ids'])) {
                $action = processAlbumBulkActions();
                if (!empty($action)) {
                    $action = '&bulkmessage=' . $action;
                }
            }
            header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit' . $action . '&saved' . $notify);
            exit;
            break;
        case 'savesubalbumorder':
            XSRFdefender('savealbumorder');
            $album = new Album($gallery, $folder);
開發者ID:hatone,項目名稱:zenphoto-1.4.1.4,代碼行數:31,代碼來源:admin-edit.php

示例2: isset

 $gallery->setPersistentArchive((int) isset($_POST['persistent_archive']));
 $gallery->setGallerySession((int) isset($_POST['album_session']));
 $gallery->setThumbSelectImages((int) isset($_POST['thumb_select_images']));
 $gallery->set('gallery_title', process_language_string_save('gallery_title', 2));
 $gallery->set('Gallery_description', process_language_string_save('Gallery_description', 1));
 $gallery->set('website_title', process_language_string_save('website_title', 2));
 $web = sanitize($_POST['website_url'], 3);
 $gallery->setWebsiteURL($web);
 $gallery->setAlbumUseImagedate((int) isset($_POST['album_use_new_image_date']));
 $st = strtolower(sanitize($_POST['gallery_sorttype'], 3));
 if ($st == 'custom') {
     $st = strtolower(sanitize($_POST['customalbumsort'], 3));
 }
 $gallery->setSortType($st);
 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));
開發者ID:hatone,項目名稱:zenphoto-1.4.1.4,代碼行數:31,代碼來源:admin-options.php


注:本文中的Gallery::setSortDirection方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。