当前位置: 首页>>代码示例>>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;未经允许,请勿转载。