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


PHP Browse::save_objects方法代码示例

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


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

     $browse->set_filter('catalog', $_SESSION['catalog']);
     if (AmpConfig::get('catalog_disable')) {
         $browse->set_filter('catalog_enabled', '1');
     }
     $browse->set_sort('name', 'ASC');
     $browse->update_browse_from_session();
     // Update current index depending on what is in session.
     $browse->show_objects();
     break;
 case 'tag':
     //FIXME: This whole thing is ugly, even though it works.
     $browse->set_sort('count', 'ASC');
     // This one's a doozy
     $browse_type = isset($_REQUEST['type']) ? $_REQUEST['type'] : 'artist';
     $browse->set_simple_browse(false);
     $browse->save_objects(Tag::get_tags($browse_type, 0, 'name'));
     // Should add a pager?
     $object_ids = $browse->get_saved();
     $keys = array_keys($object_ids);
     Tag::build_cache($keys);
     UI::show_box_top(T_('Tag Cloud'), 'box box_tag_cloud');
     $browse2 = new Browse();
     $browse2->set_type($browse_type);
     $browse2->store();
     require_once AmpConfig::get('prefix') . UI::find_template('show_tagcloud.inc.php');
     UI::show_box_bottom();
     $type = $browse2->get_type();
     require_once AmpConfig::get('prefix') . UI::find_template('browse_content.inc.php');
     break;
 case 'artist':
     $browse->set_filter('catalog', $_SESSION['catalog']);
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:browse.php

示例3: 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

示例4: Browse

 case 'file':
     break;
 case 'album':
     $browse->set_filter('catalog', $_SESSION['catalog']);
     if (AmpConfig::get('catalog_disable')) {
         $browse->set_filter('catalog_enabled', '1');
     }
     $browse->set_sort('name', 'ASC');
     $browse->show_objects();
     break;
 case 'tag':
     //FIXME: This whole thing is ugly, even though it works.
     $browse->set_sort('count', 'ASC');
     // This one's a doozy
     $browse->set_simple_browse(false);
     $browse->save_objects(Tag::get_tags());
     // Should add a pager?
     $object_ids = $browse->get_saved();
     $keys = array_keys($object_ids);
     Tag::build_cache($keys);
     UI::show_box_top(T_('Tag Cloud'), 'box box_tag_cloud');
     $browse2 = new Browse();
     $browse2->set_type('song');
     $browse2->store();
     require_once AmpConfig::get('prefix') . '/templates/show_tagcloud.inc.php';
     UI::show_box_bottom();
     $type = $browse2->get_type();
     require_once AmpConfig::get('prefix') . '/templates/browse_content.inc.php';
     break;
 case 'artist':
     $browse->set_filter('catalog', $_SESSION['catalog']);
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:browse.php


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