1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 01:39:28 +02:00

Use UI::find_template everytime there's a '/templates/…'

Note: This concerns everything but the install files
This commit is contained in:
Niols 2015-06-06 18:54:05 +02:00
parent 35477d0a5e
commit a1f6a073cb
136 changed files with 365 additions and 672 deletions

View file

@ -72,7 +72,7 @@ switch ($_REQUEST['action']) {
show_confirmation(T_('Added'), T_('Your new Access Control List(s) have been created'),$url);
} else {
$action = 'show_add_' . $_POST['type'];
require_once AmpConfig::get('prefix') . '/templates/show_add_access.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_access.inc.php');
}
break;
case 'update_record':
@ -86,7 +86,7 @@ switch ($_REQUEST['action']) {
show_confirmation(T_('Updated'), T_('Access List Entry updated'), AmpConfig::get('web_path').'/admin/access.php');
} else {
$access->format();
require_once AmpConfig::get('prefix') . '/templates/show_edit_access.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_edit_access.inc.php');
}
break;
case 'show_add_current':
@ -94,17 +94,17 @@ switch ($_REQUEST['action']) {
case 'show_add_local':
case 'show_add_advanced':
$action = $_REQUEST['action'];
require_once AmpConfig::get('prefix') . '/templates/show_add_access.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_access.inc.php');
break;
case 'show_edit_record':
$access = new Access($_REQUEST['access_id']);
$access->format();
require_once AmpConfig::get('prefix') . '/templates/show_edit_access.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_edit_access.inc.php');
break;
default:
$list = array();
$list = Access::get_access_lists();
require_once AmpConfig::get('prefix') .'/templates/show_access_list.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_access_list.inc.php');
break;
} // end switch on action
UI::show_footer();

View file

@ -176,7 +176,7 @@ switch ($_REQUEST['action']) {
$catalog_id = Catalog::create($_POST);
if (!$catalog_id) {
require AmpConfig::get('prefix') . '/templates/show_add_catalog.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_add_catalog.inc.php');
break;
}
@ -185,7 +185,7 @@ switch ($_REQUEST['action']) {
show_confirmation(T_('Catalog Creation started...'), '', AmpConfig::get('web_path') . '/admin/catalog.php', 0, 'confirmation', false);
} else {
require AmpConfig::get('prefix') . '/templates/show_add_catalog.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_add_catalog.inc.php');
}
break;
case 'clear_stats':
@ -197,7 +197,7 @@ switch ($_REQUEST['action']) {
show_confirmation($title, $body, $url);
break;
case 'show_add_catalog':
require AmpConfig::get('prefix') . '/templates/show_add_catalog.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_add_catalog.inc.php');
break;
case 'clear_now_playing':
if (AmpConfig::get('demo_mode')) { UI::access_denied(); break; }
@ -210,7 +210,7 @@ switch ($_REQUEST['action']) {
$songs = Song::get_disabled();
if (count($songs)) {
require AmpConfig::get('prefix') . '/templates/show_disabled_songs.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_disabled_songs.inc.php');
} else {
echo "<div class=\"error\" align=\"center\">" . T_('No Disabled songs found') . "</div>";
}
@ -226,7 +226,7 @@ switch ($_REQUEST['action']) {
case 'show_customize_catalog':
$catalog = Catalog::create_from_id($_REQUEST['catalog_id']);
$catalog->format();
require_once AmpConfig::get('prefix') . '/templates/show_edit_catalog.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_edit_catalog.inc.php');
break;
case 'gather_media_art':
$sse_url = AmpConfig::get('web_path') . "/server/sse.server.php?worker=catalog&action=gather_media_art&catalogs=" . $sse_catalogs;
@ -235,7 +235,7 @@ switch ($_REQUEST['action']) {
break;
case 'show_catalogs':
default:
require_once AmpConfig::get('prefix') . '/templates/show_manage_catalogs.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_manage_catalogs.inc.php');
break;
} // end switch

View file

@ -34,11 +34,11 @@ switch ($_REQUEST['action']) {
case 'find_duplicates':
$search_type = $_REQUEST['search_type'];
$duplicates = Song::find_duplicates($search_type);
require_once AmpConfig::get('prefix') . '/templates/show_duplicate.inc.php';
require_once AmpConfig::get('prefix') . '/templates/show_duplicates.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_duplicate.inc.php');
require_once AmpConfig::get('prefix') . UI::find_template('show_duplicates.inc.php');
break;
default:
require_once AmpConfig::get('prefix') . '/templates/show_duplicate.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_duplicate.inc.php');
break;
} // end switch on action

View file

@ -65,7 +65,7 @@ switch ($_REQUEST['action']) {
// We don't want the footer so we're done here
exit;
default:
require_once AmpConfig::get('prefix') . '/templates/show_export.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_export.inc.php');
break;
} // end switch on action

View file

@ -46,7 +46,7 @@ switch ($_REQUEST['action']) {
case 'show_edit':
$license = new License($_REQUEST['license_id']);
case 'show_create':
require_once AmpConfig::get('prefix') . '/templates/show_edit_license.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_edit_license.inc.php');
break;
case 'delete':
License::delete($_REQUEST['license_id']);

View file

@ -71,7 +71,7 @@ switch ($_REQUEST['action']) {
break;
default:
require_once AmpConfig::get('prefix') . '/templates/show_mail_users.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_mail_users.inc.php');
break;
} // end switch

View file

@ -184,19 +184,19 @@ switch ($_REQUEST['action']) {
case 'show_plugins':
$plugins = Plugin::get_plugins();
UI::show_box_top(T_('Plugins'), 'box box_localplay_plugins');
require_once AmpConfig::get('prefix') . '/templates/show_plugins.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_plugins.inc.php');
UI::show_box_bottom();
break;
case 'show_localplay':
$controllers = Localplay::get_controllers();
UI::show_box_top(T_('Localplay Controllers'), 'box box_localplay_controllers');
require_once AmpConfig::get('prefix') . '/templates/show_localplay_controllers.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_controllers.inc.php');
UI::show_box_bottom();
break;
case 'show_catalog_types':
$catalogs = Catalog::get_catalog_types();
UI::show_box_top(T_('Catalog Types'), 'box box_catalog_types');
require_once AmpConfig::get('prefix') . '/templates/show_catalog_types.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_catalog_types.inc.php');
UI::show_box_bottom();
break;
default:

View file

@ -44,7 +44,7 @@ switch ($_REQUEST['action']) {
$object->format();
$client = new User($shout->user);
$client->format();
require_once AmpConfig::get('prefix') . '/templates/show_edit_shout.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_edit_shout.inc.php');
break;
case 'delete':
Shoutbox::delete($_REQUEST['shout_id']);

View file

@ -55,7 +55,7 @@ switch ($_REQUEST['action']) {
if ($_REQUEST['autoupdate'] == 'force') {
$version = AutoUpdate::get_latest_version(true);
}
require_once AmpConfig::get('prefix') . '/templates/show_debug.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_debug.inc.php');
break;
case 'clear_cache':
switch ($_REQUEST['type']) {

View file

@ -76,7 +76,7 @@ switch ($_REQUEST['action']) {
/* If we've got an error then show edit form! */
if (Error::occurred()) {
require_once AmpConfig::get('prefix') . '/templates/show_edit_user.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_edit_user.inc.php');
break;
}
@ -149,7 +149,7 @@ switch ($_REQUEST['action']) {
/* If we've got an error then show add form! */
if (Error::occurred()) {
require_once AmpConfig::get('prefix') . '/templates/show_add_user.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_user.inc.php');
break;
}
@ -185,7 +185,7 @@ switch ($_REQUEST['action']) {
case 'show_edit':
if (AmpConfig::get('demo_mode')) { break; }
$client = new User($_REQUEST['user_id']);
require_once AmpConfig::get('prefix') . '/templates/show_edit_user.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_edit_user.inc.php');
break;
case 'confirm_delete':
if (AmpConfig::get('demo_mode')) { break; }
@ -257,16 +257,16 @@ switch ($_REQUEST['action']) {
} else {
$history = $working_user->get_ip_history();
}
require AmpConfig::get('prefix') . '/templates/show_ip_history.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_ip_history.inc.php');
break;
case 'show_add_user':
if (AmpConfig::get('demo_mode')) { break; }
require_once AmpConfig::get('prefix') . '/templates/show_add_user.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_user.inc.php');
break;
case 'show_preferences':
$client = new User($_REQUEST['user_id']);
$preferences = Preference::get_all($client->id);
require_once AmpConfig::get('prefix') . '/templates/show_user_preferences.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_user_preferences.inc.php');
break;
default:
$browse = new Browse();

View file

@ -22,7 +22,7 @@
require_once 'lib/init.php';
require_once AmpConfig::get('prefix') . '/templates/header.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('header.inc.php');
/* Switch on Action */
switch ($_REQUEST['action']) {
@ -64,7 +64,7 @@ switch ($_REQUEST['action']) {
$type = 'album';
$object_id = intval($_REQUEST['album_id']);
$target_url = AmpConfig::get('web_path') . '/albums.php?action=show&amp;album=' . $object_id;
require_once AmpConfig::get('prefix') . '/templates/show_update_items.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_update_items.inc.php');
break;
case 'set_track_numbers':
debug_event('albums', 'Set track numbers called.', '5');
@ -108,7 +108,7 @@ switch ($_REQUEST['action']) {
}
$walbum->load_all();
$walbum->format();
require AmpConfig::get('prefix') . '/templates/show_missing_album.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_missing_album.inc.php');
break;
// Browse by Album
case 'show':
@ -117,9 +117,9 @@ switch ($_REQUEST['action']) {
$album->format();
if (!count($album->album_suite)) {
require AmpConfig::get('prefix') . '/templates/show_album.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_album.inc.php');
} else {
require AmpConfig::get('prefix') . '/templates/show_album_group_disks.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_album_group_disks.inc.php');
}
break;

View file

@ -65,30 +65,30 @@ switch ($_REQUEST['action']) {
$object_ids = $artist->get_albums($_REQUEST['catalog']);
}
$object_type = 'album';
require_once AmpConfig::get('prefix') . '/templates/show_artist.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_artist.inc.php');
break;
case 'show_all_songs':
$artist = new Artist($_REQUEST['artist']);
$artist->format();
$object_type = 'song';
$object_ids = $artist->get_songs();
require_once AmpConfig::get('prefix') . '/templates/show_artist.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_artist.inc.php');
break;
case 'update_from_tags':
$type = 'artist';
$object_id = intval($_REQUEST['artist']);
$target_url = AmpConfig::get('web_path') . "/artists.php?action=show&amp;artist=" . $object_id;
require_once AmpConfig::get('prefix') . '/templates/show_update_items.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_update_items.inc.php');
break;
case 'match':
case 'Match':
$match = scrub_in($_REQUEST['match']);
if ($match == "Browse" || $match == "Show_all") { $chr = ""; } else { $chr = $match; }
/* Enclose this in the purty box! */
require AmpConfig::get('prefix') . '/templates/show_box_top.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_box_top.inc.php');
show_alphabet_list('artists','artists.php',$match);
show_alphabet_form($chr, T_('Show Artists starting with'),"artists.php?action=match");
require AmpConfig::get('prefix') . '/templates/show_box_bottom.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_box_bottom.inc.php');
if ($match === "Browse") {
show_artists();
@ -108,7 +108,7 @@ switch ($_REQUEST['action']) {
$mbid = $_REQUEST['mbid'];
$wartist = Wanted::get_missing_artist($mbid);
require AmpConfig::get('prefix') . '/templates/show_missing_artist.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_missing_artist.inc.php');
break;
} // end switch

View file

@ -22,7 +22,7 @@
require_once 'lib/init.php';
require_once AmpConfig::get('prefix') . '/templates/header.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('header.inc.php');
$object_type = $_GET['object_type'];
$object_id = $_GET['object_id'];
@ -128,14 +128,14 @@ switch ($_REQUEST['action']) {
} // end foreach
// Store the results for further use
$_SESSION['form']['images'] = $images;
require_once AmpConfig::get('prefix') . '/templates/show_arts.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_arts.inc.php');
}
// Else nothing
else {
show_confirmation(T_('Art Not Located'), T_('Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'), $burl);
}
require_once AmpConfig::get('prefix') . '/templates/show_get_art.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_get_art.inc.php');
break;
case 'select_art':

View file

@ -280,7 +280,6 @@ while(true)
}
} else {
$channel->update_listeners(0);
debug_event('channel', 'No more data, stream ended.', 5);
die('No more data, stream ended.');
}
}

View file

@ -93,10 +93,10 @@ switch ($_REQUEST['action']) {
$browse2 = new Browse();
$browse2->set_type($browse_type);
$browse2->store();
require_once AmpConfig::get('prefix') . '/templates/show_tagcloud.inc.php';
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') . '/templates/browse_content.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('browse_content.inc.php');
break;
case 'artist':
$browse->set_filter('catalog',$_SESSION['catalog']);

View file

@ -37,7 +37,7 @@ switch ($_REQUEST['action']) {
$object = new $type($_REQUEST['id']);
if ($object->id) {
$object->format();
require_once AmpConfig::get('prefix') . '/templates/show_add_channel.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_channel.inc.php');
}
}
UI::show_footer();
@ -56,7 +56,7 @@ switch ($_REQUEST['action']) {
$created = Channel::create($_REQUEST['name'], $_REQUEST['description'], $_REQUEST['url'], $_REQUEST['type'], $_REQUEST['id'], $_REQUEST['interface'], $_REQUEST['port'], $_REQUEST['admin_password'], $_REQUEST['private'] ?: 0, $_REQUEST['max_listeners'], $_REQUEST['random'] ?: 0, $_REQUEST['loop'] ?: 0, $_REQUEST['stream_type'], $_REQUEST['bitrate']);
if (!$created) {
require_once AmpConfig::get('prefix') . '/templates/show_add_channel.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_channel.inc.php');
} else {
$title = T_('Channel Created');
show_confirmation($title, $body, AmpConfig::get('web_path') . '/browse.php?action=channel');

View file

@ -24,6 +24,6 @@ require_once 'lib/init.php';
UI::show_header();
require_once AmpConfig::get('prefix') . '/templates/cookie_disclaimer.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('cookie_disclaimer.inc.php');
UI::show_footer();

View file

@ -43,7 +43,7 @@ switch ($_REQUEST['action']) {
}
// Show the create page
require_once AmpConfig::get('prefix') . '/templates/show_create_democratic.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_create_democratic.inc.php');
break;
case 'delete':
if (!Access::check('interface','75')) {
@ -96,20 +96,20 @@ switch ($_REQUEST['action']) {
// Get all of the non-user playlists
$playlists = Democratic::get_playlists();
require_once AmpConfig::get('prefix') . '/templates/show_manage_democratic.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_manage_democratic.inc.php');
break;
case 'show_playlist':
default:
$democratic = Democratic::get_current_playlist();
if (!$democratic->id) {
require_once AmpConfig::get('prefix') . '/templates/show_democratic.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_democratic.inc.php');
break;
}
$democratic->set_parent();
$democratic->format();
require_once AmpConfig::get('prefix') . '/templates/show_democratic.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_democratic.inc.php');
$objects = $democratic->get_items();
Song::build_cache($democratic->object_ids);
Democratic::build_vote_cache($democratic->vote_ids);

View file

@ -65,7 +65,7 @@ if (isset($_GET['type'])) {
switch ($_GET['type']) {
case 'popup':
$typeManaged = true;
require_once AmpConfig::get('prefix') . '/templates/show_big_art.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_big_art.inc.php');
break;
case 'session':
// If we need to pull the data out of the session

View file

@ -39,9 +39,9 @@ $_SESSION['catalog'] = 0;
if (AmpConfig::get('refresh_limit') > 5 && AmpConfig::get('home_now_playing')) {
$refresh_limit = AmpConfig::get('refresh_limit');
$ajax_url = '?page=index&action=reloadnp';
require_once AmpConfig::get('prefix') . '/templates/javascript_refresh.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('javascript_refresh.inc.php');
}
require_once AmpConfig::get('prefix') . '/templates/show_index.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_index.inc.php');
UI::show_footer();

View file

@ -29,7 +29,7 @@ set_error_handler('ampache_error_handler');
// Redirect if installation is already complete.
if (!install_check_status($configfile)) {
$redirect_url = 'login.php';
require_once AmpConfig::get('prefix') . '/templates/error_page.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('error_page.inc.php');
exit;
}
@ -171,13 +171,13 @@ switch ($_REQUEST['action']) {
/* Make sure we've got a valid config file */
if (!check_config_values($results) || !$created_config) {
Error::add('general', T_('Error: Config files not found or unreadable'));
require_once AmpConfig::get('prefix') . '/templates/show_install_config.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_install_config.inc.php');
break;
}
// Don't try to add administrator user on existing database
if (install_check_status($configfile)) {
require_once AmpConfig::get('prefix') . '/templates/show_install_account.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_install_account.inc.php');
} else {
header ("Location: " . $web_path . '/login.php');
}
@ -189,7 +189,7 @@ switch ($_REQUEST['action']) {
$password2 = scrub_in($_REQUEST['local_pass2']);
if (!install_create_account($username, $password, $password2)) {
require_once AmpConfig::get('prefix') . '/templates/show_install_account.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_install_account.inc.php');
break;
}

View file

@ -76,7 +76,7 @@ switch ($_REQUEST['action']) {
$label_id = Label::create($_POST);
if (!$label_id) {
require_once AmpConfig::get('prefix') . '/templates/show_add_label.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_label.inc.php');
} else {
$body = T_('Label Added');
$title = '';
@ -95,13 +95,13 @@ switch ($_REQUEST['action']) {
$label->format();
$object_ids = $label->get_artists();
$object_type = 'artist';
require_once AmpConfig::get('prefix') . '/templates/show_label.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_label.inc.php');
UI::show_footer();
exit;
}
case 'show_add_label':
if (Access::check('interface','50') || AmpConfig::get('upload_allow_edit')) {
require_once AmpConfig::get('prefix') . '/templates/show_add_label.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_label.inc.php');
} else {
echo T_('Label cannot be found.');
}

View file

@ -717,12 +717,6 @@ class Album extends database_object implements library_item
$search['rule_0_input'] = $name;
$search['rule_0_operator'] = 4;
$search['rule_0'] = "title";
$search['rule_1_input'] = $this->name;
$search['rule_1_operator'] = 4;
$search['rule_1'] = "album";
$search['rule_2_input'] = $this->album_artist_name;
$search['rule_2_operator'] = 4;
$search['rule_2'] = "artist";
$songs = Search::run($search);
$childrens = array();

View file

@ -37,7 +37,7 @@ class Api
/**
* @var string $version
*/
public static $version = '380001';
public static $version = '370001';
/**
* @var Browse $browse
@ -863,9 +863,7 @@ class Api
$type = $input['type'];
$offset = $input['offset'];
$limit = $input['limit'];
$username = $input['username'];
$albums = null;
if ($type == "newest") {
$albums = Stats::get_newest("album", $limit, $offset);
} else if ($type == "highest") {
@ -873,16 +871,7 @@ class Api
} else if ($type == "frequent") {
$albums = Stats::get_top("album", $limit, '', $offset);
} else if ($type == "recent") {
if (!empty($username)) {
$user = User::get_from_username($username);
if ($user !== null) {
$albums = $user->get_recently_played($limit, 'album');
} else {
debug_event('api', 'User `' . $username . '` cannot be found.', 1);
}
} else {
$albums = Stats::get_recent("album", $limit, $offset);
}
$albums = Stats::get_recent("album", $limit, $offset);
} else if ($type == "flagged") {
$albums = Userflag::get_latest('album');
} else {
@ -892,109 +881,8 @@ class Api
$albums = Album::get_random($limit);
}
if ($albums !== null) {
ob_end_clean();
echo XML_Data::albums($albums);
}
} // stats
/**
* user
* This get an user public information
* @param array $input
*/
public static function user($input)
{
$username = $input['username'];
if (!empty($username)) {
$user = User::get_from_username($username);
if ($user !== null) {
ob_end_clean();
echo XML_Data::user($user);
} else {
debug_event('api', 'User `' . $username . '` cannot be found.', 1);
}
} else {
debug_event('api', 'Username required on user function call.', 1);
}
} // user
/**
* followers
* This get an user followers
* @param array $input
*/
public static function followers($input)
{
if (AmpConfig::get('sociable')) {
$username = $input['username'];
if (!empty($username)) {
$user = User::get_from_username($username);
if ($user !== null) {
$users = $user->get_followers();
ob_end_clean();
echo XML_Data::users($user);
} else {
debug_event('api', 'User `' . $username . '` cannot be found.', 1);
}
} else {
debug_event('api', 'Username required on followers function call.', 1);
}
} else {
debug_event('api', 'Sociable feature is not enabled.', 3);
}
} // followers
/**
* following
* This get the user list followed by an user
* @param array $input
*/
public static function following($input)
{
if (AmpConfig::get('sociable')) {
$username = $input['username'];
if (!empty($username)) {
$user = User::get_from_username($username);
if ($user !== null) {
$users = $user->get_following();
ob_end_clean();
echo XML_Data::users($user);
} else {
debug_event('api', 'User `' . $username . '` cannot be found.', 1);
}
} else {
debug_event('api', 'Username required on following function call.', 1);
}
} else {
debug_event('api', 'Sociable feature is not enabled.', 3);
}
} // following
/**
* last_shouts
* This get the latest posted shouts
* @param array $input
*/
public static function last_shouts($input)
{
$limit = intval($input['limit']);
if ($limit < 1) {
$limit = AmpConfig::get('popular_threshold');
}
if (AmpConfig::get('sociable')) {
$username = $input['username'];
if (!empty($username)) {
$shouts = Shoutbox::get_top($limit, $username);
} else {
$shouts = Shoutbox::get_top($limit);
}
ob_end_clean();
echo XML_Data::shouts($shouts);
} else {
debug_event('api', 'Sociable feature is not enabled.', 3);
}
} // last_shouts
ob_end_clean();
echo XML_Data::albums($albums);
}
} // API class

View file

@ -537,9 +537,6 @@ class Artist extends database_object implements library_item
$search['rule_0_input'] = $name;
$search['rule_0_operator'] = 4;
$search['rule_0'] = "title";
$search['rule_1_input'] = $this->name;
$search['rule_1_operator'] = 4;
$search['rule_1'] = "artist";
$albums = Search::run($search);
$childrens = array();

View file

@ -204,7 +204,7 @@ class Browse extends Query
case 'song':
$box_title = T_('Songs') . $match;
Song::build_cache($object_ids, $limit_threshold);
$box_req = AmpConfig::get('prefix') . '/templates/show_songs.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_songs.inc.php');
break;
case 'album':
Album::build_cache($object_ids);
@ -217,122 +217,122 @@ class Browse extends Query
} else {
$allow_group_disks = false;
}
$box_req = AmpConfig::get('prefix') . '/templates/show_albums.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_albums.inc.php');
break;
case 'user':
$box_title = T_('Users') . $match;
$box_req = AmpConfig::get('prefix') . '/templates/show_users.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_users.inc.php');
break;
case 'artist':
$box_title = T_('Artists') . $match;
Artist::build_cache($object_ids, true, $limit_threshold);
$box_req = AmpConfig::get('prefix') . '/templates/show_artists.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_artists.inc.php');
break;
case 'live_stream':
require_once AmpConfig::get('prefix') . '/templates/show_live_stream.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_live_stream.inc.php');
$box_title = T_('Radio Stations') . $match;
$box_req = AmpConfig::get('prefix') . '/templates/show_live_streams.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_live_streams.inc.php');
break;
case 'playlist':
Playlist::build_cache($object_ids);
$box_title = T_('Playlists') . $match;
$box_req = AmpConfig::get('prefix') . '/templates/show_playlists.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_playlists.inc.php');
break;
case 'playlist_song':
$box_title = T_('Playlist Songs') . $match;
$box_req = AmpConfig::get('prefix') . '/templates/show_playlist_songs.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_playlist_songs.inc.php');
break;
case 'playlist_localplay':
$box_title = T_('Current Playlist');
$box_req = AmpConfig::get('prefix') . '/templates/show_localplay_playlist.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_localplay_playlist.inc.php');
UI::show_box_bottom();
break;
case 'smartplaylist':
$box_title = T_('Smart Playlists') . $match;
$box_req = AmpConfig::get('prefix') . '/templates/show_searches.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_searches.inc.php');
break;
case 'catalog':
$box_title = T_('Catalogs');
$box_req = AmpConfig::get('prefix') . '/templates/show_catalogs.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_catalogs.inc.php');
break;
case 'shoutbox':
$box_title = T_('Shoutbox Records');
$box_req = AmpConfig::get('prefix') . '/templates/show_manage_shoutbox.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_manage_shoutbox.inc.php');
break;
case 'tag':
Tag::build_cache($object_ids);
$box_title = T_('Tag Cloud');
$box_req = AmpConfig::get('prefix') . '/templates/show_tagcloud.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_tagcloud.inc.php');
break;
case 'video':
Video::build_cache($object_ids);
$video_type = 'video';
$box_title = T_('Videos');
$box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_videos.inc.php');
break;
case 'democratic':
$box_title = T_('Democratic Playlist');
$box_req = AmpConfig::get('prefix') . '/templates/show_democratic_playlist.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_democratic_playlist.inc.php');
break;
case 'wanted':
$box_title = T_('Wanted Albums');
$box_req = AmpConfig::get('prefix') . '/templates/show_wanted_albums.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_wanted_albums.inc.php');
break;
case 'share':
$box_title = T_('Shared Objects');
$box_req = AmpConfig::get('prefix') . '/templates/show_shared_objects.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_shared_objects.inc.php');
break;
case 'song_preview':
$box_title = T_('Songs');
$box_req = AmpConfig::get('prefix') . '/templates/show_song_previews.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_song_previews.inc.php');
break;
case 'channel':
$box_title = T_('Channels');
$box_req = AmpConfig::get('prefix') . '/templates/show_channels.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_channels.inc.php');
break;
case 'broadcast':
$box_title = T_('Broadcasts');
$box_req = AmpConfig::get('prefix') . '/templates/show_broadcasts.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_broadcasts.inc.php');
break;
case 'license':
$box_title = T_('Media Licenses');
$box_req = AmpConfig::get('prefix') . '/templates/show_manage_license.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_manage_license.inc.php');
break;
case 'tvshow':
$box_title = T_('TV Shows');
$box_req = AmpConfig::get('prefix') . '/templates/show_tvshows.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_tvshows.inc.php');
break;
case 'tvshow_season':
$box_title = T_('Seasons');
$box_req = AmpConfig::get('prefix') . '/templates/show_tvshow_seasons.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_tvshow_seasons.inc.php');
break;
case 'tvshow_episode':
$box_title = T_('Episodes');
$video_type = $type;
$box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_videos.inc.php');
break;
case 'movie':
$box_title = T_('Movies');
$video_type = $type;
$box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_videos.inc.php');
break;
case 'clip':
$box_title = T_('Clips');
$video_type = $type;
$box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_videos.inc.php');
break;
case 'personal_video':
$box_title = T_('Personal Videos');
$video_type = $type;
$box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_videos.inc.php');
break;
case 'label':
$box_title = T_('Labels');
$box_req = AmpConfig::get('prefix') . '/templates/show_labels.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_labels.inc.php');
break;
case 'pvmsg':
$box_title = T_('Private Messages');
$box_req = AmpConfig::get('prefix') . '/templates/show_pvmsgs.inc.php';
$box_req = AmpConfig::get('prefix') . UI::find_template('show_pvmsgs.inc.php');
break;
default:
// Rien a faire

View file

@ -1589,7 +1589,7 @@ abstract class Catalog extends database_object
debug_event('clean', 'Starting on ' . $this->name, 5);
if (!defined('SSE_OUTPUT')) {
require AmpConfig::get('prefix') . '/templates/show_clean_catalog.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_clean_catalog.inc.php');
ob_flush();
flush();
}
@ -1619,7 +1619,7 @@ abstract class Catalog extends database_object
public function verify_catalog()
{
if (!defined('SSE_OUTPUT')) {
require AmpConfig::get('prefix') . '/templates/show_verify_catalog.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_verify_catalog.inc.php');
ob_flush();
flush();
}

View file

@ -472,7 +472,7 @@ class Channel extends database_object implements media, library_item
fclose($this->transcoder['stderr']);
}
fclose($this->transcoder['handle']);
Stream::kill_process($this->transcoder);
Stream::kill_process($this->$transcoder);
$this->media = null;
$this->transcoder = null;

View file

@ -499,7 +499,7 @@ class Graph
$blink = $u->f_link;
}
require_once AmpConfig::get('prefix') . '/templates/show_graphs.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_graphs.inc.php');
}
}
}

View file

@ -277,9 +277,9 @@ class Rating extends database_object
$rating = new Rating($object_id, $type);
if ($static) {
require AmpConfig::get('prefix') . '/templates/show_static_object_rating.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_static_object_rating.inc.php');
} else {
require AmpConfig::get('prefix') . '/templates/show_object_rating.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_object_rating.inc.php');
}
} // show

View file

@ -415,13 +415,6 @@ class Search extends playlist_object
'widget' => array('input', 'text')
);
$this->types[] = array(
'name' => 'artist',
'label' => T_('Artist'),
'type' => 'text',
'widget' => array('input', 'text')
);
$this->types[] = array(
'name' => 'year',
'label' => T_('Year'),
@ -989,10 +982,6 @@ class Search extends playlist_object
$where[] = "`image`.`width` $sql_match_operator '$input'";
$join['image'] = true;
break;
case 'artist':
$where[] = "`artist`.`name` $sql_match_operator '$input'";
$join['artist'] = true;
break;
default:
// Nae laird!
break;
@ -1015,9 +1004,6 @@ class Search extends playlist_object
") AS realtag_$key " .
"ON `album`.`id`=`realtag_$key`.`object_id`";
}
if ($join['artist']) {
$table['artist'] = "LEFT JOIN `artist` ON `artist`.`id`=`album`.`album_artist`";
}
if ($join['song']) {
$table['song'] = "LEFT JOIN `song` ON `song`.`album`=`album`.`id`";

View file

@ -96,7 +96,7 @@ class Shoutbox
* This returns the top user_shouts, shoutbox objects are always shown regardless and count against the total
* number of objects shown
*/
public static function get_top($limit, $username = null)
public static function get_top($limit)
{
$shouts = self::get_sticky();
@ -108,14 +108,8 @@ class Shoutbox
// Only get as many as we need
$limit = intval($limit) - count($shouts);
$params = array();
$sql = "SELECT `user_shout`.`id` AS `id` FROM `user_shout` LEFT JOIN `user` ON `user`.`id` = `user_shout`.`user` WHERE `user_shout`.`sticky`='0' ";
if ($username !== null) {
$sql .= "AND `user`.`username` = ? ";
$params[] = $username;
}
$sql .= "ORDER BY `user_shout`.`date` DESC LIMIT " . $limit;
$db_results = Dba::read($sql, $params);
$sql = "SELECT * FROM `user_shout` WHERE `sticky`='0' ORDER BY `date` DESC LIMIT $limit";
$db_results = Dba::read($sql);
while ($row = Dba::fetch_assoc($db_results)) {
$shouts[] = $row['id'];

View file

@ -457,9 +457,9 @@ class Stream_Playlist
public function create_web_player()
{
if (AmpConfig::get("ajax_load")) {
require AmpConfig::get('prefix') . '/templates/create_web_player_embedded.inc.php';
require AmpConfig::get('prefix') . UI::find_template('create_web_player_embedded.inc.php');
} else {
require AmpConfig::get('prefix') . '/templates/create_web_player.inc.php';
require AmpConfig::get('prefix') . UI::find_template('create_web_player.inc.php');
}
} // create_web_player

View file

@ -247,7 +247,7 @@ class Userflag extends database_object
if (!AmpConfig::get('userflags')) { return false; }
$userflag = new Userflag($object_id, $type);
require AmpConfig::get('prefix') . '/templates/show_object_userflag.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_object_userflag.inc.php');
} // show

View file

@ -572,87 +572,6 @@ class XML_Data
return $final;
} // democratic
/**
* user
*
* This handles creating an xml document for an user
*
* @param User $user User
* @return string return xml
*/
public static function user(User $user)
{
$user->format();
$string = "<user id=\"" . $user->id . "\">\n" .
"\t<username><![CDATA[" . $user->username . "]]></username>\n" .
"\t<create_date>" . $user->create_date . "</create_date>\n" .
"\t<last_seen>" . $user->last_seen . "</last_seen>\n" .
"\t<website><![CDATA[" . $user->website . "]]></website>\n" .
"\t<state><![CDATA[" . $user->state . "]]></state>\n" .
"\t<city><![CDATA[" . $user->city . "]]></city>\n";
if ($user->fullname_public) {
$string .= "\t<fullname><![CDATA[" . $user->fullname . "]]></fullname>\n";
}
$string .= "</user>\n";
$final = self::_header() . $string . self::_footer();
return $final;
} // user
/**
* users
*
* This handles creating an xml document for an user list
*
* @param int[] $users User identifier list
* @return string return xml
*/
public static function users($users)
{
$string = "<users>\n";
foreach ($users as $user_id) {
$user = new User($user_id);
$string .= "\t<username><![CDATA[" . $user->username . "]]></username>\n";
}
$string .= "</users>\n";
$final = self::_header() . $string . self::_footer();
return $final;
} // users
/**
* shouts
*
* This handles creating an xml document for a shout list
*
* @param int[] $shouts Shout identifier list
* @return string return xml
*/
public static function shouts($shouts)
{
$string = "<shouts>\n";
foreach ($shouts as $shout_id) {
$shout = new Shoutbox($shout_id);
$shout->format();
$user = new User($shout->user);
$string .= "\t<shout id=\"" . $shout_id . "\">\n" .
"\t\t<date>" . $shout->date . "</date>\n" .
"\t\t<text><![CDATA[" . $shout->text . "]]></text>\n";
if ($user->id) {
$string .= "\t\t<username><![CDATA[" . $user->username ."]]></username>";
}
$string .= "\t</shout>n";
}
$string .= "</shouts>\n";
$final = self::_header() . $string . self::_footer();
return $final;
} // shouts
/**
* rss_feed
*

View file

@ -485,7 +485,6 @@ function install_config_backends(Array $backends)
'plex_backend' => '0',
'daap_backend' => '0',
'upnp_backend' => '0',
'webdav_backend' => '0',
'stream_beautiful_url' => '0'
);
@ -504,9 +503,6 @@ function install_config_backends(Array $backends)
case 'daap':
$dbconfig['daap_backend'] = '1';
break;
case 'webdav':
$dbconfig['webdav_backend'] = '1';
break;
}
}

View file

@ -92,25 +92,23 @@ $(function() {
var postData = $(this).serializeArray();
var formURL = $(this).attr("action");
if (formURL.indexOf('javascript:') !== 0) {
$.ajax(
{
url : formURL,
type: "POST",
data : postData,
success:function(data, status, jqXHR)
{
loadContentData(data, status, jqXHR);
window.location.hash = "";
},
error: function(jqXHR, status, errorThrown)
{
alert(errorThrown);
}
});
$.ajax(
{
url : formURL,
type: "POST",
data : postData,
success:function(data, status, jqXHR)
{
loadContentData(data, status, jqXHR);
window.location.hash = "";
},
error: function(jqXHR, status, errorThrown)
{
alert(errorThrown);
}
});
e.preventDefault();
}
e.preventDefault();
}
});

View file

@ -28,7 +28,7 @@ function show_rating($object_id,$type)
{
$rating = new Rating($object_id,$type);
require AmpConfig::get('prefix') . '/templates/show_object_rating.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_object_rating.inc.php');
} // show_rating

View file

@ -43,7 +43,7 @@ function show_confirmation($title,$text,$next_url,$cancel=0,$form_name='confirma
$path = AmpConfig::get('web_path') . "/$next_url";
}
require AmpConfig::get('prefix') . '/templates/show_confirmation.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_confirmation.inc.php');
} // show_confirmation
function sse_worker($url)
@ -183,7 +183,7 @@ function get_location()
*/
function show_preference_box($preferences)
{
require AmpConfig::get('prefix') . '/templates/show_preference_box.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_preference_box.inc.php');
} // show_preference_box
@ -733,7 +733,7 @@ function show_now_playing()
$web_path = AmpConfig::get('web_path');
$results = Stream::get_now_playing();
require_once AmpConfig::get('prefix') . '/templates/show_now_playing.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_now_playing.inc.php');
} // show_now_playing

View file

@ -38,7 +38,7 @@ switch ($_REQUEST['action']) {
// Get the current localplay fields
$localplay = new Localplay(AmpConfig::get('localplay_controller'));
$fields = $localplay->get_instance_fields();
require_once AmpConfig::get('prefix') . '/templates/show_localplay_add_instance.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_add_instance.inc.php');
break;
case 'add_instance':
// This requires 50 or better!
@ -62,7 +62,7 @@ switch ($_REQUEST['action']) {
$localplay = new Localplay(AmpConfig::get('localplay_controller'));
$instance = $localplay->get_instance($_REQUEST['instance']);
$fields = $localplay->get_instance_fields();
require_once AmpConfig::get('prefix') . '/templates/show_localplay_edit_instance.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_edit_instance.inc.php');
break;
case 'show_instances':
// First build the localplay object and then get the instances
@ -70,7 +70,7 @@ switch ($_REQUEST['action']) {
$localplay = new Localplay(AmpConfig::get('localplay_controller'));
$instances = $localplay->get_instances();
$fields = $localplay->get_instance_fields();
require_once AmpConfig::get('prefix') . '/templates/show_localplay_instances.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_instances.inc.php');
break;
case 'show_playlist':
default:
@ -81,7 +81,7 @@ switch ($_REQUEST['action']) {
// Pull the current playlist and require the template
$objects = $localplay->get();
require_once AmpConfig::get('prefix') . '/templates/show_localplay_status.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_status.inc.php');
break;
} // end switch action

View file

@ -39,4 +39,4 @@ if (AmpConfig::get('use_auth') && !isset($_GET['force_display'])) {
}
require_once 'lib/login.php';
require AmpConfig::get('prefix') . '/templates/show_login_form.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_login_form.inc.php');

View file

@ -41,10 +41,10 @@ switch ($action) {
Error::add('general', T_('Password has not been sent'));
}
require AmpConfig::get('prefix') . '/templates/show_login_form.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_login_form.inc.php');
break;
default:
require AmpConfig::get('prefix') . '/templates/show_lostpassword_form.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_lostpassword_form.inc.php');
}
function send_newpassword($email,$current_ip)

View file

@ -115,7 +115,7 @@ abstract class Catalog extends \Catalog
public function add_to_catalog($options = null)
{
if (!defined('SSE_OUTPUT')) {
require AmpConfig::get('prefix') . '/templates/show_adds_catalog.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_adds_catalog.inc.php');
flush();
}
set_time_limit(0);

View file

@ -432,7 +432,7 @@ class Catalog_local extends Catalog
$this->added_videos_to_gather = array();
if (!defined('SSE_OUTPUT')) {
require AmpConfig::get('prefix') . '/templates/show_adds_catalog.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_adds_catalog.inc.php');
flush();
}
@ -465,7 +465,7 @@ class Catalog_local extends Catalog
if ($options['gather_art']) {
$catalog_id = $this->id;
if (!defined('SSE_OUTPUT')) {
require AmpConfig::get('prefix') . '/templates/show_gather_art.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_gather_art.inc.php');
flush();
}
$this->gather_art($this->added_songs_to_gather, $this->added_videos_to_gather);
@ -505,7 +505,7 @@ class Catalog_local extends Catalog
$this->count = 0;
if (!defined('SSE_OUTPUT')) {
require_once AmpConfig::get('prefix') . '/templates/show_verify_catalog.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_verify_catalog.inc.php');
flush();
}

View file

@ -83,7 +83,7 @@ class AmpacheShoutHome {
echo "<div id='shout_objects'>\n";
$shouts = Shoutbox::get_top($this->maxitems);
if (count($shouts)) {
require_once AmpConfig::get('prefix') . '/templates/show_shoutbox.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_shoutbox.inc.php');
}
echo "</div>\n";
}

View file

@ -61,10 +61,10 @@ switch ($_REQUEST['action']) {
$playlist = new Playlist($_REQUEST['playlist_id']);
$playlist->format();
$object_ids = $playlist->get_items();
require_once AmpConfig::get('prefix') . '/templates/show_playlist.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_playlist.inc.php');
break;
case 'show_import_playlist':
require_once AmpConfig::get('prefix') . '/templates/show_import_playlist.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_import_playlist.inc.php');
break;
case 'import_playlist':
/* first we rename the file to it's original name before importing.
@ -164,7 +164,7 @@ switch ($_REQUEST['action']) {
$playlist->delete_track($track_id);
}
$object_ids = $playlist->get_items();
require_once AmpConfig::get('prefix') . '/templates/show_playlist.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_playlist.inc.php');
break;
case 'sort_tracks':
$playlist = new Playlist($_REQUEST['playlist_id']);
@ -176,10 +176,10 @@ switch ($_REQUEST['action']) {
/* Sort the tracks */
$playlist->sort_tracks();
$object_ids = $playlist->get_items();
require_once AmpConfig::get('prefix') . '/templates/show_playlist.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_playlist.inc.php');
break;
default:
require_once AmpConfig::get('prefix') . '/templates/show_playlist.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_playlist.inc.php');
break;
} // switch on the action

View file

@ -168,7 +168,7 @@ switch ($_REQUEST['action']) {
}
// Show the default preferences page
require AmpConfig::get('prefix') . '/templates/show_preferences.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_preferences.inc.php');
break;
} // end switch on action

View file

@ -42,7 +42,7 @@ switch ($action) {
$_REQUEST['message'] = "\n\n\n---\n> " . str_replace("\n", "\n> ", $pvmsg->message);
}
}
require_once AmpConfig::get('prefix') . '/templates/show_add_pvmsg.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_pvmsg.inc.php');
break;
case 'add_message':
if (AmpConfig::get('demo_mode')) { break; }
@ -60,7 +60,7 @@ switch ($action) {
$pvmsg_id = PrivateMsg::create($_POST);
if (!$pvmsg_id) {
require_once AmpConfig::get('prefix') . '/templates/show_add_pvmsg.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_pvmsg.inc.php');
} else {
$body = T_('Message Sent');
$title = '';
@ -124,7 +124,7 @@ switch ($action) {
if (!$pvmsg->is_read) {
$pvmsg->set_is_read(true);
}
require_once AmpConfig::get('prefix') . '/templates/show_pvmsg.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_pvmsg.inc.php');
} else {
debug_event('UI::access_denied', 'Unknown or unauthorized private message #' . $msg_id . '.', '3');
UI::access_denied();

View file

@ -37,7 +37,7 @@ switch ($_REQUEST['action']) {
exit;
}
require_once AmpConfig::get('prefix') . '/templates/show_add_live_stream.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_live_stream.inc.php');
break;
case 'create':
@ -55,7 +55,7 @@ switch ($_REQUEST['action']) {
$results = Live_Stream::create($_POST);
if (!$results) {
require_once AmpConfig::get('prefix') . '/templates/show_add_live_stream.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_live_stream.inc.php');
} else {
$body = T_('Radio Station Added');
$title = '';

View file

@ -36,7 +36,7 @@ switch ($_REQUEST['action']) {
}
case 'advanced':
default:
require_once AmpConfig::get('prefix') . '/templates/show_random.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_random.inc.php');
break;
} // end switch

View file

@ -44,7 +44,7 @@ switch ($_REQUEST['action']) {
case 'validate':
$username = scrub_in($_GET['username']);
$validation = scrub_in($_GET['auth']);
require_once AmpConfig::get('prefix') . '/templates/show_user_activate.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_user_activate.inc.php');
break;
case 'add_user':
/**
@ -123,7 +123,7 @@ switch ($_REQUEST['action']) {
// If we've hit an error anywhere up there break!
if (Error::occurred()) {
require_once AmpConfig::get('prefix') . '/templates/show_user_registration.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_user_registration.inc.php');
break;
}
@ -148,7 +148,7 @@ switch ($_REQUEST['action']) {
if (!$new_user) {
Error::add('duplicate_user', T_("Error: Insert Failed"));
require_once AmpConfig::get('prefix') . '/templates/show_user_registration.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_user_registration.inc.php');
break;
}
@ -161,10 +161,10 @@ switch ($_REQUEST['action']) {
Registration::send_confirmation($username, $fullname, $email, $website, $pass1, $validation);
}
require_once AmpConfig::get('prefix') . '/templates/show_registration_confirmation.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_registration_confirmation.inc.php');
break;
case 'show_add_user':
default:
require_once AmpConfig::get('prefix') . '/templates/show_user_registration.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_user_registration.inc.php');
break;
} // end switch on action

View file

@ -31,15 +31,15 @@ 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';
require_once AmpConfig::get('prefix') . UI::find_template('show_search_form.inc.php');
require_once AmpConfig::get('prefix') . UI::find_template('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';
require_once AmpConfig::get('prefix') . UI::find_template('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;
@ -56,10 +56,10 @@ switch ($_REQUEST['action']) {
case 'descriptor':
// This is a little special we don't want header/footers so trash what we've got in the OB
ob_clean();
require_once AmpConfig::get('prefix') . '/templates/show_search_descriptor.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_search_descriptor.inc.php');
exit;
default:
require_once AmpConfig::get('prefix') . '/templates/show_search_form.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_search_form.inc.php');
break;
}

View file

@ -142,7 +142,7 @@ switch ($_REQUEST['action']) {
break;
case 'get_filters':
ob_start();
require_once AmpConfig::get('prefix') . '/templates/browse_filters.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('browse_filters.inc.php');
$results['browse_filters'] = ob_get_clean();
break;
case 'options':

View file

@ -68,16 +68,16 @@ if (!Access::check('interface', $level) || AmpConfig::get('demo_mode')) {
switch ($_REQUEST['action']) {
case 'show_edit_object':
ob_start();
require AmpConfig::get('prefix') . '/templates/show_edit_' . $type . '.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_edit_' . $type . '.inc.php');
$results = ob_get_contents();
break;
case 'refresh_updated':
require AmpConfig::get('prefix') . '/templates/show_' . $type . '.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_' . $type . '.inc.php');
$results = ob_get_contents();
break;
case 'show_edit_playlist':
ob_start();
require AmpConfig::get('prefix') . '/templates/show_playlists_dialog.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_playlists_dialog.inc.php');
$results = ob_get_contents();
ob_end_clean();
break;

View file

@ -31,7 +31,7 @@ switch ($_REQUEST['action']) {
$albums = Album::get_random(6);
if (count($albums) AND is_array($albums)) {
ob_start();
require_once AmpConfig::get('prefix') . '/templates/show_random_albums.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_random_albums.inc.php');
$results['random_selection'] = ob_get_clean();
} else {
$results['random_selection'] = '<!-- None found -->';
@ -48,7 +48,7 @@ switch ($_REQUEST['action']) {
$videos = Video::get_random(6);
if (count($videos) AND is_array($videos)) {
ob_start();
require_once AmpConfig::get('prefix') . '/templates/show_random_videos.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_random_videos.inc.php');
$results['random_video_selection'] = ob_get_clean();
} else {
$results['random_video_selection'] = '<!-- None found -->';
@ -64,7 +64,7 @@ switch ($_REQUEST['action']) {
$biography = Recommendation::get_artist_info(null, rawurldecode($_REQUEST['fullname']));
}
ob_start();
require_once AmpConfig::get('prefix') . '/templates/show_artist_info.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_artist_info.inc.php');
$results['artist_biography'] = ob_get_clean();
}
break;
@ -84,7 +84,7 @@ switch ($_REQUEST['action']) {
}
}
ob_start();
require_once AmpConfig::get('prefix') . '/templates/show_recommended_artists.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_recommended_artists.inc.php');
$results['similar_artist'] = ob_get_clean();
}
break;
@ -94,7 +94,7 @@ switch ($_REQUEST['action']) {
$artists = Recommendation::get_artists_like($_REQUEST['media_artist'], 3, false);
$songs = Recommendation::get_songs_like($media_id, 3);
ob_start();
require_once AmpConfig::get('prefix') . '/templates/show_now_playing_similar.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_now_playing_similar.inc.php');
$results['similar_items_' . $media_id] = ob_get_clean();
}
break;
@ -123,7 +123,7 @@ switch ($_REQUEST['action']) {
}
}
ob_start();
require_once AmpConfig::get('prefix') . '/templates/show_concerts.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_concerts.inc.php');
$results['concerts'] = ob_get_clean();
}
break;
@ -142,7 +142,7 @@ switch ($_REQUEST['action']) {
$browse->save_objects($object_ids);
$browse->store();
ob_start();
require_once AmpConfig::get('prefix') . '/templates/show_labels.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_labels.inc.php');
$results['labels'] = ob_get_clean();
}
break;
@ -161,7 +161,7 @@ switch ($_REQUEST['action']) {
}
ob_start();
require_once AmpConfig::get('prefix') . '/templates/show_missing_albums.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_missing_albums.inc.php');
$results['missing_albums'] = ob_get_clean();
}
break;
@ -221,7 +221,7 @@ switch ($_REQUEST['action']) {
ob_start();
$data = Song::get_recently_played();
Song::build_cache(array_keys($data));
require_once AmpConfig::get('prefix') . '/templates/show_recently_played.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_recently_played.inc.php');
$results['recently_played'] = ob_get_clean();
break;
case 'sidebar':
@ -243,7 +243,7 @@ switch ($_REQUEST['action']) {
Ajax::set_include_override(true);
ob_start();
$_SESSION['state']['sidebar_tab'] = $button;
require_once AmpConfig::get('prefix') . '/templates/sidebar.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('sidebar.inc.php');
$results['sidebar-content'] = ob_get_contents();
ob_end_clean();
break;
@ -316,7 +316,7 @@ switch ($_REQUEST['action']) {
$browse->store();
UI::show_box_top(T_('Songs'), 'info-box');
require_once AmpConfig::get('prefix') . '/templates/show_songs.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_songs.inc.php');
UI::show_box_bottom();
}

View file

@ -42,7 +42,7 @@ switch ($_REQUEST['action']) {
// We should also refesh the sidebar
ob_start();
require_once AmpConfig::get('prefix') . '/templates/sidebar.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('sidebar.inc.php');
$results['sidebar-content'] = ob_get_contents();
ob_end_clean();
break;
@ -75,7 +75,7 @@ switch ($_REQUEST['action']) {
// We actually want to refresh something here
ob_start();
$objects = $localplay->get();
require_once AmpConfig::get('prefix') . '/templates/show_localplay_status.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_status.inc.php');
$results['localplay_status'] = ob_get_contents();
ob_end_clean();
break;
@ -168,7 +168,7 @@ switch ($_REQUEST['action']) {
ob_start();
$objects = $localplay->get();
require_once AmpConfig::get('prefix') . '/templates/show_localplay_status.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_status.inc.php');
$results['localplay_status'] = ob_get_contents();
ob_end_clean();
@ -187,7 +187,7 @@ switch ($_REQUEST['action']) {
ob_start();
$objects = $localplay->get();
require_once AmpConfig::get('prefix') . '/templates/show_localplay_status.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_status.inc.php');
$results['localplay_status'] = ob_get_contents();
ob_end_clean();

View file

@ -30,7 +30,7 @@ $results = array();
switch ($_REQUEST['action']) {
case 'show_broadcasts':
ob_start();
require AmpConfig::get('prefix') . '/templates/show_broadcasts_dialog.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_broadcasts_dialog.inc.php');
$results = ob_get_contents();
ob_end_clean();
echo $results;

View file

@ -129,7 +129,7 @@ switch ($_REQUEST['action']) {
/*$playlist->format();
$object_ids = $playlist->get_items();
ob_start();
require_once AmpConfig::get('prefix') . '/templates/show_playlist.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_playlist.inc.php');
$results['content'] = ob_get_contents();
ob_end_clean();*/
debug_event('playlist', 'Items added successfully!', '5');

View file

@ -148,7 +148,7 @@ switch ($worker) {
foreach ($catalogs as $catalog_id) {
$catalog = Catalog::create_from_id($catalog_id);
if ($catalog !== null) {
require AmpConfig::get('prefix') . '/templates/show_gather_art.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_gather_art.inc.php');
flush();
$catalog->gather_art();
}

View file

@ -107,7 +107,7 @@ switch ($_REQUEST['action']) {
if ( ($_REQUEST['playlist_method'] == 'clear' || AmpConfig::get('playlist_method') == 'clear')) {
define('NO_SONGS','1');
ob_start();
require_once AmpConfig::get('prefix') . '/templates/rightbar.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('rightbar.inc.php');
$results['rightbar'] = ob_get_clean();
}

View file

@ -49,7 +49,7 @@ switch ($action) {
$object = new $type($oid);
if ($object->id) {
$object->format();
require_once AmpConfig::get('prefix') . '/templates/show_add_share.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_share.inc.php');
}
}
UI::show_footer();
@ -69,7 +69,7 @@ switch ($action) {
$id = Share::create_share($_REQUEST['type'], $_REQUEST['id'], $_REQUEST['allow_stream'], $_REQUEST['allow_download'], $_REQUEST['expire'], $_REQUEST['secret'], $_REQUEST['max_counter']);
if (!$id) {
require_once AmpConfig::get('prefix') . '/templates/show_add_share.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_share.inc.php');
} else {
$share = new Share($id);
$body = T_('Share created.') . '<br />' .
@ -191,7 +191,7 @@ if ($action == 'download') {
require AmpConfig::get('prefix') . '/batch.php';
}
} elseif ($action == 'stream') {
require AmpConfig::get('prefix') . '/templates/show_share.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_share.inc.php');
} else {
debug_event('UI::access_denied', 'Access Denied: unknown action.', '3');
UI::access_denied();

View file

@ -71,7 +71,7 @@ switch ($_REQUEST['action']) {
}
// Now go ahead and display the page where we let them add a comment etc
require_once AmpConfig::get('prefix') . '/templates/show_add_shout.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_add_shout.inc.php');
break;
default:
header("Location:" . AmpConfig::get('web_path'));

View file

@ -80,7 +80,7 @@ switch ($_REQUEST['action']) {
$playlist = new Search($_REQUEST['playlist_id'], 'song');
$playlist->format();
$object_ids = $playlist->get_items();
require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_search.inc.php');
break;
case 'update_playlist':
$playlist = new Search($_REQUEST['playlist_id'], 'song');
@ -93,11 +93,11 @@ switch ($_REQUEST['action']) {
break;
}
$object_ids = $playlist->get_items();
require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_search.inc.php');
break;
default:
$object_ids = $playlist->get_items();
require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_search.inc.php');
break;
} // switch on the action

View file

@ -59,14 +59,14 @@ switch ($_REQUEST['action']) {
$song->format();
$song->fill_ext_info();
$lyrics = $song->get_lyrics();
require_once AmpConfig::get('prefix') . '/templates/show_lyrics.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_lyrics.inc.php');
break;
case 'show_song':
default:
$song = new Song($_REQUEST['song_id']);
$song->format();
$song->fill_ext_info();
require_once AmpConfig::get('prefix') . '/templates/show_song.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_song.inc.php');
break;
} // end data collection

View file

@ -650,12 +650,7 @@ INSERT INTO `preference` (`id`, `name`, `value`, `description`, `level`, `type`,
(132, 'browser_notify_timeout', '10', 'WebPlayer browser notifications timeout (seconds)', 25, 'integer', 'interface'),
(133, 'geolocation', '0', 'Allow geolocation', 25, 'integer', 'options'),
(134, 'webplayer_aurora', '1', 'Authorize JavaScript decoder (Aurora.js) in Web Player(s)', 25, 'boolean', 'streaming'),
(135, 'upload_allow_remove', '1', 'Upload: allow users to remove uploaded songs', 75, 'boolean', 'system'),
(136, 'custom_login_logo', '', 'Custom login page logo url', 75, 'string', 'interface'),
(137, 'custom_favicon', '', 'Custom favicon url', 75, 'string', 'interface'),
(138, 'custom_text_footer', '', 'Custom text footer', 75, 'string', 'interface'),
(139, 'webdav_backend', '0', 'Use WebDAV backend', 100, 'boolean', 'system'),
(140, 'notify_email', '0', 'Receive notifications by email (shouts, private messages, ...)', 25, 'boolean', 'options');
(135, 'upload_allow_remove', '1', 'Upload: allow users to remove uploaded songs', 75, 'boolean', 'system');
-- --------------------------------------------------------
@ -1074,7 +1069,7 @@ CREATE TABLE IF NOT EXISTS `update_info` (
--
INSERT INTO `update_info` (`key`, `value`) VALUES
('db_version', '370035'),
('db_version', '370030'),
('Plugin_Last.FM', '000004');
-- --------------------------------------------------------
@ -1099,7 +1094,6 @@ CREATE TABLE IF NOT EXISTS `user` (
`validation` varchar(128) CHARACTER SET utf8 DEFAULT NULL,
`state` varchar(64) CHARACTER SET utf8 DEFAULT NULL,
`city` varchar(64) CHARACTER SET utf8 DEFAULT NULL,
`fullname_public` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
@ -1247,11 +1241,6 @@ INSERT INTO `user_preference` (`user`, `preference`, `value`) VALUES
(-1, 133, '0'),
(-1, 134, '1'),
(-1, 135, '1'),
(-1, 136, ''),
(-1, 137, ''),
(-1, 138, ''),
(-1, 139, '0'),
(-1, 140, '0'),
(-1, 96, ''),
(-1, 97, ''),
(-1, 98, '');
@ -1355,76 +1344,6 @@ CREATE TABLE IF NOT EXISTS `wanted` (
UNIQUE KEY `unique_wanted` (`user`,`artist`,`mbid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `label`
--
DROP TABLE IF EXISTS `label`;
CREATE TABLE IF NOT EXISTS `label` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(80) NOT NULL,
`category` varchar(40) NULL,
`summary` TEXT CHARACTER SET utf8 NULL,
`address` varchar(256) NULL,
`email` varchar(128) NULL,
`website` varchar(256) NULL,
`user` int(11) unsigned NULL,
`creation_date` int(11) unsigned NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1
-- --------------------------------------------------------
--
-- Table structure for table `label_asso`
--
DROP TABLE IF EXISTS `label_asso`;
CREATE TABLE IF NOT EXISTS `label_asso` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`label` int(11) unsigned NOT NULL,
`artist` int(11) unsigned NOT NULL,
`creation_date` int(11) unsigned NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `user_pvmsg`
--
DROP TABLE IF EXISTS `user_pvmsg`;
CREATE TABLE IF NOT EXISTS `user_pvmsg` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`subject` varchar(80) NOT NULL,
`message` TEXT CHARACTER SET utf8 NULL,
`from_user` int(11) unsigned NOT NULL,
`to_user` int(11) unsigned NOT NULL,
`is_read` tinyint(1) unsigned NOT NULL DEFAULT '0',
`creation_date` int(11) unsigned NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `user_follower`
--
DROP TABLE IF EXISTS `user_follower`;
CREATE TABLE IF NOT EXISTS `user_follower` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user` int(11) unsigned NOT NULL,
`follow_user` int(11) unsigned NOT NULL,
`follow_date` int(11) unsigned NULL,
`creation_date` int(11) unsigned NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;

View file

@ -33,33 +33,33 @@ switch ($_REQUEST['action']) {
// Show a Users "Profile" page
case 'show_user':
$client = new User($_REQUEST['user_id']);
require_once AmpConfig::get('prefix') . '/templates/show_user.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_user.inc.php');
break;
// Show stats
case 'newest':
require_once AmpConfig::get('prefix') . '/templates/show_newest.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_newest.inc.php');
break;
case 'popular':
require_once AmpConfig::get('prefix') . '/templates/show_popular.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_popular.inc.php');
break;
case 'highest':
require_once AmpConfig::get('prefix') . '/templates/show_highest.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_highest.inc.php');
break;
case 'userflag':
require_once AmpConfig::get('prefix') . '/templates/show_userflag.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_userflag.inc.php');
break;
case 'recent':
$user_id = $_REQUEST['user_id'];
require_once AmpConfig::get('prefix') . '/templates/show_recent.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_recent.inc.php');
break;
case 'wanted':
require_once AmpConfig::get('prefix') . '/templates/show_wanted.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_wanted.inc.php');
break;
case 'share':
require_once AmpConfig::get('prefix') . '/templates/show_shares.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_shares.inc.php');
break;
case 'upload':
require_once AmpConfig::get('prefix') . '/templates/show_uploads.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_uploads.inc.php');
break;
case 'graph':
Graph::display_from_request();
@ -67,7 +67,7 @@ switch ($_REQUEST['action']) {
case 'show':
default:
if (Access::check('interface','50')) {
require_once AmpConfig::get('prefix') . '/templates/show_stats.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_stats.inc.php');
}
break;
} // end switch on action

View file

@ -30,7 +30,7 @@ if (!Core::is_session_started()) {
<h4><?php echo T_('Filters'); ?></h4>
<div class="sb3">
<?php if (in_array('starts_with',$allowed_filters)) { ?>
<form id="multi_alpha_filter_form" action="javascript:void(0);">
<form id="multi_alpha_filter_form" method="post" action="javascript:void(0);">
<label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo T_('Starts With'); ?></label>
<input type="text" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php $browse->set_catalog($_SESSION['catalog']); echo scrub_out($browse->get_filter('starts_with'));?>" onKeyUp="delayRun(this, '400', 'ajaxState', '<?php echo Ajax::url('?page=browse&action=browse&browse_id=' . $browse->id . '&key=starts_with'); ?>', 'multi_alpha_filter');">
</form>

View file

@ -58,7 +58,7 @@
<?php if (AmpConfig::get('ajax_load') && (!isset($_SESSION['login']) || !$_SESSION['login'])) { ?>
<div id="webplayer"></div>
<?php
require_once AmpConfig::get('prefix') . '/templates/uberviz.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('uberviz.inc.php');
}
?>
</body>

View file

@ -45,10 +45,10 @@ $_SESSION['login'] = false;
<?php } ?>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?php echo AmpConfig::get('site_charset'); ?>" />
<title><?php echo AmpConfig::get('site_title'); ?> - <?php echo $location['title']; ?></title>
<?php require_once AmpConfig::get('prefix') . '/templates/stylesheets.inc.php'; ?>
<link rel="stylesheet" href="<?php echo $web_path; ?>/templates/jquery-editdialog.css" type="text/css" media="screen" />
<?php require_once AmpConfig::get('prefix') . UI::find_template('stylesheets.inc.php'); ?>
<link rel="stylesheet" href="<?php echo $web_path . UI::find_template('jquery-editdialog.css'); ?>" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path; ?>/modules/jquery-ui-ampache/jquery-ui.min.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path; ?>/templates/jquery-file-upload.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path . UI::find_template('jquery-file-upload.css'); ?>" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path; ?>/modules/jstree/themes/default/style.min.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path; ?>/modules/tag-it/jquery.tagit.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path; ?>/modules/rhinoslider/css/rhinoslider-1.05.css" type="text/css" media="screen" />
@ -95,7 +95,7 @@ $_SESSION['login'] = false;
?>
<script src="<?php echo $web_path; ?>/lib/javascript/dynamicpage.js" language="javascript" type="text/javascript"></script>
<?php
require_once AmpConfig::get('prefix') . '/templates/show_html5_player_headers.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_html5_player_headers.inc.php');
?>
<script type="text/javascript">
function NavigateTo(url)
@ -309,9 +309,9 @@ $_SESSION['login'] = false;
</h1>
<div id="headerbox">
<?php UI::show_box_top('','box box_headerbox'); ?>
<?php require_once AmpConfig::get('prefix') . '/templates/show_search_bar.inc.php'; ?>
<?php require_once AmpConfig::get('prefix') . UI::find_template('show_search_bar.inc.php'); ?>
<?php if (User::is_registered()) { ?>
<?php require_once AmpConfig::get('prefix') . '/templates/show_playtype_switch.inc.php'; ?>
<?php require_once AmpConfig::get('prefix') . UI::find_template('show_playtype_switch.inc.php'); ?>
<span id="loginInfo">
<a href="<?php echo $web_path; ?>/stats.php?action=show_user&user_id=<?php echo $GLOBALS['user']->id; ?>"><?php echo $GLOBALS['user']->fullname; ?></a>
<?php if (AmpConfig::get('sociable')) { ?>
@ -373,10 +373,10 @@ $_SESSION['login'] = false;
<div id="sidebar" class="sidebar-<?php echo AmpConfig::get('ui_fixed') ? 'fixed' : 'float'; ?>">
<div id="sidebar-header" class="<?php echo $isCollapsed ? 'sidebar-header-collapsed' : ''; ?>" ><span id="sidebar-header-content"><?php echo $isCollapsed ? '>>>' : '<<<'; ?></span></div>
<div id="sidebar-content" class="<?php echo $isCollapsed ? 'sidebar-content-collapsed' : ''; ?>" >
<?php require_once AmpConfig::get('prefix') . '/templates/sidebar.inc.php'; ?>
<?php require_once AmpConfig::get('prefix') . UI::find_template('sidebar.inc.php'); ?>
</div>
<div id="sidebar-content-light" class="<?php echo $isCollapsed ? 'sidebar-content-light-collapsed' : ''; ?>" >
<?php require_once AmpConfig::get('prefix') . '/templates/sidebar.light.inc.php'; ?>
<?php require_once AmpConfig::get('prefix') . UI::find_template('sidebar.light.inc.php'); ?>
</div>
</div>
<!-- Handle collapsed visibility -->
@ -414,7 +414,7 @@ $_SESSION['login'] = false;
</script>
<div id="rightbar" class="rightbar-<?php echo AmpConfig::get('ui_fixed') ? 'fixed' : 'float'; ?> <?php echo $count_temp_playlist ? '' : 'hidden' ?>">
<?php require_once AmpConfig::get('prefix') . '/templates/rightbar.inc.php'; ?>
<?php require_once AmpConfig::get('prefix') . UI::find_template('rightbar.inc.php'); ?>
</div>
<!-- Tiny little div, used to cheat the system -->

View file

@ -75,7 +75,7 @@
</ul>
<?php
if (AmpConfig::get('play_type') == 'localplay') {
require_once AmpConfig::get('prefix') . '/templates/show_localplay_control.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_control.inc.php');
}
?>
<ul id="rb_current_playlist">

View file

@ -65,7 +65,7 @@ UI::show_box_top($boxtitle, 'box box_add_shout');
<?php
$shouts = Shoutbox::get_shouts($object_type, $object->id);
if (count($shouts)) {
require_once AmpConfig::get('prefix') . '/templates/show_shoutbox.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_shoutbox.inc.php');
}
?>
<?php UI::show_box_bottom(); ?>

View file

@ -23,7 +23,7 @@
$web_path = AmpConfig::get('web_path');
$thcount = 8;
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="album">
<thead>
<tr class="th-top">
@ -74,7 +74,7 @@ $thcount = 8;
}
?>
<tr id="album_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_album_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_album_row.inc.php'); ?>
</tr>
<?php }?>
<?php if (!count($object_ids)) { ?>
@ -112,4 +112,4 @@ $thcount = 8;
</table>
<?php show_table_render(); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>

View file

@ -25,7 +25,7 @@ session_start();
$web_path = AmpConfig::get('web_path');
$thcount = 8;
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="artist">
<thead>
<tr class="th-top">
@ -76,7 +76,7 @@ $thcount = 8;
}
?>
<tr id="artist_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_artist_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_artist_row.inc.php'); ?>
</tr>
<?php } //end foreach ($artists as $artist) ?>
<?php if (!count($object_ids)) { ?>
@ -114,4 +114,4 @@ $thcount = 8;
</table>
<?php show_table_render(); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>

View file

@ -21,7 +21,7 @@
*/
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php' ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php') ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="broadcast">
<thead>
<tr class="th-top">
@ -40,7 +40,7 @@
$libitem->format();
?>
<tr class="<?php echo UI::flip_class(); ?>" id="broadcast_row_<?php echo $libitem->id; ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_broadcast_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_broadcast_row.inc.php'); ?>
</tr>
<?php } ?>
<?php if (!count($object_ids)) { ?>
@ -51,4 +51,4 @@
</tbody>
</table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php' ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php') ?>

View file

@ -20,7 +20,7 @@
*
*/
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="catalog">
<thead>
<tr class="th-top">
@ -39,7 +39,7 @@
$libitem->format();
?>
<tr class="<?php echo UI::flip_class(); ?>" id="catalog_<?php echo $libitem->id; ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_catalog_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_catalog_row.inc.php'); ?>
</tr>
<?php } ?>
<tr class="<?php echo UI::flip_class(); ?>">
@ -62,4 +62,4 @@
</tfoot>
</table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>

View file

@ -21,7 +21,7 @@
*/
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php' ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php') ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="channel">
<thead>
<tr class="th-top">
@ -49,7 +49,7 @@
$libitem->format();
?>
<tr class="<?php echo UI::flip_class(); ?>" id="channel_row_<?php echo $libitem->id; ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_channel_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_channel_row.inc.php'); ?>
</tr>
<?php } ?>
<?php if (!count($object_ids)) { ?>
@ -60,4 +60,4 @@
</tbody>
</table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php' ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php') ?>

View file

@ -34,7 +34,7 @@
foreach ($coming_concerts as $libitem) {
?>
<tr id="concert_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_concert_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_concert_row.inc.php'); ?>
</tr>
<?php } ?>
<?php if (!$coming_concerts || !count($coming_concerts)) { ?>
@ -59,7 +59,7 @@
foreach ($concerts as $libitem) {
?>
<tr id="concert_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_concert_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_concert_row.inc.php'); ?>
</tr>
<?php } ?>
<?php if (!$concerts || !count($concerts)) { ?>

View file

@ -22,7 +22,7 @@
$web_path = AmpConfig::get('web_path');
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>
<table class="tabledata" cellpadding="0" cellspacing="0">
<colgroup>
<col id="col_action" />
@ -116,4 +116,4 @@ foreach ($object_ids as $item) {
</table>
<?php show_table_render(); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>

View file

@ -24,6 +24,8 @@ $logo_url = AmpConfig::get('custom_login_logo');
if (empty($logo_url)) {
$logo_url = AmpConfig::get('web_path') . "/themes/reborn/images/ampache.png";
}
$web_path = AmpConfig::get('web_path');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html lang="en-US">
@ -32,9 +34,9 @@ if (empty($logo_url)) {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ampache -- Debug Page</title>
<?php UI::show_custom_style(); ?>
<link href="<?php echo AmpConfig::get('web_path'); ?>/modules/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo AmpConfig::get('web_path'); ?>/modules/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/templates/install-doped.css" type="text/css" media="screen" />
<link href="<?php echo $web_path; ?>/modules/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo $web_path; ?>/modules/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<link rel="stylesheet" href="<?php echo $web_path . UI::find_template('install-doped.css'); ?>" type="text/css" media="screen" />
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">

View file

@ -37,7 +37,7 @@ $video_type = strtolower(get_class($libitem));
</tr>
<?php
if ($video_type != 'video') {
require AmpConfig::get('prefix') . '/templates/show_partial_edit_' . $video_type . '_row.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_partial_edit_' . $video_type . '_row.inc.php');
}
?>
<tr>

View file

@ -21,5 +21,5 @@
*/
?>
<?php UI::show_box_top(T_('Information')); ?>
<?php require_once AmpConfig::get('prefix') . '/templates/show_stats_highest.inc.php'; ?>
<?php require_once AmpConfig::get('prefix') . UI::find_template('show_stats_highest.inc.php'); ?>
<?php UI::show_box_bottom(); ?>

View file

@ -5,7 +5,7 @@ if ($is_share) {
}
if (!$iframed) {
require_once AmpConfig::get('prefix') . '/templates/show_html5_player_headers.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_html5_player_headers.inc.php');
}
?>
<script type="text/javascript">
@ -490,7 +490,7 @@ if ($isVideo) {
</div>
<?php
if (!$iframed || $is_share) {
require_once AmpConfig::get('prefix') . '/templates/uberviz.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('uberviz.inc.php');
}
?>
<?php if (!$is_share) { ?>

View file

@ -1,18 +1,18 @@
<?php
if ($iframed || $is_share) {
?>
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/templates/jplayer.midnight.black-iframed.css" type="text/css" />
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path') . UI::find_template('jplayer.midnight.black-iframed.css'); ?>" type="text/css" />
<?php
} else {
?>
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/templates/jplayer.midnight.black.css" type="text/css" />
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path') . UI::find_template('jplayer.midnight.black.css'); ?>" type="text/css" />
<?php
}
if (!$iframed) {
require_once AmpConfig::get('prefix') . '/templates/stylesheets.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('stylesheets.inc.php');
?>
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/templates/jquery-editdialog.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path') . UI::find_template('jquery-editdialog.css'); ?>" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/modules/jquery-ui-ampache/jquery-ui.min.css" type="text/css" media="screen" />
<script src="<?php echo AmpConfig::get('web_path'); ?>/modules/jquery/jquery.min.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo AmpConfig::get('web_path'); ?>/modules/jquery-ui/jquery-ui.min.js" language="javascript" type="text/javascript"></script>

View file

@ -57,7 +57,7 @@ if (Art::is_enabled()) {
<?php
$data = Song::get_recently_played();
Song::build_cache(array_keys($data));
require_once AmpConfig::get('prefix') . '/templates/show_recently_played.inc.php';
require_once AmpConfig::get('prefix') . UI::find_template('show_recently_played.inc.php');
?>
</div>
<?php } ?>

View file

@ -172,9 +172,6 @@ require $prefix . '/templates/install_header.inc.php';
<div class="checkbox-inline">
<label><input type="checkbox" name="backends[]" value="daap" <?php if (isset($_REQUEST['backends']) && in_array('daap', $_REQUEST['backends'])) echo 'checked'; ?>>DAAP (iTunes)</label>
</div>
<div class="checkbox-inline">
<label><input type="checkbox" name="backends[]" value="webdav" <?php if (isset($_REQUEST['backends']) && in_array('webdav', $_REQUEST['backends'])) echo 'checked'; ?>>WebDAV</label>
</div>
</div>
<br /><br />

View file

@ -29,7 +29,7 @@ $thcount = 6;
</ul>
</div>
<?php } ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="label">
<thead>
<tr class="th-top">
@ -50,7 +50,7 @@ $thcount = 6;
$libitem->format();
?>
<tr id="label_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_label_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_label_row.inc.php'); ?>
</tr>
<?php } ?>
<?php if (!count($object_ids)) { ?>
@ -73,4 +73,4 @@ $thcount = 6;
</table>
<?php show_table_render(); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>

View file

@ -22,7 +22,7 @@
$web_path = AmpConfig::get('web_path');
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="live_stream">
<thead>
<tr class="th-top">
@ -40,7 +40,7 @@ $web_path = AmpConfig::get('web_path');
$libitem->format();
?>
<tr id="live_stream_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_live_stream_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_live_stream_row.inc.php'); ?>
</tr>
<?php } //end foreach ($artists as $artist) ?>
<?php if (!count($object_ids)) { ?>
@ -60,4 +60,4 @@ $web_path = AmpConfig::get('web_path');
</tfoot>
</table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) require AmpConfig::Get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>

View file

@ -24,7 +24,7 @@ $localplay = new Localplay(AmpConfig::get('localplay_controller'));
$localplay->connect();
$status = $localplay->status();
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>
<table class="tabledata" cellpadding="0" cellspacing="0">
<thead>
<tr class="th-top">
@ -64,4 +64,4 @@ $status = $localplay->status();
</tr>
</tfoot>
</table>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>

View file

@ -30,6 +30,8 @@ if (AmpConfig::get('session_length') >= AmpConfig::get('remember_length')) {
$htmllang = str_replace("_","-",AmpConfig::get('lang'));
is_rtl(AmpConfig::get('lang')) ? $dir = 'rtl' : $dir = 'ltr';
$web_path = AmpConfig::get('web_path');
$_SESSION['login'] = true;
define('TABLE_RENDERED', 1);
@ -40,9 +42,9 @@ define('TABLE_RENDERED', 1);
<!-- Propulsed by Ampache | ampache.org -->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo AmpConfig::get('site_charset'); ?>" />
<?php UI::show_custom_style(); ?>
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/templates/print.css" type="text/css" media="print" />
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?><?php echo AmpConfig::get('theme_path'); ?>/templates/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?><?php echo AmpConfig::get('theme_path'); ?>/templates/dark.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path . UI::find_template('print.css'); ?>" type="text/css" media="print" />
<link rel="stylesheet" href="<?php echo $web_path . UI::find_template('default.css'); ?>" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path . UI::find_template('dark.css'); ?>" type="text/css" media="screen" />
<title> <?php echo scrub_out(AmpConfig::get('site_title')); ?> </title>
<script type="text/javascript" language="javascript">
function focus(){ document.login.username.focus(); }
@ -52,11 +54,11 @@ define('TABLE_RENDERED', 1);
<body id="loginPage" onload="focus();">
<div id="maincontainer">
<div id="header"><!-- This is the header -->
<a href="<?php echo AmpConfig::get('web_path'); ?>"><h1 id="headerlogo"></h1></a>
<a href="<?php echo $web_path; ?>"><h1 id="headerlogo"></h1></a>
</div>
<div id="loginbox">
<h2><?php echo scrub_out(AmpConfig::get('site_title')); ?></h2>
<form name="login" method="post" enctype="multipart/form-data" action="<?php echo AmpConfig::get('web_path'); ?>/login.php">
<form name="login" method="post" enctype="multipart/form-data" action="<?php echo $web_path; ?>/login.php">
<div class="loginfield" id="usernamefield">
<label for="username"><?php echo T_('Username'); ?>:</label>
<input class="text_input" type="text" id="username" name="username" value="<?php echo scrub_out($_REQUEST['username']); ?>" />
@ -72,13 +74,13 @@ define('TABLE_RENDERED', 1);
<?php Error::display('general'); ?>
<div class="formValidation">
<a rel="nohtml" class="button" id="lostpasswordbutton" href="<?php echo AmpConfig::get('web_path'); ?>/lostpassword.php"><?php echo T_('Lost password'); ?></a>
<a rel="nohtml" class="button" id="lostpasswordbutton" href="<?php echo $web_path; ?>/lostpassword.php"><?php echo T_('Lost password'); ?></a>
<input class="button" id="loginbutton" type="submit" value="<?php echo T_('Login'); ?>" />
<input type="hidden" name="referrer" value="<?php echo scrub_out($_SERVER['HTTP_REFERRER']); ?>" />
<input type="hidden" name="action" value="login" />
<?php if (AmpConfig::get('allow_public_registration')) { ?>
<a rel="nohtml" class="button" id="registerbutton" href="<?php echo AmpConfig::get('web_path'); ?>/register.php"><?php echo T_('Register'); ?></a>
<a rel="nohtml" class="button" id="registerbutton" href="<?php echo $web_path; ?>/register.php"><?php echo T_('Register'); ?></a>
<?php } // end if allow_public_registration ?>
</div>
</form>

View file

@ -28,6 +28,8 @@ if (AmpConfig::get('session_length') >= AmpConfig::get('remember_length')) {
}
$htmllang = str_replace("_","-",AmpConfig::get('lang'));
is_rtl(AmpConfig::get('lang')) ? $dir = 'rtl' : $dir = 'ltr';
$web_path = AmpConfig::get('web_path');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -36,9 +38,9 @@ is_rtl(AmpConfig::get('lang')) ? $dir = 'rtl' : $dir = 'ltr';
<!-- Propulsed by Ampache | ampache.org -->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo AmpConfig::get('site_charset'); ?>" />
<?php UI::show_custom_style(); ?>
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/templates/print.css" type="text/css" media="print" />
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?><?php echo AmpConfig::get('theme_path'); ?>/templates/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?><?php echo AmpConfig::get('theme_path'); ?>/templates/dark.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path . UI::find_template('print.css'); ?>" type="text/css" media="print" />
<link rel="stylesheet" href="<?php echo $web_path . UI::find_template('default.css'); ?>" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $web_path . UI::find_template('dark.css'); ?>" type="text/css" media="screen" />
<title><?php echo scrub_out(AmpConfig::get('site_title')); ?></title>
<script type="text/javascript" language="javascript">
function focus()
@ -51,14 +53,14 @@ is_rtl(AmpConfig::get('lang')) ? $dir = 'rtl' : $dir = 'ltr';
<div id="maincontainer">
<div id="header"><!-- This is the header -->
<h1 id="headerlogo">
<a href="<?php echo AmpConfig::get('web_path'); ?>/login.php">
<img src="<?php echo AmpConfig::get('web_path'); ?><?php echo AmpConfig::get('theme_path'); ?>/images/ampache.png" title="<?php echo AmpConfig::get('site_title'); ?>" alt="<?php echo AmpConfig::get('site_title'); ?>" />
<a href="<?php echo $web_path ?>/login.php">
<img src="<?php echo $web_path ?><?php echo AmpConfig::get('theme_path'); ?>/images/ampache.png" title="<?php echo AmpConfig::get('site_title'); ?>" alt="<?php echo AmpConfig::get('site_title'); ?>" />
</a>
</h1>
</div>
<div id="loginbox">
<h2><?php echo scrub_out(AmpConfig::get('site_title')); ?></h2>
<form name="login" method="post" enctype="multipart/form-data" action="<?php echo AmpConfig::get('web_path'); ?>/lostpassword.php">
<form name="login" method="post" enctype="multipart/form-data" action="<?php echo $web_path ?>/lostpassword.php">
<div class="loginfield" id="emailfield">
<label for="email"><?php echo T_('Email'); ?>:</label>
<input type="hidden" id="action" name="action" value="send" />

View file

@ -43,7 +43,7 @@ $web_path = AmpConfig::get('web_path');
$libitem = new License($license_id);
$libitem->format();
require AmpConfig::get('prefix') . '/templates/show_license_row.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_license_row.inc.php');
?>
<?php } if (!count($object_ids)) { ?>
<tr class="<?php echo UI::flip_class(); ?>">

View file

@ -44,7 +44,7 @@ $web_path = AmpConfig::get('web_path');
$client = new User($libitem->user);
$client->format();
require AmpConfig::get('prefix') . '/templates/show_shout_row.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_shout_row.inc.php');
?>
<?php } if (!count($object_ids)) { ?>
<tr class="<?php echo UI::flip_class(); ?>">

View file

@ -37,7 +37,7 @@
foreach ($walbums as $libitem) {
?>
<tr id="walbum_<?php echo $libitem->mbid; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_wanted_album_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_wanted_album_row.inc.php'); ?>
</tr>
<?php
}

View file

@ -21,5 +21,5 @@
*/
?>
<?php UI::show_box_top(T_('Information')); ?>
<?php require_once AmpConfig::get('prefix') . '/templates/show_stats_newest.inc.php'; ?>
<?php require_once AmpConfig::get('prefix') . UI::find_template('show_stats_newest.inc.php'); ?>
<?php UI::show_box_bottom(); ?>

View file

@ -45,9 +45,9 @@ foreach ($results as $item) {
<div class="np_row">
<?php
if (strtolower(get_class($media)) == 'song') {
require AmpConfig::get('prefix') . '/templates/show_now_playing_row.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_now_playing_row.inc.php');
} else {
require AmpConfig::get('prefix') . '/templates/show_now_playing_video_row.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_now_playing_video_row.inc.php');
}
?>
</div>

View file

@ -35,7 +35,7 @@
$object->format();
?>
<tr id="object_row_<?php echo $object->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_object_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_object_row.inc.php'); ?>
</tr>
<?php } ?>
<?php if (!count($objects)) { ?>

View file

@ -28,7 +28,7 @@
?>
<?php
ob_start();
require AmpConfig::get('prefix') . '/templates/show_playlist_title.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_playlist_title.inc.php');
$title = ob_get_contents();
ob_end_clean();
UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</div>', 'info-box');

View file

@ -22,7 +22,7 @@
$web_path = AmpConfig::get('web_path');
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>
<form method="post" id="reorder_playlist_<?php echo $playlist->id; ?>">
<table id="reorder_playlist_table" class="tabledata" cellpadding="0" cellspacing="0">
<thead>
@ -60,7 +60,7 @@ $web_path = AmpConfig::get('web_path');
$playlist_track = $object['track'];
?>
<tr class="<?php echo UI::flip_class(); ?>" id="track_<?php echo $object['track_id']; ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_playlist_song_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_playlist_song_row.inc.php'); ?>
</tr>
<?php } ?>
</tbody>
@ -88,4 +88,4 @@ $web_path = AmpConfig::get('web_path');
</table>
</form>
<?php show_table_render($argument); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php'); ?>

View file

@ -20,7 +20,7 @@
*
*/
?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php' ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php') ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="playlist">
<thead>
<tr class="th-top">
@ -48,7 +48,7 @@
$libitem->format();
?>
<tr class="<?php echo UI::flip_class(); ?>" id="playlist_row_<?php echo $libitem->id; ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_playlist_row.inc.php'; ?>
<?php require AmpConfig::get('prefix') . UI::find_template('show_playlist_row.inc.php'); ?>
</tr>
<?php } // end foreach ($playlists as $playlist) ?>
<?php if (!count($object_ids)) { ?>
@ -78,4 +78,4 @@
</tfoot>
</table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php' ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php') ?>

View file

@ -44,7 +44,7 @@
} // end if not account
if ($_REQUEST['tab'] == 'account') {
$client = $GLOBALS['user'];
require AmpConfig::get('prefix') . '/templates/show_account.inc.php';
require AmpConfig::get('prefix') . UI::find_template('show_account.inc.php');
}
?>
</form>

Some files were not shown because too many files have changed in this diff Show more