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


PHP Song::get_recently_played方法代码示例

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


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

示例1: get_current_slideshow

 public static function get_current_slideshow()
 {
     $songs = Song::get_recently_played($GLOBALS['user']->id);
     $images = array();
     if (count($songs) > 0) {
         $last_song = new Song($songs[0]['object_id']);
         $last_song->format();
         $images = self::get_images($last_song->f_artist);
     }
     return $images;
 }
开发者ID:nioc,项目名称:ampache,代码行数:11,代码来源:slideshow.class.php

示例2: Tmp_Playlist

    </dd>
</dl><br />
<?php 
UI::show_box_bottom();
UI::show_box_top(T_('Active Playlist'));
?>
<table cellspacing="0">
    <tr>
        <td valign="top">
            <?php 
$tmp_playlist = new Tmp_Playlist(Tmp_Playlist::get_from_userid($client->id));
$object_ids = $tmp_playlist->get_items();
foreach ($object_ids as $object_data) {
    $type = array_shift($object_data);
    $object = new $type(array_shift($object_data));
    $object->format();
    echo $object->f_link;
    ?>
                <br />
            <?php 
}
?>
        </td>
    </tr>
</table><br />
<?php 
UI::show_box_bottom();
$data = Song::get_recently_played($client->id);
Song::build_cache(array_keys($data));
$user_id = $client->id;
require AmpConfig::get('prefix') . '/templates/show_recently_played.inc.php';
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_user.inc.php

示例3: Wanted

 case 'accept_wanted':
     if (AmpConfig::get('wanted') && isset($_REQUEST['mbid'])) {
         $mbid = $_REQUEST['mbid'];
         $walbum = new Wanted(Wanted::get_wanted($mbid));
         $walbum->accept();
         ob_start();
         $walbum->show_action_buttons();
         $results['wanted_action_' . $mbid] = ob_get_clean();
     }
     break;
 case 'reloadnp':
     ob_start();
     show_now_playing();
     $results['now_playing'] = ob_get_clean();
     ob_start();
     $data = Song::get_recently_played();
     Song::build_cache(array_keys($data));
     require_once AmpConfig::get('prefix') . UI::find_template('show_recently_played.inc.php');
     $results['recently_played'] = ob_get_clean();
     break;
 case 'sidebar':
     switch ($_REQUEST['button']) {
         case 'home':
         case 'modules':
         case 'localplay':
         case 'player':
         case 'preferences':
             $button = $_REQUEST['button'];
             break;
         case 'admin':
             if (Access::check('interface', '100')) {
开发者ID:ivan801,项目名称:ampache,代码行数:31,代码来源:index.ajax.php

示例4: pubdate_recently_played

 /**
  * pubdate_recently_played
  * This just returns the 'newest' recently played entry
  * @return int
  */
 public static function pubdate_recently_played()
 {
     $data = Song::get_recently_played();
     $element = array_shift($data);
     return $element['date'];
 }
开发者ID:nioc,项目名称:ampache,代码行数:11,代码来源:ampache_rss.class.php


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