本文整理匯總了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;
?>