当前位置: 首页>>代码示例>>PHP>>正文


PHP Browse::set_static_content方法代码示例

本文整理汇总了PHP中Browse::set_static_content方法的典型用法代码示例。如果您正苦于以下问题:PHP Browse::set_static_content方法的具体用法?PHP Browse::set_static_content怎么用?PHP Browse::set_static_content使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Browse的用法示例。


在下文中一共展示了Browse::set_static_content方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Playlist

 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
define('AJAX_INCLUDE', '1');
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();
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:refresh_reordered.server.php

示例2: xoutput_from_array

        $_SESSION['iframe']['target'] = AmpConfig::get('web_path') . '/stream.php?action=democratic&democratic_id=' . scrub_out($_REQUEST['democratic_id']);
        $results['rfc3514'] = '<script type="text/javascript">' . Core::get_reloadutil() . '("' . $_SESSION['iframe']['target'] . '")</script>';
        break;
    case 'clear_playlist':
        if (!Access::check('interface', '100')) {
            echo xoutput_from_array(array('rfc3514' => '0x1'));
            exit;
        }
        $democratic = new Democratic($_REQUEST['democratic_id']);
        $democratic->set_parent();
        $democratic->clear();
        $show_browse = true;
        break;
    default:
        $results['rfc3514'] = '0x1';
        break;
}
// switch on action;
if ($show_browse) {
    ob_start();
    $object_ids = $democratic->get_items();
    $browse = new Browse();
    $browse->set_type('democratic');
    $browse->set_static_content(false);
    $browse->show_objects($object_ids);
    $browse->store();
    $results[$browse->get_content_div()] = ob_get_contents();
    ob_end_clean();
}
// We always do this
echo xoutput_from_array($results);
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:democratic.ajax.php


注:本文中的Browse::set_static_content方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。