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


PHP Browse::set_simple_browse方法代碼示例

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


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

示例1: intval

            ob_start();
            echo "<script language='javascript' type='text/javascript'>";
            echo "\$('#" . $fsname . "').rhinoslider({\n                    showTime: 15000,\n                    effectTime: 2000,\n                    randomOrder: true,\n                    controlsPlayPause: false,\n                    autoPlay: true,\n                    showBullets: 'never',\n                    showControls: 'always',\n                    controlsMousewheel: false,\n            });";
            echo "</script>";
        }
        $results['fslider_script'] = ob_get_clean();
        break;
    case 'songs':
        $label_id = intval($_REQUEST['label']);
        ob_start();
        if ($label_id > 0) {
            $label = new Label($label_id);
            $object_ids = $label->get_songs();
            $browse = new Browse();
            $browse->set_type('song');
            $browse->set_simple_browse(false);
            $browse->save_objects($object_ids);
            $browse->store();
            UI::show_box_top(T_('Songs'), 'info-box');
            require_once AmpConfig::get('prefix') . UI::find_template('show_songs.inc.php');
            UI::show_box_bottom();
        }
        $results['songs'] = ob_get_contents();
        ob_end_clean();
        break;
    default:
        $results['rfc3514'] = '0x1';
        break;
}
// switch on action;
// We always do this
開發者ID:ivan801,項目名稱:ampache,代碼行數:31,代碼來源:index.ajax.php

示例2: Playlist

require_once '../lib/init.php';
debug_event('refresh_reordered.server.php', 'Called for action: {' . $_REQUEST['action'] . '}', '5');
/* Switch on the action passed in */
switch ($_REQUEST['action']) {
    case 'refresh_playlist_medias':
        $playlist = new Playlist($_REQUEST['id']);
        $playlist->format();
        $object_ids = $playlist->get_items();
        $browse = new Browse();
        $browse->set_type('playlist_media');
        $browse->add_supplemental_object('playlist', $playlist->id);
        $browse->set_static_content(true);
        $browse->show_objects($object_ids);
        $browse->store();
        break;
    case 'refresh_album_songs':
        $browse = new Browse();
        $browse->set_show_header(true);
        $browse->set_type('song');
        $browse->set_simple_browse(true);
        $browse->set_filter('album', $_REQUEST['id']);
        $browse->set_sort('track', 'ASC');
        $browse->get_objects();
        echo "<div id='browse_content_song' class='browse_content'>";
        $browse->show_objects(null, true);
        // true argument is set to show the reorder column
        $browse->store();
        echo "</div>";
        break;
}
// switch on the action
開發者ID:bl00m,項目名稱:ampache,代碼行數:31,代碼來源:refresh_reordered.server.php

示例3: User

            $history = $working_user->get_ip_history(0, 1);
        } else {
            $history = $working_user->get_ip_history();
        }
        require AmpConfig::get('prefix') . '/templates/show_ip_history.inc.php';
        break;
    case 'show_add_user':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        require_once AmpConfig::get('prefix') . '/templates/show_add_user.inc.php';
        break;
    case 'show_preferences':
        $client = new User($_REQUEST['user_id']);
        $preferences = Preference::get_all($client->id);
        require_once AmpConfig::get('prefix') . '/templates/show_user_preferences.inc.php';
        break;
    default:
        $browse = new Browse();
        $browse->reset_filters();
        $browse->set_type('user');
        $browse->set_simple_browse(1);
        $browse->set_sort('name', 'ASC');
        $user_ids = $browse->get_objects();
        $browse->show_objects($user_ids);
        $browse->store();
        break;
}
// end switch on action
/* Show the footer */
UI::show_footer();
開發者ID:axelsimon,項目名稱:ampache,代碼行數:31,代碼來源:users.php


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