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


PHP Browse::show_objects方法代码示例

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


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

示例1: xoutput_from_array

        $items = $playlist->get_items();
        foreach ($items as $item) {
            $GLOBALS['user']->playlist->add_object($item['object_id'], $item['object_type']);
        }
        $results['rightbar'] = UI::ajax_include('rightbar.inc.php');
        break;
    case 'advanced_random':
        $object_ids = Random::advanced('song', $_POST);
        // First add them to the active playlist
        if (is_array($object_ids)) {
            foreach ($object_ids as $object_id) {
                $GLOBALS['user']->playlist->add_object($object_id, 'song');
            }
        }
        $results['rightbar'] = UI::ajax_include('rightbar.inc.php');
        // Now setup the browse and show them below!
        $browse = new Browse();
        $browse->set_type('song');
        $browse->save_objects($object_ids);
        ob_start();
        $browse->show_objects();
        $results['browse'] = ob_get_contents();
        ob_end_clean();
        break;
    default:
        $results['rfc3514'] = '0x1';
        break;
}
// switch on action;
// We always do this
echo xoutput_from_array($results);
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:random.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: elseif

         $browse->set_filter($_REQUEST['key'], $_REQUEST['multi_alpha_filter']);
         $browse->set_catalog($_SESSION['catalog']);
     }
     if ($_REQUEST['sort']) {
         // Set the new sort value
         $browse->set_sort($_REQUEST['sort']);
     }
     if ($_REQUEST['catalog_key'] || $_SESSION['catalog'] != 0) {
         $browse->set_filter('catalog', $_REQUEST['catalog_key']);
         $_SESSION['catalog'] = $_REQUEST['catalog_key'];
     } elseif ($_REQUEST['catalog_key'] == 0) {
         $browse->set_filter('catalog', null);
         unset($_SESSION['catalog']);
     }
     ob_start();
     $browse->show_objects(null, $argument);
     $results[$browse->get_content_div()] = ob_get_clean();
     break;
 case 'set_sort':
     if ($_REQUEST['sort']) {
         $browse->set_sort($_REQUEST['sort']);
     }
     if (!$browse->get_use_pages()) {
         $browse->set_start(0);
     }
     ob_start();
     $browse->show_objects(null, $argument);
     $results[$browse->get_content_div()] = ob_get_clean();
     break;
 case 'toggle_tag':
     $type = $_SESSION['tagcloud_type'] ? $_SESSION['tagcloud_type'] : 'song';
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:browse.ajax.php

示例4: License

        if (isset($_POST['license_id'])) {
            $license = new License($_POST['license_id']);
            if ($license->id) {
                $license->update($_POST);
            }
            $text = T_('License Updated');
        } else {
            License::create($_POST);
            $text = T_('License Created');
        }
        show_confirmation($text, '', AmpConfig::get('web_path') . '/admin/license.php');
        break;
    case 'show_edit':
        $license = new License($_REQUEST['license_id']);
    case 'show_create':
        require_once AmpConfig::get('prefix') . '/templates/show_edit_license.inc.php';
        break;
    case 'delete':
        License::delete($_REQUEST['license_id']);
        show_confirmation(T_('License Deleted'), '', AmpConfig::get('web_path') . '/admin/license.php');
        break;
    default:
        $browse = new Browse();
        $browse->set_type('license');
        $browse->set_simple_browse(true);
        $license_ids = $browse->get_objects();
        $browse->show_objects($license_ids);
        $browse->store();
        break;
}
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:license.php

示例5:

    ?>
            <li><a id="concerts_link" href="#concerts"><?php 
    echo T_('Events');
    ?>
</a></li>
<?php 
}
?>
            <!-- Needed to avoid the 'only one' bug -->
            <li></li>
        </ul>
    </div>
    <div id="tabs_content">
        <div id="albums" class="tab_content" style="display: block;">
<?php 
$browse->show_objects($object_ids, true);
// Passing 'true' means that we allow grouping albums by disks depending on the configuration
$browse->store();
?>
        </div>
<?php 
if (AmpConfig::get('wanted')) {
    echo Ajax::observe('missing_albums_link', 'click', Ajax::action('?page=index&action=wanted_missing_albums&artist=' . $artist->id, 'missing_albums'));
    ?>
        <div id="missing_albums" class="tab_content">
        <?php 
    UI::show_box_top(T_('Missing Albums'), 'info-box');
    echo T_('Loading...');
    UI::show_box_bottom();
    ?>
        </div>
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_artist.inc.php

示例6: Browse

 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
require_once '../lib/init.php';
if (!Access::check('interface', 100)) {
    UI::access_denied();
    exit;
}
UI::show_header();
switch ($_REQUEST['action']) {
    default:
        // Show Catalogs
        $catalog_ids = Catalog::get_catalogs();
        $browse = new Browse();
        $browse->set_type('catalog');
        $browse->set_static_content(true);
        $browse->save_objects($catalog_ids);
        $browse->show_objects($catalog_ids);
        $browse->store();
        break;
}
UI::show_footer();
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:index.php

示例7: Browse

<?php

/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
/**
 *
 * LICENSE: GNU General Public License, version 2 (GPLv2)
 * Copyright 2001 - 2015 Ampache.org
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License v2
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
$object_ids = Wanted::get_wanted_list();
$browse = new Browse();
$browse->set_type('wanted');
$browse->set_static_content(true);
$browse->save_objects($object_ids);
$browse->show_objects($object_ids);
$browse->store();
开发者ID:nioc,项目名称:ampache,代码行数:29,代码来源:show_stats_wanted.inc.php

示例8: T_

    <li>
        <?php 
echo T_('Wanted actions');
?>
:
        <div id="wanted_action_<?php 
echo $walbum->mbid;
?>
">
        <?php 
$walbum->show_action_buttons();
?>
        </div>
    </li>
</ul>
</div>
<?php 
UI::show_box_bottom();
?>
<div id="additional_information">
&nbsp;
</div>
<div>
<?php 
$browse = new Browse();
$browse->set_type('song_preview');
$browse->set_static_content(true);
$browse->show_objects($walbum->songs);
?>
</div>
开发者ID:nioc,项目名称:ampache,代码行数:30,代码来源:show_missing_album.inc.php

示例9: Browse

     <?php 
 $following_ids = $client->get_following();
 $browse = new Browse();
 $browse->set_type('user');
 $browse->set_simple_browse(false);
 $browse->show_objects($following_ids);
 $browse->store();
 ?>
     </div>
     <div id="followers" class="tab_content">
     <?php 
 $follower_ids = $client->get_followers();
 $browse = new Browse();
 $browse->set_type('user');
 $browse->set_simple_browse(false);
 $browse->show_objects($follower_ids);
 $browse->store();
 ?>
     </div>
         <div id="timeline" class="tab_content">
             <?php 
 if (Preference::get_by_user($client->id, 'allow_personal_info_recent')) {
     $activities = Useractivity::get_activities($client->id);
     Useractivity::build_cache($activities);
     foreach ($activities as $aid) {
         $activity = new Useractivity($aid);
         $activity->show();
     }
 }
 ?>
         </div>
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_user.inc.php

示例10: 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(true);
        $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:nioc,项目名称:ampache,代码行数:31,代码来源:users.php

示例11: Browse

$browse = new Browse();
// We limit threshold for all items otherwise the counter will not be the same that the top_sql query.
// Example: Item '1234' => 3 counts during period with 'get_top_sql'. Without threshold, 'show_objects' would return the total which could be 24 during all time)
$browse->set_threshold($thresh_value);
$browse->set_type('song', $sql);
$browse->set_simple_browse(true);
$browse->show_objects();
$browse->store();
$sql = Stats::get_top_sql('album', $thresh_value);
$browse = new Browse();
$browse->set_threshold($thresh_value);
$browse->set_type('album', $sql);
$browse->set_simple_browse(true);
$browse->show_objects();
$browse->store();
$sql = Stats::get_top_sql('artist', $thresh_value);
$browse = new Browse();
$browse->set_threshold($thresh_value);
$browse->set_type('artist', $sql);
$browse->set_simple_browse(true);
$browse->show_objects();
$browse->store();
if (AmpConfig::get('allow_video')) {
    $sql = Stats::get_top_sql('video');
    $browse = new Browse();
    $browse->set_type('video', $sql);
    $browse->set_simple_browse(true);
    $browse->show_objects(null);
    $browse->store();
}
UI::show_box_bottom();
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_popular.inc.php

示例12: Shoutbox

switch ($_REQUEST['action']) {
    case 'edit_shout':
        $shout = new Shoutbox($_REQUEST['shout_id']);
        if ($shout->id) {
            $shout->update($_POST);
        }
        show_confirmation(T_('Shoutbox Post Updated'), '', AmpConfig::get('web_path') . '/admin/shout.php');
        break;
    case 'show_edit':
        $shout = new Shoutbox($_REQUEST['shout_id']);
        $object = Shoutbox::get_object($shout->object_type, $shout->object_id);
        $object->format();
        $client = new User($shout->user);
        $client->format();
        require_once AmpConfig::get('prefix') . '/templates/show_edit_shout.inc.php';
        break;
    case 'delete':
        Shoutbox::delete($_REQUEST['shout_id']);
        show_confirmation(T_('Shoutbox Post Deleted'), '', AmpConfig::get('web_path') . '/admin/shout.php');
        break;
    default:
        $browse = new Browse();
        $browse->set_type('shoutbox');
        $browse->set_simple_browse(true);
        $shoutbox_ids = $browse->get_objects();
        $browse->show_objects($shoutbox_ids);
        $browse->store();
        break;
}
// end switch on action
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:shout.php

示例13: Browse

 *
 */
require_once 'lib/init.php';
UI::show_header();
/**
 * action switch
 */
switch ($_REQUEST['action']) {
    case 'search':
        if ($_REQUEST['rule_1'] != 'missing_artist') {
            $browse = new Browse();
            require_once AmpConfig::get('prefix') . '/templates/show_search_form.inc.php';
            require_once AmpConfig::get('prefix') . '/templates/show_search_options.inc.php';
            $results = Search::run($_REQUEST);
            $browse->set_type($_REQUEST['type']);
            $browse->show_objects($results);
            $browse->store();
        } else {
            $wartists = Wanted::search_missing_artists($_REQUEST['rule_1_input']);
            require_once AmpConfig::get('prefix') . '/templates/show_missing_artists.inc.php';
            echo '<a href="http://musicbrainz.org/search?query=' . rawurlencode($_REQUEST['rule_1_input']) . '&type=artist&method=indexed" target="_blank">' . T_('View on MusicBrainz') . '</a><br />';
        }
        break;
    case 'save_as_smartplaylist':
        if (!Access::check('interface', 25)) {
            UI::access_denied();
            exit;
        }
        $playlist = new Search();
        $playlist->parse_rules(Search::clean_request($_REQUEST));
        $playlist->save();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:search.php

示例14: array

        </ul>
    </div>
    <div id="tabs_content">
        <div id="albums" class="tab_content" style="display: block;">
<?php 
if (!isset($multi_object_ids)) {
    $multi_object_ids = array('' => $object_ids);
}
foreach ($multi_object_ids as $key => $object_ids) {
    $title = !empty($key) ? ucwords($key) : '';
    $browse = new Browse();
    $browse->set_type($object_type);
    if (!empty($key)) {
        $browse->set_content_div_ak($key);
    }
    $browse->show_objects($object_ids, array('group_disks' => true, 'title' => $title));
    $browse->store();
}
?>
        </div>
<?php 
if (AmpConfig::get('wanted')) {
    echo Ajax::observe('missing_albums_link', 'click', Ajax::action('?page=index&action=wanted_missing_albums&artist=' . $artist->id, 'missing_albums'));
    ?>
        <div id="missing_albums" class="tab_content">
        <?php 
    UI::show_box_top(T_('Missing Albums'), 'info-box');
    echo T_('Loading...');
    UI::show_box_bottom();
    ?>
        </div>
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_artist.inc.php


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