/** * videos * This returns video objects! * @param array $input */ public static function videos($input) { self::$browse->reset_filters(); self::$browse->set_type('video'); self::$browse->set_sort('title', 'ASC'); $method = $input['exact'] ? 'exact_match' : 'alpha_match'; Api::set_filter($method, $input['filter']); $video_ids = self::$browse->get_objects(); XML_Data::set_offset($input['offset']); XML_Data::set_limit($input['limit']); echo XML_Data::videos($video_ids); }
* as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ require_once '../lib/init.php'; if (!Access::check('interface', 100)) { UI::access_denied(); exit; } UI::show_header(); switch ($_REQUEST['action']) { default: // Show Catalogs $catalog_ids = Catalog::get_catalogs(); $browse = new Browse(); $browse->set_type('catalog'); $browse->set_static_content(true); $browse->save_objects($catalog_ids); $browse->show_objects($catalog_ids); $browse->store(); break; } UI::show_footer();
?> <div id="following" class="tab_content"> <?php $following_ids = $client->get_following(); $browse = new Browse(); $browse->set_type('user'); $browse->set_simple_browse(false); $browse->show_objects($following_ids); $browse->store(); ?> </div> <div id="followers" class="tab_content"> <?php $follower_ids = $client->get_followers(); $browse = new Browse(); $browse->set_type('user'); $browse->set_simple_browse(false); $browse->show_objects($follower_ids); $browse->store(); ?> </div> <div id="timeline" class="tab_content"> <?php if (Preference::get_by_user($client->id, 'allow_personal_info_recent')) { $activities = Useractivity::get_activities($client->id); Useractivity::build_cache($activities); foreach ($activities as $aid) { $activity = new Useractivity($aid); $activity->show(); } }
<li> <?php echo T_('Wanted actions'); ?> : <div id="wanted_action_<?php echo $walbum->mbid; ?> "> <?php $walbum->show_action_buttons(); ?> </div> </li> </ul> </div> <?php UI::show_box_bottom(); ?> <div id="additional_information"> </div> <div> <?php $browse = new Browse(); $browse->set_type('song_preview'); $browse->set_static_content(true); $browse->show_objects($walbum->songs); ?> </div>
<?php /* vim:set softtabstop=4 shiftwidth=4 expandtab: */ /** * * LICENSE: GNU General Public License, version 2 (GPLv2) * Copyright 2001 - 2014 Ampache.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License v2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ $object_ids = Share::get_share_list(); $browse = new Browse(); $browse->set_type('share'); $browse->set_static_content(true); $browse->save_objects($object_ids); $browse->show_objects($object_ids); $browse->store();
* modify it under the terms of the GNU General Public License v2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ $sql = Stats::get_recent_sql('album', $user_id); $browse = new Browse(); $browse->set_type('album', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); $sql = Stats::get_recent_sql('artist', $user_id); $browse = new Browse(); $browse->set_type('artist', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); $sql = Stats::get_recent_sql('song', $user_id); $browse = new Browse(); $browse->set_type('song', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store();
$results[$browse->get_content_div()] = ob_get_clean(); break; case 'set_sort': if ($_REQUEST['sort']) { $browse->set_sort($_REQUEST['sort']); } if (!$browse->get_use_pages()) { $browse->set_start(0); } ob_start(); $browse->show_objects(null, $argument); $results[$browse->get_content_div()] = ob_get_clean(); break; case 'toggle_tag': $type = $_SESSION['tagcloud_type'] ? $_SESSION['tagcloud_type'] : 'song'; $browse->set_type($type); break; case 'delete_object': switch ($_REQUEST['type']) { case 'playlist': // Check the perms we need to on this $playlist = new Playlist($_REQUEST['id']); if (!$playlist->has_access()) { exit; } // Delete it! $playlist->delete(); $key = 'playlist_row_' . $playlist->id; break; case 'smartplaylist': $playlist = new Search($_REQUEST['id'], 'song');
* You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ $sql = Stats::get_recent_sql('album', $user_id); $browse = new Browse(); $browse->set_type('album', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); $sql = Stats::get_recent_sql('artist', $user_id); $browse = new Browse(); $browse->set_type('artist', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); $sql = Stats::get_recent_sql('song', $user_id); $browse = new Browse(); $browse->set_type('song', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); if (AmpConfig::get('allow_video')) { $sql = Stats::get_recent_sql('video', $user_id); $browse = new Browse(); $browse->set_type('video', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); }
if (!Access::check('localplay', '50')) { debug_event('DENIED', 'Attempted to delete track without access', '1'); exit; } $localplay = new Localplay(AmpConfig::get('localplay_controller')); $localplay->connect(); // Scrub in the delete request $id = intval($_REQUEST['id']); $localplay->delete_track($id); // Wait in case we just deleted what we were playing sleep(3); $objects = $localplay->get(); $status = $localplay->status(); ob_start(); $browse = new Browse(); $browse->set_type('playlist_localplay'); $browse->set_static_content(true); $browse->save_objects($objects); $browse->show_objects($objects); $browse->store(); $results[$browse->get_content_div()] = ob_get_contents(); ob_end_clean(); break; case 'delete_instance': // Make sure that you have access to do this... if (!Access::check('localplay', '75')) { debug_event('DENIED', 'Attempted to delete instance without access', '1'); exit; } // Scrub it in $localplay = new Localplay(AmpConfig::get('localplay_controller'));
/** * * LICENSE: GNU General Public License, version 2 (GPLv2) * Copyright 2001 - 2014 Ampache.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License v2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ $sql = Stats::get_newest_sql('album'); $browse = new Browse(); $browse->set_type('album', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); $sql = Stats::get_newest_sql('artist'); $browse = new Browse(); $browse->set_type('artist', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store();
switch ($_REQUEST['action']) { case 'edit_shout': $shout = new Shoutbox($_REQUEST['shout_id']); if ($shout->id) { $shout->update($_POST); } show_confirmation(T_('Shoutbox Post Updated'), '', AmpConfig::get('web_path') . '/admin/shout.php'); break; case 'show_edit': $shout = new Shoutbox($_REQUEST['shout_id']); $object = Shoutbox::get_object($shout->object_type, $shout->object_id); $object->format(); $client = new User($shout->user); $client->format(); require_once AmpConfig::get('prefix') . '/templates/show_edit_shout.inc.php'; break; case 'delete': Shoutbox::delete($_REQUEST['shout_id']); show_confirmation(T_('Shoutbox Post Deleted'), '', AmpConfig::get('web_path') . '/admin/shout.php'); break; default: $browse = new Browse(); $browse->set_type('shoutbox'); $browse->set_simple_browse(true); $shoutbox_ids = $browse->get_objects(); $browse->show_objects($shoutbox_ids); $browse->store(); break; } // end switch on action UI::show_footer();
$browse = new Browse(); $browse->set_type('album', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); $sql = Userflag::get_latest_sql('artist'); $browse = new Browse(); $browse->set_type('artist', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); $sql = Userflag::get_latest_sql('song'); $browse = new Browse(); $browse->set_type('song', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); if (AmpConfig::get('allow_video')) { $sql = Userflag::get_latest_sql('video'); $browse = new Browse(); $browse->set_type('video', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store(); } $sql = Userflag::get_latest_sql('playlist'); $browse = new Browse(); $browse->set_type('playlist', $sql); $browse->set_simple_browse(true); $browse->show_objects(); $browse->store();
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ require_once 'lib/init.php'; UI::show_header(); /** * action switch */ switch ($_REQUEST['action']) { case 'search': if ($_REQUEST['rule_1'] != 'missing_artist') { $browse = new Browse(); require_once AmpConfig::get('prefix') . '/templates/show_search_form.inc.php'; require_once AmpConfig::get('prefix') . '/templates/show_search_options.inc.php'; $results = Search::run($_REQUEST); $browse->set_type($_REQUEST['type']); $browse->show_objects($results); $browse->store(); } else { $wartists = Wanted::search_missing_artists($_REQUEST['rule_1_input']); require_once AmpConfig::get('prefix') . '/templates/show_missing_artists.inc.php'; echo '<a href="http://musicbrainz.org/search?query=' . rawurlencode($_REQUEST['rule_1_input']) . '&type=artist&method=indexed" target="_blank">' . T_('View on MusicBrainz') . '</a><br />'; } break; case 'save_as_smartplaylist': if (!Access::check('interface', 25)) { UI::access_denied(); exit; } $playlist = new Search(); $playlist->parse_rules(Search::clean_request($_REQUEST));
<?php /* vim:set softtabstop=4 shiftwidth=4 expandtab: */ /** * * LICENSE: GNU General Public License, version 2 (GPLv2) * Copyright 2001 - 2015 Ampache.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License v2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ $object_ids = Wanted::get_wanted_list(); $browse = new Browse(); $browse->set_type('wanted'); $browse->set_static_content(true); $browse->save_objects($object_ids); $browse->show_objects($object_ids); $browse->store();
$browse->show_objects(); break; case 'tag': //FIXME: This whole thing is ugly, even though it works. $browse->set_sort('count', 'ASC'); // This one's a doozy $browse_type = isset($_REQUEST['type']) ? $_REQUEST['type'] : 'artist'; $browse->set_simple_browse(false); $browse->save_objects(Tag::get_tags($browse_type, 0, 'name')); // Should add a pager? $object_ids = $browse->get_saved(); $keys = array_keys($object_ids); Tag::build_cache($keys); UI::show_box_top(T_('Tag Cloud'), 'box box_tag_cloud'); $browse2 = new Browse(); $browse2->set_type($browse_type); $browse2->store(); require_once AmpConfig::get('prefix') . UI::find_template('show_tagcloud.inc.php'); UI::show_box_bottom(); $type = $browse2->get_type(); require_once AmpConfig::get('prefix') . UI::find_template('browse_content.inc.php'); break; case 'artist': $browse->set_filter('catalog', $_SESSION['catalog']); if (AmpConfig::get('catalog_disable')) { $browse->set_filter('catalog_enabled', '1'); } $browse->set_sort('name', 'ASC'); $browse->update_browse_from_session(); $browse->show_objects(); break;
if (isset($_POST['license_id'])) { $license = new License($_POST['license_id']); if ($license->id) { $license->update($_POST); } $text = T_('License Updated'); } else { License::create($_POST); $text = T_('License Created'); } show_confirmation($text, '', AmpConfig::get('web_path') . '/admin/license.php'); break; case 'show_edit': $license = new License($_REQUEST['license_id']); case 'show_create': require_once AmpConfig::get('prefix') . '/templates/show_edit_license.inc.php'; break; case 'delete': License::delete($_REQUEST['license_id']); show_confirmation(T_('License Deleted'), '', AmpConfig::get('web_path') . '/admin/license.php'); break; default: $browse = new Browse(); $browse->set_type('license'); $browse->set_simple_browse(true); $license_ids = $browse->get_objects(); $browse->show_objects($license_ids); $browse->store(); break; } UI::show_footer();
');"> <?php echo UI::get_icon('delete'); ?> <?php echo T_('Delete'); ?> </a> </li> <?php } ?> </ul> </div> <?php UI::show_box_bottom(); ?> <div id='reordered_list_<?php echo $playlist->id; ?> '> <?php $browse = new Browse(); $browse->set_type('playlist_song'); $browse->add_supplemental_object('playlist', $playlist->id); $browse->set_static_content(true); $browse->show_objects($object_ids, true); $browse->store(); ?> </div>
* modify it under the terms of the GNU General Public License v2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ $web_path = AmpConfig::get('web_path'); $browse = new Browse(); $browse->set_type($object_type); UI::show_box_top($artist->f_name, 'info-box'); if (AmpConfig::get('lastfm_api_key')) { echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=artist_info&artist=' . $artist->id, 'artist_info')); ?> <div class="item_right_info"> <div class="external_links"> <a href="http://www.google.com/search?q=%22<?php echo rawurlencode($artist->f_name); ?> %22" target="_blank"><?php echo UI::get_icon('google', T_('Search on Google ...')); ?> </a> <a href="http://en.wikipedia.org/wiki/Special:Search?search=%22<?php echo rawurlencode($artist->f_name);
$_SESSION['iframe']['target'] = AmpConfig::get('web_path') . '/stream.php?action=democratic&democratic_id=' . scrub_out($_REQUEST['democratic_id']); $results['rfc3514'] = '<script type="text/javascript">' . Core::get_reloadutil() . '("' . $_SESSION['iframe']['target'] . '")</script>'; break; case 'clear_playlist': if (!Access::check('interface', '100')) { echo xoutput_from_array(array('rfc3514' => '0x1')); exit; } $democratic = new Democratic($_REQUEST['democratic_id']); $democratic->set_parent(); $democratic->clear(); $show_browse = true; break; default: $results['rfc3514'] = '0x1'; break; } // switch on action; if ($show_browse) { ob_start(); $object_ids = $democratic->get_items(); $browse = new Browse(); $browse->set_type('democratic'); $browse->set_static_content(false); $browse->show_objects($object_ids); $browse->store(); $results[$browse->get_content_div()] = ob_get_contents(); ob_end_clean(); } // We always do this echo xoutput_from_array($results);
$items = $playlist->get_items(); foreach ($items as $item) { $GLOBALS['user']->playlist->add_object($item['object_id'], $item['object_type']); } $results['rightbar'] = UI::ajax_include('rightbar.inc.php'); break; case 'advanced_random': $object_ids = Random::advanced('song', $_POST); // First add them to the active playlist if (is_array($object_ids)) { foreach ($object_ids as $object_id) { $GLOBALS['user']->playlist->add_object($object_id, 'song'); } } $results['rightbar'] = UI::ajax_include('rightbar.inc.php'); // Now setup the browse and show them below! $browse = new Browse(); $browse->set_type('song'); $browse->save_objects($object_ids); ob_start(); $browse->show_objects(); $results['browse'] = ob_get_contents(); ob_end_clean(); break; default: $results['rfc3514'] = '0x1'; break; } // switch on action; // We always do this echo xoutput_from_array($results);
?> /smartplaylist.php?action=update_playlist&playlist_id=<?php echo $playlist->id; ?> " enctype="multipart/form-data" style="Display:inline"> <?php require AmpConfig::get('prefix') . UI::find_template('show_rules.inc.php'); ?> <div class="formValidation"> <input class="button" type="submit" value="<?php echo T_('Save Changes'); ?> " /> </div> </form> <?php UI::show_box_bottom(); ?> <div> <?php $browse = new Browse(); $browse->set_type('playlist_media'); $browse->add_supplemental_object('search', $playlist->id); $browse->set_static_content(false); $browse->show_objects($object_ids); $browse->store(); ?> </div>