1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 17:59:21 +02:00

Merge branch 'develop' of https://github.com/Niols/ampache into Niols-develop

Conflicts:
	admin/users.php
	config/ampache.cfg.php.dist
	lib/class/api.class.php
	lib/class/userflag.class.php
	lib/rating.lib.php
	lib/ui.lib.php
	sql/ampache.sql
	templates/browse_filters.inc.php
	templates/footer.inc.php
	templates/header.inc.php
	templates/show_albums.inc.php
	templates/show_artists.inc.php
	templates/show_broadcasts.inc.php
	templates/show_catalogs.inc.php
	templates/show_channels.inc.php
	templates/show_concerts.inc.php
	templates/show_democratic_playlist.inc.php
	templates/show_html5_player_headers.inc.php
	templates/show_index.inc.php
	templates/show_install_config.inc.php
	templates/show_labels.inc.php
	templates/show_live_streams.inc.php
	templates/show_localplay_playlist.inc.php
	templates/show_login_form.inc.php
	templates/show_manage_license.inc.php
	templates/show_manage_shoutbox.inc.php
	templates/show_missing_albums.inc.php
	templates/show_objects.inc.php
	templates/show_playlist_songs.inc.php
	templates/show_playlists.inc.php
	templates/show_preferences.inc.php
	templates/show_pvmsgs.inc.php
	templates/show_recommended_artists.inc.php
	templates/show_searches.inc.php
	templates/show_shared_objects.inc.php
	templates/show_song_previews.inc.php
	templates/show_songs.inc.php
	templates/show_tvshow_seasons.inc.php
	templates/show_tvshows.inc.php
	templates/show_user_activate.inc.php
	templates/show_users.inc.php
	templates/show_videos.inc.php
	templates/show_wanted_albums.inc.php
	templates/sidebar.inc.php
	templates/stylesheets.inc.php
This commit is contained in:
Afterster 2015-09-06 11:23:51 +02:00
commit 207076d9a0
126 changed files with 375 additions and 340 deletions

4
.gitignore vendored
View file

@ -2,6 +2,7 @@ config/ampache.cfg.php
config/ampache-doped.cfg.php config/ampache-doped.cfg.php
rest/.htaccess rest/.htaccess
play/.htaccess play/.htaccess
channel/.htaccess
*.phpproj *.phpproj
*.sln *.sln
*.v11.suo *.v11.suo
@ -10,3 +11,6 @@ logs
/nbproject/private/ /nbproject/private/
.pc .pc
/tmp /tmp
log/
*~
*#

View file

@ -74,7 +74,7 @@ switch ($_REQUEST['action']) {
show_confirmation(T_('Added'), T_('Your new Access Control List(s) have been created'),$url); show_confirmation(T_('Added'), T_('Your new Access Control List(s) have been created'),$url);
} else { } else {
$action = 'show_add_' . $_POST['type']; $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; break;
case 'update_record': case 'update_record':
@ -88,7 +88,7 @@ switch ($_REQUEST['action']) {
show_confirmation(T_('Updated'), T_('Access List Entry updated'), AmpConfig::get('web_path').'/admin/access.php'); show_confirmation(T_('Updated'), T_('Access List Entry updated'), AmpConfig::get('web_path').'/admin/access.php');
} else { } else {
$access->format(); $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; break;
case 'show_add_current': case 'show_add_current':
@ -96,17 +96,17 @@ switch ($_REQUEST['action']) {
case 'show_add_local': case 'show_add_local':
case 'show_add_advanced': case 'show_add_advanced':
$action = $_REQUEST['action']; $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; break;
case 'show_edit_record': case 'show_edit_record':
$access = new Access($_REQUEST['access_id']); $access = new Access($_REQUEST['access_id']);
$access->format(); $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; break;
default: default:
$list = array(); $list = array();
$list = Access::get_access_lists(); $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; break;
} // end switch on action } // end switch on action
UI::show_footer(); UI::show_footer();

View file

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

View file

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

View file

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

View file

@ -46,7 +46,7 @@ switch ($_REQUEST['action']) {
case 'show_edit': case 'show_edit':
$license = new License($_REQUEST['license_id']); $license = new License($_REQUEST['license_id']);
case 'show_create': 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; break;
case 'delete': case 'delete':
License::delete($_REQUEST['license_id']); License::delete($_REQUEST['license_id']);

View file

@ -71,7 +71,7 @@ switch ($_REQUEST['action']) {
break; break;
default: 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; break;
} // end switch } // end switch

View file

@ -184,19 +184,19 @@ switch ($_REQUEST['action']) {
case 'show_plugins': case 'show_plugins':
$plugins = Plugin::get_plugins(); $plugins = Plugin::get_plugins();
UI::show_box_top(T_('Plugins'), 'box box_localplay_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(); UI::show_box_bottom();
break; break;
case 'show_localplay': case 'show_localplay':
$controllers = Localplay::get_controllers(); $controllers = Localplay::get_controllers();
UI::show_box_top(T_('Localplay Controllers'), 'box box_localplay_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(); UI::show_box_bottom();
break; break;
case 'show_catalog_types': case 'show_catalog_types':
$catalogs = Catalog::get_catalog_types(); $catalogs = Catalog::get_catalog_types();
UI::show_box_top(T_('Catalog Types'), 'box box_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(); UI::show_box_bottom();
break; break;
default: default:

View file

@ -44,7 +44,7 @@ switch ($_REQUEST['action']) {
$object->format(); $object->format();
$client = new User($shout->user); $client = new User($shout->user);
$client->format(); $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; break;
case 'delete': case 'delete':
Shoutbox::delete($_REQUEST['shout_id']); Shoutbox::delete($_REQUEST['shout_id']);

View file

@ -55,7 +55,7 @@ switch ($_REQUEST['action']) {
if ($_REQUEST['autoupdate'] == 'force') { if ($_REQUEST['autoupdate'] == 'force') {
$version = AutoUpdate::get_latest_version(true); $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; break;
case 'clear_cache': case 'clear_cache':
switch ($_REQUEST['type']) { switch ($_REQUEST['type']) {

View file

@ -78,7 +78,7 @@ switch ($_REQUEST['action']) {
/* If we've got an error then show edit form! */ /* If we've got an error then show edit form! */
if (Error::occurred()) { 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; break;
} }
@ -153,7 +153,7 @@ switch ($_REQUEST['action']) {
/* If we've got an error then show add form! */ /* If we've got an error then show add form! */
if (Error::occurred()) { 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; break;
} }
@ -197,7 +197,7 @@ switch ($_REQUEST['action']) {
break; break;
} }
$client = new User($_REQUEST['user_id']); $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; break;
case 'confirm_delete': case 'confirm_delete':
if (AmpConfig::get('demo_mode')) { if (AmpConfig::get('demo_mode')) {
@ -277,18 +277,18 @@ switch ($_REQUEST['action']) {
} else { } else {
$history = $working_user->get_ip_history(); $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; break;
case 'show_add_user': case 'show_add_user':
if (AmpConfig::get('demo_mode')) { if (AmpConfig::get('demo_mode')) {
break; 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; break;
case 'show_preferences': case 'show_preferences':
$client = new User($_REQUEST['user_id']); $client = new User($_REQUEST['user_id']);
$preferences = Preference::get_all($client->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; break;
default: default:
$browse = new Browse(); $browse = new Browse();

View file

@ -22,7 +22,7 @@
require_once 'lib/init.php'; 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 on Action */
switch ($_REQUEST['action']) { switch ($_REQUEST['action']) {
@ -68,7 +68,7 @@ switch ($_REQUEST['action']) {
$type = 'album'; $type = 'album';
$object_id = intval($_REQUEST['album_id']); $object_id = intval($_REQUEST['album_id']);
$target_url = AmpConfig::get('web_path') . '/albums.php?action=show&amp;album=' . $object_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; break;
case 'set_track_numbers': case 'set_track_numbers':
debug_event('albums', 'Set track numbers called.', '5'); debug_event('albums', 'Set track numbers called.', '5');
@ -112,7 +112,7 @@ switch ($_REQUEST['action']) {
} }
$walbum->load_all(); $walbum->load_all();
$walbum->format(); $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; break;
// Browse by Album // Browse by Album
case 'show': case 'show':
@ -121,9 +121,9 @@ switch ($_REQUEST['action']) {
$album->format(); $album->format();
if (!count($album->album_suite)) { 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 { } 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; break;

View file

@ -69,20 +69,20 @@ switch ($_REQUEST['action']) {
$object_ids = $artist->get_albums($_REQUEST['catalog']); $object_ids = $artist->get_albums($_REQUEST['catalog']);
} }
$object_type = 'album'; $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; break;
case 'show_all_songs': case 'show_all_songs':
$artist = new Artist($_REQUEST['artist']); $artist = new Artist($_REQUEST['artist']);
$artist->format(); $artist->format();
$object_type = 'song'; $object_type = 'song';
$object_ids = $artist->get_songs(); $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; break;
case 'update_from_tags': case 'update_from_tags':
$type = 'artist'; $type = 'artist';
$object_id = intval($_REQUEST['artist']); $object_id = intval($_REQUEST['artist']);
$target_url = AmpConfig::get('web_path') . "/artists.php?action=show&amp;artist=" . $object_id; $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; break;
case 'match': case 'match':
case 'Match': case 'Match':
@ -93,10 +93,10 @@ switch ($_REQUEST['action']) {
$chr = $match; $chr = $match;
} }
/* Enclose this in the purty box! */ /* 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_list('artists','artists.php',$match);
show_alphabet_form($chr, T_('Show Artists starting with'),"artists.php?action=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") { if ($match === "Browse") {
show_artists(); show_artists();
@ -116,7 +116,7 @@ switch ($_REQUEST['action']) {
$mbid = $_REQUEST['mbid']; $mbid = $_REQUEST['mbid'];
$wartist = Wanted::get_missing_artist($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; break;
} // end switch } // end switch

View file

@ -22,7 +22,7 @@
require_once 'lib/init.php'; 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_type = $_GET['object_type'];
$object_id = $_GET['object_id']; $object_id = $_GET['object_id'];
@ -132,14 +132,14 @@ switch ($_REQUEST['action']) {
} // end foreach } // end foreach
// Store the results for further use // Store the results for further use
$_SESSION['form']['images'] = $images; $_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 nothing
else { 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); 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; break;
case 'select_art': case 'select_art':

View file

@ -93,10 +93,10 @@ switch ($_REQUEST['action']) {
$browse2 = new Browse(); $browse2 = new Browse();
$browse2->set_type($browse_type); $browse2->set_type($browse_type);
$browse2->store(); $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(); UI::show_box_bottom();
$type = $browse2->get_type(); $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; break;
case 'artist': case 'artist':
$browse->set_filter('catalog',$_SESSION['catalog']); $browse->set_filter('catalog',$_SESSION['catalog']);

View file

@ -37,7 +37,7 @@ switch ($_REQUEST['action']) {
$object = new $type($_REQUEST['id']); $object = new $type($_REQUEST['id']);
if ($object->id) { if ($object->id) {
$object->format(); $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(); 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']); $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) { 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 { } else {
$title = T_('Channel Created'); $title = T_('Channel Created');
show_confirmation($title, $body, AmpConfig::get('web_path') . '/browse.php?action=channel'); show_confirmation($title, $body, AmpConfig::get('web_path') . '/browse.php?action=channel');

View file

@ -570,6 +570,11 @@ show_footer_statistics = "true"
;DEFAULT: use_rss = false ;DEFAULT: use_rss = false
;use_rss = "false" ;use_rss = "false"
; This setting allows themes to overwrite PHP template files. This can be really
; dangerous. Do this only if you trust every theme in your themes/ directory.
; DEFAULT: false
;allow_php_themes = "false"
;######################################################### ;#########################################################
; Debugging # ; Debugging #

View file

@ -24,6 +24,6 @@ require_once 'lib/init.php';
UI::show_header(); 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(); UI::show_footer();

View file

@ -43,7 +43,7 @@ switch ($_REQUEST['action']) {
} }
// Show the create page // 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; break;
case 'delete': case 'delete':
if (!Access::check('interface','75')) { if (!Access::check('interface','75')) {
@ -96,20 +96,20 @@ switch ($_REQUEST['action']) {
// Get all of the non-user playlists // Get all of the non-user playlists
$playlists = Democratic::get_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; break;
case 'show_playlist': case 'show_playlist':
default: default:
$democratic = Democratic::get_current_playlist(); $democratic = Democratic::get_current_playlist();
if (!$democratic->id) { 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; break;
} }
$democratic->set_parent(); $democratic->set_parent();
$democratic->format(); $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(); $objects = $democratic->get_items();
Song::build_cache($democratic->object_ids); Song::build_cache($democratic->object_ids);
Democratic::build_vote_cache($democratic->vote_ids); Democratic::build_vote_cache($democratic->vote_ids);

View file

@ -68,7 +68,7 @@ if (isset($_GET['type'])) {
switch ($_GET['type']) { switch ($_GET['type']) {
case 'popup': case 'popup':
$typeManaged = true; $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; break;
case 'session': case 'session':
// If we need to pull the data out of the 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')) { if (AmpConfig::get('refresh_limit') > 5 && AmpConfig::get('home_now_playing')) {
$refresh_limit = AmpConfig::get('refresh_limit'); $refresh_limit = AmpConfig::get('refresh_limit');
$ajax_url = '?page=index&action=reloadnp'; $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(); UI::show_footer();

View file

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

View file

@ -80,7 +80,7 @@ switch ($_REQUEST['action']) {
$label_id = Label::create($_POST); $label_id = Label::create($_POST);
if (!$label_id) { 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 { } else {
$body = T_('Label Added'); $body = T_('Label Added');
$title = ''; $title = '';
@ -99,13 +99,13 @@ switch ($_REQUEST['action']) {
$label->format(); $label->format();
$object_ids = $label->get_artists(); $object_ids = $label->get_artists();
$object_type = 'artist'; $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(); UI::show_footer();
exit; exit;
} }
case 'show_add_label': case 'show_add_label':
if (Access::check('interface','50') || AmpConfig::get('upload_allow_edit')) { 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 { } else {
echo T_('Label cannot be found.'); echo T_('Label cannot be found.');
} }

View file

@ -202,7 +202,7 @@ class Browse extends Query
case 'song': case 'song':
$box_title = T_('Songs') . $match; $box_title = T_('Songs') . $match;
Song::build_cache($object_ids, $limit_threshold); 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; break;
case 'album': case 'album':
Album::build_cache($object_ids); Album::build_cache($object_ids);
@ -215,122 +215,122 @@ class Browse extends Query
} else { } else {
$allow_group_disks = false; $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; break;
case 'user': case 'user':
$box_title = T_('Users') . $match; $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; break;
case 'artist': case 'artist':
$box_title = T_('Artists') . $match; $box_title = T_('Artists') . $match;
Artist::build_cache($object_ids, true, $limit_threshold); 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; break;
case 'live_stream': 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_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; break;
case 'playlist': case 'playlist':
Playlist::build_cache($object_ids); Playlist::build_cache($object_ids);
$box_title = T_('Playlists') . $match; $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; break;
case 'playlist_song': case 'playlist_song':
$box_title = T_('Playlist Songs') . $match; $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; break;
case 'playlist_localplay': case 'playlist_localplay':
$box_title = T_('Current Playlist'); $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(); UI::show_box_bottom();
break; break;
case 'smartplaylist': case 'smartplaylist':
$box_title = T_('Smart Playlists') . $match; $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; break;
case 'catalog': case 'catalog':
$box_title = T_('Catalogs'); $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; break;
case 'shoutbox': case 'shoutbox':
$box_title = T_('Shoutbox Records'); $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; break;
case 'tag': case 'tag':
Tag::build_cache($object_ids); Tag::build_cache($object_ids);
$box_title = T_('Tag Cloud'); $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; break;
case 'video': case 'video':
Video::build_cache($object_ids); Video::build_cache($object_ids);
$video_type = 'video'; $video_type = 'video';
$box_title = T_('Videos'); $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; break;
case 'democratic': case 'democratic':
$box_title = T_('Democratic Playlist'); $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; break;
case 'wanted': case 'wanted':
$box_title = T_('Wanted Albums'); $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; break;
case 'share': case 'share':
$box_title = T_('Shared Objects'); $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; break;
case 'song_preview': case 'song_preview':
$box_title = T_('Songs'); $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; break;
case 'channel': case 'channel':
$box_title = T_('Channels'); $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; break;
case 'broadcast': case 'broadcast':
$box_title = T_('Broadcasts'); $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; break;
case 'license': case 'license':
$box_title = T_('Media Licenses'); $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; break;
case 'tvshow': case 'tvshow':
$box_title = T_('TV Shows'); $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; break;
case 'tvshow_season': case 'tvshow_season':
$box_title = T_('Seasons'); $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; break;
case 'tvshow_episode': case 'tvshow_episode':
$box_title = T_('Episodes'); $box_title = T_('Episodes');
$video_type = $type; $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; break;
case 'movie': case 'movie':
$box_title = T_('Movies'); $box_title = T_('Movies');
$video_type = $type; $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; break;
case 'clip': case 'clip':
$box_title = T_('Clips'); $box_title = T_('Clips');
$video_type = $type; $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; break;
case 'personal_video': case 'personal_video':
$box_title = T_('Personal Videos'); $box_title = T_('Personal Videos');
$video_type = $type; $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; break;
case 'label': case 'label':
$box_title = T_('Labels'); $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; break;
case 'pvmsg': case 'pvmsg':
$box_title = T_('Private Messages'); $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; break;
default: default:
// Rien a faire // Rien a faire

View file

@ -1598,7 +1598,7 @@ abstract class Catalog extends database_object
debug_event('clean', 'Starting on ' . $this->name, 5); debug_event('clean', 'Starting on ' . $this->name, 5);
if (!defined('SSE_OUTPUT')) { 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(); ob_flush();
flush(); flush();
} }
@ -1628,7 +1628,7 @@ abstract class Catalog extends database_object
public function verify_catalog() public function verify_catalog()
{ {
if (!defined('SSE_OUTPUT')) { 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(); ob_flush();
flush(); flush();
} }

View file

@ -501,7 +501,7 @@ class Graph
} }
} }
require_once AmpConfig::get('prefix') . '/templates/show_graphs.inc.php'; require_once AmpConfig::get('prefix') . UI::find_template('show_graphs.inc.php');
} }
} }
} }

View file

@ -275,9 +275,9 @@ class Rating extends database_object
$rating = new Rating($object_id, $type); $rating = new Rating($object_id, $type);
if ($static) { 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 { } else {
require AmpConfig::get('prefix') . '/templates/show_object_rating.inc.php'; require AmpConfig::get('prefix') . UI::find_template('show_object_rating.inc.php');
} }
} // show } // show
} //end rating class } //end rating class

View file

@ -528,9 +528,9 @@ class Stream_Playlist
public function create_web_player() public function create_web_player()
{ {
if (AmpConfig::get("ajax_load")) { 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 { } 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 } // create_web_player

View file

@ -34,6 +34,26 @@ class UI
return false; return false;
} }
/**
* find_template
*
* Return the path to the template file wanted. The file can be overwriten
* by the theme if it's not a php file, or if it is and if option
* allow_php_themes is set to true.
*/
public static function find_template($template)
{
$path = AmpConfig::get('theme_path') . '/templates/' . $template;
$realpath = AmpConfig::get('prefix') . $path;
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
if (($extension != 'php' || AmpConfig::get('allow_php_themes'))
&& file_exists($realpath) && is_file($realpath)) {
return $path;
} else {
return '/templates/' . $template;
}
}
/** /**
* access_denied * access_denied
* *
@ -44,7 +64,7 @@ class UI
// Clear any buffered crap // Clear any buffered crap
ob_end_clean(); ob_end_clean();
header("HTTP/1.1 403 $error"); header("HTTP/1.1 403 $error");
require_once AmpConfig::get('prefix') . '/templates/show_denied.inc.php'; require_once AmpConfig::get('prefix') . UI::find_template('show_denied.inc.php');
exit; exit;
} }
@ -57,7 +77,7 @@ class UI
public static function ajax_include($template) public static function ajax_include($template)
{ {
ob_start(); ob_start();
require AmpConfig::get('prefix') . '/templates/' . $template; require AmpConfig::get('prefix') . UI::find_template('') . $template;
$output = ob_get_contents(); $output = ob_get_contents();
ob_end_clean(); ob_end_clean();
@ -274,7 +294,7 @@ END;
*/ */
public static function show_header() public static function show_header()
{ {
require_once AmpConfig::get('prefix') . '/templates/header.inc.php'; require_once AmpConfig::get('prefix') . UI::find_template('header.inc.php');
} }
/** /**
@ -296,7 +316,7 @@ END;
} }
} }
require_once AmpConfig::get('prefix') . '/templates/footer.inc.php'; require_once AmpConfig::get('prefix') . UI::find_template('footer.inc.php');
if (isset($_REQUEST['profiling'])) { if (isset($_REQUEST['profiling'])) {
Dba::show_profile(); Dba::show_profile();
} }
@ -309,7 +329,7 @@ END;
*/ */
public static function show_box_top($title = '', $class = '') public static function show_box_top($title = '', $class = '')
{ {
require AmpConfig::get('prefix') . '/templates/show_box_top.inc.php'; require AmpConfig::get('prefix') . UI::find_template('show_box_top.inc.php');
} }
/** /**
@ -319,7 +339,7 @@ END;
*/ */
public static function show_box_bottom() public static function show_box_bottom()
{ {
require AmpConfig::get('prefix') . '/templates/show_box_bottom.inc.php'; require AmpConfig::get('prefix') . UI::find_template('show_box_bottom.inc.php');
} }
public static function show_custom_style() public static function show_custom_style()

View file

@ -246,7 +246,7 @@ class Userflag extends database_object
} }
$userflag = new Userflag($object_id, $type); $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 } // show
} //end rating class } //end rating class

View file

@ -28,7 +28,7 @@ function show_rating($object_id,$type)
{ {
$rating = new 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 } // 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"; $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 } // show_confirmation
function sse_worker($url) function sse_worker($url)
@ -181,7 +181,7 @@ function get_location()
*/ */
function show_preference_box($preferences) 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 } // show_preference_box
/** /**
@ -715,7 +715,7 @@ function show_now_playing()
$web_path = AmpConfig::get('web_path'); $web_path = AmpConfig::get('web_path');
$results = Stream::get_now_playing(); $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 } // show_now_playing
function show_table_render($render = false, $force = false) function show_table_render($render = false, $force = false)

View file

@ -41,7 +41,7 @@ switch ($_REQUEST['action']) {
// Get the current localplay fields // Get the current localplay fields
$localplay = new Localplay(AmpConfig::get('localplay_controller')); $localplay = new Localplay(AmpConfig::get('localplay_controller'));
$fields = $localplay->get_instance_fields(); $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; break;
case 'add_instance': case 'add_instance':
// This requires 50 or better! // This requires 50 or better!
@ -74,7 +74,7 @@ switch ($_REQUEST['action']) {
$localplay = new Localplay(AmpConfig::get('localplay_controller')); $localplay = new Localplay(AmpConfig::get('localplay_controller'));
$instance = $localplay->get_instance($_REQUEST['instance']); $instance = $localplay->get_instance($_REQUEST['instance']);
$fields = $localplay->get_instance_fields(); $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; break;
case 'show_instances': case 'show_instances':
// First build the localplay object and then get the instances // First build the localplay object and then get the instances
@ -85,7 +85,7 @@ switch ($_REQUEST['action']) {
$localplay = new Localplay(AmpConfig::get('localplay_controller')); $localplay = new Localplay(AmpConfig::get('localplay_controller'));
$instances = $localplay->get_instances(); $instances = $localplay->get_instances();
$fields = $localplay->get_instance_fields(); $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; break;
case 'show_playlist': case 'show_playlist':
default: default:
@ -99,7 +99,7 @@ switch ($_REQUEST['action']) {
// Pull the current playlist and require the template // Pull the current playlist and require the template
$objects = $localplay->get(); $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; break;
} // end switch action } // end switch action

View file

@ -39,4 +39,4 @@ if (AmpConfig::get('use_auth') && !isset($_GET['force_display'])) {
} }
require_once 'lib/login.php'; 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')); 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; break;
default: 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) function send_newpassword($email,$current_ip)

View file

@ -115,7 +115,7 @@ abstract class Catalog extends \Catalog
public function add_to_catalog($options = null) public function add_to_catalog($options = null)
{ {
if (!defined('SSE_OUTPUT')) { 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(); flush();
} }
set_time_limit(0); set_time_limit(0);

View file

@ -423,7 +423,7 @@ class Catalog_local extends Catalog
$this->added_videos_to_gather = array(); $this->added_videos_to_gather = array();
if (!defined('SSE_OUTPUT')) { 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(); flush();
} }
@ -456,7 +456,7 @@ class Catalog_local extends Catalog
if ($options['gather_art']) { if ($options['gather_art']) {
$catalog_id = $this->id; $catalog_id = $this->id;
if (!defined('SSE_OUTPUT')) { 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(); flush();
} }
$this->gather_art($this->added_songs_to_gather, $this->added_videos_to_gather); $this->gather_art($this->added_songs_to_gather, $this->added_videos_to_gather);
@ -495,7 +495,7 @@ class Catalog_local extends Catalog
$this->count = 0; $this->count = 0;
if (!defined('SSE_OUTPUT')) { 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(); flush();
} }

View file

@ -83,7 +83,7 @@ class AmpacheShoutHome {
echo "<div id='shout_objects'>\n"; echo "<div id='shout_objects'>\n";
$shouts = Shoutbox::get_top($this->maxitems); $shouts = Shoutbox::get_top($this->maxitems);
if (count($shouts)) { 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"; echo "</div>\n";
} }

View file

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

View file

@ -169,7 +169,7 @@ switch ($_REQUEST['action']) {
} }
// Show the default preferences page // 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; break;
} // end switch on action } // end switch on action

View file

@ -42,7 +42,7 @@ switch ($action) {
$_REQUEST['message'] = "\n\n\n---\n> " . str_replace("\n", "\n> ", $pvmsg->message); $_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; break;
case 'add_message': case 'add_message':
if (AmpConfig::get('demo_mode')) { if (AmpConfig::get('demo_mode')) {
@ -62,7 +62,7 @@ switch ($action) {
$pvmsg_id = PrivateMsg::create($_POST); $pvmsg_id = PrivateMsg::create($_POST);
if (!$pvmsg_id) { 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 { } else {
$body = T_('Message Sent'); $body = T_('Message Sent');
$title = ''; $title = '';
@ -132,7 +132,7 @@ switch ($action) {
if (!$pvmsg->is_read) { if (!$pvmsg->is_read) {
$pvmsg->set_is_read(true); $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 { } else {
debug_event('UI::access_denied', 'Unknown or unauthorized private message #' . $msg_id . '.', '3'); debug_event('UI::access_denied', 'Unknown or unauthorized private message #' . $msg_id . '.', '3');
UI::access_denied(); UI::access_denied();

View file

@ -37,7 +37,7 @@ switch ($_REQUEST['action']) {
exit; 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; break;
case 'create': case 'create':
@ -55,7 +55,7 @@ switch ($_REQUEST['action']) {
$results = Live_Stream::create($_POST); $results = Live_Stream::create($_POST);
if (!$results) { 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 { } else {
$body = T_('Radio Station Added'); $body = T_('Radio Station Added');
$title = ''; $title = '';

View file

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

View file

@ -44,7 +44,7 @@ switch ($_REQUEST['action']) {
case 'validate': case 'validate':
$username = scrub_in($_GET['username']); $username = scrub_in($_GET['username']);
$validation = scrub_in($_GET['auth']); $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; break;
case 'add_user': case 'add_user':
/** /**
@ -123,7 +123,7 @@ switch ($_REQUEST['action']) {
// If we've hit an error anywhere up there break! // If we've hit an error anywhere up there break!
if (Error::occurred()) { 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; break;
} }
@ -148,7 +148,7 @@ switch ($_REQUEST['action']) {
if (!$new_user) { if (!$new_user) {
Error::add('duplicate_user', T_("Error: Insert Failed")); 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; break;
} }
@ -161,11 +161,11 @@ switch ($_REQUEST['action']) {
Registration::send_confirmation($username, $fullname, $email, $website, $pass1, $validation); 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; break;
case 'show_add_user': case 'show_add_user':
default: 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; break;
} // end switch on action } // end switch on action

View file

@ -31,15 +31,15 @@ switch ($_REQUEST['action']) {
case 'search': case 'search':
if ($_REQUEST['rule_1'] != 'missing_artist') { if ($_REQUEST['rule_1'] != 'missing_artist') {
$browse = new Browse(); $browse = new Browse();
require_once AmpConfig::get('prefix') . '/templates/show_search_form.inc.php'; require_once AmpConfig::get('prefix') . UI::find_template('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_options.inc.php');
$results = Search::run($_REQUEST); $results = Search::run($_REQUEST);
$browse->set_type($_REQUEST['type']); $browse->set_type($_REQUEST['type']);
$browse->show_objects($results); $browse->show_objects($results);
$browse->store(); $browse->store();
} else { } else {
$wartists = Wanted::search_missing_artists($_REQUEST['rule_1_input']); $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 />'; 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; break;
@ -56,10 +56,10 @@ switch ($_REQUEST['action']) {
case 'descriptor': case 'descriptor':
// This is a little special we don't want header/footers so trash what we've got in the OB // This is a little special we don't want header/footers so trash what we've got in the OB
ob_clean(); 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; exit;
default: 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; break;
} }

View file

@ -150,7 +150,7 @@ switch ($_REQUEST['action']) {
break; break;
case 'get_filters': case 'get_filters':
ob_start(); 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(); $results['browse_filters'] = ob_get_clean();
break; break;
case 'options': case 'options':

View file

@ -71,16 +71,16 @@ if (!Access::check('interface', $level) || AmpConfig::get('demo_mode')) {
switch ($_REQUEST['action']) { switch ($_REQUEST['action']) {
case 'show_edit_object': case 'show_edit_object':
ob_start(); 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(); $results = ob_get_contents();
break; break;
case 'refresh_updated': 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(); $results = ob_get_contents();
break; break;
case 'show_edit_playlist': case 'show_edit_playlist':
ob_start(); 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(); $results = ob_get_contents();
ob_end_clean(); ob_end_clean();
break; break;

View file

@ -33,7 +33,7 @@ switch ($_REQUEST['action']) {
$albums = Album::get_random(6); $albums = Album::get_random(6);
if (count($albums) AND is_array($albums)) { if (count($albums) AND is_array($albums)) {
ob_start(); 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(); $results['random_selection'] = ob_get_clean();
} else { } else {
$results['random_selection'] = '<!-- None found -->'; $results['random_selection'] = '<!-- None found -->';
@ -50,7 +50,7 @@ switch ($_REQUEST['action']) {
$videos = Video::get_random(6); $videos = Video::get_random(6);
if (count($videos) AND is_array($videos)) { if (count($videos) AND is_array($videos)) {
ob_start(); 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(); $results['random_video_selection'] = ob_get_clean();
} else { } else {
$results['random_video_selection'] = '<!-- None found -->'; $results['random_video_selection'] = '<!-- None found -->';
@ -66,7 +66,7 @@ switch ($_REQUEST['action']) {
$biography = Recommendation::get_artist_info(null, rawurldecode($_REQUEST['fullname'])); $biography = Recommendation::get_artist_info(null, rawurldecode($_REQUEST['fullname']));
} }
ob_start(); 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(); $results['artist_biography'] = ob_get_clean();
} }
break; break;
@ -86,7 +86,7 @@ switch ($_REQUEST['action']) {
} }
} }
ob_start(); 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(); $results['similar_artist'] = ob_get_clean();
} }
break; break;
@ -96,7 +96,7 @@ switch ($_REQUEST['action']) {
$artists = Recommendation::get_artists_like($_REQUEST['media_artist'], 3, false); $artists = Recommendation::get_artists_like($_REQUEST['media_artist'], 3, false);
$songs = Recommendation::get_songs_like($media_id, 3); $songs = Recommendation::get_songs_like($media_id, 3);
ob_start(); 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(); $results['similar_items_' . $media_id] = ob_get_clean();
} }
break; break;
@ -125,7 +125,7 @@ switch ($_REQUEST['action']) {
} }
} }
ob_start(); 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(); $results['concerts'] = ob_get_clean();
} }
break; break;
@ -144,7 +144,7 @@ switch ($_REQUEST['action']) {
$browse->save_objects($object_ids); $browse->save_objects($object_ids);
$browse->store(); $browse->store();
ob_start(); 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(); $results['labels'] = ob_get_clean();
} }
break; break;
@ -163,7 +163,7 @@ switch ($_REQUEST['action']) {
} }
ob_start(); 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(); $results['missing_albums'] = ob_get_clean();
} }
break; break;
@ -223,7 +223,7 @@ switch ($_REQUEST['action']) {
ob_start(); ob_start();
$data = Song::get_recently_played(); $data = Song::get_recently_played();
Song::build_cache(array_keys($data)); 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(); $results['recently_played'] = ob_get_clean();
break; break;
case 'sidebar': case 'sidebar':
@ -249,7 +249,7 @@ switch ($_REQUEST['action']) {
Ajax::set_include_override(true); Ajax::set_include_override(true);
ob_start(); ob_start();
$_SESSION['state']['sidebar_tab'] = $button; $_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(); $results['sidebar-content'] = ob_get_contents();
ob_end_clean(); ob_end_clean();
break; break;
@ -322,7 +322,7 @@ switch ($_REQUEST['action']) {
$browse->store(); $browse->store();
UI::show_box_top(T_('Songs'), 'info-box'); 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(); UI::show_box_bottom();
} }

View file

@ -44,7 +44,7 @@ switch ($_REQUEST['action']) {
// We should also refesh the sidebar // We should also refesh the sidebar
ob_start(); 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(); $results['sidebar-content'] = ob_get_contents();
ob_end_clean(); ob_end_clean();
break; break;
@ -77,7 +77,7 @@ switch ($_REQUEST['action']) {
// We actually want to refresh something here // We actually want to refresh something here
ob_start(); ob_start();
$objects = $localplay->get(); $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(); $results['localplay_status'] = ob_get_contents();
ob_end_clean(); ob_end_clean();
break; break;
@ -170,7 +170,7 @@ switch ($_REQUEST['action']) {
ob_start(); ob_start();
$objects = $localplay->get(); $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(); $results['localplay_status'] = ob_get_contents();
ob_end_clean(); ob_end_clean();
@ -189,7 +189,7 @@ switch ($_REQUEST['action']) {
ob_start(); ob_start();
$objects = $localplay->get(); $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(); $results['localplay_status'] = ob_get_contents();
ob_end_clean(); ob_end_clean();

View file

@ -32,7 +32,7 @@ $results = array();
switch ($_REQUEST['action']) { switch ($_REQUEST['action']) {
case 'show_broadcasts': case 'show_broadcasts':
ob_start(); 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(); $results = ob_get_contents();
ob_end_clean(); ob_end_clean();
echo $results; echo $results;

View file

@ -131,7 +131,7 @@ switch ($_REQUEST['action']) {
/*$playlist->format(); /*$playlist->format();
$object_ids = $playlist->get_items(); $object_ids = $playlist->get_items();
ob_start(); 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(); $results['content'] = ob_get_contents();
ob_end_clean();*/ ob_end_clean();*/
debug_event('playlist', 'Items added successfully!', '5'); debug_event('playlist', 'Items added successfully!', '5');

View file

@ -152,7 +152,7 @@ switch ($worker) {
foreach ($catalogs as $catalog_id) { foreach ($catalogs as $catalog_id) {
$catalog = Catalog::create_from_id($catalog_id); $catalog = Catalog::create_from_id($catalog_id);
if ($catalog !== null) { 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(); flush();
$catalog->gather_art(); $catalog->gather_art();
} }

View file

@ -109,7 +109,7 @@ switch ($_REQUEST['action']) {
if ( ($_REQUEST['playlist_method'] == 'clear' || AmpConfig::get('playlist_method') == 'clear')) { if ( ($_REQUEST['playlist_method'] == 'clear' || AmpConfig::get('playlist_method') == 'clear')) {
define('NO_SONGS','1'); define('NO_SONGS','1');
ob_start(); 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(); $results['rightbar'] = ob_get_clean();
} }

View file

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

View file

@ -80,7 +80,7 @@ switch ($_REQUEST['action']) {
$playlist = new Search($_REQUEST['playlist_id'], 'song'); $playlist = new Search($_REQUEST['playlist_id'], 'song');
$playlist->format(); $playlist->format();
$object_ids = $playlist->get_items(); $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; break;
case 'update_playlist': case 'update_playlist':
$playlist = new Search($_REQUEST['playlist_id'], 'song'); $playlist = new Search($_REQUEST['playlist_id'], 'song');
@ -93,11 +93,11 @@ switch ($_REQUEST['action']) {
break; break;
} }
$object_ids = $playlist->get_items(); $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; break;
default: default:
$object_ids = $playlist->get_items(); $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; break;
} // switch on the action } // switch on the action

View file

@ -63,14 +63,14 @@ switch ($_REQUEST['action']) {
$song->format(); $song->format();
$song->fill_ext_info(); $song->fill_ext_info();
$lyrics = $song->get_lyrics(); $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; break;
case 'show_song': case 'show_song':
default: default:
$song = new Song($_REQUEST['song_id']); $song = new Song($_REQUEST['song_id']);
$song->format(); $song->format();
$song->fill_ext_info(); $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; break;
} // end data collection } // end data collection

View file

@ -33,33 +33,33 @@ switch ($_REQUEST['action']) {
// Show a Users "Profile" page // Show a Users "Profile" page
case 'show_user': case 'show_user':
$client = new User($_REQUEST['user_id']); $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; break;
// Show stats // Show stats
case 'newest': 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; break;
case 'popular': 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; break;
case 'highest': 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; break;
case 'userflag': 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; break;
case 'recent': case 'recent':
$user_id = $_REQUEST['user_id']; $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; break;
case 'wanted': 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; break;
case 'share': 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; break;
case 'upload': 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; break;
case 'graph': case 'graph':
Graph::display_from_request(); Graph::display_from_request();
@ -67,7 +67,7 @@ switch ($_REQUEST['action']) {
case 'show': case 'show':
default: default:
if (Access::check('interface','50')) { 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; break;
} // end switch on action } // end switch on action

View file

@ -72,7 +72,7 @@
?> ?>
<div id="webplayer"></div> <div id="webplayer"></div>
<?php <?php
require_once AmpConfig::get('prefix') . '/templates/uberviz.inc.php'; require_once AmpConfig::get('prefix') . UI::find_template('uberviz.inc.php');
} }
?> ?>
</body> </body>

View file

@ -62,10 +62,10 @@ $_SESSION['login'] = false;
} ?> } ?>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?php echo AmpConfig::get('site_charset'); ?>" /> <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> <title><?php echo AmpConfig::get('site_title'); ?> - <?php echo $location['title']; ?></title>
<?php require_once AmpConfig::get('prefix') . '/templates/stylesheets.inc.php'; ?> <?php require_once AmpConfig::get('prefix') . UI::find_template('stylesheets.inc.php'); ?>
<link rel="stylesheet" href="<?php echo $web_path; ?>/templates/jquery-editdialog.css" type="text/css" media="screen" /> <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; ?>/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/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/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" /> <link rel="stylesheet" href="<?php echo $web_path; ?>/modules/rhinoslider/css/rhinoslider-1.05.css" type="text/css" media="screen" />
@ -115,7 +115,7 @@ $_SESSION['login'] = false;
<script src="<?php echo $web_path; <script src="<?php echo $web_path;
?>/lib/javascript/dynamicpage.js" language="javascript" type="text/javascript"></script> ?>/lib/javascript/dynamicpage.js" language="javascript" type="text/javascript"></script>
<?php <?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"> <script type="text/javascript">
function NavigateTo(url) function NavigateTo(url)
@ -334,10 +334,10 @@ $_SESSION['login'] = false;
</h1> </h1>
<div id="headerbox"> <div id="headerbox">
<?php UI::show_box_top('','box box_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 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"> <span id="loginInfo">
<a href="<?php echo $web_path; <a href="<?php echo $web_path;
@ -436,10 +436,10 @@ $_SESSION['login'] = false;
<div id="sidebar" class="sidebar-<?php echo AmpConfig::get('ui_fixed') ? 'fixed' : 'float'; ?>"> <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-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' : ''; ?>" > <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>
<div id="sidebar-content-light" class="<?php echo $isCollapsed ? 'sidebar-content-light-collapsed' : ''; ?>" > <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>
</div> </div>
<!-- Handle collapsed visibility --> <!-- Handle collapsed visibility -->
@ -477,7 +477,7 @@ $_SESSION['login'] = false;
</script> </script>
<div id="rightbar" class="rightbar-<?php echo AmpConfig::get('ui_fixed') ? 'fixed' : 'float'; ?> <?php echo $count_temp_playlist ? '' : 'hidden' ?>"> <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> </div>
<!-- Tiny little div, used to cheat the system --> <!-- Tiny little div, used to cheat the system -->

View file

@ -87,7 +87,7 @@
</ul> </ul>
<?php <?php
if (AmpConfig::get('play_type') == 'localplay') { 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"> <ul id="rb_current_playlist">

View file

@ -68,7 +68,7 @@ UI::show_box_top($boxtitle, 'box box_add_shout');
<?php <?php
$shouts = Shoutbox::get_shouts($object_type, $object->id); $shouts = Shoutbox::get_shouts($object_type, $object->id);
if (count($shouts)) { 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(); ?> <?php UI::show_box_bottom(); ?>

View file

@ -24,7 +24,7 @@ $web_path = AmpConfig::get('web_path');
$thcount = 8; $thcount = 8;
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="album"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="album">
<thead> <thead>
@ -101,7 +101,7 @@ $thcount = 8;
<tr id="album_<?php echo $libitem->id; <tr id="album_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class(); ?>" 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> </tr>
<?php <?php
@ -163,5 +163,5 @@ $thcount = 8;
<?php show_table_render(); ?> <?php show_table_render(); ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -26,7 +26,7 @@ $web_path = AmpConfig::get('web_path');
$thcount = 8; $thcount = 8;
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="artist"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="artist">
<thead> <thead>
@ -103,7 +103,7 @@ $thcount = 8;
<tr id="artist_<?php echo $libitem->id; <tr id="artist_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class(); ?>" 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> </tr>
<?php <?php
@ -165,5 +165,5 @@ $thcount = 8;
<?php show_table_render(); ?> <?php show_table_render(); ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -22,7 +22,7 @@
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="broadcast"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="broadcast">
<thead> <thead>
@ -44,7 +44,7 @@
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class();
?>" id="broadcast_row_<?php echo $libitem->id; ?>" 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> </tr>
<?php <?php
@ -62,5 +62,5 @@
</table> </table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -21,7 +21,7 @@
*/ */
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="catalog"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="catalog">
<thead> <thead>
@ -43,7 +43,7 @@
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class();
?>" id="catalog_<?php echo $libitem->id; ?>" 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> </tr>
<?php <?php
@ -72,5 +72,5 @@
</table> </table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -22,7 +22,7 @@
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="channel"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="channel">
<thead> <thead>
@ -53,7 +53,7 @@
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class();
?>" id="channel_row_<?php echo $libitem->id; ?>" 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> </tr>
<?php <?php
@ -71,5 +71,5 @@
</table> </table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -36,7 +36,7 @@
<tr id="concert_<?php echo $libitem->id; <tr id="concert_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class(); ?>" 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> </tr>
<?php <?php
@ -70,7 +70,7 @@
<tr id="concert_<?php echo $libitem->id; <tr id="concert_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class(); ?>" 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> </tr>
<?php <?php

View file

@ -23,7 +23,7 @@
$web_path = AmpConfig::get('web_path'); $web_path = AmpConfig::get('web_path');
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0"> <table class="tabledata" cellpadding="0" cellspacing="0">
<colgroup> <colgroup>
@ -162,5 +162,5 @@ $democratic = Democratic::get_current_playlist();
<?php show_table_render(); ?> <?php show_table_render(); ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; 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)) { if (empty($logo_url)) {
$logo_url = AmpConfig::get('web_path') . "/themes/reborn/images/ampache.png"; $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"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html lang="en-US"> <html lang="en-US">
@ -32,9 +34,9 @@ if (empty($logo_url)) {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ampache -- Debug Page</title> <title>Ampache -- Debug Page</title>
<?php UI::show_custom_style(); ?> <?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 $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 href="<?php echo $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 rel="stylesheet" href="<?php echo $web_path . UI::find_template('install-doped.css'); ?>" type="text/css" media="screen" />
</head> </head>
<body> <body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">

View file

@ -37,7 +37,7 @@ $video_type = strtolower(get_class($libitem));
</tr> </tr>
<?php <?php
if ($video_type != 'video') { 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> <tr>

View file

@ -21,5 +21,5 @@
*/ */
?> ?>
<?php UI::show_box_top(T_('Information')); ?> <?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(); ?> <?php UI::show_box_bottom(); ?>

View file

@ -5,7 +5,7 @@ if ($is_share) {
} }
if (!$iframed) { 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"> <script type="text/javascript">
@ -562,7 +562,7 @@ if ($isVideo) {
</div> </div>
<?php <?php
if (!$iframed || $is_share) { 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) { <?php if (!$is_share) {

View file

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

View file

@ -71,7 +71,7 @@ if (Art::is_enabled()) {
<?php <?php
$data = Song::get_recently_played(); $data = Song::get_recently_played();
Song::build_cache(array_keys($data)); 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> </div>
<?php <?php

View file

@ -35,7 +35,7 @@ $thcount = 6;
<?php <?php
} ?> } ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="label"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="label">
<thead> <thead>
@ -63,7 +63,7 @@ $thcount = 6;
<tr id="label_<?php echo $libitem->id; <tr id="label_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class(); ?>" 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> </tr>
<?php <?php
@ -97,5 +97,5 @@ $thcount = 6;
<?php show_table_render(); ?> <?php show_table_render(); ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -23,7 +23,7 @@
$web_path = AmpConfig::get('web_path'); $web_path = AmpConfig::get('web_path');
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="live_stream"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="live_stream">
<thead> <thead>
@ -44,7 +44,7 @@ $web_path = AmpConfig::get('web_path');
<tr id="live_stream_<?php echo $libitem->id; <tr id="live_stream_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class(); ?>" 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> </tr>
<?php <?php
@ -70,5 +70,5 @@ $web_path = AmpConfig::get('web_path');
</table> </table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::Get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -25,7 +25,7 @@ $localplay->connect();
$status = $localplay->status(); $status = $localplay->status();
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0"> <table class="tabledata" cellpadding="0" cellspacing="0">
<thead> <thead>
@ -80,5 +80,5 @@ $status = $localplay->status();
</tfoot> </tfoot>
</table> </table>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; 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')); $htmllang = str_replace("_","-",AmpConfig::get('lang'));
is_rtl(AmpConfig::get('lang')) ? $dir = 'rtl' : $dir = 'ltr'; is_rtl(AmpConfig::get('lang')) ? $dir = 'rtl' : $dir = 'ltr';
$web_path = AmpConfig::get('web_path');
$_SESSION['login'] = true; $_SESSION['login'] = true;
define('TABLE_RENDERED', 1); define('TABLE_RENDERED', 1);
@ -40,9 +42,9 @@ define('TABLE_RENDERED', 1);
<!-- Propulsed by Ampache | ampache.org --> <!-- Propulsed by Ampache | ampache.org -->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo AmpConfig::get('site_charset'); ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo AmpConfig::get('site_charset'); ?>" />
<?php UI::show_custom_style(); ?> <?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 $web_path . UI::find_template('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 $web_path . UI::find_template('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('dark.css'); ?>" type="text/css" media="screen" />
<title> <?php echo scrub_out(AmpConfig::get('site_title')); ?> </title> <title> <?php echo scrub_out(AmpConfig::get('site_title')); ?> </title>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
function focus(){ document.login.username.focus(); } function focus(){ document.login.username.focus(); }
@ -52,11 +54,11 @@ define('TABLE_RENDERED', 1);
<body id="loginPage" onload="focus();"> <body id="loginPage" onload="focus();">
<div id="maincontainer"> <div id="maincontainer">
<div id="header"><!-- This is the header --> <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>
<div id="loginbox"> <div id="loginbox">
<h2><?php echo scrub_out(AmpConfig::get('site_title')); ?></h2> <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"> <div class="loginfield" id="usernamefield">
<label for="username"><?php echo T_('Username'); ?>:</label> <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']); ?>" /> <input class="text_input" type="text" id="username" name="username" value="<?php echo scrub_out($_REQUEST['username']); ?>" />
@ -72,7 +74,7 @@ define('TABLE_RENDERED', 1);
<?php Error::display('general'); ?> <?php Error::display('general'); ?>
<div class="formValidation"> <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 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="referrer" value="<?php echo scrub_out($_SERVER['HTTP_REFERRER']); ?>" />
<input type="hidden" name="action" value="login" /> <input type="hidden" name="action" value="login" />

View file

@ -28,6 +28,8 @@ if (AmpConfig::get('session_length') >= AmpConfig::get('remember_length')) {
} }
$htmllang = str_replace("_","-",AmpConfig::get('lang')); $htmllang = str_replace("_","-",AmpConfig::get('lang'));
is_rtl(AmpConfig::get('lang')) ? $dir = 'rtl' : $dir = 'ltr'; 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"> <!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 --> <!-- Propulsed by Ampache | ampache.org -->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo AmpConfig::get('site_charset'); ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo AmpConfig::get('site_charset'); ?>" />
<?php UI::show_custom_style(); ?> <?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 $web_path . UI::find_template('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 $web_path . UI::find_template('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('dark.css'); ?>" type="text/css" media="screen" />
<title><?php echo scrub_out(AmpConfig::get('site_title')); ?></title> <title><?php echo scrub_out(AmpConfig::get('site_title')); ?></title>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
function focus() function focus()
@ -51,14 +53,14 @@ is_rtl(AmpConfig::get('lang')) ? $dir = 'rtl' : $dir = 'ltr';
<div id="maincontainer"> <div id="maincontainer">
<div id="header"><!-- This is the header --> <div id="header"><!-- This is the header -->
<h1 id="headerlogo"> <h1 id="headerlogo">
<a href="<?php echo AmpConfig::get('web_path'); ?>/login.php"> <a href="<?php echo $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'); ?>" /> <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> </a>
</h1> </h1>
</div> </div>
<div id="loginbox"> <div id="loginbox">
<h2><?php echo scrub_out(AmpConfig::get('site_title')); ?></h2> <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"> <div class="loginfield" id="emailfield">
<label for="email"><?php echo T_('Email'); ?>:</label> <label for="email"><?php echo T_('Email'); ?>:</label>
<input type="hidden" id="action" name="action" value="send" /> <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 = new License($license_id);
$libitem->format(); $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 <?php
} if (!count($object_ids)) { } if (!count($object_ids)) {

View file

@ -44,7 +44,7 @@ $web_path = AmpConfig::get('web_path');
$client = new User($libitem->user); $client = new User($libitem->user);
$client->format(); $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 <?php
} if (!count($object_ids)) { } if (!count($object_ids)) {

View file

@ -39,7 +39,7 @@
<tr id="walbum_<?php echo $libitem->mbid; <tr id="walbum_<?php echo $libitem->mbid;
?>" class="<?php echo UI::flip_class(); ?>" 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> </tr>
<?php <?php

View file

@ -21,5 +21,5 @@
*/ */
?> ?>
<?php UI::show_box_top(T_('Information')); ?> <?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(); ?> <?php UI::show_box_bottom(); ?>

View file

@ -50,9 +50,9 @@ foreach ($results as $item) {
<div class="np_row"> <div class="np_row">
<?php <?php
if (strtolower(get_class($media)) == 'song') { 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 { } 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> </div>

View file

@ -40,7 +40,7 @@
<tr id="object_row_<?php echo $object->id; <tr id="object_row_<?php echo $object->id;
?>" class="<?php echo UI::flip_class(); ?>" 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> </tr>
<?php <?php

View file

@ -28,7 +28,7 @@
?> ?>
<?php <?php
ob_start(); 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(); $title = ob_get_contents();
ob_end_clean(); ob_end_clean();
UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</div>', 'info-box'); UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</div>', 'info-box');

View file

@ -23,7 +23,7 @@
$web_path = AmpConfig::get('web_path'); $web_path = AmpConfig::get('web_path');
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<form method="post" id="reorder_playlist_<?php echo $playlist->id; ?>"> <form method="post" id="reorder_playlist_<?php echo $playlist->id; ?>">
<table id="reorder_playlist_table" class="tabledata" cellpadding="0" cellspacing="0"> <table id="reorder_playlist_table" class="tabledata" cellpadding="0" cellspacing="0">
@ -72,7 +72,7 @@ $web_path = AmpConfig::get('web_path');
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class();
?>" id="track_<?php echo $object['track_id']; ?>" 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> </tr>
<?php <?php
@ -113,5 +113,5 @@ $web_path = AmpConfig::get('web_path');
</form> </form>
<?php show_table_render($argument); ?> <?php show_table_render($argument); ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -21,7 +21,7 @@
*/ */
?> ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="playlist"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="playlist">
<thead> <thead>
@ -62,7 +62,7 @@
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class();
?>" id="playlist_row_<?php echo $libitem->id; ?>" 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> </tr>
<?php <?php
@ -109,5 +109,5 @@
</table> </table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

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

View file

@ -41,7 +41,7 @@ $thcount = 5;
</ul> </ul>
</div> </div>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="label"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="label">
<thead> <thead>
@ -64,7 +64,7 @@ $thcount = 5;
<tr id="label_<?php echo $libitem->id; <tr id="label_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class(); ?>" class="<?php echo UI::flip_class();
?> <?php echo (!$libitem->is_read) ? "unread" : "" ?>"> ?> <?php echo (!$libitem->is_read) ? "unread" : "" ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_pvmsg_row.inc.php'; <?php require AmpConfig::get('prefix') . UI::find_template('show_pvmsg_row.inc.php');
?> ?>
</tr> </tr>
<?php <?php
@ -94,5 +94,5 @@ $thcount = 5;
<?php show_table_render(); ?> <?php show_table_render(); ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -114,7 +114,7 @@
</tr> </tr>
</table> </table>
<?php require AmpConfig::get('prefix') . '/templates/show_rules.inc.php'; ?> <?php require AmpConfig::get('prefix') . UI::find_template('show_rules.inc.php'); ?>
<div class="formValidation"> <div class="formValidation">
<input type="submit" value="<?php echo T_('Enqueue'); ?>" /> <input type="submit" value="<?php echo T_('Enqueue'); ?>" />

View file

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

View file

@ -69,7 +69,7 @@ $thcount = 8;
<tr id="artist_<?php echo $libitem->id; <tr id="artist_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class(); ?>" 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> </tr>
<?php <?php

View file

@ -31,15 +31,15 @@ $_SESSION['login'] = true;
<!-- Propulsed by Ampache | ampache.org --> <!-- Propulsed by Ampache | ampache.org -->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo AmpConfig::get('site_charset'); ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo AmpConfig::get('site_charset'); ?>" />
<title><?php echo AmpConfig::get('site_title'); ?> - <?php echo T_('Registration'); ?></title> <title><?php echo AmpConfig::get('site_title'); ?> - <?php echo T_('Registration'); ?></title>
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/templates/print.css" type="text/css" media="print" /> <link rel="stylesheet" href="<?php echo $web_path . UI::find_template('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 $web_path . UI::find_template('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('dark.css'); ?>" type="text/css" media="screen" />
<?php UI::show_custom_style(); ?> <?php UI::show_custom_style(); ?>
</head> </head>
<body id="registerPage"> <body id="registerPage">
<div id="maincontainer"> <div id="maincontainer">
<div id="header"> <div id="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>
<span><?php echo T_('Registration Complete'); ?>.</span> <span><?php echo T_('Registration Complete'); ?>.</span>
</div> </div>
<script src="<?php echo $web_path; ?>/modules/jquery/jquery.min.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/modules/jquery/jquery.min.js" language="javascript" type="text/javascript"></script>
@ -55,7 +55,7 @@ $_SESSION['login'] = true;
} }
?> ?>
<br /><br /> <br /><br />
<a href="<?php echo AmpConfig::get('web_path'); ?>/login.php"><?php echo T_('Return to Login Page'); ?></a> <a href="<?php echo $web_path; ?>/login.php"><?php echo T_('Return to Login Page'); ?></a>
<p><?php echo AmpConfig::get('site_title'); ?></p> <p><?php echo AmpConfig::get('site_title'); ?></p>
</div> </div>
</div> </div>

View file

@ -22,7 +22,7 @@
?> ?>
<?php <?php
ob_start(); ob_start();
require AmpConfig::get('prefix') . '/templates/show_search_title.inc.php'; require AmpConfig::get('prefix') . UI::find_template('show_search_title.inc.php');
$title = ob_get_contents(); $title = ob_get_contents();
ob_end_clean(); ob_end_clean();
UI::show_box_top('<div id="smartplaylist_row_' . $playlist->id . '">' . $title . '</div>' , 'box box_smartplaylist'); UI::show_box_top('<div id="smartplaylist_row_' . $playlist->id . '">' . $title . '</div>' , 'box box_smartplaylist');
@ -63,7 +63,7 @@ UI::show_box_top('<div id="smartplaylist_row_' . $playlist->id . '">' . $title .
</div> </div>
<form id="editplaylist" name="editplaylist" method="post" action="<?php echo AmpConfig::get('web_path'); ?>/smartplaylist.php?action=update_playlist&playlist_id=<?php echo $playlist->id; ?>" enctype="multipart/form-data" style="Display:inline"> <form id="editplaylist" name="editplaylist" method="post" action="<?php echo AmpConfig::get('web_path'); ?>/smartplaylist.php?action=update_playlist&playlist_id=<?php echo $playlist->id; ?>" enctype="multipart/form-data" style="Display:inline">
<?php require AmpConfig::get('prefix') . '/templates/show_rules.inc.php'; ?> <?php require AmpConfig::get('prefix') . UI::find_template('show_rules.inc.php'); ?>
<div class="formValidation"> <div class="formValidation">
<input class="button" type="submit" value="<?php echo T_('Save Changes'); ?>" /> <input class="button" type="submit" value="<?php echo T_('Save Changes'); ?>" />
</div> </div>

View file

@ -79,7 +79,7 @@ UI::show_box_top(T_('Search Ampache') . "...", 'box box_advanced_search');
</tr> </tr>
</table> </table>
<?php require AmpConfig::get('prefix') . '/templates/show_rules.inc.php'; ?> <?php require AmpConfig::get('prefix') . UI::find_template('show_rules.inc.php'); ?>
<div class="formValidation"> <div class="formValidation">
<input class="button" type="submit" value="<?php echo T_('Search'); ?>" />&nbsp;&nbsp; <input class="button" type="submit" value="<?php echo T_('Search'); ?>" />&nbsp;&nbsp;

View file

@ -36,7 +36,7 @@
</ul> </ul>
</div> </div>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="smartplaylist"> <table class="tabledata" cellpadding="0" cellspacing="0" data-objecttype="smartplaylist">
<thead> <thead>
@ -60,7 +60,7 @@
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class();
?>" id="smartplaylist_row_<?php echo $libitem->id; ?>" id="smartplaylist_row_<?php echo $libitem->id;
?>"> ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_search_row.inc.php'; <?php require AmpConfig::get('prefix') . UI::find_template('show_search_row.inc.php');
?> ?>
</tr> </tr>
<?php <?php
@ -90,5 +90,5 @@
</table> </table>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; require AmpConfig::get('prefix') . UI::find_template('list_header.inc.php');
} ?> } ?>

View file

@ -25,7 +25,7 @@ $embed = $_REQUEST['embed'];
$is_share = true; $is_share = true;
$playlist = $share->create_fake_playlist(); $playlist = $share->create_fake_playlist();
require AmpConfig::get('prefix') . '/templates/show_web_player.inc.php'; require AmpConfig::get('prefix') . UI::find_template('show_web_player.inc.php');
if (empty($embed)) { if (empty($embed)) {
echo "<a href='" . $share->public_url . "'>" .T_('Shared by') . ' ' . $share->f_user . "</a><br />"; echo "<a href='" . $share->public_url . "'>" .T_('Shared by') . ' ' . $share->f_user . "</a><br />";

View file

@ -46,7 +46,7 @@
<tr id="share_<?php echo $libitem->id; <tr id="share_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class(); ?>" class="<?php echo UI::flip_class();
?>"> ?>">
<?php require AmpConfig::get('prefix') . '/templates/show_share_row.inc.php'; <?php require AmpConfig::get('prefix') . UI::find_template('show_share_row.inc.php');
?> ?>
</tr> </tr>
<?php <?php

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