本文整理汇总了PHP中Playlist::get_users方法的典型用法代码示例。如果您正苦于以下问题:PHP Playlist::get_users方法的具体用法?PHP Playlist::get_users怎么用?PHP Playlist::get_users使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist::get_users方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getplaylists
/**
* getPlaylists
* Get all playlists a user is allowed to play.
* Takes optional user in parameter.
*/
public static function getplaylists($input)
{
self::check_version($input);
$r = Subsonic_XML_Data::createSuccessResponse();
$username = $input['username'];
// Don't allow playlist listing for another user
if (empty($username) || $username == $GLOBALS['user']->username) {
Subsonic_XML_Data::addPlaylists($r, Playlist::get_playlists(), Search::get_searches());
} else {
$user = User::get_from_username($username);
if ($user->id) {
Subsonic_XML_Data::addPlaylists($r, Playlist::get_users($user->id));
} else {
Subsonic_XML_Data::addPlaylists($r, array());
}
}
self::apiOutput($input, $r);
}
示例2: T_
*/
?>
<ul>
<li>
<a href="javascript:void(0);" id="rb_append_dplaylist_new" onclick="handlePlaylistAction('<?php
echo AmpConfig::get('ajax_url') . '?page=playlist&action=append_item&item_type=' . $_REQUEST['item_type'] . '&item_id=' . $_REQUEST['item_id'];
?>
', 'rb_append_dplaylist_new');">
<?php
echo T_('Add to New Playlist');
?>
</a>
</li>
<?php
$playlists = Playlist::get_users($GLOBALS['user']->id);
Playlist::build_cache($playlists);
foreach ($playlists as $playlist_id) {
$playlist = new Playlist($playlist_id);
$playlist->format();
?>
<li>
<a href="javascript:void(0);" id="rb_append_dplaylist_<?php
echo $playlist->id;
?>
" onclick="handlePlaylistAction('<?php
echo AmpConfig::get('ajax_url') . '?page=playlist&action=append_item&playlist_id=' . $playlist->id . '&item_type=' . $_REQUEST['item_type'] . '&item_id=' . $_REQUEST['item_id'];
?>
', 'rb_append_dplaylist_<?php
echo $playlist->id;
?>