Beispiel #1
0
 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;
 }
Beispiel #2
0
    </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';
Beispiel #3
0
 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')) {
Beispiel #4
0
 /**
  * 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'];
 }