當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。