1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00

code formatting with php-cs-fixer

I let php-cs-fixer format the code.. seems that they worked on it so the
most ugly line breaks are gone.

And hopefully we Travis won't get angry any more.

:-)
This commit is contained in:
Manuel 2016-08-07 02:13:33 +02:00
parent b1a4eed28f
commit 9399312faa
140 changed files with 1368 additions and 3104 deletions

View file

@ -752,10 +752,8 @@ function show_table_render($render = false, $force = false)
{ {
// Include table render javascript only once // Include table render javascript only once
if ($force || !defined('TABLE_RENDERED')) { if ($force || !defined('TABLE_RENDERED')) {
define('TABLE_RENDERED', 1); define('TABLE_RENDERED', 1); ?>
?> <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 (isset($render) && $render) { <?php if (isset($render) && $render) {
?> ?>
<script language="javascript" type="text/javascript">sortPlaylistRender();</script> <script language="javascript" type="text/javascript">sortPlaylistRender();</script>

View file

@ -172,8 +172,7 @@ switch ($plexact) {
<input type="hidden" name="plexact" value="auth_myplex" /> <input type="hidden" name="plexact" value="auth_myplex" />
<div class="field"> <div class="field">
<label for="myplex_username">myPlex Username:</label> <label for="myplex_username">myPlex Username:</label>
<input type="text" id="myplex_username" class="field_value" name="myplex_username" value="<?php echo $myplex_username; <input type="text" id="myplex_username" class="field_value" name="myplex_username" value="<?php echo $myplex_username; ?>" />
?>" />
</div> </div>
<div class="field"> <div class="field">
<label for="myplex_password">myPlex Password:</label> <label for="myplex_password">myPlex Password:</label>
@ -181,19 +180,16 @@ switch ($plexact) {
</div> </div>
<div class="field"> <div class="field">
<label for="plex_public_port">Public Server Port (optional):</label> <label for="plex_public_port">Public Server Port (optional):</label>
<input type="text" id="plex_public_port" class="field_value" name="plex_public_port" value="<?php echo $plex_public_port; <input type="text" id="plex_public_port" class="field_value" name="plex_public_port" value="<?php echo $plex_public_port; ?>" />
?>" />
</div> </div>
<?php if ($plex_local_port != 32400) { <?php if ($plex_local_port != 32400) {
?> ?>
<div style="color: orange;"> <div style="color: orange;">
Plex servers should locally listen on port 32400. Current local listing port for your Plex backend is <?php echo $plex_local_port; Plex servers should locally listen on port 32400. Current local listing port for your Plex backend is <?php echo $plex_local_port; ?>. Ampache applies a small URI `hack` to work with custom port
?>. Ampache applies a small URI `hack` to work with custom port
as Plex server, but be aware that this will not work with all clients. as Plex server, but be aware that this will not work with all clients.
</div> </div>
<?php <?php
} } ?>
?>
<div class="formbuttons"> <div class="formbuttons">
<input type="submit" value="Auth/Publish" /> <input type="submit" value="Auth/Publish" />
</div> </div>
@ -205,11 +201,8 @@ switch ($plexact) {
<div class="configform"> <div class="configform">
<h3>myPlex authentication / server publish</h3> <h3>myPlex authentication / server publish</h3>
<form action="" method="POST" enctype="multipart/form-data"> <form action="" method="POST" enctype="multipart/form-data">
<label>myPlex user: <b><?php echo $myplex_username; <label>myPlex user: <b><?php echo $myplex_username; ?></b></label><br />
?></b></label><br /> <label>Public server address: <b><?php echo $plex_public_address; ?>:<?php echo $plex_public_port; ?></b></label>
<label>Public server address: <b><?php echo $plex_public_address;
?>:<?php echo $plex_public_port;
?></b></label>
<input type="hidden" name="plexact" value="unauth_myplex" /> <input type="hidden" name="plexact" value="unauth_myplex" />
<div class="formbuttons"> <div class="formbuttons">
<input type="submit" value="Unregister" /> <input type="submit" value="Unregister" />

View file

@ -32,83 +32,61 @@ if (!Core::is_session_started()) {
<?php if (in_array('starts_with', $allowed_filters)) { <?php if (in_array('starts_with', $allowed_filters)) {
?> ?>
<form id="multi_alpha_filter_form" action="javascript:void(0);"> <form id="multi_alpha_filter_form" action="javascript:void(0);">
<label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo T_('Starts With'); <label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo T_('Starts With'); ?></label>
?></label>
<input type="text" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php $browse->set_catalog($_SESSION['catalog']); <input type="text" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php $browse->set_catalog($_SESSION['catalog']);
echo scrub_out($browse->get_filter('starts_with')); echo scrub_out($browse->get_filter('starts_with')); ?>" onKeyUp="delayRun(this, '400', 'ajaxState', '<?php echo Ajax::url('?page=browse&action=browse&browse_id=' . $browse->id . '&key=starts_with'); ?>', 'multi_alpha_filter');">
?>" onKeyUp="delayRun(this, '400', 'ajaxState', '<?php echo Ajax::url('?page=browse&action=browse&browse_id=' . $browse->id . '&key=starts_with');
?>', 'multi_alpha_filter');">
</form> </form>
<?php <?php
} // end if alpha_match ?> } // end if alpha_match ?>
<?php if (in_array('minimum_count', $allowed_filters)) { <?php if (in_array('minimum_count', $allowed_filters)) {
?> ?>
<input id="mincountCB" type="checkbox" value="1" /> <input id="mincountCB" type="checkbox" value="1" />
<label id="mincountLabel" for="mincountCB"><?php echo T_('Minimum Count'); <label id="mincountLabel" for="mincountCB"><?php echo T_('Minimum Count'); ?></label><br />
?></label><br /> <?php echo Ajax::observe('mincountCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=min_count&value=1', '')); ?>
<?php echo Ajax::observe('mincountCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=min_count&value=1', ''));
?>
<?php <?php
} ?> } ?>
<?php if (in_array('rated', $allowed_filters)) { <?php if (in_array('rated', $allowed_filters)) {
?> ?>
<input id="ratedCB" type="checkbox" value="1" /> <input id="ratedCB" type="checkbox" value="1" />
<label id="ratedLabel" for="ratedCB"><?php echo T_('Rated'); <label id="ratedLabel" for="ratedCB"><?php echo T_('Rated'); ?></label><br />
?></label><br /> <?php echo Ajax::observe('ratedCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=rated&value=1', '')); ?>
<?php echo Ajax::observe('ratedCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=rated&value=1', ''));
?>
<?php <?php
} ?> } ?>
<?php if (in_array('unplayed', $allowed_filters)) { <?php if (in_array('unplayed', $allowed_filters)) {
?> ?>
<input id="unplayedCB" type="checkbox" <?php echo $string = $browse->get_filter('unplayed') ? 'checked="checked"' : ''; <input id="unplayedCB" type="checkbox" <?php echo $string = $browse->get_filter('unplayed') ? 'checked="checked"' : ''; ?>/>
?>/> <label id="unplayedLabel" for="unplayedCB"><?php echo T_('Unplayed'); ?></label><br />
<label id="unplayedLabel" for="unplayedCB"><?php echo T_('Unplayed');
?></label><br />
<?php <?php
} ?> } ?>
<?php if (in_array('playlist_type', $allowed_filters)) { <?php if (in_array('playlist_type', $allowed_filters)) {
?> ?>
<input id="show_allplCB" type="checkbox" <?php echo $string = $browse->get_filter('playlist_type') ? 'checked="checked"' : ''; <input id="show_allplCB" type="checkbox" <?php echo $string = $browse->get_filter('playlist_type') ? 'checked="checked"' : ''; ?>/>
?>/> <label id="show_allplLabel" for="showallplCB"><?php echo T_('All Playlists'); ?></label><br />
<label id="show_allplLabel" for="showallplCB"><?php echo T_('All Playlists'); <?php echo Ajax::observe('show_allplCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=playlist_type&value=1', '')); ?>
?></label><br />
<?php echo Ajax::observe('show_allplCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=playlist_type&value=1', ''));
?>
<?php <?php
} // if playlist_type ?> } // if playlist_type ?>
<?php if (in_array('object_type', $allowed_filters)) { <?php if (in_array('object_type', $allowed_filters)) {
?> ?>
<?php $string = 'otype_' . $browse->get_filter('object_type'); <?php $string = 'otype_' . $browse->get_filter('object_type');
${$string} = 'selected="selected"'; ${$string} = 'selected="selected"'; ?>
?> <input id="typeSongRadio" type="radio" name="object_type" value="1" <?php echo $otype_song; ?>/>
<input id="typeSongRadio" type="radio" name="object_type" value="1" <?php echo $otype_song; <label id="typeSongLabel" for="typeSongRadio"><?php echo T_('Song Title'); ?></label><br />
?>/> <?php echo Ajax::observe('typeSongRadio', 'click', Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=song', '')); ?>
<label id="typeSongLabel" for="typeSongRadio"><?php echo T_('Song Title');
?></label><br />
<?php echo Ajax::observe('typeSongRadio', 'click', Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=song', ''));
?>
<input id="typeAlbumRadio" type="radio" name="object_type" value="1" /> <input id="typeAlbumRadio" type="radio" name="object_type" value="1" />
<label id="typeAlbumLabel" for="typeAlbumRadio"><?php echo T_('Albums'); <label id="typeAlbumLabel" for="typeAlbumRadio"><?php echo T_('Albums'); ?></label><br />
?></label><br /> <?php echo Ajax::observe('typeAlbumRadio', 'click', Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=album', '')); ?>
<?php echo Ajax::observe('typeAlbumRadio', 'click', Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=album', ''));
?>
<input id="typeArtistRadio" type="radio" name="object_type" value="1" /> <input id="typeArtistRadio" type="radio" name="object_type" value="1" />
<label id="typeArtistLabel" for="typeArtistRadio"><?php echo T_('Artist'); <label id="typeArtistLabel" for="typeArtistRadio"><?php echo T_('Artist'); ?></label><br />
?></label><br /> <?php echo Ajax::observe('typeArtistRadio', 'click', Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=artist', '')); ?>
<?php echo Ajax::observe('typeArtistRadio', 'click', Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=artist', ''));
?>
<?php <?php
} ?> } ?>
<?php if (in_array('catalog', $allowed_filters)) { <?php if (in_array('catalog', $allowed_filters)) {
?> ?>
<form method="post" id="catalog_choice" action="javascript.void(0);"> <form method="post" id="catalog_choice" action="javascript.void(0);">
<label id="catalogLabel" for="catalog_select"><?php echo T_('Catalog'); <label id="catalogLabel" for="catalog_select"><?php echo T_('Catalog'); ?></label><br />
?></label><br />
<select id="catalog_select" name="catalog_key"> <select id="catalog_select" name="catalog_key">
<option value="0"><?php echo T_('All'); <option value="0"><?php echo T_('All'); ?></option>
?></option>
<?php <?php
$sql = 'SELECT `id`,`name` FROM `catalog`'; $sql = 'SELECT `id`,`name` FROM `catalog`';
$db_results = Dba::read($sql); $db_results = Dba::read($sql);
@ -122,22 +100,17 @@ if (!Core::is_session_started()) {
echo ' selected="selected" '; echo ' selected="selected" ';
} }
echo '>' . $entries['name'] . '</options>'; echo '>' . $entries['name'] . '</options>';
} } ?>
?>
</select> </select>
<?php echo Ajax::observe('catalog_select', 'change', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id, 'catalog_select', 'catalog_choice')); <?php echo Ajax::observe('catalog_select', 'change', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id, 'catalog_select', 'catalog_choice')); ?>
?>
</form> </form>
<?php <?php
} ?> } ?>
<?php if (in_array('show_art', $allowed_filters)) { <?php if (in_array('show_art', $allowed_filters)) {
?> ?>
<?php echo T_('Toggle Artwork'); <?php echo T_('Toggle Artwork'); ?>&nbsp;<input id="show_artCB" type="checkbox" <?php echo Art::is_enabled() ? 'checked="checked"' : ''; ?>/>
?>&nbsp;<input id="show_artCB" type="checkbox" <?php echo Art::is_enabled() ? 'checked="checked"' : ''; <?php echo Ajax::observe('show_artCB', 'click', Ajax::action('?page=browse&action=show_art&browse_id=' . $browse->id, '')); ?>
?>/>
<?php echo Ajax::observe('show_artCB', 'click', Ajax::action('?page=browse&action=show_art&browse_id=' . $browse->id, ''));
?>
<?php <?php
} // if show_art ?> } // if show_art ?>
</div> </div>

View file

@ -37,8 +37,7 @@
<div id="footer" class="<?php echo(($count_temp_playlist || AmpConfig::get('play_type') == 'localplay') ? '' : 'footer-wild'); ?>"> <div id="footer" class="<?php echo(($count_temp_playlist || AmpConfig::get('play_type') == 'localplay') ? '' : 'footer-wild'); ?>">
<?php if (AmpConfig::get('show_donate')) { <?php if (AmpConfig::get('show_donate')) {
?> ?>
<a id="donate" href="//ampache.github.io/donate.html" title="Donate" target="_blank"><?php echo ".:: " . T_('Donate') . " ::."; <a id="donate" href="//ampache.github.io/donate.html" title="Donate" target="_blank"><?php echo ".:: " . T_('Donate') . " ::."; ?></a> |
?></a> |
<?php <?php
} ?> } ?>
<?php <?php
@ -46,25 +45,17 @@
echo AmpConfig::get('custom_text_footer'); echo AmpConfig::get('custom_text_footer');
} else { } else {
?> ?>
<a id="ampache_link" href="https://github.com/ampache/ampache#readme" target="_blank" title="Copyright © 2001 - 2015 Ampache.org">Ampache <?php echo AmpConfig::get('version'); <a id="ampache_link" href="https://github.com/ampache/ampache#readme" target="_blank" title="Copyright © 2001 - 2015 Ampache.org">Ampache <?php echo AmpConfig::get('version'); ?></a>
?></a>
<?php <?php
} ?> } ?>
<?php if (AmpConfig::get('show_footer_statistics')) { <?php if (AmpConfig::get('show_footer_statistics')) {
?> ?>
<br /> <br />
<?php echo T_('Queries:'); <?php echo T_('Queries:'); ?><?php echo Dba::$stats['query']; ?> <?php echo T_('Cache Hits:'); ?><?php echo database_object::$cache_hit; ?>
?><?php echo Dba::$stats['query'];
?> <?php echo T_('Cache Hits:');
?><?php echo database_object::$cache_hit;
?>
<?php <?php
$load_time_end = microtime(true); $load_time_end = microtime(true);
$load_time = number_format(($load_time_end - AmpConfig::get('load_time_begin')), 4); $load_time = number_format(($load_time_end - AmpConfig::get('load_time_begin')), 4); ?>
?> | <?php echo T_('Load time:'); ?><?php echo $load_time; ?>
| <?php echo T_('Load time:');
?><?php echo $load_time;
?>
<?php <?php
} ?> } ?>
</div> </div>

View file

@ -37,26 +37,15 @@ $_SESSION['login'] = false;
<link rel="search" type="application/opensearchdescription+xml" title="<?php echo scrub_out(AmpConfig::get('site_title')); ?>" href="<?php echo $web_path; ?>/search.php?action=descriptor" /> <link rel="search" type="application/opensearchdescription+xml" title="<?php echo scrub_out(AmpConfig::get('site_title')); ?>" href="<?php echo $web_path; ?>/search.php?action=descriptor" />
<?php if (AmpConfig::get('use_rss')) { <?php if (AmpConfig::get('use_rss')) {
?> ?>
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Now Playing'); <link rel="alternate" type="application/rss+xml" title="<?php echo T_('Now Playing'); ?>" href="<?php echo $web_path; ?>/rss.php" />
?>" href="<?php echo $web_path; <link rel="alternate" type="application/rss+xml" title="<?php echo T_('Recently Played'); ?>" href="<?php echo $web_path; ?>/rss.php?type=recently_played" />
?>/rss.php" /> <link rel="alternate" type="application/rss+xml" title="<?php echo T_('Newest Albums'); ?>" href="<?php echo $web_path; ?>/rss.php?type=latest_album" />
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Recently Played'); <link rel="alternate" type="application/rss+xml" title="<?php echo T_('Newest Artists'); ?>" href="<?php echo $web_path; ?>/rss.php?type=latest_artist" />
?>" href="<?php echo $web_path;
?>/rss.php?type=recently_played" />
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Newest Albums');
?>" href="<?php echo $web_path;
?>/rss.php?type=latest_album" />
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Newest Artists');
?>" href="<?php echo $web_path;
?>/rss.php?type=latest_artist" />
<?php if (AmpConfig::get('sociable')) { <?php if (AmpConfig::get('sociable')) {
?> ?>
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Newest Shouts'); <link rel="alternate" type="application/rss+xml" title="<?php echo T_('Newest Shouts'); ?>" href="<?php echo $web_path; ?>/rss.php?type=latest_shout" />
?>" href="<?php echo $web_path;
?>/rss.php?type=latest_shout" />
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<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'); ?>" />
@ -111,13 +100,10 @@ $_SESSION['login'] = false;
<?php <?php
if (AmpConfig::get('ajax_load')) { if (AmpConfig::get('ajax_load')) {
$iframed = true; $iframed = true; ?>
?> <script src="<?php echo $web_path; ?>/lib/javascript/dynamicpage.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path;
?>/lib/javascript/dynamicpage.js" language="javascript" type="text/javascript"></script>
<?php <?php
require_once AmpConfig::get('prefix') . UI::find_template('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)
{ {
@ -310,8 +296,7 @@ $_SESSION['login'] = false;
?> ?>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
noty({text: '<?php printf(json_encode(nl2br(/* HINT: Translator, "%s" is replaced by "cookie settings" */T_("We have placed cookies on your computer to help make this website better. You can change your %s at any time.\nOtherwise, we will assume you are OK to continue.\n\nClick on this message to not display it again."))), noty({text: '<?php printf(json_encode(nl2br(/* HINT: Translator, "%s" is replaced by "cookie settings" */T_("We have placed cookies on your computer to help make this website better. You can change your %s at any time.\nOtherwise, we will assume you are OK to continue.\n\nClick on this message to not display it again."))),
"<a href=\"" . AmpConfig::get('web_path') . "/cookie_disclaimer.php\">" . T_('cookie settings') . "</a>"); "<a href=\"" . AmpConfig::get('web_path') . "/cookie_disclaimer.php\">" . T_('cookie settings') . "</a>"); ?>',
?>',
type: 'warning', type: 'warning',
layout: 'bottom', layout: 'bottom',
timeout: false, timeout: false,
@ -370,41 +355,26 @@ $_SESSION['login'] = false;
<?php require_once AmpConfig::get('prefix') . UI::find_template('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') . UI::find_template('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; ?>/stats.php?action=show_user&user_id=<?php echo $GLOBALS['user']->id; ?>"><?php echo $GLOBALS['user']->fullname; ?></a>
?>/stats.php?action=show_user&user_id=<?php echo $GLOBALS['user']->id;
?>"><?php echo $GLOBALS['user']->fullname;
?></a>
<?php if (AmpConfig::get('sociable')) { <?php if (AmpConfig::get('sociable')) {
?> ?>
<a href="<?php echo $web_path; <a href="<?php echo $web_path; ?>/browse.php?action=pvmsg" title="<?php echo T_('New messages'); ?>">(<?php echo count(PrivateMsg::get_private_msgs($GLOBALS['user']->id, true)); ?>)</a>
?>/browse.php?action=pvmsg" title="<?php echo T_('New messages');
?>">(<?php echo count(PrivateMsg::get_private_msgs($GLOBALS['user']->id, true));
?>)</a>
<?php <?php
} } ?>
?> <a rel="nohtml" href="<?php echo $web_path; ?>/logout.php">[<?php echo T_('Log out'); ?>]</a>
<a rel="nohtml" href="<?php echo $web_path;
?>/logout.php">[<?php echo T_('Log out');
?>]</a>
</span> </span>
<?php <?php
} else { } else {
?> ?>
<span id="loginInfo"> <span id="loginInfo">
<a href="<?php echo $web_path; <a href="<?php echo $web_path; ?>/login.php" rel="nohtml"><?php echo T_('Login'); ?></a>
?>/login.php" rel="nohtml"><?php echo T_('Login');
?></a>
<?php if (AmpConfig::get('allow_public_registration')) { <?php if (AmpConfig::get('allow_public_registration')) {
?> ?>
/ <a href="<?php echo $web_path; / <a href="<?php echo $web_path; ?>/register.php" rel="nohtml"><?php echo T_('Register'); ?></a>
?>/register.php" rel="nohtml"><?php echo T_('Register');
?></a>
<?php <?php
} } ?>
?>
</span> </span>
<?php <?php
} ?> } ?>
@ -415,8 +385,7 @@ $_SESSION['login'] = false;
<?php if (AmpConfig::get('topmenu')) { <?php if (AmpConfig::get('topmenu')) {
?> ?>
<div id="topmenu_container" class="topmenu_container-<?php echo AmpConfig::get('ui_fixed') ? 'fixed' : 'float'; <div id="topmenu_container" class="topmenu_container-<?php echo AmpConfig::get('ui_fixed') ? 'fixed' : 'float'; ?>">
?>">
<div id="topmenu_item"> <div id="topmenu_item">
<a href="<?php echo $web_path ?>/index.php"> <a href="<?php echo $web_path ?>/index.php">
<img src="<?php echo $web_path ?>/images/topmenu-home.png" /> <img src="<?php echo $web_path ?>/images/topmenu-home.png" />
@ -450,8 +419,7 @@ $_SESSION['login'] = false;
</a> </a>
</div> </div>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('allow_upload') && Access::check('interface', '25')) { <?php if (AmpConfig::get('allow_upload') && Access::check('interface', '25')) {
?> ?>
<div id="topmenu_item"> <div id="topmenu_item">
@ -461,8 +429,7 @@ $_SESSION['login'] = false;
</a> </a>
</div> </div>
<?php <?php
} } ?>
?>
</div> </div>
<?php <?php
} ?> } ?>
@ -533,15 +500,10 @@ $_SESSION['login'] = false;
if (AmpConfig::get('int_config_version') != AmpConfig::get('config_version')) { if (AmpConfig::get('int_config_version') != AmpConfig::get('config_version')) {
?> ?>
<div class="fatalerror"> <div class="fatalerror">
<?php echo T_('Error: Your config file is out of date!'); <?php echo T_('Error: Your config file is out of date!'); ?>
?>
<br /> <br />
<a rel="nohtml" href="<?php echo $web_path; <a rel="nohtml" href="<?php echo $web_path; ?>/admin/system.php?action=generate_config"><?php echo T_('Generate and download new config file'); ?></a> |
?>/admin/system.php?action=generate_config"><?php echo T_('Generate and download new config file'); <a rel="nohtml" href="<?php echo $web_path; ?>/admin/system.php?action=write_config"><?php echo T_('Write new config file to disk'); ?></a>
?></a> |
<a rel="nohtml" href="<?php echo $web_path;
?>/admin/system.php?action=write_config"><?php echo T_('Write new config file to disk');
?></a>
</div> </div>
<?php <?php

View file

@ -48,13 +48,11 @@ $sides = 0;
?> ?>
<?php if (!$browse->get_use_pages() && !$is_header) { <?php if (!$browse->get_use_pages() && !$is_header) {
?> ?>
<?php $this->show_next_link(); <?php $this->show_next_link(); ?>
?>
</p> </p>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$('#browse_<?php echo $browse->id; $('#browse_<?php echo $browse->id; ?>_scroll').jscroll({
?>_scroll').jscroll({
autoTrigger: true, autoTrigger: true,
nextSelector: 'a.jscroll-next:last', nextSelector: 'a.jscroll-next:last',
autoTriggerUntil: 5, autoTriggerUntil: 5,
@ -102,8 +100,7 @@ if ($limit > 0 && $total > $limit) {
$value = '<b>' . $value . '</b>'; $value = '<b>' . $value . '</b>';
} }
echo Ajax::text('?page=browse&action=browse&browse_id=' . $browse->id . '&key=regex_match&multi_alpha_filter=' . $filter . $argument_param, $value, 'browse_' . $uid . '_alpha_' . $key, ''); echo Ajax::text('?page=browse&action=browse&browse_id=' . $browse->id . '&key=regex_match&multi_alpha_filter=' . $filter . $argument_param, $value, 'browse_' . $uid . '_alpha_' . $key, '');
} } ?>
?>
</div> </div>
<?php <?php
} ?> } ?>
@ -116,26 +113,15 @@ if ($limit > 0 && $total > $limit) {
if ($browse->get_use_pages()) { if ($browse->get_use_pages()) {
?> ?>
<span class="list-header-navmenu-border"> <span class="list-header-navmenu-border">
<span><?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=' . $prev_offset . '&browse_uid=' . $uid . $argument_param, T_('Prev'), 'browse_' . $uid . 'prev', '', 'prev'); <span><?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=' . $prev_offset . '&browse_uid=' . $uid . $argument_param, T_('Prev'), 'browse_' . $uid . 'prev', '', 'prev'); ?></span>
?></span>
&nbsp; &nbsp;
<?php echo '&nbsp;' . T_('Page') . ':'; <?php echo '&nbsp;' . T_('Page') . ':'; ?>
?> <input class="list-header-navmenu-input" type="text" id="browse_<?php echo $browse->id; ?>_custom_value_<?php echo $is_header; ?>" class="browse_custom_value" name="value" value="<?php echo($current_page + 1); ?>" onKeyUp="delayRun(this, '750', 'ajaxState', '<?php echo Ajax::url('?page=browse&action=options&browse_id=' . $browse->id . '&option=custom' . $argument_param); ?>', 'browse_<?php echo $browse->id; ?>_custom_value_<?php echo $is_header; ?>');">
<input class="list-header-navmenu-input" type="text" id="browse_<?php echo $browse->id; <?php echo T_('of') . '&nbsp;' . $pages; ?>
?>_custom_value_<?php echo $is_header;
?>" class="browse_custom_value" name="value" value="<?php echo($current_page + 1);
?>" onKeyUp="delayRun(this, '750', 'ajaxState', '<?php echo Ajax::url('?page=browse&action=options&browse_id=' . $browse->id . '&option=custom' . $argument_param);
?>', 'browse_<?php echo $browse->id;
?>_custom_value_<?php echo $is_header;
?>');">
<?php echo T_('of') . '&nbsp;' . $pages;
?>
&nbsp; &nbsp;
<span><?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=' . $next_offset . '&browse_uid=' . $uid . $argument_param, T_('Next'), 'browse_' . $uid . 'next', '', 'next'); <span><?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=' . $next_offset . '&browse_uid=' . $uid . $argument_param, T_('Next'), 'browse_' . $uid . 'next', '', 'next'); ?></span>
?></span>
&nbsp; &nbsp;
<span><?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=-1&browse_uid=' . $uid . $argument_param, T_('All'), 'browse_' . $uid . 'all', '', 'all'); <span><?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=-1&browse_uid=' . $uid . $argument_param, T_('All'), 'browse_' . $uid . 'all', '', 'all'); ?></span>
?></span>
</span> </span>
<?php <?php
@ -150,32 +136,16 @@ if ($limit > 0 && $total > $limit) {
<span><input type="checkbox" id="browse_<?php echo $browse->id; ?>_grid_view_<?php echo $is_header; ?>" value="true" <?php echo(($browse->get_grid_view()) ? 'checked' : ''); ?> onClick="javascript:<?php echo Ajax::action("?page=browse&action=options&browse_id=" . $browse->id . "&option=grid_view&value=' + ($('#browse_" . $browse->id . "_grid_view_" . $is_header . "').is(':checked')) + '" . $argument_param, "browse_" . $browse->id . "_grid_view_" . $is_header); ?>"><?php echo T_('Grid View'); ?></span> <span><input type="checkbox" id="browse_<?php echo $browse->id; ?>_grid_view_<?php echo $is_header; ?>" value="true" <?php echo(($browse->get_grid_view()) ? 'checked' : ''); ?> onClick="javascript:<?php echo Ajax::action("?page=browse&action=options&browse_id=" . $browse->id . "&option=grid_view&value=' + ($('#browse_" . $browse->id . "_grid_view_" . $is_header . "').is(':checked')) + '" . $argument_param, "browse_" . $browse->id . "_grid_view_" . $is_header); ?>"><?php echo T_('Grid View'); ?></span>
<?php if (!$browse->is_static_content()) { <?php if (!$browse->is_static_content()) {
?> ?>
<span><input type="checkbox" id="browse_<?php echo $browse->id; <span><input type="checkbox" id="browse_<?php echo $browse->id; ?>_use_alpha_<?php echo $is_header; ?>" value="true" <?php echo(($browse->get_use_alpha()) ? 'checked' : ''); ?> onClick="javascript:<?php echo Ajax::action("?page=browse&action=options&browse_id=" . $browse->id . "&option=use_alpha&value=' + $('#browse_" . $browse->id . "_use_alpha_" . $is_header . "').is(':checked') + '" . $argument_param, "browse_" . $browse->id . "_use_alpha_" . $is_header); ?>"><?php echo T_('Alphabet'); ?></span>
?>_use_alpha_<?php echo $is_header;
?>" value="true" <?php echo(($browse->get_use_alpha()) ? 'checked' : '');
?> onClick="javascript:<?php echo Ajax::action("?page=browse&action=options&browse_id=" . $browse->id . "&option=use_alpha&value=' + $('#browse_" . $browse->id . "_use_alpha_" . $is_header . "').is(':checked') + '" . $argument_param, "browse_" . $browse->id . "_use_alpha_" . $is_header);
?>"><?php echo T_('Alphabet');
?></span>
<?php <?php
} ?> } ?>
<?php if ($browse->get_use_pages()) { <?php if ($browse->get_use_pages()) {
?> ?>
<span>|</span> <span>|</span>
<span> <span>
<form id="browse_<?php echo $browse->id; <form id="browse_<?php echo $browse->id; ?>_limit_form_<?php echo $is_header; ?>" method="post" action="javascript:void(0);">
?>_limit_form_<?php echo $is_header; <label id="limit_label_<?php echo $browse->id; ?>_<?php echo $is_header; ?>" for="multi_alpha_filter"><?php echo T_('Limit'); ?>:</label>
?>" method="post" action="javascript:void(0);"> <input type="text" id="limit_value_<?php echo $browse->id; ?>_<?php echo $is_header; ?>" name="value" value="<?php echo $browse->get_offset(); ?>" onKeyUp="delayRun(this, '800', 'ajaxState', '<?php echo Ajax::url('?page=browse&action=options&browse_id=' . $browse->id . '&option=limit'); ?>', 'limit_value_<?php echo $browse->id; ?>_<?php echo $is_header; ?>');">
<label id="limit_label_<?php echo $browse->id;
?>_<?php echo $is_header;
?>" for="multi_alpha_filter"><?php echo T_('Limit');
?>:</label>
<input type="text" id="limit_value_<?php echo $browse->id;
?>_<?php echo $is_header;
?>" name="value" value="<?php echo $browse->get_offset();
?>" onKeyUp="delayRun(this, '800', 'ajaxState', '<?php echo Ajax::url('?page=browse&action=options&browse_id=' . $browse->id . '&option=limit');
?>', 'limit_value_<?php echo $browse->id;
?>_<?php echo $is_header;
?>');">
</form> </form>
</span> </span>
<?php <?php
@ -186,8 +156,7 @@ if ($limit > 0 && $total > $limit) {
<span class="item-count"><?php echo T_('Item Count') . ': ' . $total; ?></span> <span class="item-count"><?php echo T_('Item Count') . ': ' . $total; ?></span>
<?php if (!$browse->get_use_pages() && $is_header) { <?php if (!$browse->get_use_pages() && $is_header) {
?> ?>
<div id="browse_<?php echo $browse->id; <div id="browse_<?php echo $browse->id; ?>_scroll">
?>_scroll">
<p> <p>
<?php <?php
} ?> } ?>

View file

@ -27,27 +27,22 @@
<?php if (Access::check('interface', '25')) { <?php if (Access::check('interface', '25')) {
?> ?>
<li id="pl_add"> <li id="pl_add">
<?php echo UI::get_icon('playlist_add', T_('Add to Playlist')); <?php echo UI::get_icon('playlist_add', T_('Add to Playlist')); ?>
?>
<ul id="pl_action_additems" class="submenu"> <ul id="pl_action_additems" class="submenu">
<li> <li>
<?php echo Ajax::text('?page=playlist&action=append_item', T_('Add to New Playlist'), 'rb_create_playlist'); <?php echo Ajax::text('?page=playlist&action=append_item', T_('Add to New Playlist'), 'rb_create_playlist'); ?>
?>
</li> </li>
<?php <?php
$playlists = Playlist::get_users($GLOBALS['user']->id); $playlists = Playlist::get_users($GLOBALS['user']->id);
Playlist::build_cache($playlists); Playlist::build_cache($playlists);
foreach ($playlists as $playlist_id) { foreach ($playlists as $playlist_id) {
$playlist = new Playlist($playlist_id); $playlist = new Playlist($playlist_id);
$playlist->format(); $playlist->format(); ?>
?>
<li> <li>
<?php echo Ajax::text('?page=playlist&action=append_item&playlist_id=' . $playlist->id, $playlist->f_name, 'rb_append_playlist_' . $playlist->id); <?php echo Ajax::text('?page=playlist&action=append_item&playlist_id=' . $playlist->id, $playlist->f_name, 'rb_append_playlist_' . $playlist->id); ?>
?>
</li> </li>
<?php <?php
} } ?>
?>
</ul> </ul>
</li> </li>
<?php <?php
@ -55,11 +50,8 @@
<?php if (Access::check_function('batch_download') && check_can_zip('tmp_playlist')) { <?php if (Access::check_function('batch_download') && check_can_zip('tmp_playlist')) {
?> ?>
<li> <li>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); <a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=tmp_playlist&amp;id=<?php echo $GLOBALS['user']->playlist->id; ?>">
?>/batch.php?action=tmp_playlist&amp;id=<?php echo $GLOBALS['user']->playlist->id; <?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
?>">
<?php echo UI::get_icon('batch_download', T_('Batch Download'));
?>
</a> </a>
</li> </li>
<?php <?php
@ -131,28 +123,21 @@
if (in_array($type, $normal_array)) { if (in_array($type, $normal_array)) {
$object = new $type(array_shift($object_data)); $object = new $type(array_shift($object_data));
$object->format(); $object->format();
} } ?>
?> <li class="<?php echo UI::flip_class(); ?>" >
<li class="<?php echo UI::flip_class(); <?php echo $object->f_link; ?>
?>" > <?php echo Ajax::button('?action=current_playlist&type=delete&id=' . $uid, 'delete', T_('Delete'), 'rightbar_delete_' . $uid, '', 'delitem'); ?>
<?php echo $object->f_link;
?>
<?php echo Ajax::button('?action=current_playlist&type=delete&id=' . $uid, 'delete', T_('Delete'), 'rightbar_delete_' . $uid, '', 'delitem');
?>
</li> </li>
<?php <?php
} if (!count($objects)) { } if (!count($objects)) {
?> ?>
<li><span class="nodata"><?php echo T_('No items'); <li><span class="nodata"><?php echo T_('No items'); ?></span></li>
?></span></li>
<?php <?php
} ?> } ?>
<?php if (isset($truncated)) { <?php if (isset($truncated)) {
?> ?>
<li class="<?php echo UI::flip_class(); <li class="<?php echo UI::flip_class(); ?>">
?>"> <?php echo $truncated . ' ' . T_('More'); ?>...
<?php echo $truncated . ' ' . T_('More');
?>...
</li> </li>
<?php <?php
} ?> } ?>

View file

@ -44,20 +44,13 @@
<table cellspacing="1" cellpadding="3" class="tabledata"> <table cellspacing="1" cellpadding="3" class="tabledata">
<thead> <thead>
<tr class="th-top"> <tr class="th-top">
<th><?php echo T_('Name'); <th><?php echo T_('Name'); ?></th>
?></th> <th><?php echo T_('Start Address'); ?></th>
<th><?php echo T_('Start Address'); <th><?php echo T_('End Address'); ?></th>
?></th> <th><?php echo T_('Level'); ?></th>
<th><?php echo T_('End Address'); <th><?php echo T_('User'); ?></th>
?></th> <th><?php echo T_('Type'); ?></th>
<th><?php echo T_('Level'); <th><?php echo T_('Action'); ?></th>
?></th>
<th><?php echo T_('User');
?></th>
<th><?php echo T_('Type');
?></th>
<th><?php echo T_('Action');
?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -65,31 +58,17 @@
/* Start foreach List Item */ /* Start foreach List Item */
foreach ($list as $access_id) { foreach ($list as $access_id) {
$access = new Access($access_id); $access = new Access($access_id);
$access->format(); $access->format(); ?>
?> <tr class="<?php echo UI::flip_class(); ?>">
<tr class="<?php echo UI::flip_class(); <td><?php echo scrub_out($access->name); ?></td>
?>"> <td><?php echo $access->f_start; ?></td>
<td><?php echo scrub_out($access->name); <td><?php echo $access->f_end; ?></td>
?></td> <td><?php echo $access->f_level; ?></td>
<td><?php echo $access->f_start; <td><?php echo $access->f_user; ?></td>
?></td> <td><?php echo $access->f_type; ?></td>
<td><?php echo $access->f_end;
?></td>
<td><?php echo $access->f_level;
?></td>
<td><?php echo $access->f_user;
?></td>
<td><?php echo $access->f_type;
?></td>
<td> <td>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/admin/access.php?action=show_edit_record&amp;access_id=<?php echo scrub_out($access->id); ?>"><?php echo UI::get_icon('edit', T_('Edit')); ?></a>
?>/admin/access.php?action=show_edit_record&amp;access_id=<?php echo scrub_out($access->id); <a href="<?php echo AmpConfig::get('web_path'); ?>/admin/access.php?action=show_delete_record&amp;access_id=<?php echo scrub_out($access->id); ?>"><?php echo UI::get_icon('delete', T_('Delete')); ?></a>
?>"><?php echo UI::get_icon('edit', T_('Edit'));
?></a>
<a href="<?php echo AmpConfig::get('web_path');
?>/admin/access.php?action=show_delete_record&amp;access_id=<?php echo scrub_out($access->id);
?>"><?php echo UI::get_icon('delete', T_('Delete'));
?></a>
</td> </td>
</tr> </tr>
<?php <?php

View file

@ -30,11 +30,9 @@ $display_fields = (array) AmpConfig::get('registration_display_fields');
<?php if (in_array('fullname', $display_fields)) { <?php if (in_array('fullname', $display_fields)) {
?> ?>
<tr> <tr>
<td><?php echo T_('Full Name'); <td><?php echo T_('Full Name'); ?>:</td>
?>:</td>
<td> <td>
<input type="text" name="fullname" id="fullname" value="<?php echo scrub_out($client->fullname); <input type="text" name="fullname" id="fullname" value="<?php echo scrub_out($client->fullname); ?>" />
?>" />
</td> </td>
</tr> </tr>
<?php <?php
@ -48,11 +46,9 @@ $display_fields = (array) AmpConfig::get('registration_display_fields');
<?php if (in_array('website', $display_fields)) { <?php if (in_array('website', $display_fields)) {
?> ?>
<tr> <tr>
<td><?php echo T_('Website'); <td><?php echo T_('Website'); ?>:</td>
?>:</td>
<td> <td>
<input type="text" name="website" id="website" value="<?php echo scrub_out($client->website); <input type="text" name="website" id="website" value="<?php echo scrub_out($client->website); ?>" />
?>" />
</td> </td>
</tr> </tr>
<?php <?php
@ -60,11 +56,9 @@ $display_fields = (array) AmpConfig::get('registration_display_fields');
<?php if (in_array('state', $display_fields)) { <?php if (in_array('state', $display_fields)) {
?> ?>
<tr> <tr>
<td><?php echo T_('State'); <td><?php echo T_('State'); ?>:</td>
?>:</td>
<td> <td>
<input type="text" name="state" id="state" value="<?php echo scrub_out($client->state); <input type="text" name="state" id="state" value="<?php echo scrub_out($client->state); ?>" />
?>" />
</td> </td>
</tr> </tr>
<?php <?php
@ -72,11 +66,9 @@ $display_fields = (array) AmpConfig::get('registration_display_fields');
<?php if (in_array('city', $display_fields)) { <?php if (in_array('city', $display_fields)) {
?> ?>
<tr> <tr>
<td><?php echo T_('City'); <td><?php echo T_('City'); ?>:</td>
?>:</td>
<td> <td>
<input type="text" name="city" id="city" value="<?php echo scrub_out($client->city); <input type="text" name="city" id="city" value="<?php echo scrub_out($client->city); ?>" />
?>" />
</td> </td>
</tr> </tr>
<?php <?php
@ -120,18 +112,14 @@ $display_fields = (array) AmpConfig::get('registration_display_fields');
$apikey_qrcode .= $urlinfo['path']; $apikey_qrcode .= $urlinfo['path'];
if ($urlinfo['scheme'] == "https" || AmpConfig::get('force_ssl')) { if ($urlinfo['scheme'] == "https" || AmpConfig::get('force_ssl')) {
$apikey_qrcode .= "#ssl=true"; $apikey_qrcode .= "#ssl=true";
} } ?>
?>
<br /> <br />
<div style="background-color: #ffffff; border: 8px solid #ffffff; width: 128px; height: 128px;"> <div style="background-color: #ffffff; border: 8px solid #ffffff; width: 128px; height: 128px;">
<a href="<?php echo $apikey_qrcode; <a href="<?php echo $apikey_qrcode; ?>" rel="nohtml"><div id="apikey_qrcode"></div></a>
?>" rel="nohtml"><div id="apikey_qrcode"></div></a>
</div> </div>
<br /> <br />
<script language="javascript" type="text/javascript">$('#apikey_qrcode').qrcode({width: 128, height: 128, text: '<?php echo $apikey_qrcode; <script language="javascript" type="text/javascript">$('#apikey_qrcode').qrcode({width: 128, height: 128, text: '<?php echo $apikey_qrcode; ?>', background: '#ffffff', foreground: '#000000'});</script>
?>', background: '#ffffff', foreground: '#000000'});</script> <?php echo $client->apikey; ?>
<?php echo $client->apikey;
?>
<?php <?php
} ?> } ?>
</span> </span>

View file

@ -53,36 +53,26 @@
?> ?>
<input type="hidden" name="type" value="rpc" /> <input type="hidden" name="type" value="rpc" />
<select name="addtype"> <select name="addtype">
<option value="rpc"><?php echo T_('API/RPC'); <option value="rpc"><?php echo T_('API/RPC'); ?></option>
?></option> <option selected="selected" value="stream"><?php printf(T_('%s + %s'), T_('API/RPC'), T_('Stream Access')); ?></option>
<option selected="selected" value="stream"><?php printf(T_('%s + %s'), T_('API/RPC'), T_('Stream Access')); <option value="all"><?php printf(T_('%s + %s'), T_('API/RPC'), T_('All')); ?></option>
?></option>
<option value="all"><?php printf(T_('%s + %s'), T_('API/RPC'), T_('All'));
?></option>
<?php <?php
} else { } else {
if ($action == 'show_add_local') { if ($action == 'show_add_local') {
?> ?>
<input type="hidden" name="type" value="local" /> <input type="hidden" name="type" value="local" />
<select name="addtype"> <select name="addtype">
<option value="network"><?php echo T_('Local Network Definition'); <option value="network"><?php echo T_('Local Network Definition'); ?></option>
?></option> <option value="stream"><?php printf(T_('%s + %s'), T_('Local Network Definition'), T_('Stream Access')); ?></option>
<option value="stream"><?php printf(T_('%s + %s'), T_('Local Network Definition'), T_('Stream Access')); <option selected="selected" value="all"><?php printf(T_('%s + %s'), T_('Local Network Definition'), T_('All')); ?></option>
?></option>
<option selected="selected" value="all"><?php printf(T_('%s + %s'), T_('Local Network Definition'), T_('All'));
?></option>
<?php <?php
} else { } else {
?> ?>
<select name="type"> <select name="type">
<option selected="selected" value="stream"><?php echo T_('Stream Access'); <option selected="selected" value="stream"><?php echo T_('Stream Access'); ?></option>
?></option> <option value="interface"><?php echo T_('Web Interface'); ?></option>
<option value="interface"><?php echo T_('Web Interface'); <option value="network"><?php echo T_('Local Network Definition'); ?></option>
?></option> <option value="rpc"><?php echo T_('API/RPC'); ?></option>
<option value="network"><?php echo T_('Local Network Definition');
?></option>
<option value="rpc"><?php echo T_('API/RPC');
?></option>
<?php <?php
} }
} ?> } ?>

View file

@ -72,21 +72,16 @@ $default_sort = "%a/%A";
<option value="music"><?php echo T_('Music'); ?></option> <option value="music"><?php echo T_('Music'); ?></option>
<?php if (AmpConfig::get('allow_video')) { <?php if (AmpConfig::get('allow_video')) {
?> ?>
<option value="clip"><?php echo T_('Music Clip'); <option value="clip"><?php echo T_('Music Clip'); ?></option>
?></option> <option value="tvshow"><?php echo T_('TV Show'); ?></option>
<option value="tvshow"><?php echo T_('TV Show'); <option value="movie"><?php echo T_('Movie'); ?></option>
?></option> <option value="personal_video"><?php echo T_('Personal Video'); ?></option>
<option value="movie"><?php echo T_('Movie');
?></option>
<option value="personal_video"><?php echo T_('Personal Video');
?></option>
<?php <?php
} }
if (AmpConfig::get('podcast')) { if (AmpConfig::get('podcast')) {
?> ?>
<option value="podcast"><?php echo T_('Podcast'); <option value="podcast"><?php echo T_('Podcast'); ?></option>
?></option>
<?php <?php
} }

View file

@ -60,11 +60,9 @@
<?php if ((($_REQUEST['type'] == 'song' || $_REQUEST['type'] == 'video') && Access::check_function('download')) || Access::check_function('batch_download')) { <?php if ((($_REQUEST['type'] == 'song' || $_REQUEST['type'] == 'video') && Access::check_function('download')) || Access::check_function('batch_download')) {
?> ?>
<tr> <tr>
<td><?php echo T_('Allow Download'); <td><?php echo T_('Allow Download'); ?></td>
?></td>
<td> <td>
<input type="checkbox" name="allow_download" value="1" <?php echo ($_REQUEST['allow_download'] || $_SERVER['REQUEST_METHOD'] === 'GET') ? 'checked' : ''; <input type="checkbox" name="allow_download" value="1" <?php echo ($_REQUEST['allow_download'] || $_SERVER['REQUEST_METHOD'] === 'GET') ? 'checked' : ''; ?> />
?> />
</td> </td>
</tr> </tr>
<?php <?php

View file

@ -31,14 +31,11 @@ $boxtitle = T_('Post to Shoutbox');
if ($data) { if ($data) {
$boxtitle .= ' (' . $data . ')'; $boxtitle .= ' (' . $data . ')';
} }
UI::show_box_top($boxtitle, 'box box_add_shout'); UI::show_box_top($boxtitle, 'box box_add_shout'); ?>
?> <form method="post" enctype="multipart/form-data" action="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=add_shout">
<form method="post" enctype="multipart/form-data" action="<?php echo AmpConfig::get('web_path');
?>/shout.php?action=add_shout">
<table id="shoutbox-input" cellpadding="0" cellspacing="0"> <table id="shoutbox-input" cellpadding="0" cellspacing="0">
<tr> <tr>
<td><strong><?php echo T_('Comment:'); <td><strong><?php echo T_('Comment:'); ?></strong>
?></strong>
</tr> </tr>
<tr> <tr>
<td><textarea rows="5" cols="35" maxlength="140" name="comment"></textarea></td> <td><textarea rows="5" cols="35" maxlength="140" name="comment"></textarea></td>
@ -46,30 +43,22 @@ $boxtitle = T_('Post to Shoutbox');
<?php if (Access::check('interface', '50')) { <?php if (Access::check('interface', '50')) {
?> ?>
<tr> <tr>
<td><input type="checkbox" name="sticky" /> <strong><?php echo T_('Stick this comment'); <td><input type="checkbox" name="sticky" /> <strong><?php echo T_('Stick this comment'); ?></strong></td>
?></strong></td>
</tr> </tr>
<?php <?php
} } ?>
?>
<tr> <tr>
<td> <td>
<?php echo Core::form_register('add_shout'); <?php echo Core::form_register('add_shout'); ?>
?> <input type="hidden" name="object_id" value="<?php echo $object->id; ?>" />
<input type="hidden" name="object_id" value="<?php echo $object->id; <input type="hidden" name="object_type" value="<?php echo $object_type; ?>" />
?>" /> <input type="hidden" name="data" value="<?php echo $data; ?>" />
<input type="hidden" name="object_type" value="<?php echo $object_type; <input type="submit" value="<?php echo T_('Create'); ?>" />
?>" />
<input type="hidden" name="data" value="<?php echo $data;
?>" />
<input type="submit" value="<?php echo T_('Create');
?>" />
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>
<?php UI::show_box_bottom(); <?php UI::show_box_bottom(); ?>
?>
</div> </div>
<?php <?php
} ?> } ?>

View file

@ -166,8 +166,7 @@ $(function () {
// Display a max file size client side if we know it // Display a max file size client side if we know it
if ($upload_max > 0) { if ($upload_max > 0) {
?> ?>
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $upload_max; <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $upload_max; ?>" />
?>" />
<?php <?php
} }
@ -178,11 +177,9 @@ if ($upload_max > 0) {
<tr> <tr>
<td class="edit_dialog_content_header"><?php echo T_('Artist') ?></td> <td class="edit_dialog_content_header"><?php echo T_('Artist') ?></td>
<td> <td>
<?php show_artist_select('artist', $artist, true, 1, Access::check('interface', 50), Access::check('interface', 50) ? null : $GLOBALS['user']->id); <?php show_artist_select('artist', $artist, true, 1, Access::check('interface', 50), Access::check('interface', 50) ? null : $GLOBALS['user']->id); ?>
?>
<div id="artist_select_album_1"> <div id="artist_select_album_1">
<?php echo Ajax::observe('artist_select_1', 'change', 'check_inline_song_edit("artist", 1)'); <?php echo Ajax::observe('artist_select_1', 'change', 'check_inline_song_edit("artist", 1)'); ?>
?>
</div> </div>
</td> </td>
</tr> </tr>
@ -202,11 +199,9 @@ if ($upload_max > 0) {
<tr> <tr>
<td class="edit_dialog_content_header"><?php echo T_('Music License') ?></td> <td class="edit_dialog_content_header"><?php echo T_('Music License') ?></td>
<td> <td>
<?php show_license_select('license', '', '0'); <?php show_license_select('license', '', '0'); ?>
?>
<div id="album_select_license_<?php echo $song->license ?>"> <div id="album_select_license_<?php echo $song->license ?>">
<?php echo Ajax::observe('license_select', 'change', 'check_inline_song_edit("license", "0")'); <?php echo Ajax::observe('license_select', 'change', 'check_inline_song_edit("license", "0")'); ?>
?>
</div> </div>
</td> </td>
</tr> </tr>

View file

@ -62,32 +62,25 @@ if ($directplay_limit > 0) {
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<div style="display:table-cell;" id="rating_<?php echo $album->id; <div style="display:table-cell;" id="rating_<?php echo $album->id; ?>_album">
?>_album"> <?php Rating::show($album->id, 'album'); ?>
<?php Rating::show($album->id, 'album');
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<div style="display:table-cell;" id="userflag_<?php echo $album->id; <div style="display:table-cell;" id="userflag_<?php echo $album->id; ?>_album">
?>_album"> <?php Userflag::show($album->id, 'album'); ?>
<?php Userflag::show($album->id, 'album');
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php <?php
if (AmpConfig::get('show_played_times')) { if (AmpConfig::get('show_played_times')) {
?> ?>
<br /> <br />
<div style="display:inline;"><?php echo T_('Played') . ' ' . $album->object_cnt . ' ' . T_('times'); <div style="display:inline;"><?php echo T_('Played') . ' ' . $album->object_cnt . ' ' . T_('times'); ?></div>
?></div>
<?php <?php
} }
@ -97,12 +90,9 @@ if (AmpConfig::get('show_played_times')) {
$owner_id = $album->get_user_owner(); $owner_id = $album->get_user_owner();
if (AmpConfig::get('sociable') && $owner_id > 0) { if (AmpConfig::get('sociable') && $owner_id > 0) {
$owner = new User($owner_id); $owner = new User($owner_id);
$owner->format(); $owner->format(); ?>
?>
<div class="item_uploaded_by"> <div class="item_uploaded_by">
<?php echo T_('Uploaded by'); <?php echo T_('Uploaded by'); ?> <?php echo $owner->f_link; ?>
?> <?php echo $owner->f_link;
?>
</div> </div>
<?php <?php
} ?> } ?>
@ -113,43 +103,33 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if ($show_direct_play) { <?php if ($show_direct_play) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), 'play', T_('Play'), 'directplay_full_' . $album->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), 'play', T_('Play'), 'directplay_full_' . $album->id); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), T_('Play'), 'directplay_full_text_' . $album->id); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), T_('Play'), 'directplay_full_text_' . $album->id);
?>
</li> </li>
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $album->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $album->id); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', T_('Play last'), 'addplay_album_text_' . $album->id); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', T_('Play last'), 'addplay_album_text_' . $album->id);
?>
</li> </li>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php if ($show_playlist_add) { <?php if ($show_playlist_add) {
?> ?>
<li> <li>
<?php echo Ajax::button('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $album->id); <?php echo Ajax::button('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $album->id); ?>
?> <?php echo Ajax::text('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), T_('Add to temporary playlist'), 'play_full_text_' . $album->id); ?>
<?php echo Ajax::text('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), T_('Add to temporary playlist'), 'play_full_text_' . $album->id);
?>
</li> </li>
<li> <li>
<?php echo Ajax::button('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'play_random_' . $album->id); <?php echo Ajax::button('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'play_random_' . $album->id); ?>
?> <?php echo Ajax::text('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), T_('Random to temporary playlist'), 'play_random_text_' . $album->id); ?>
<?php echo Ajax::text('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), T_('Random to temporary playlist'), 'play_random_text_' . $album->id);
?>
</li> </li>
<li> <li>
<a id="<?php echo 'add_playlist_' . $album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php echo $album->id ?>')"> <a id="<?php echo 'add_playlist_' . $album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php echo $album->id ?>')">
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); <?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
?>
</a> </a>
<a id="<?php echo 'add_playlist_' . $album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php echo $album->id ?>')"> <a id="<?php echo 'add_playlist_' . $album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php echo $album->id ?>')">
<?php echo T_('Add to existing playlist') ?> <?php echo T_('Add to existing playlist') ?>
@ -160,8 +140,7 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('use_rss')) { <?php if (AmpConfig::get('use_rss')) {
?> ?>
<li> <li>
<?php echo Ampache_RSS::get_display('podcast', T_('Podcast'), array('object_type' => 'album', 'object_id' => $album->id)); <?php echo Ampache_RSS::get_display('podcast', T_('Podcast'), array('object_type' => 'album', 'object_id' => $album->id)); ?>
?>
</li> </li>
<?php <?php
} ?> } ?>
@ -169,17 +148,10 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
?> ?>
<?php if (AmpConfig::get('sociable')) { <?php if (AmpConfig::get('sociable')) {
?> ?>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=album&id=<?php echo $album->id; ?>"><?php echo UI::get_icon('comment', T_('Post Shout')); ?></a>
?>/shout.php?action=show_add_shout&type=album&id=<?php echo $album->id; <a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=album&id=<?php echo $album->id; ?>"><?php echo T_('Post Shout'); ?></a>
?>"><?php echo UI::get_icon('comment', T_('Post Shout'));
?></a>
<a href="<?php echo AmpConfig::get('web_path');
?>/shout.php?action=show_add_shout&type=album&id=<?php echo $album->id;
?>"><?php echo T_('Post Shout');
?></a>
<?php <?php
} } ?>
?>
<?php <?php
} }
?> ?>
@ -188,12 +160,10 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('share')) { <?php if (AmpConfig::get('share')) {
?> ?>
<li> <li>
<?php Share::display_ui('album', $album->id); <?php Share::display_ui('album', $album->id); ?>
?>
</li> </li>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php if (($owner_id > 0 && $owner_id == $GLOBALS['user']->id) || Access::check('interface', '50')) { <?php if (($owner_id > 0 && $owner_id == $GLOBALS['user']->id) || Access::check('interface', '50')) {
@ -201,37 +171,20 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('statistical_graphs')) { <?php if (AmpConfig::get('statistical_graphs')) {
?> ?>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/stats.php?action=graph&object_type=album&object_id=<?php echo $album->id; ?>"><?php echo UI::get_icon('statistics', T_('Graphs')); ?></a>
?>/stats.php?action=graph&object_type=album&object_id=<?php echo $album->id; <a href="<?php echo AmpConfig::get('web_path'); ?>/stats.php?action=graph&object_type=album&object_id=<?php echo $album->id; ?>"><?php echo T_('Graphs'); ?></a>
?>"><?php echo UI::get_icon('statistics', T_('Graphs'));
?></a>
<a href="<?php echo AmpConfig::get('web_path');
?>/stats.php?action=graph&object_type=album&object_id=<?php echo $album->id;
?>"><?php echo T_('Graphs');
?></a>
</li> </li>
<?php <?php
} } ?>
?>
<li> <li>
<a onclick="submitNewItemsOrder('<?php echo $album->id; <a onclick="submitNewItemsOrder('<?php echo $album->id; ?>', 'reorder_songs_table_<?php echo $album->id; ?>', 'song_',
?>', 'reorder_songs_table_<?php echo $album->id; '<?php echo AmpConfig::get('web_path'); ?>/albums.php?action=set_track_numbers', 'refresh_album_songs')">
?>', 'song_', <?php echo UI::get_icon('save', T_('Save Tracks Order')); ?>
'<?php echo AmpConfig::get('web_path'); &nbsp;&nbsp;<?php echo T_('Save Tracks Order'); ?>
?>/albums.php?action=set_track_numbers', 'refresh_album_songs')">
<?php echo UI::get_icon('save', T_('Save Tracks Order'));
?>
&nbsp;&nbsp;<?php echo T_('Save Tracks Order');
?>
</a> </a>
</li> </li>
<li> <li>
<a href="javascript:NavigateTo('<?php echo $web_path; <a href="javascript:NavigateTo('<?php echo $web_path; ?>/albums.php?action=update_from_tags&amp;album_id=<?php echo $album->id; ?>');" onclick="return confirm('<?php echo T_('Do you really want to update from tags?'); ?>');"><?php echo UI::get_icon('file_refresh', T_('Update from tags')); ?> &nbsp;&nbsp;<?php echo T_('Update from tags'); ?></a>
?>/albums.php?action=update_from_tags&amp;album_id=<?php echo $album->id;
?>');" onclick="return confirm('<?php echo T_('Do you really want to update from tags?');
?>');"><?php echo UI::get_icon('file_refresh', T_('Update from tags'));
?> &nbsp;&nbsp;<?php echo T_('Update from tags');
?></a>
</li> </li>
<?php <?php
} ?> } ?>
@ -240,26 +193,19 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('allow_upload')) { <?php if (AmpConfig::get('allow_upload')) {
?> ?>
<li> <li>
<a href="<?php echo $web_path; <a href="<?php echo $web_path; ?>/upload.php?artist=<?php echo($album->album_artist ? $album->album_artist : $album->artist_id); ?>&album=<?php echo $album->id ?>">
?>/upload.php?artist=<?php echo($album->album_artist ? $album->album_artist : $album->artist_id); <?php echo UI::get_icon('upload', T_('Upload')); ?>
?>&album=<?php echo $album->id ?>"> &nbsp;&nbsp;<?php echo T_('Upload'); ?>
<?php echo UI::get_icon('upload', T_('Upload'));
?>
&nbsp;&nbsp;<?php echo T_('Upload');
?>
</a> </a>
</li> </li>
<?php <?php
} } ?>
?>
<li> <li>
<a id="<?php echo 'edit_album_' . $album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_' . $album->id ?>', '<?php echo T_('Album edit') ?>', '')"> <a id="<?php echo 'edit_album_' . $album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_' . $album->id ?>', '<?php echo T_('Album edit') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<a id="<?php echo 'edit_album_' . $album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_' . $album->id ?>', '<?php echo T_('Album edit') ?>', '')"> <a id="<?php echo 'edit_album_' . $album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_' . $album->id ?>', '<?php echo T_('Album edit') ?>', '')">
<?php echo T_('Edit Album'); <?php echo T_('Edit Album'); ?>
?>
</a> </a>
</li> </li>
<?php <?php
@ -267,26 +213,16 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (Access::check_function('batch_download') && check_can_zip('album')) { <?php if (Access::check_function('batch_download') && check_can_zip('album')) {
?> ?>
<li> <li>
<a rel="nohtml" href="<?php echo $web_path; <a rel="nohtml" href="<?php echo $web_path; ?>/batch.php?action=album&<?php echo $album->get_http_album_query_ids('id'); ?>"><?php echo UI::get_icon('batch_download', T_('Download')); ?></a>
?>/batch.php?action=album&<?php echo $album->get_http_album_query_ids('id'); <a rel="nohtml" href="<?php echo $web_path; ?>/batch.php?action=album&<?php echo $album->get_http_album_query_ids('id'); ?>"><?php echo T_('Download'); ?></a>
?>"><?php echo UI::get_icon('batch_download', T_('Download'));
?></a>
<a rel="nohtml" href="<?php echo $web_path;
?>/batch.php?action=album&<?php echo $album->get_http_album_query_ids('id');
?>"><?php echo T_('Download');
?></a>
</li> </li>
<?php <?php
} ?> } ?>
<?php if (Catalog::can_remove($album)) { <?php if (Catalog::can_remove($album)) {
?> ?>
<li> <li>
<a id="<?php echo 'delete_album_' . $album->id ?>" href="<?php echo AmpConfig::get('web_path'); <a id="<?php echo 'delete_album_' . $album->id ?>" href="<?php echo AmpConfig::get('web_path'); ?>/albums.php?action=delete&album_id=<?php echo $album->id; ?>">
?>/albums.php?action=delete&album_id=<?php echo $album->id; <?php echo UI::get_icon('delete', T_('Delete')); ?> <?php echo T_('Delete'); ?>
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?> <?php echo T_('Delete');
?>
</a> </a>
</li> </li>
<?php <?php

View file

@ -61,51 +61,36 @@ if ($directplay_limit > 0) {
<?php if ($show_direct_play) { <?php if ($show_direct_play) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), 'play', T_('Play'), 'directplay_full_'); <?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), 'play', T_('Play'), 'directplay_full_'); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), T_('Play'), 'directplay_full_text_'); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), T_('Play'), 'directplay_full_text_');
?>
</li> </li>
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_'); <?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_'); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', T_('Play last'), 'addplay_album_text_'); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', T_('Play last'), 'addplay_album_text_');
?>
</li> </li>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php if ($show_playlist_add) { <?php if ($show_playlist_add) {
?> ?>
<li> <li>
<?php echo Ajax::button('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_'); <?php echo Ajax::button('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_'); ?>
?> <?php echo Ajax::text('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), T_('Add to temporary playlist'), 'play_full_text_'); ?>
<?php echo Ajax::text('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), T_('Add to temporary playlist'), 'play_full_text_');
?>
</li> </li>
<li> <li>
<?php echo Ajax::button('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'play_random_'); <?php echo Ajax::button('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'play_random_'); ?>
?> <?php echo Ajax::text('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), T_('Random to temporary playlist'), 'play_random_text_'); ?>
<?php echo Ajax::text('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), T_('Random to temporary playlist'), 'play_random_text_');
?>
</li> </li>
<?php <?php
} ?> } ?>
<?php if (Access::check_function('batch_download') && check_can_zip('album')) { <?php if (Access::check_function('batch_download') && check_can_zip('album')) {
?> ?>
<li> <li>
<a rel="nohtml" href="<?php echo $web_path; <a rel="nohtml" href="<?php echo $web_path; ?>/batch.php?action=album&<?php echo $album->get_http_album_query_ids('id'); ?>"><?php echo UI::get_icon('batch_download', T_('Download')); ?></a>
?>/batch.php?action=album&<?php echo $album->get_http_album_query_ids('id'); <a rel="nohtml" href="<?php echo $web_path; ?>/batch.php?action=album&<?php echo $album->get_http_album_query_ids('id'); ?>"><?php echo T_('Download'); ?></a>
?>"><?php echo UI::get_icon('batch_download', T_('Download'));
?></a>
<a rel="nohtml" href="<?php echo $web_path;
?>/batch.php?action=album&<?php echo $album->get_http_album_query_ids('id');
?>"><?php echo T_('Download');
?></a>
</li> </li>
<?php <?php
} ?> } ?>
@ -129,10 +114,8 @@ if ($directplay_limit > 0) {
if ($show_direct_play) { if ($show_direct_play) {
$show_direct_play = $show_playlist_add; $show_direct_play = $show_playlist_add;
} }
} } ?>
?> <div class="album_group_disks_title"><span> <?php echo $c_title; ?></span></div>
<div class="album_group_disks_title"><span> <?php echo $c_title;
?></span></div>
<div class="album_group_disks_actions"> <div class="album_group_disks_actions">
<?php <?php
if ($show_direct_play) { if ($show_direct_play) {
@ -144,56 +127,42 @@ if ($directplay_limit > 0) {
if ($show_playlist_add) { if ($show_playlist_add) {
echo Ajax::button('?action=basket&type=album&' . $c_album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $c_album->id); echo Ajax::button('?action=basket&type=album&' . $c_album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $c_album->id);
echo Ajax::button('?action=basket&type=album_random&' . $c_album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'play_random_' . $c_album->id); echo Ajax::button('?action=basket&type=album_random&' . $c_album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'play_random_' . $c_album->id);
} } ?>
?>
<?php if (Access::check('interface', '25')) { <?php if (Access::check('interface', '25')) {
?> ?>
<?php if (AmpConfig::get('sociable')) { <?php if (AmpConfig::get('sociable')) {
?> ?>
<a href="<?php echo AmpConfig::get('web_path') ?>/shout.php?action=show_add_shout&type=album&id=<?php echo $c_album->id ?>"><?php echo UI::get_icon('comment', T_('Post Shout')) ?></a> <a href="<?php echo AmpConfig::get('web_path') ?>/shout.php?action=show_add_shout&type=album&id=<?php echo $c_album->id ?>"><?php echo UI::get_icon('comment', T_('Post Shout')) ?></a>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('share')) { <?php if (AmpConfig::get('share')) {
?> ?>
<?php Share::display_ui('album', $c_album->id, false); <?php Share::display_ui('album', $c_album->id, false); ?>
?>
<?php <?php
} } ?>
?>
<?php <?php
} } ?>
?>
<?php if (Access::check_function('batch_download') && check_can_zip('album')) { <?php if (Access::check_function('batch_download') && check_can_zip('album')) {
?> ?>
<a rel="nohtml" href="<?php echo $web_path; <a rel="nohtml" href="<?php echo $web_path; ?>/batch.php?action=album&<?php echo $c_album->get_http_album_query_ids('id'); ?>"><?php echo UI::get_icon('batch_download', T_('Download')); ?></a>
?>/batch.php?action=album&<?php echo $c_album->get_http_album_query_ids('id');
?>"><?php echo UI::get_icon('batch_download', T_('Download'));
?></a>
<?php <?php
} } ?>
?>
<?php if (Access::check('interface', '50')) { <?php if (Access::check('interface', '50')) {
?> ?>
<a onclick="submitNewItemsOrder('<?php echo $c_album->id ?>', 'reorder_songs_table_<?php echo $c_album->id ?>', 'song_', <a onclick="submitNewItemsOrder('<?php echo $c_album->id ?>', 'reorder_songs_table_<?php echo $c_album->id ?>', 'song_',
'<?php echo AmpConfig::get('web_path') ?>/albums.php?action=set_track_numbers', 'refresh_album_songs')"> '<?php echo AmpConfig::get('web_path') ?>/albums.php?action=set_track_numbers', 'refresh_album_songs')">
<?php echo UI::get_icon('save', T_('Save Tracks Order')); <?php echo UI::get_icon('save', T_('Save Tracks Order')); ?>
?>
</a> </a>
<a href="javascript:NavigateTo('<?php echo $web_path ?>/albums.php?action=update_from_tags&amp;album_id=<?php echo $c_album->id ?>');" onclick="return confirm('<?php echo T_('Do you really want to update from tags?') ?>');"> <a href="javascript:NavigateTo('<?php echo $web_path ?>/albums.php?action=update_from_tags&amp;album_id=<?php echo $c_album->id ?>');" onclick="return confirm('<?php echo T_('Do you really want to update from tags?') ?>');">
<?php echo UI::get_icon('file_refresh', T_('Update from tags')); <?php echo UI::get_icon('file_refresh', T_('Update from tags')); ?>
?>
</a> </a>
<a id="<?php echo 'edit_album_' . $c_album->id ?>" onclick="showEditDialog('album_row', '<?php echo $c_album->id ?>', '<?php echo 'edit_album_' . $c_album->id ?>', '<?php echo T_('Album edit') ?>', '')"> <a id="<?php echo 'edit_album_' . $c_album->id ?>" onclick="showEditDialog('album_row', '<?php echo $c_album->id ?>', '<?php echo 'edit_album_' . $c_album->id ?>', '<?php echo T_('Album edit') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<?php <?php
} } ?>
?>
</div> </div>
<div id='reordered_list_<?php echo $album_id; <div id='reordered_list_<?php echo $album_id; ?>'>
?>'>
<?php <?php
$browse = new Browse(); $browse = new Browse();
$browse->set_show_header(false); $browse->set_show_header(false);
@ -203,8 +172,7 @@ if ($directplay_limit > 0) {
$browse->set_sort('track', 'ASC'); $browse->set_sort('track', 'ASC');
$browse->get_objects(); $browse->get_objects();
$browse->show_objects(null, true); // true argument is set to show the reorder column $browse->show_objects(null, true); // true argument is set to show the reorder column
$browse->store(); $browse->store(); ?>
?>
</div><br /> </div><br />
<?php <?php
} ?> } ?>

View file

@ -38,13 +38,11 @@
</td> </td>
<?php <?php
if (Art::is_enabled()) { if (Art::is_enabled()) {
$name = '[' . $libitem->f_artist . '] ' . scrub_out($libitem->full_name); $name = '[' . $libitem->f_artist . '] ' . scrub_out($libitem->full_name); ?>
?>
<td class="cel_cover"> <td class="cel_cover">
<?php <?php
$thumb = (isset($browse) && !$browse->get_grid_view()) ? 11 : 1; $thumb = (isset($browse) && !$browse->get_grid_view()) ? 11 : 1;
Art::display('album', $libitem->id, $name, $thumb, AmpConfig::get('web_path') . '/albums.php?action=show&album=' . $libitem->id); Art::display('album', $libitem->id, $name, $thumb, AmpConfig::get('web_path') . '/albums.php?action=show&album=' . $libitem->id); ?>
?>
</td> </td>
<?php <?php
} ?> } ?>
@ -54,16 +52,13 @@ if (Art::is_enabled()) {
<?php <?php
if ($show_playlist_add) { if ($show_playlist_add) {
echo Ajax::button('?action=basket&type=album&' . $libitem->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'add_album_' . $libitem->id); echo Ajax::button('?action=basket&type=album&' . $libitem->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'add_album_' . $libitem->id);
echo Ajax::button('?action=basket&type=album_random&' . $libitem->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'random_album_' . $libitem->id); echo Ajax::button('?action=basket&type=album_random&' . $libitem->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'random_album_' . $libitem->id); ?>
?>
<a id="<?php echo 'add_playlist_' . $libitem->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php if (!count($libitem->album_suite)) { <a id="<?php echo 'add_playlist_' . $libitem->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php if (!count($libitem->album_suite)) {
echo $libitem->id; echo $libitem->id;
} else { } else {
echo implode(',', $libitem->album_suite); echo implode(',', $libitem->album_suite);
} } ?>')">
?>')"> <?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist'));
?>
</a> </a>
<?php <?php
} ?> } ?>
@ -77,8 +72,7 @@ if (Art::is_enabled()) {
<?php <?php
if (AmpConfig::get('show_played_times')) { if (AmpConfig::get('show_played_times')) {
?> ?>
<td class="cel_counter"><?php echo $libitem->object_cnt; <td class="cel_counter"><?php echo $libitem->object_cnt; ?></td>
?></td>
<?php <?php
} }
@ -88,16 +82,12 @@ if (Art::is_enabled()) {
if (User::is_registered()) { if (User::is_registered()) {
if (AmpConfig::get('ratings')) { if (AmpConfig::get('ratings')) {
?> ?>
<td class="cel_rating" id="rating_<?php echo $libitem->id; <td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_album"><?php Rating::show($libitem->id, 'album'); ?></td>
?>_album"><?php Rating::show($libitem->id, 'album');
?></td>
<?php <?php
} }
if (AmpConfig::get('userflags')) { if (AmpConfig::get('userflags')) {
?> ?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; <td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_album"><?php Userflag::show($libitem->id, 'album'); ?></td>
?>_album"><?php Userflag::show($libitem->id, 'album');
?></td>
<?php <?php
} }
} }
@ -106,11 +96,8 @@ if (Art::is_enabled()) {
<?php if (!AmpConfig::get('use_auth') || Access::check('interface', '25')) { <?php if (!AmpConfig::get('use_auth') || Access::check('interface', '25')) {
if (AmpConfig::get('sociable') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) { if (AmpConfig::get('sociable') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
?> ?>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=album&amp;id=<?php echo $libitem->id; ?>">
?>/shout.php?action=show_add_shout&type=album&amp;id=<?php echo $libitem->id; <?php echo UI::get_icon('comment', T_('Post Shout')); ?>
?>">
<?php echo UI::get_icon('comment', T_('Post Shout'));
?>
</a> </a>
<?php <?php
} }
@ -122,24 +109,21 @@ if (Art::is_enabled()) {
if (Access::check_function('batch_download') && check_can_zip('album')) { if (Access::check_function('batch_download') && check_can_zip('album')) {
?> ?>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path') ?>/batch.php?action=album&<?php echo $libitem->get_http_album_query_ids('id') ?>"> <a rel="nohtml" href="<?php echo AmpConfig::get('web_path') ?>/batch.php?action=album&<?php echo $libitem->get_http_album_query_ids('id') ?>">
<?php echo UI::get_icon('batch_download', T_('Batch Download')); <?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
?>
</a> </a>
<?php <?php
} }
if (Access::check('interface', '50') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) { if (Access::check('interface', '50') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
?> ?>
<a id="<?php echo 'edit_album_' . $libitem->id ?>" onclick="showEditDialog('album_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_album_' . $libitem->id ?>', '<?php echo T_('Album edit') ?>', 'album_')"> <a id="<?php echo 'edit_album_' . $libitem->id ?>" onclick="showEditDialog('album_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_album_' . $libitem->id ?>', '<?php echo T_('Album edit') ?>', 'album_')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<?php <?php
} }
if (Catalog::can_remove($libitem)) { if (Catalog::can_remove($libitem)) {
?> ?>
<a id="<?php echo 'delete_album_' . $libitem->id ?>" href="<?php echo AmpConfig::get('web_path') ?>/albums.php?action=delete&album_id=<?php echo $libitem->id ?>"> <a id="<?php echo 'delete_album_' . $libitem->id ?>" href="<?php echo AmpConfig::get('web_path') ?>/albums.php?action=delete&album_id=<?php echo $libitem->id ?>">
<?php echo UI::get_icon('delete', T_('Delete')); <?php echo UI::get_icon('delete', T_('Delete')); ?>
?>
</a> </a>
<?php <?php
} }

View file

@ -31,10 +31,8 @@ $thcount = 8;
<tr class="th-top"> <tr class="th-top">
<th class="cel_play essential"></th> <th class="cel_play essential"></th>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
++$thcount; ++$thcount; ?>
?> <th class="cel_cover optional"><?php echo T_('Art'); ?></th>
<th class="cel_cover optional"><?php echo T_('Art');
?></th>
<?php <?php
} ?> } ?>
<th class="cel_album essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Album'), 'album_sort_name'); ?></th> <th class="cel_album essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Album'), 'album_sort_name'); ?></th>
@ -44,29 +42,22 @@ $thcount = 8;
<th class="cel_year essential"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year', T_('Year'), 'album_sort_year'); ?></th> <th class="cel_year essential"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year', T_('Year'), 'album_sort_year'); ?></th>
<?php if (AmpConfig::get('show_played_times')) { <?php if (AmpConfig::get('show_played_times')) {
?> ?>
<th class="cel_counter optional"><?php echo T_('# Played'); <th class="cel_counter optional"><?php echo T_('# Played'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_tags optional"><?php echo T_('Tags'); ?></th> <th class="cel_tags optional"><?php echo T_('Tags'); ?></th>
<?php if (User::is_registered()) { <?php if (User::is_registered()) {
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
<th class="cel_rating optional"><?php echo T_('Rating');
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
<th class="cel_userflag optional"><?php echo T_('Fav.');
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action essential"><?php echo T_('Actions'); ?></th> <th class="cel_action essential"><?php echo T_('Actions'); ?></th>
@ -96,21 +87,16 @@ $thcount = 8;
if ($show_direct_play) { if ($show_direct_play) {
$show_direct_play = $show_playlist_add; $show_direct_play = $show_playlist_add;
} }
} } ?>
?>
<tr id="album_<?php echo $libitem->id ?>" class="<?php echo UI::flip_class() ?> libitem_menu"> <tr id="album_<?php echo $libitem->id ?>" class="<?php echo UI::flip_class() ?> libitem_menu">
<?php require AmpConfig::get('prefix') . UI::find_template('show_album_row.inc.php'); <?php require AmpConfig::get('prefix') . UI::find_template('show_album_row.inc.php'); ?>
?>
</tr> </tr>
<?php <?php
}?> }?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No album found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No album found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -120,8 +106,7 @@ $thcount = 8;
<th class="cel_play"></th> <th class="cel_play"></th>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
?> ?>
<th class="cel_cover"><?php echo T_('Art'); <th class="cel_cover"><?php echo T_('Art'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_album"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Album'), 'album_sort_name_bottom'); ?></th> <th class="cel_album"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Album'), 'album_sort_name_bottom'); ?></th>
@ -131,8 +116,7 @@ $thcount = 8;
<th class="cel_year"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year', T_('Year'), 'album_sort_year_bottom'); ?></th> <th class="cel_year"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year', T_('Year'), 'album_sort_year_bottom'); ?></th>
<?php if (AmpConfig::get('show_played_times')) { <?php if (AmpConfig::get('show_played_times')) {
?> ?>
<th class="cel_counter optional"><?php echo T_('# Played'); <th class="cel_counter optional"><?php echo T_('# Played'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_tags"><?php echo T_('Tags'); ?></th> <th class="cel_tags"><?php echo T_('Tags'); ?></th>
@ -140,18 +124,14 @@ $thcount = 8;
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<th class="cel_rating"><?php echo T_('Rating'); <th class="cel_rating"><?php echo T_('Rating'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<th class="cel_userflag"><?php echo T_('Fav.'); <th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action"><?php echo T_('Actions'); ?></th> <th class="cel_action"><?php echo T_('Actions'); ?></th>

View file

@ -37,26 +37,16 @@ UI::show_box_top($artist->f_name, 'info-box');
?> ?>
<?php <?php
if (AmpConfig::get('lastfm_api_key')) { if (AmpConfig::get('lastfm_api_key')) {
echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=artist_info&artist=' . $artist->id, 'artist_info')); echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=artist_info&artist=' . $artist->id, 'artist_info')); ?>
?>
<div class="item_right_info"> <div class="item_right_info">
<div class="external_links"> <div class="external_links">
<a href="http://www.google.com/search?q=%22<?php echo rawurlencode($artist->f_name); <a href="http://www.google.com/search?q=%22<?php echo rawurlencode($artist->f_name); ?>%22" target="_blank"><?php echo UI::get_icon('google', T_('Search on Google ...')); ?></a>
?>%22" target="_blank"><?php echo UI::get_icon('google', T_('Search on Google ...')); <a href="https://www.duckduckgo.com/?q=%22<?php echo rawurlencode($artist->f_name); ?>%22" target="_blank"><?php echo UI::get_icon('duckduckgo', T_('Search on DuckDuckGo ...')); ?></a>
?></a> <a href="http://en.wikipedia.org/wiki/Special:Search?search=%22<?php echo rawurlencode($artist->f_name); ?>%22&go=Go" target="_blank"><?php echo UI::get_icon('wikipedia', T_('Search on Wikipedia ...')); ?></a>
<a href="https://www.duckduckgo.com/?q=%22<?php echo rawurlencode($artist->f_name); <a href="http://www.last.fm/search?q=%22<?php echo rawurlencode($artist->f_name); ?>%22&type=artist" target="_blank"><?php echo UI::get_icon('lastfm', T_('Search on Last.fm ...')); ?></a>
?>%22" target="_blank"><?php echo UI::get_icon('duckduckgo', T_('Search on DuckDuckGo ...'));
?></a>
<a href="http://en.wikipedia.org/wiki/Special:Search?search=%22<?php echo rawurlencode($artist->f_name);
?>%22&go=Go" target="_blank"><?php echo UI::get_icon('wikipedia', T_('Search on Wikipedia ...'));
?></a>
<a href="http://www.last.fm/search?q=%22<?php echo rawurlencode($artist->f_name);
?>%22&type=artist" target="_blank"><?php echo UI::get_icon('lastfm', T_('Search on Last.fm ...'));
?></a>
</div> </div>
<div id="artist_biography"> <div id="artist_biography">
<?php echo T_('Loading...'); <?php echo T_('Loading...'); ?>
?>
</div> </div>
</div> </div>
<?php <?php
@ -67,32 +57,25 @@ if (AmpConfig::get('lastfm_api_key')) {
<?php <?php
if (AmpConfig::get('ratings')) { if (AmpConfig::get('ratings')) {
?> ?>
<div id="rating_<?php echo intval($artist->id); <div id="rating_<?php echo intval($artist->id); ?>_artist" style="display:inline;">
?>_artist" style="display:inline;"> <?php show_rating($artist->id, 'artist'); ?>
<?php show_rating($artist->id, 'artist');
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<div style="display:table-cell;" id="userflag_<?php echo $artist->id; <div style="display:table-cell;" id="userflag_<?php echo $artist->id; ?>_artist">
?>_artist"> <?php Userflag::show($artist->id, 'artist'); ?>
<?php Userflag::show($artist->id, 'artist');
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php <?php
if (AmpConfig::get('show_played_times')) { if (AmpConfig::get('show_played_times')) {
?> ?>
<br /> <br />
<div style="display:inline;"><?php echo T_('Played') . ' ' . $artist->object_cnt . ' ' . T_('times'); <div style="display:inline;"><?php echo T_('Played') . ' ' . $artist->object_cnt . ' ' . T_('times'); ?></div>
?></div>
<?php <?php
} }
@ -102,12 +85,9 @@ if (AmpConfig::get('show_played_times')) {
$owner_id = $artist->get_user_owner(); $owner_id = $artist->get_user_owner();
if (AmpConfig::get('sociable') && $owner_id > 0) { if (AmpConfig::get('sociable') && $owner_id > 0) {
$owner = new User($owner_id); $owner = new User($owner_id);
$owner->format(); $owner->format(); ?>
?>
<div class="item_uploaded_by"> <div class="item_uploaded_by">
<?php echo T_('Uploaded by'); <?php echo T_('Uploaded by'); ?> <?php echo $owner->f_link; ?>
?> <?php echo $owner->f_link;
?>
</div> </div>
<?php <?php
} ?> } ?>
@ -118,77 +98,55 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<li> <li>
<?php if ($object_type == 'album') { <?php if ($object_type == 'album') {
?> ?>
<a href="<?php echo $web_path; <a href="<?php echo $web_path; ?>/artists.php?action=show_all_songs&amp;artist=<?php echo $artist->id; ?>">
?>/artists.php?action=show_all_songs&amp;artist=<?php echo $artist->id; <?php echo UI::get_icon('view', T_("Show all")); ?></a>
?>"> <a href="<?php echo $web_path; ?>/artists.php?action=show_all_songs&amp;artist=<?php echo $artist->id; ?>">
<?php echo UI::get_icon('view', T_("Show all")); <?php echo T_("Show all"); ?>
?></a>
<a href="<?php echo $web_path;
?>/artists.php?action=show_all_songs&amp;artist=<?php echo $artist->id;
?>">
<?php echo T_("Show all");
?>
</a> </a>
<?php <?php
} else { } else {
?> ?>
<a href="<?php echo $web_path; <a href="<?php echo $web_path; ?>/artists.php?action=show&amp;artist=<?php echo $artist->id; ?>">
?>/artists.php?action=show&amp;artist=<?php echo $artist->id; <?php echo UI::get_icon('view', T_("Show albums")); ?></a>
?>"> <a href="<?php echo $web_path; ?>/artists.php?action=show&amp;artist=<?php echo $artist->id; ?>">
<?php echo UI::get_icon('view', T_("Show albums")); <?php echo T_("Show albums"); ?></a>
?></a>
<a href="<?php echo $web_path;
?>/artists.php?action=show&amp;artist=<?php echo $artist->id;
?>">
<?php echo T_("Show albums");
?></a>
<?php <?php
} ?> } ?>
</li> </li>
<?php if ($show_direct_play) { <?php if ($show_direct_play) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $artist->id, 'play', T_('Play all'), 'directplay_full_' . $artist->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $artist->id, 'play', T_('Play all'), 'directplay_full_' . $artist->id); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=artist&object_id=' . $artist->id, T_('Play all'), 'directplay_full_text_' . $artist->id); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=artist&object_id=' . $artist->id, T_('Play all'), 'directplay_full_text_' . $artist->id);
?>
</li> </li>
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $artist->id . '&append=true', 'play_add', T_('Play all last'), 'addplay_artist_' . $artist->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $artist->id . '&append=true', 'play_add', T_('Play all last'), 'addplay_artist_' . $artist->id); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=artist&object_id=' . $artist->id . '&append=true', T_('Play all last'), 'addplay_artist_text_' . $artist->id); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=artist&object_id=' . $artist->id . '&append=true', T_('Play all last'), 'addplay_artist_text_' . $artist->id);
?>
</li> </li>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php if ($show_playlist_add) { <?php if ($show_playlist_add) {
?> ?>
<li> <li>
<?php /* HINT: Artist Fullname */ ?> <?php /* HINT: Artist Fullname */ ?>
<?php echo Ajax::button('?action=basket&type=artist&id=' . $artist->id, 'add', T_('Add all to temporary playlist'), 'add_' . $artist->id); <?php echo Ajax::button('?action=basket&type=artist&id=' . $artist->id, 'add', T_('Add all to temporary playlist'), 'add_' . $artist->id); ?>
?> <?php echo Ajax::text('?action=basket&type=artist&id=' . $artist->id, T_('Add all to temporary playlist'), 'add_text_' . $artist->id); ?>
<?php echo Ajax::text('?action=basket&type=artist&id=' . $artist->id, T_('Add all to temporary playlist'), 'add_text_' . $artist->id);
?>
</li> </li>
<li> <li>
<?php /* HINT: Artist Fullname */ ?> <?php /* HINT: Artist Fullname */ ?>
<?php echo Ajax::button('?action=basket&type=artist_random&id=' . $artist->id, 'random', T_('Random all to temporary playlist'), 'random_' . $artist->id); <?php echo Ajax::button('?action=basket&type=artist_random&id=' . $artist->id, 'random', T_('Random all to temporary playlist'), 'random_' . $artist->id); ?>
?> <?php echo Ajax::text('?action=basket&type=artist_random&id=' . $artist->id, T_('Random all to temporary playlist'), 'random_text_' . $artist->id); ?>
<?php echo Ajax::text('?action=basket&type=artist_random&id=' . $artist->id, T_('Random all to temporary playlist'), 'random_text_' . $artist->id);
?>
</li> </li>
<?php <?php
} ?> } ?>
<?php if (AmpConfig::get('use_rss')) { <?php if (AmpConfig::get('use_rss')) {
?> ?>
<li> <li>
<?php echo Ampache_RSS::get_display('podcast', T_('Podcast'), array('object_type' => 'artist', 'object_id' => $artist->id)); <?php echo Ampache_RSS::get_display('podcast', T_('Podcast'), array('object_type' => 'artist', 'object_id' => $artist->id)); ?>
?>
</li> </li>
<?php <?php
} ?> } ?>
@ -196,30 +154,17 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
?> ?>
<?php if (AmpConfig::get('sociable')) { <?php if (AmpConfig::get('sociable')) {
?> ?>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=artist&id=<?php echo $artist->id; ?>"><?php echo UI::get_icon('comment', T_('Post Shout')); ?></a>
?>/shout.php?action=show_add_shout&type=artist&id=<?php echo $artist->id; <a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=artist&id=<?php echo $artist->id; ?>"><?php echo T_('Post Shout'); ?></a>
?>"><?php echo UI::get_icon('comment', T_('Post Shout'));
?></a>
<a href="<?php echo AmpConfig::get('web_path');
?>/shout.php?action=show_add_shout&type=artist&id=<?php echo $artist->id;
?>"><?php echo T_('Post Shout');
?></a>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php if (Access::check_function('batch_download') && check_can_zip('artist')) { <?php if (Access::check_function('batch_download') && check_can_zip('artist')) {
?> ?>
<li> <li>
<a rel="nohtml" href="<?php echo $web_path; <a rel="nohtml" href="<?php echo $web_path; ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>"><?php echo UI::get_icon('batch_download', T_('Download')); ?></a>
?>/batch.php?action=artist&id=<?php echo $artist->id; <a rel="nohtml" href="<?php echo $web_path; ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>"><?php echo T_('Download'); ?></a>
?>"><?php echo UI::get_icon('batch_download', T_('Download'));
?></a>
<a rel="nohtml" href="<?php echo $web_path;
?>/batch.php?action=artist&id=<?php echo $artist->id;
?>"><?php echo T_('Download');
?></a>
</li> </li>
<?php <?php
@ -229,18 +174,11 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('statistical_graphs')) { <?php if (AmpConfig::get('statistical_graphs')) {
?> ?>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/stats.php?action=graph&object_type=artist&object_id=<?php echo $artist->id; ?>"><?php echo UI::get_icon('statistics', T_('Graphs')); ?></a>
?>/stats.php?action=graph&object_type=artist&object_id=<?php echo $artist->id; <a href="<?php echo AmpConfig::get('web_path'); ?>/stats.php?action=graph&object_type=artist&object_id=<?php echo $artist->id; ?>"><?php echo T_('Graphs'); ?></a>
?>"><?php echo UI::get_icon('statistics', T_('Graphs'));
?></a>
<a href="<?php echo AmpConfig::get('web_path');
?>/stats.php?action=graph&object_type=artist&object_id=<?php echo $artist->id;
?>"><?php echo T_('Graphs');
?></a>
</li> </li>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php if ($artist->can_edit()) { <?php if ($artist->can_edit()) {
@ -248,26 +186,19 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('allow_upload')) { <?php if (AmpConfig::get('allow_upload')) {
?> ?>
<li> <li>
<a href="<?php echo $web_path; <a href="<?php echo $web_path; ?>/upload.php?artist=<?php echo $artist->id; ?>">
?>/upload.php?artist=<?php echo $artist->id; <?php echo UI::get_icon('upload', T_('Upload')); ?>
?>"> &nbsp;&nbsp;<?php echo T_('Upload'); ?>
<?php echo UI::get_icon('upload', T_('Upload'));
?>
&nbsp;&nbsp;<?php echo T_('Upload');
?>
</a> </a>
</li> </li>
<?php <?php
} } ?>
?>
<li> <li>
<a id="<?php echo 'edit_artist_' . $artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_' . $artist->id ?>', '<?php echo T_('Artist edit') ?>', '')"> <a id="<?php echo 'edit_artist_' . $artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_' . $artist->id ?>', '<?php echo T_('Artist edit') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<a id="<?php echo 'edit_artist_' . $artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_' . $artist->id ?>', '<?php echo T_('Artist edit') ?>', '')"> <a id="<?php echo 'edit_artist_' . $artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_' . $artist->id ?>', '<?php echo T_('Artist edit') ?>', '')">
<?php echo T_('Edit Artist'); <?php echo T_('Edit Artist'); ?>
?>
</a> </a>
</li> </li>
<?php <?php
@ -275,12 +206,8 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (Catalog::can_remove($artist)) { <?php if (Catalog::can_remove($artist)) {
?> ?>
<li> <li>
<a id="<?php echo 'delete_artist_' . $artist->id ?>" href="<?php echo AmpConfig::get('web_path'); <a id="<?php echo 'delete_artist_' . $artist->id ?>" href="<?php echo AmpConfig::get('web_path'); ?>/artists.php?action=delete&artist_id=<?php echo $artist->id; ?>">
?>/artists.php?action=delete&artist_id=<?php echo $artist->id; <?php echo UI::get_icon('delete', T_('Delete')); ?> <?php echo T_('Delete'); ?>
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?> <?php echo T_('Delete');
?>
</a> </a>
</li> </li>
<?php <?php
@ -294,26 +221,22 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<li class="tab_active"><a href="#albums"><?php echo T_('Albums'); ?></a></li> <li class="tab_active"><a href="#albums"><?php echo T_('Albums'); ?></a></li>
<?php if (AmpConfig::get('wanted')) { <?php if (AmpConfig::get('wanted')) {
?> ?>
<li><a id="missing_albums_link" href="#missing_albums"><?php echo T_('Missing Albums'); <li><a id="missing_albums_link" href="#missing_albums"><?php echo T_('Missing Albums'); ?></a></li>
?></a></li>
<?php <?php
} ?> } ?>
<?php if (AmpConfig::get('show_similar')) { <?php if (AmpConfig::get('show_similar')) {
?> ?>
<li><a id="similar_artist_link" href="#similar_artist"><?php echo T_('Similar Artists'); <li><a id="similar_artist_link" href="#similar_artist"><?php echo T_('Similar Artists'); ?></a></li>
?></a></li>
<?php <?php
} ?> } ?>
<?php if (AmpConfig::get('show_concerts')) { <?php if (AmpConfig::get('show_concerts')) {
?> ?>
<li><a id="concerts_link" href="#concerts"><?php echo T_('Events'); <li><a id="concerts_link" href="#concerts"><?php echo T_('Events'); ?></a></li>
?></a></li>
<?php <?php
} ?> } ?>
<?php if (AmpConfig::get('label')) { <?php if (AmpConfig::get('label')) {
?> ?>
<li><a id="labels_link" href="#labels"><?php echo T_('Labels'); <li><a id="labels_link" href="#labels"><?php echo T_('Labels'); ?></a></li>
?></a></li>
<?php <?php
} ?> } ?>
<!-- Needed to avoid the 'only one' bug --> <!-- Needed to avoid the 'only one' bug -->
@ -342,49 +265,41 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
</div> </div>
<?php <?php
if (AmpConfig::get('wanted')) { if (AmpConfig::get('wanted')) {
echo Ajax::observe('missing_albums_link', 'click', Ajax::action('?page=index&action=wanted_missing_albums&artist=' . $artist->id, 'missing_albums')); echo Ajax::observe('missing_albums_link', 'click', Ajax::action('?page=index&action=wanted_missing_albums&artist=' . $artist->id, 'missing_albums')); ?>
?>
<div id="missing_albums" class="tab_content"> <div id="missing_albums" class="tab_content">
<?php UI::show_box_top(T_('Missing Albums'), 'info-box'); <?php UI::show_box_top(T_('Missing Albums'), 'info-box');
echo T_('Loading...'); echo T_('Loading...');
UI::show_box_bottom(); UI::show_box_bottom(); ?>
?>
</div> </div>
<?php <?php
} ?> } ?>
<?php <?php
if (AmpConfig::get('show_similar')) { if (AmpConfig::get('show_similar')) {
echo Ajax::observe('similar_artist_link', 'click', Ajax::action('?page=index&action=similar_artist&artist=' . $artist->id, 'similar_artist')); echo Ajax::observe('similar_artist_link', 'click', Ajax::action('?page=index&action=similar_artist&artist=' . $artist->id, 'similar_artist')); ?>
?>
<div id="similar_artist" class="tab_content"> <div id="similar_artist" class="tab_content">
<?php UI::show_box_top(T_('Similar Artists'), 'info-box'); <?php UI::show_box_top(T_('Similar Artists'), 'info-box');
echo T_('Loading...'); echo T_('Loading...');
UI::show_box_bottom(); UI::show_box_bottom(); ?>
?>
</div> </div>
<?php <?php
} ?> } ?>
<?php <?php
if (AmpConfig::get('show_concerts')) { if (AmpConfig::get('show_concerts')) {
echo Ajax::observe('concerts_link', 'click', Ajax::action('?page=index&action=concerts&artist=' . $artist->id, 'concerts')); echo Ajax::observe('concerts_link', 'click', Ajax::action('?page=index&action=concerts&artist=' . $artist->id, 'concerts')); ?>
?>
<div id="concerts" class="tab_content"> <div id="concerts" class="tab_content">
<?php UI::show_box_top(T_('Events'), 'info-box'); <?php UI::show_box_top(T_('Events'), 'info-box');
echo T_('Loading...'); echo T_('Loading...');
UI::show_box_bottom(); UI::show_box_bottom(); ?>
?>
</div> </div>
<?php <?php
} ?> } ?>
<?php <?php
if (AmpConfig::get('label')) { if (AmpConfig::get('label')) {
echo Ajax::observe('labels_link', 'click', Ajax::action('?page=index&action=labels&artist=' . $artist->id, 'labels')); echo Ajax::observe('labels_link', 'click', Ajax::action('?page=index&action=labels&artist=' . $artist->id, 'labels')); ?>
?>
<div id="labels" class="tab_content"> <div id="labels" class="tab_content">
<?php UI::show_box_top(T_('Labels'), 'info-box'); <?php UI::show_box_top(T_('Labels'), 'info-box');
echo T_('Loading...'); echo T_('Loading...');
UI::show_box_bottom(); UI::show_box_bottom(); ?>
?>
</div> </div>
<?php <?php
} ?> } ?>

View file

@ -30,13 +30,9 @@
<div class="item_art"> <div class="item_art">
<?php if ($biography && is_array($biography)) { <?php if ($biography && is_array($biography)) {
?> ?>
<a href="<?php echo $biography['megaphoto']; <a href="<?php echo $biography['megaphoto']; ?>" rel="prettyPhoto"><img src="<?php echo $biography['largephoto']; ?>" alt="<?php echo $artist->f_name; ?>" width="128"></a>
?>" rel="prettyPhoto"><img src="<?php echo $biography['largephoto'];
?>" alt="<?php echo $artist->f_name;
?>" width="128"></a>
<?php <?php
} } ?>
?>
</div> </div>
<?php <?php
} ?> } ?>
@ -60,8 +56,7 @@
<div id="item_summary"> <div id="item_summary">
<?php if ($biography && is_array($biography)) { <?php if ($biography && is_array($biography)) {
?> ?>
<?php echo $biography['summary']; <?php echo $biography['summary']; ?>
?>
<?php <?php
}?> }?>
</div> </div>

View file

@ -38,13 +38,11 @@
</td> </td>
<?php <?php
if (Art::is_enabled()) { if (Art::is_enabled()) {
$name = scrub_out($libitem->full_name); $name = scrub_out($libitem->full_name); ?>
?>
<td class="cel_cover"> <td class="cel_cover">
<?php <?php
$thumb = (isset($browse) && !$browse->get_grid_view()) ? 11 : 1; $thumb = (isset($browse) && !$browse->get_grid_view()) ? 11 : 1;
Art::display('artist', $libitem->id, $name, $thumb, AmpConfig::get('web_path') . '/artists.php?action=show&artist=' . $libitem->id); Art::display('artist', $libitem->id, $name, $thumb, AmpConfig::get('web_path') . '/artists.php?action=show&artist=' . $libitem->id); ?>
?>
</td> </td>
<?php <?php
} ?> } ?>
@ -54,11 +52,9 @@ if (Art::is_enabled()) {
<?php <?php
if ($show_playlist_add) { if ($show_playlist_add) {
echo Ajax::button('?action=basket&type=artist&id=' . $libitem->id, 'add', T_('Add to temporary playlist'), 'add_artist_' . $libitem->id); echo Ajax::button('?action=basket&type=artist&id=' . $libitem->id, 'add', T_('Add to temporary playlist'), 'add_artist_' . $libitem->id);
echo Ajax::button('?action=basket&type=artist_random&id=' . $libitem->id, 'random', T_('Random to temporary playlist'), 'random_artist_' . $libitem->id); echo Ajax::button('?action=basket&type=artist_random&id=' . $libitem->id, 'random', T_('Random to temporary playlist'), 'random_artist_' . $libitem->id); ?>
?>
<a id="<?php echo 'add_playlist_' . $libitem->id ?>" onclick="showPlaylistDialog(event, 'artist', '<?php echo $libitem->id ?>')"> <a id="<?php echo 'add_playlist_' . $libitem->id ?>" onclick="showPlaylistDialog(event, 'artist', '<?php echo $libitem->id ?>')">
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); <?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
?>
</a> </a>
<?php <?php
@ -70,8 +66,7 @@ if (Art::is_enabled()) {
<td class="cel_time"><?php echo $libitem->f_time; ?></td> <td class="cel_time"><?php echo $libitem->f_time; ?></td>
<?php if (AmpConfig::get('show_played_times')) { <?php if (AmpConfig::get('show_played_times')) {
?> ?>
<td class="cel_counter"><?php echo $libitem->object_cnt; <td class="cel_counter"><?php echo $libitem->object_cnt; ?></td>
?></td>
<?php <?php
} ?> } ?>
<td class="cel_tags"><?php echo $libitem->f_tags; ?></td> <td class="cel_tags"><?php echo $libitem->f_tags; ?></td>
@ -79,16 +74,12 @@ if (Art::is_enabled()) {
if (User::is_registered()) { if (User::is_registered()) {
if (AmpConfig::get('ratings')) { if (AmpConfig::get('ratings')) {
?> ?>
<td class="cel_rating" id="rating_<?php echo $libitem->id; <td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_artist"><?php Rating::show($libitem->id, 'artist'); ?></td>
?>_artist"><?php Rating::show($libitem->id, 'artist');
?></td>
<?php <?php
} }
if (AmpConfig::get('userflags')) { if (AmpConfig::get('userflags')) {
?> ?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; <td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_artist"><?php Userflag::show($libitem->id, 'artist'); ?></td>
?>_artist"><?php Userflag::show($libitem->id, 'artist');
?></td>
<?php <?php
} }
} }
@ -97,29 +88,22 @@ if (Art::is_enabled()) {
<?php if (!AmpConfig::get('use_auth') || Access::check('interface', '25')) { <?php if (!AmpConfig::get('use_auth') || Access::check('interface', '25')) {
if (AmpConfig::get('sociable') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) { if (AmpConfig::get('sociable') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
?> ?>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=artist&amp;id=<?php echo $libitem->id; ?>">
?>/shout.php?action=show_add_shout&type=artist&amp;id=<?php echo $libitem->id; <?php echo UI::get_icon('comment', T_('Post Shout')); ?>
?>">
<?php echo UI::get_icon('comment', T_('Post Shout'));
?>
</a> </a>
<?php <?php
} }
if ($libitem->can_edit()) { if ($libitem->can_edit()) {
?> ?>
<a id="<?php echo 'edit_artist_' . $libitem->id ?>" onclick="showEditDialog('artist_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_artist_' . $libitem->id ?>', '<?php echo T_('Artist edit') ?>', 'artist_')"> <a id="<?php echo 'edit_artist_' . $libitem->id ?>" onclick="showEditDialog('artist_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_artist_' . $libitem->id ?>', '<?php echo T_('Artist edit') ?>', 'artist_')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<?php <?php
} }
if (Catalog::can_remove($libitem)) { if (Catalog::can_remove($libitem)) {
?> ?>
<a id="<?php echo 'delete_artist_' . $libitem->id ?>" href="<?php echo AmpConfig::get('web_path'); <a id="<?php echo 'delete_artist_' . $libitem->id ?>" href="<?php echo AmpConfig::get('web_path'); ?>/artists.php?action=delete&artist_id=<?php echo $libitem->id; ?>">
?>/artists.php?action=delete&artist_id=<?php echo $libitem->id; <?php echo UI::get_icon('delete', T_('Delete')); ?>
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?>
</a> </a>
<?php <?php
} }

View file

@ -33,10 +33,8 @@ $thcount = 8;
<tr class="th-top"> <tr class="th-top">
<th class="cel_play essential"></th> <th class="cel_play essential"></th>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
++$thcount; ++$thcount; ?>
?> <th class="cel_cover optional"><?php echo T_('Art'); ?></th>
<th class="cel_cover optional"><?php echo T_('Art');
?></th>
<?php <?php
} ?> } ?>
<th class="cel_artist essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=artist&sort=name', T_('Artist'), 'artist_sort_name'); ?></th> <th class="cel_artist essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=artist&sort=name', T_('Artist'), 'artist_sort_name'); ?></th>
@ -46,29 +44,22 @@ $thcount = 8;
<th class="cel_time optional"><?php echo T_('Time'); ?></th> <th class="cel_time optional"><?php echo T_('Time'); ?></th>
<?php if (AmpConfig::get('show_played_times')) { <?php if (AmpConfig::get('show_played_times')) {
?> ?>
<th class="cel_counter optional"><?php echo T_('# Played'); <th class="cel_counter optional"><?php echo T_('# Played'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_tags optional"><?php echo T_('Tags'); ?></th> <th class="cel_tags optional"><?php echo T_('Tags'); ?></th>
<?php if (User::is_registered()) { <?php if (User::is_registered()) {
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
<th class="cel_rating optional"><?php echo T_('Rating');
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
<th class="cel_userflag optional"><?php echo T_('Fav.');
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action essential"><?php echo T_('Action'); ?></th> <th class="cel_action essential"><?php echo T_('Action'); ?></th>
@ -98,21 +89,16 @@ $thcount = 8;
if ($show_direct_play) { if ($show_direct_play) {
$show_direct_play = $show_playlist_add; $show_direct_play = $show_playlist_add;
} }
} } ?>
?>
<tr id="artist_<?php echo $libitem->id ?>" class="<?php echo UI::flip_class() ?> libitem_menu"> <tr id="artist_<?php echo $libitem->id ?>" class="<?php echo UI::flip_class() ?> libitem_menu">
<?php require AmpConfig::get('prefix') . UI::find_template('show_artist_row.inc.php'); <?php require AmpConfig::get('prefix') . UI::find_template('show_artist_row.inc.php'); ?>
?>
</tr> </tr>
<?php <?php
} //end foreach ($artists as $artist) ?> } //end foreach ($artists as $artist) ?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No artist found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No artist found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -122,8 +108,7 @@ $thcount = 8;
<th class="cel_play essential"></th> <th class="cel_play essential"></th>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
?> ?>
<th class="cel_cover"><?php echo T_('Art'); <th class="cel_cover"><?php echo T_('Art'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_artist essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=artist&sort=name', T_('Artist'), 'artist_sort_name'); ?></th> <th class="cel_artist essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=artist&sort=name', T_('Artist'), 'artist_sort_name'); ?></th>
@ -133,8 +118,7 @@ $thcount = 8;
<th class="cel_time essential"><?php echo T_('Time'); ?></th> <th class="cel_time essential"><?php echo T_('Time'); ?></th>
<?php if (AmpConfig::get('show_played_times')) { <?php if (AmpConfig::get('show_played_times')) {
?> ?>
<th class="cel_counter optional"><?php echo T_('# Played'); <th class="cel_counter optional"><?php echo T_('# Played'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_tags optional"><?php echo T_('Tags'); ?></th> <th class="cel_tags optional"><?php echo T_('Tags'); ?></th>
@ -142,18 +126,14 @@ $thcount = 8;
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<th class="cel_rating optional"><?php echo T_('Rating'); <th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<th class="cel_userflag optional"><?php echo T_('Fav.'); <th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action essential"> <?php echo T_('Action'); ?> </th> <th class="cel_action essential"> <?php echo T_('Action'); ?> </th>

View file

@ -40,33 +40,19 @@ while ($i <= $rows) {
} else { } else {
?> ?>
<td align="center"> <td align="center">
<a href="<?php echo $image_url; <a href="<?php echo $image_url; ?>" title="<?php echo $_SESSION['form']['images'][$key]['title']; ?>" rel="prettyPhoto" target="_blank"><img src="<?php echo $image_url; ?>" alt="<?php echo T_('Art'); ?>" border="0" height="175" width="175" /></a>
?>" title="<?php echo $_SESSION['form']['images'][$key]['title'];
?>" rel="prettyPhoto" target="_blank"><img src="<?php echo $image_url;
?>" alt="<?php echo T_('Art');
?>" border="0" height="175" width="175" /></a>
<br /> <br />
<p align="center"> <p align="center">
<?php if (is_array($dimensions)) { <?php if (is_array($dimensions)) {
?> ?>
[<?php echo intval($dimensions['width']); [<?php echo intval($dimensions['width']); ?>x<?php echo intval($dimensions['height']); ?>]
?>x<?php echo intval($dimensions['height']);
?>]
<?php <?php
} else { } else {
?> ?>
<span class="error"><?php echo T_('Invalid'); <span class="error"><?php echo T_('Invalid'); ?></span>
?></span>
<?php <?php
} } ?>
?> [<a href="<?php echo AmpConfig::get('web_path'); ?>/arts.php?action=select_art&image=<?php echo $key; ?>&object_type=<?php echo $object_type; ?>&object_id=<?php echo $object_id; ?>&burl=<?php echo base64_encode($burl); ?>"><?php echo T_('Select'); ?></a>]
[<a href="<?php echo AmpConfig::get('web_path');
?>/arts.php?action=select_art&image=<?php echo $key;
?>&object_type=<?php echo $object_type;
?>&object_id=<?php echo $object_id;
?>&burl=<?php echo base64_encode($burl);
?>"><?php echo T_('Select');
?></a>]
</p> </p>
</td> </td>
<?php <?php

View file

@ -31,8 +31,7 @@ $class = $class ? $class : 'box';
</div> </div>
<?php if ($title) { <?php if ($title) {
?> ?>
<h3 class="box-title"><?php echo $title; <h3 class="box-title"><?php echo $title; ?></h3>
?></h3>
<?php <?php
} ?> } ?>
<div class="box-content clearfix"> <div class="box-content clearfix">

View file

@ -39,22 +39,16 @@
<?php <?php
foreach ($object_ids as $broadcast_id) { foreach ($object_ids as $broadcast_id) {
$libitem = new Broadcast($broadcast_id); $libitem = new Broadcast($broadcast_id);
$libitem->format(); $libitem->format(); ?>
?> <tr class="<?php echo UI::flip_class(); ?>" id="broadcast_row_<?php echo $libitem->id; ?>">
<tr class="<?php echo UI::flip_class(); <?php require AmpConfig::get('prefix') . UI::find_template('show_broadcast_row.inc.php'); ?>
?>" id="broadcast_row_<?php echo $libitem->id;
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_broadcast_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="6"><span class="nodata"><?php echo T_('No broadcast found'); ?></span></td>
<td colspan="6"><span class="nodata"><?php echo T_('No broadcast found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -26,15 +26,10 @@
$broadcasts = Broadcast::get_broadcasts($GLOBALS['user']->id); $broadcasts = Broadcast::get_broadcasts($GLOBALS['user']->id);
foreach ($broadcasts as $broadcast_id) { foreach ($broadcasts as $broadcast_id) {
$broadcast = new Broadcast($broadcast_id); $broadcast = new Broadcast($broadcast_id);
$broadcast->format(); $broadcast->format(); ?>
?>
<li> <li>
<a href="javascript:void(0);" id="rb_append_dbroadcast_<?php echo $broadcast->id; <a href="javascript:void(0);" id="rb_append_dbroadcast_<?php echo $broadcast->id; ?>" onclick="handleBroadcastAction('<?php echo AmpConfig::get('ajax_url') . '?page=player&action=broadcast&broadcast_id=' . $broadcast->id; ?>', 'rb_append_dbroadcast_<?php echo $broadcast->id; ?>');">
?>" onclick="handleBroadcastAction('<?php echo AmpConfig::get('ajax_url') . '?page=player&action=broadcast&broadcast_id=' . $broadcast->id; <?php echo $broadcast->f_name; ?>
?>', 'rb_append_dbroadcast_<?php echo $broadcast->id;
?>');">
<?php echo $broadcast->f_name;
?>
</a> </a>
</li> </li>
<?php <?php

View file

@ -33,26 +33,18 @@ $button_flip_state_id = 'button_flip_state_' . $libitem->id;
<td class="cel_action cel_action_text"> <td class="cel_action cel_action_text">
<?php if (!$libitem->isReady()) { <?php if (!$libitem->isReady()) {
?> ?>
<a href="<?php echo $web_path; <a href="<?php echo $web_path; ?>/admin/catalog.php?action=add_to_catalog&catalogs[]=<?php echo $libitem->id; ?>"><b><?php echo T_('Make it ready ...'); ?></b></a><br />
?>/admin/catalog.php?action=add_to_catalog&catalogs[]=<?php echo $libitem->id;
?>"><b><?php echo T_('Make it ready ...');
?></b></a><br />
<?php <?php
} ?> } ?>
<form> <form>
<select name="catalog_action_menu"> <select name="catalog_action_menu">
<?php if ($libitem->isReady()) { <?php if ($libitem->isReady()) {
?> ?>
<option value="add_to_catalog"><?php echo T_('Add'); <option value="add_to_catalog"><?php echo T_('Add'); ?></option>
?></option> <option value="update_catalog"><?php echo T_('Verify'); ?></option>
<option value="update_catalog"><?php echo T_('Verify'); <option value="clean_catalog"><?php echo T_('Clean'); ?></option>
?></option> <option value="full_service"><?php echo T_('Update'); ?></option>
<option value="clean_catalog"><?php echo T_('Clean'); <option value="gather_media_art"><?php echo T_('Gather Art'); ?></option>
?></option>
<option value="full_service"><?php echo T_('Update');
?></option>
<option value="gather_media_art"><?php echo T_('Gather Art');
?></option>
<?php <?php
} ?> } ?>
<option value="show_delete_catalog"><?php echo T_('Delete'); ?></option> <option value="show_delete_catalog"><?php echo T_('Delete'); ?></option>
@ -60,10 +52,8 @@ $button_flip_state_id = 'button_flip_state_' . $libitem->id;
<input type="button" onClick="NavigateTo('<?php echo $web_path; ?>/admin/catalog.php?action=' + this.form.catalog_action_menu.options[this.form.catalog_action_menu.selectedIndex].value + '&catalogs[]=<?php echo $libitem->id; ?>');" value="<?php echo T_('Go'); ?>"> <input type="button" onClick="NavigateTo('<?php echo $web_path; ?>/admin/catalog.php?action=' + this.form.catalog_action_menu.options[this.form.catalog_action_menu.selectedIndex].value + '&catalogs[]=<?php echo $libitem->id; ?>');" value="<?php echo T_('Go'); ?>">
<?php if (AmpConfig::get('catalog_disable')) { <?php if (AmpConfig::get('catalog_disable')) {
?> ?>
<span id="<?php echo($button_flip_state_id); <span id="<?php echo($button_flip_state_id); ?>">
?>"> <?php echo Ajax::button('?page=catalog&action=flip_state&catalog_id=' . $libitem->id, $icon, T_(ucfirst($icon)), 'flip_state_' . $libitem->id); ?>
<?php echo Ajax::button('?page=catalog&action=flip_state&catalog_id=' . $libitem->id, $icon, T_(ucfirst($icon)), 'flip_state_' . $libitem->id);
?>
</span> </span>
<?php <?php
} ?> } ?>

View file

@ -46,29 +46,18 @@ $web_path = AmpConfig::get('web_path');
} else { } else {
$action = 'install_catalog_type'; $action = 'install_catalog_type';
$action_txt = T_('Activate'); $action_txt = T_('Activate');
} } ?>
?> <tr class="<?php echo UI::flip_class(); ?>">
<tr class="<?php echo UI::flip_class(); <td class="cel_type"><?php echo scrub_out($catalog->get_type()); ?></td>
?>"> <td class="cel_description"><?php echo scrub_out($catalog->get_description()); ?></td>
<td class="cel_type"><?php echo scrub_out($catalog->get_type()); <td class="cel_version"><?php echo scrub_out($catalog->get_version()); ?></td>
?></td> <td class="cel_action"><a href="<?php echo $web_path; ?>/admin/modules.php?action=<?php echo $action; ?>&amp;type=<?php echo urlencode($catalog->get_type()); ?>"><?php echo $action_txt; ?></a></td>
<td class="cel_description"><?php echo scrub_out($catalog->get_description());
?></td>
<td class="cel_version"><?php echo scrub_out($catalog->get_version());
?></td>
<td class="cel_action"><a href="<?php echo $web_path;
?>/admin/modules.php?action=<?php echo $action;
?>&amp;type=<?php echo urlencode($catalog->get_type());
?>"><?php echo $action_txt;
?></a></td>
</tr> </tr>
<?php <?php
} if (!count($catalogs)) { } if (!count($catalogs)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="4"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
<td colspan="4"><span class="error"><?php echo T_('No Records Found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -38,13 +38,9 @@
<?php <?php
foreach ($object_ids as $catalog_id) { foreach ($object_ids as $catalog_id) {
$libitem = Catalog::create_from_id($catalog_id); $libitem = Catalog::create_from_id($catalog_id);
$libitem->format(); $libitem->format(); ?>
?> <tr class="<?php echo UI::flip_class(); ?>" id="catalog_<?php echo $libitem->id; ?>">
<tr class="<?php echo UI::flip_class(); <?php require AmpConfig::get('prefix') . UI::find_template('show_catalog_row.inc.php'); ?>
?>" id="catalog_<?php echo $libitem->id;
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_catalog_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -52,8 +48,7 @@
<td colspan="6"> <td colspan="6">
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<span class="nodata"><?php echo T_('No catalog found'); <span class="nodata"><?php echo T_('No catalog found'); ?></span>
?></span>
<?php <?php
} ?> } ?>
</td> </td>

View file

@ -48,22 +48,16 @@
<?php <?php
foreach ($object_ids as $channel_id) { foreach ($object_ids as $channel_id) {
$libitem = new Channel($channel_id); $libitem = new Channel($channel_id);
$libitem->format(); $libitem->format(); ?>
?> <tr class="<?php echo UI::flip_class(); ?>" id="channel_row_<?php echo $libitem->id; ?>">
<tr class="<?php echo UI::flip_class(); <?php require AmpConfig::get('prefix') . UI::find_template('show_channel_row.inc.php'); ?>
?>" id="channel_row_<?php echo $libitem->id;
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_channel_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="13"><span class="nodata"><?php echo T_('No channel found'); ?></span></td>
<td colspan="13"><span class="nodata"><?php echo T_('No channel found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -33,21 +33,15 @@
<?php <?php
foreach ($coming_concerts as $libitem) { foreach ($coming_concerts as $libitem) {
?> ?>
<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') . UI::find_template('show_concert_row.inc.php'); ?>
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_concert_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
<?php if (!$coming_concerts || !count($coming_concerts)) { <?php if (!$coming_concerts || !count($coming_concerts)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No coming events found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No coming events found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -67,21 +61,15 @@
<?php <?php
foreach ($concerts as $libitem) { foreach ($concerts as $libitem) {
?> ?>
<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') . UI::find_template('show_concert_row.inc.php'); ?>
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_concert_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
<?php if (!$concerts || !count($concerts)) { <?php if (!$concerts || !count($concerts)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No past events found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No past events found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -31,12 +31,9 @@ $confirmation = Core::form_register($form_name);
</form> </form>
<?php if ($cancel) { <?php if ($cancel) {
?> ?>
<form method="post" action="<?php echo AmpConfig::get('web_path') . '/' . return_referer(); <form method="post" action="<?php echo AmpConfig::get('web_path') . '/' . return_referer(); ?>" style="display:inline;">
?>" style="display:inline;"> <input type="submit" value="<?php echo T_('Cancel'); ?>" />
<input type="submit" value="<?php echo T_('Cancel'); <?php echo $confirmation; ?>
?>" />
<?php echo $confirmation;
?>
</form> </form>
<?php <?php
} ?> } ?>

View file

@ -140,12 +140,9 @@
// Be sure to print only scalar values // Be sure to print only scalar values
if ($value === null || is_scalar($value)) { if ($value === null || is_scalar($value)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td valign="top"><strong><?php echo $key; ?></strong></td>
<td valign="top"><strong><?php echo $key; <td><?php echo $value; ?></td>
?></strong></td>
<td><?php echo $value;
?></td>
</tr> </tr>
<?php <?php

View file

@ -28,39 +28,29 @@ UI::show_box_top($string, 'info-box');
<?php if ($democratic->is_enabled()) { <?php if ($democratic->is_enabled()) {
?> ?>
<li> <li>
<?php echo T_('Cooldown'); <?php echo T_('Cooldown'); ?>:<?php echo $democratic->f_cooldown; ?>
?>:<?php echo $democratic->f_cooldown;
?>
</li> </li>
<?php <?php
} ?> } ?>
<?php if (Access::check('interface', '75')) { <?php if (Access::check('interface', '75')) {
?> ?>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/democratic.php?action=manage"><?php echo UI::get_icon('server_lightning', T_('Configure Democratic Playlist')); ?>
?>/democratic.php?action=manage"><?php echo UI::get_icon('server_lightning', T_('Configure Democratic Playlist'));
?>
&nbsp; &nbsp;
<?php echo T_('Configure Democratic Playlist'); <?php echo T_('Configure Democratic Playlist'); ?></a>
?></a>
</li> </li>
<?php if ($democratic->is_enabled()) { <?php if ($democratic->is_enabled()) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=democratic&action=send_playlist&democratic_id=' . $democratic->id, 'all', T_('Play'), 'play_democratic'); <?php echo Ajax::button('?page=democratic&action=send_playlist&democratic_id=' . $democratic->id, 'all', T_('Play'), 'play_democratic'); ?>
?> <?php echo Ajax::text('?page=democratic&action=send_playlist&democratic_id=' . $democratic->id, T_('Play Democratic Playlist'), 'play_democratic_full_text'); ?>
<?php echo Ajax::text('?page=democratic&action=send_playlist&democratic_id=' . $democratic->id, T_('Play Democratic Playlist'), 'play_democratic_full_text');
?>
</li> </li>
<li> <li>
<?php echo Ajax::button('?page=democratic&action=clear_playlist&democratic_id=' . $democratic->id, 'delete', T_('Clear Playlist'), 'clear_democratic'); <?php echo Ajax::button('?page=democratic&action=clear_playlist&democratic_id=' . $democratic->id, 'delete', T_('Clear Playlist'), 'clear_democratic'); ?>
?> <?php echo Ajax::text('?page=democratic&action=clear_playlist&democratic_id=' . $democratic->id, T_('Clear Playlist'), 'clear_democratic_full_text'); ?>
<?php echo Ajax::text('?page=democratic&action=clear_playlist&democratic_id=' . $democratic->id, T_('Clear Playlist'), 'clear_democratic_full_text');
?>
</li> </li>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
</ul> </ul>

View file

@ -41,12 +41,10 @@ $web_path = AmpConfig::get('web_path');
</colgroup> </colgroup>
<?php <?php
if (!count($object_ids)) { if (!count($object_ids)) {
$playlist = new Playlist($democratic->base_playlist); $playlist = new Playlist($democratic->base_playlist); ?>
?>
<tr> <tr>
<td> <td>
<?php echo T_('Playing from base Playlist'); <?php echo T_('Playing from base Playlist'); ?>.
?>.
</a> </a>
</td> </td>
</tr> </tr>
@ -58,25 +56,17 @@ else {
?> ?>
<thead> <thead>
<tr class="th-top"> <tr class="th-top">
<th class="cel_action"><?php echo T_('Action'); <th class="cel_action"><?php echo T_('Action'); ?></th>
?></th> <th class="cel_votes"><?php echo T_('Votes'); ?></th>
<th class="cel_votes"><?php echo T_('Votes'); <th class="cel_title"><?php echo T_('Title'); ?></th>
?></th> <th class="cel_album"><?php echo T_('Album'); ?></th>
<th class="cel_title"><?php echo T_('Title'); <th class="cel_artist"><?php echo T_('Artist'); ?></th>
?></th> <th class="cel_time"><?php echo T_('Time'); ?></th>
<th class="cel_album"><?php echo T_('Album');
?></th>
<th class="cel_artist"><?php echo T_('Artist');
?></th>
<th class="cel_time"><?php echo T_('Time');
?></th>
<?php if (Access::check('interface', '100')) { <?php if (Access::check('interface', '100')) {
?> ?>
<th class="cel_admin"><?php echo T_('Admin'); <th class="cel_admin"><?php echo T_('Admin'); ?></th>
?></th>
<?php <?php
} } ?>
?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -88,43 +78,31 @@ $democratic = Democratic::get_current_playlist();
$item = (array) $item; $item = (array) $item;
} }
$media = new $item['object_type']($item['object_id']); $media = new $item['object_type']($item['object_id']);
$media->format(); $media->format(); ?>
?> <tr class="<?php echo UI::flip_class(); ?>">
<tr class="<?php echo UI::flip_class();
?>">
<td class="cel_action"> <td class="cel_action">
<?php if ($democratic->has_vote($item['object_id'], $item['object_type'])) { <?php if ($democratic->has_vote($item['object_id'], $item['object_type'])) {
?> ?>
<?php echo Ajax::button('?page=democratic&action=delete_vote&row_id=' . $item['id'], 'delete', T_('Remove Vote'), 'remove_vote_' . $item['id']); <?php echo Ajax::button('?page=democratic&action=delete_vote&row_id=' . $item['id'], 'delete', T_('Remove Vote'), 'remove_vote_' . $item['id']); ?>
?>
<?php <?php
} else { } else {
?> ?>
<?php echo Ajax::button('?page=democratic&action=add_vote&object_id=' . $media->id . '&type=' . scrub_out($item['object_type']), 'tick', T_('Add Vote'), 'remove_vote_' . $item['id']); <?php echo Ajax::button('?page=democratic&action=add_vote&object_id=' . $media->id . '&type=' . scrub_out($item['object_type']), 'tick', T_('Add Vote'), 'remove_vote_' . $item['id']); ?>
?>
<?php <?php
} } ?>
?>
</td> </td>
<td class="cel_votes" ><?php echo scrub_out($democratic->get_vote($item['id'])); <td class="cel_votes" ><?php echo scrub_out($democratic->get_vote($item['id'])); ?></td>
?></td> <td class="cel_title"><?php echo $media->f_link; ?></td>
<td class="cel_title"><?php echo $media->f_link; <td class="cel_album"><?php echo $media->f_album_link; ?></td>
?></td> <td class="cel_artist"><?php echo $media->f_artist_link; ?></td>
<td class="cel_album"><?php echo $media->f_album_link; <td class="cel_time"><?php echo $media->f_time; ?></td>
?></td>
<td class="cel_artist"><?php echo $media->f_artist_link;
?></td>
<td class="cel_time"><?php echo $media->f_time;
?></td>
<?php if (Access::check('interface', '100')) { <?php if (Access::check('interface', '100')) {
?> ?>
<td class="cel_admin"> <td class="cel_admin">
<?php echo Ajax::button('?page=democratic&action=delete&row_id=' . $item['id'], 'disable', T_('Delete'), 'delete_row_' . $item['id']); <?php echo Ajax::button('?page=democratic&action=delete&row_id=' . $item['id'], 'disable', T_('Delete'), 'delete_row_' . $item['id']); ?>
?>
</td> </td>
<?php <?php
} } ?>
?>
</tr> </tr>
<?php <?php
@ -133,25 +111,17 @@ $democratic = Democratic::get_current_playlist();
</tbody> </tbody>
<tfoot> <tfoot>
<tr class="th-bottom"> <tr class="th-bottom">
<th class="cel_action"><?php echo T_('Action'); <th class="cel_action"><?php echo T_('Action'); ?></th>
?></th> <th class="cel_votes"><?php echo T_('Votes'); ?></th>
<th class="cel_votes"><?php echo T_('Votes'); <th class="cel_title"><?php echo T_('Title'); ?></th>
?></th> <th class="cel_album"><?php echo T_('Album'); ?></th>
<th class="cel_title"><?php echo T_('Title'); <th class="cel_artist"><?php echo T_('Artist'); ?></th>
?></th> <th class="cel_time"><?php echo T_('Time'); ?></th>
<th class="cel_album"><?php echo T_('Album');
?></th>
<th class="cel_artist"><?php echo T_('Artist');
?></th>
<th class="cel_time"><?php echo T_('Time');
?></th>
<?php if (Access::check('interface', '100')) { <?php if (Access::check('interface', '100')) {
?> ?>
<th class="cel_admin"><?php echo T_('Admin'); <th class="cel_admin"><?php echo T_('Admin'); ?></th>
?></th>
<?php <?php
} } ?>
?>
</tr> </tr>
</tfoot> </tfoot>
<?php <?php

View file

@ -55,17 +55,13 @@ $web_path = AmpConfig::get('web_path');
<div class="alert alert-danger"> <div class="alert alert-danger">
<?php if (!AmpConfig::get('demo_mode')) { <?php if (!AmpConfig::get('demo_mode')) {
?> ?>
<p><?php echo T_('You have been redirected to this page because you do not have access to this function.'); <p><?php echo T_('You have been redirected to this page because you do not have access to this function.'); ?></p>
?></p> <p><?php echo T_('If you believe this is an error please contact an Ampache administrator.'); ?></p>
<p><?php echo T_('If you believe this is an error please contact an Ampache administrator.'); <p><?php echo T_('This event has been logged.'); ?></p>
?></p>
<p><?php echo T_('This event has been logged.');
?></p>
<?php <?php
} else { } else {
?> ?>
<p><?php echo T_("You have been redirected to this page because you attempted to access a function that is disabled in the demo."); <p><?php echo T_("You have been redirected to this page because you attempted to access a function that is disabled in the demo."); ?></p>
?></p>
<?php <?php
} ?> } ?>
</div> </div>

View file

@ -36,28 +36,19 @@
<tbody> <tbody>
<?php foreach ($songs as $song) { <?php foreach ($songs as $song) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td class="cel_select"><input type="checkbox" name="song[]" value="<?php echo $song->id; ?>" /></td>
<td class="cel_select"><input type="checkbox" name="song[]" value="<?php echo $song->id; <td class="cel_song"><?php echo $song->title; ?></td>
?>" /></td> <td class="cel_album"><?php echo $song->get_album_name($song->album); ?></td>
<td class="cel_song"><?php echo $song->title; <td class="cel_artist"><?php echo $song->get_artist_name($song->album); ?></td>
?></td> <td class="cel_filename"><?php echo $song->file; ?></td>
<td class="cel_album"><?php echo $song->get_album_name($song->album); <td class="cel_additiontime"><?php echo date("h:i:s, m/d/y", $song->addition_time); ?></td>
?></td>
<td class="cel_artist"><?php echo $song->get_artist_name($song->album);
?></td>
<td class="cel_filename"><?php echo $song->file;
?></td>
<td class="cel_additiontime"><?php echo date("h:i:s, m/d/y", $song->addition_time);
?></td>
</tr> </tr>
<?php <?php
} if (!count($songs)) { } if (!count($songs)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="6"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
<td colspan="6"><span class="error"><?php echo T_('No Records Found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -44,30 +44,18 @@
$row_key = 'duplicate_' . $song_id; $row_key = 'duplicate_' . $song_id;
$button_flip_state_id = 'button_flip_state_' . $song_id; $button_flip_state_id = 'button_flip_state_' . $song_id;
$current_class = ($key == '0') ? 'row-highlight' : UI::flip_class(); $current_class = ($key == '0') ? 'row-highlight' : UI::flip_class();
$button = $song->enabled ? 'disable' : 'enable'; $button = $song->enabled ? 'disable' : 'enable'; ?>
?> <tr id="<?php echo $row_key; ?>" class="<?php echo $current_class; ?>">
<tr id="<?php echo $row_key; <td class="cel_disable" id="<?php echo($button_flip_state_id); ?>">
?>" class="<?php echo $current_class; <?php echo Ajax::button('?page=song&action=flip_state&song_id=' . $song_id, $button, T_(ucfirst($button)), 'flip_state_' . $song_id); ?>
?>">
<td class="cel_disable" id="<?php echo($button_flip_state_id);
?>">
<?php echo Ajax::button('?page=song&action=flip_state&song_id=' . $song_id, $button, T_(ucfirst($button)), 'flip_state_' . $song_id);
?>
</td> </td>
<td class="cel_song"><?php echo $song->f_link; <td class="cel_song"><?php echo $song->f_link; ?></td>
?></td> <td class="cel_artist"><?php echo $song->f_artist_link; ?></td>
<td class="cel_artist"><?php echo $song->f_artist_link; <td class="cel_album"><?php echo $song->f_album_link; ?></td>
?></td> <td class="cel_length"><?php echo $song->f_time; ?></td>
<td class="cel_album"><?php echo $song->f_album_link; <td class="cel_bitrate"><?php echo $song->f_bitrate; ?></td>
?></td> <td class="cel_size"><?php echo $song->f_size; ?></td>
<td class="cel_length"><?php echo $song->f_time; <td class="cel_filename"><?php echo scrub_out($song->file); ?></td>
?></td>
<td class="cel_bitrate"><?php echo $song->f_bitrate;
?></td>
<td class="cel_size"><?php echo $song->f_size;
?></td>
<td class="cel_filename"><?php echo scrub_out($song->file);
?></td>
</tr> </tr>
<?php <?php

View file

@ -34,11 +34,8 @@
<?php <?php
$fields = Song::get_fields(); $fields = Song::get_fields();
foreach ($fields as $key=>$value) { foreach ($fields as $key=>$value) {
$name = ucfirst(str_replace('_', ' ', $key)); $name = ucfirst(str_replace('_', ' ', $key)); ?>
?> <option value="<?php echo scrub_out($key); ?>"><?php echo scrub_out($name); ?></option>
<option value="<?php echo scrub_out($key);
?>"><?php echo scrub_out($name);
?></option>
<?php <?php
} ?> } ?>
</select> </select>

View file

@ -48,11 +48,9 @@
<td> <td>
<?php <?php
if (Access::check('interface', 50)) { if (Access::check('interface', 50)) {
show_artist_select('album_artist', $libitem->album_artist, true, $libitem->id, true); show_artist_select('album_artist', $libitem->album_artist, true, $libitem->id, true); ?>
?>
<div id="album_artist_select_album_<?php echo $libitem->id ?>"> <div id="album_artist_select_album_<?php echo $libitem->id ?>">
<?php echo Ajax::observe('album_artist_select_' . $libitem->id, 'change', 'check_inline_song_edit("album_artist", ' . $libitem->id . ')'); <?php echo Ajax::observe('album_artist_select_' . $libitem->id, 'change', 'check_inline_song_edit("album_artist", ' . $libitem->id . ')'); ?>
?>
</div> </div>
<?php <?php
@ -75,8 +73,7 @@
<td> <td>
<?php if (Access::check('interface', 50)) { <?php if (Access::check('interface', 50)) {
?> ?>
<input type="text" name="mbid" value="<?php echo $libitem->mbid; <input type="text" name="mbid" value="<?php echo $libitem->mbid; ?>" />
?>" />
<?php <?php
} else { } else {
@ -90,8 +87,7 @@
<td> <td>
<?php if (Access::check('interface', 50)) { <?php if (Access::check('interface', 50)) {
?> ?>
<input type="text" name="mbid_group" value="<?php echo $libitem->mbid_group; <input type="text" name="mbid_group" value="<?php echo $libitem->mbid_group; ?>" />
?>" />
<?php <?php
} else { } else {

View file

@ -32,8 +32,7 @@
<td> <td>
<?php if (Access::check('interface', 50)) { <?php if (Access::check('interface', 50)) {
?> ?>
<input type="text" name="mbid" value="<?php echo $libitem->mbid; <input type="text" name="mbid" value="<?php echo $libitem->mbid; ?>" />
?>" />
<?php <?php
} else { } else {
echo $libitem->mbid; echo $libitem->mbid;
@ -60,8 +59,7 @@
?> ?>
<tr> <tr>
<td class="edit_dialog_content_header"><?php echo T_('Labels') ?></td> <td class="edit_dialog_content_header"><?php echo T_('Labels') ?></td>
<td><input type="text" name="edit_labels" id="edit_labels" value="<?php echo Label::get_display($libitem->labels); <td><input type="text" name="edit_labels" id="edit_labels" value="<?php echo Label::get_display($libitem->labels); ?>" /></td>
?>" /></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -24,8 +24,7 @@
<form method="post" enctype="multipart/form-data" action="<?php echo AmpConfig::get('web_path'); ?>/admin/license.php?action=edit"> <form method="post" enctype="multipart/form-data" action="<?php echo AmpConfig::get('web_path'); ?>/admin/license.php?action=edit">
<?php if (isset($license)) { <?php if (isset($license)) {
?> ?>
<input type="hidden" name="license_id" value="<?php echo $license->id; <input type="hidden" name="license_id" value="<?php echo $license->id; ?>" />
?>" />
<?php <?php
} ?> } ?>
<table class="tabledata" cellpadding="0" cellspacing="0"> <table class="tabledata" cellpadding="0" cellspacing="0">

View file

@ -44,8 +44,7 @@
?> ?>
<tr> <tr>
<td class="edit_dialog_content_header"></td> <td class="edit_dialog_content_header"></td>
<td><input type="checkbox" name="allow_download" value="1" <?php echo ($libitem->allow_download) ? 'checked' : ''; <td><input type="checkbox" name="allow_download" value="1" <?php echo ($libitem->allow_download) ? 'checked' : ''; ?> /> <?php echo T_('Allow Download') ?></td>
?> /> <?php echo T_('Allow Download') ?></td>
</tr> </tr>
<?php <?php
} }

View file

@ -33,22 +33,18 @@
<tr> <tr>
<td class="edit_dialog_content_header"><?php echo T_('Artist') ?></td> <td class="edit_dialog_content_header"><?php echo T_('Artist') ?></td>
<td> <td>
<?php show_artist_select('artist', $libitem->artist, true, $libitem->id); <?php show_artist_select('artist', $libitem->artist, true, $libitem->id); ?>
?>
<div id="artist_select_song_<?php echo $libitem->id ?>"> <div id="artist_select_song_<?php echo $libitem->id ?>">
<?php echo Ajax::observe('artist_select_' . $libitem->id, 'change', 'check_inline_song_edit("artist", ' . $libitem->id . ')'); <?php echo Ajax::observe('artist_select_' . $libitem->id, 'change', 'check_inline_song_edit("artist", ' . $libitem->id . ')'); ?>
?>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="edit_dialog_content_header"><?php echo T_('Album') ?></td> <td class="edit_dialog_content_header"><?php echo T_('Album') ?></td>
<td> <td>
<?php show_album_select('album', $libitem->album, true, $libitem->id); <?php show_album_select('album', $libitem->album, true, $libitem->id); ?>
?>
<div id="album_select_song_<?php echo $libitem->id ?>"> <div id="album_select_song_<?php echo $libitem->id ?>">
<?php echo Ajax::observe('album_select_' . $libitem->id, 'change', 'check_inline_song_edit("album", ' . $libitem->id . ')'); <?php echo Ajax::observe('album_select_' . $libitem->id, 'change', 'check_inline_song_edit("album", ' . $libitem->id . ')'); ?>
?>
</div> </div>
</td> </td>
</tr> </tr>
@ -65,8 +61,7 @@
<?php <?php
if (Access::check('interface', 50)) { if (Access::check('interface', 50)) {
?> ?>
<input type="text" name="mbid" value="<?php echo $libitem->mbid; <input type="text" name="mbid" value="<?php echo $libitem->mbid; ?>" />
?>" />
<?php <?php
} else { } else {
echo $libitem->mbid; echo $libitem->mbid;
@ -98,11 +93,9 @@
<tr> <tr>
<td class="edit_dialog_content_header"><?php echo T_('Music License') ?></td> <td class="edit_dialog_content_header"><?php echo T_('Music License') ?></td>
<td> <td>
<?php show_license_select('license', $libitem->license, $libitem->id); <?php show_license_select('license', $libitem->license, $libitem->id); ?>
?>
<div id="album_select_license_<?php echo $libitem->license ?>"> <div id="album_select_license_<?php echo $libitem->license ?>">
<?php echo Ajax::observe('license_select_' . $libitem->license, 'change', 'check_inline_song_edit("license", ' . $libitem->id . ')'); <?php echo Ajax::observe('license_select_' . $libitem->license, 'change', 'check_inline_song_edit("license", ' . $libitem->id . ')'); ?>
?>
</div> </div>
</td> </td>
</tr> </tr>

View file

@ -37,13 +37,8 @@ UI::show_box_top(T_('Export Catalog'), 'box box_export'); ?>
$catalog_ids = Catalog::get_catalogs(); $catalog_ids = Catalog::get_catalogs();
foreach ($catalog_ids as $catalog_id) { foreach ($catalog_ids as $catalog_id) {
$catalog = Catalog::create_from_id($catalog_id); $catalog = Catalog::create_from_id($catalog_id);
$current_name = 'catalog_' . $catalog->id; $current_name = 'catalog_' . $catalog->id; ?>
<option value="<?php echo $catalog->id; ?>"<?php echo ${$current_name}; ?>><?php echo scrub_out($catalog->name); ?></option>
?>
<option value="<?php echo $catalog->id;
?>"<?php echo ${$current_name};
?>><?php echo scrub_out($catalog->name);
?></option>
<?php <?php
} }

View file

@ -29,14 +29,10 @@
?> ?>
<tr> <tr>
<td> <td>
<?php echo $word['label']; <?php echo $word['label']; ?>&nbsp;
?>&nbsp;
</td> </td>
<td> <td>
<input type="text" id="option_<?php echo $key; <input type="text" id="option_<?php echo $key; ?>" name="option_<?php echo $key; ?>" value="<?php echo scrub_out(unhtmlentities($word['value'])); ?>" />
?>" name="option_<?php echo $key;
?>" value="<?php echo scrub_out(unhtmlentities($word['value']));
?>" />
</td> </td>
</tr> </tr>
<?php <?php

View file

@ -29,12 +29,8 @@ if ($blink) {
<div class="stats_graph"> <div class="stats_graph">
<?php <?php
foreach ($gtypes as $gtype) { foreach ($gtypes as $gtype) {
$graph_link = AmpConfig::get('web_path') . "/graph.php?type=" . $gtype . "&start_date=" . $start_date . "&end_date=" . $end_date . "&zoom=" . $zoom . "&user_id=" . $user_id . "&object_type=" . $object_type . "&object_id=" . $object_id; $graph_link = AmpConfig::get('web_path') . "/graph.php?type=" . $gtype . "&start_date=" . $start_date . "&end_date=" . $end_date . "&zoom=" . $zoom . "&user_id=" . $user_id . "&object_type=" . $object_type . "&object_id=" . $object_id; ?>
?> <a href="<?php echo $graph_link; ?>&width=1400&height=690" target="_blank" title="<?php echo T_('Show large'); ?>"><img src="<?php echo $graph_link; ?>" /></a>
<a href="<?php echo $graph_link;
?>&width=1400&height=690" target="_blank" title="<?php echo T_('Show large');
?>"><img src="<?php echo $graph_link;
?>" /></a>
<br /><br /> <br /><br />
<?php <?php
} ?> } ?>
@ -46,8 +42,7 @@ if (AmpConfig::get('geolocation')) {
<div class="stats_graph"> <div class="stats_graph">
<?php <?php
$graph = new Graph(); $graph = new Graph();
$graph->display_map($user_id, $object_type, $object_id, $start_date, $end_date, $zoom); $graph->display_map($user_id, $object_type, $object_id, $start_date, $end_date, $zoom); ?>
?>
</div> </div>
<?php <?php

View file

@ -84,8 +84,7 @@ if ($isVideo) {
height: "108px", height: "108px",
<?php <?php
} } ?>
?>
cssClass: "jp-video-360p" cssClass: "jp-video-360p"
<?php <?php
@ -105,8 +104,7 @@ if ($isVideo) {
<?php <?php
} }
} } ?>
?>
} }
<?php <?php
} ?> } ?>
@ -178,8 +176,7 @@ if (!$isVideo && !$isRadio && !$is_share) {
} else { } else {
echo "var titleobj = obj.title;"; echo "var titleobj = obj.title;";
echo "var artistobj = obj.artist;"; echo "var artistobj = obj.artist;";
} } ?>
?>
$('.playing_title').html(titleobj); $('.playing_title').html(titleobj);
$('.playing_artist').html(artistobj); $('.playing_artist').html(artistobj);
<?php <?php
@ -370,8 +367,7 @@ if ($embed) {
if (!$isVideo) { if (!$isVideo) {
$containerClass = "jp-audio"; $containerClass = "jp-audio";
$playerClass = "jp-jplayer-audio"; $playerClass = "jp-jplayer-audio"; ?>
?>
<div class="playing_info"> <div class="playing_info">
<div class="playing_artist"></div> <div class="playing_artist"></div>
<div class="playing_title"></div> <div class="playing_title"></div>
@ -470,8 +466,7 @@ if ($isVideo) {
?> ?>
<div class="waveform"></div> <div class="waveform"></div>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
</div> </div>
@ -497,12 +492,10 @@ if ($isVideo) {
echo Broadcast::get_unbroadcast_link($broadcast_id) . '<script type="text/javascript">startBroadcast(\'' . $key . '\');</script>'; echo Broadcast::get_unbroadcast_link($broadcast_id) . '<script type="text/javascript">startBroadcast(\'' . $key . '\');</script>';
} else { } else {
echo Broadcast::get_broadcast_link(); echo Broadcast::get_broadcast_link();
} } ?>
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php if ($iframed) { <?php if ($iframed) {
?> ?>
<?php if (Access::check('interface', '25')) { <?php if (Access::check('interface', '25')) {
@ -514,8 +507,7 @@ if ($isVideo) {
</div> </div>
<?php <?php
} } ?>
?>
<div id="slideshow" class="slideshow action_button"> <div id="slideshow" class="slideshow action_button">
<a href="javascript:SwapSlideshow();"><?php echo UI::get_icon('image', T_('Slideshow')) ?></a> <a href="javascript:SwapSlideshow();"><?php echo UI::get_icon('image', T_('Slideshow')) ?></a>
</div> </div>
@ -537,11 +529,9 @@ if ($isVideo) {
<a href="javascript:ShowEqualizer();"><?php echo UI::get_icon('equalizer', T_('Equalizer')) ?></a> <a href="javascript:ShowEqualizer();"><?php echo UI::get_icon('equalizer', T_('Equalizer')) ?></a>
</div> </div>
<?php <?php
} } ?>
?>
<?php <?php
} } ?>
?>
</div> </div>
<?php <?php
} ?> } ?>

View file

@ -12,26 +12,16 @@ if ($iframed || $is_share) {
} }
if (!$iframed) { if (!$iframed) {
require_once AmpConfig::get('prefix') . UI::find_template('stylesheets.inc.php'); require_once AmpConfig::get('prefix') . UI::find_template('stylesheets.inc.php'); ?>
?> <link rel="stylesheet" href="<?php echo AmpConfig::get('web_path') . UI::find_template('jquery-editdialog.css'); ?>" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path') . UI::find_template('jquery-editdialog.css'); <link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/modules/jquery-ui-ampache/jquery-ui.min.css" type="text/css" media="screen" />
?>" type="text/css" media="screen" /> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/components/jquery/jquery.min.js" language="javascript" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/components/jquery-ui/jquery-ui.min.js" language="javascript" type="text/javascript"></script>
?>/modules/jquery-ui-ampache/jquery-ui.min.css" type="text/css" media="screen" /> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/vendor/needim/noty/js/noty/packaged/jquery.noty.packaged.min.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo AmpConfig::get('web_path'); <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/components/jquery-cookie/jquery.cookie.js" language="javascript" type="text/javascript"></script>
?>/lib/components/jquery/jquery.min.js" language="javascript" type="text/javascript"></script> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/base.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo AmpConfig::get('web_path'); <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/ajax.js" language="javascript" type="text/javascript"></script>
?>/lib/components/jquery-ui/jquery-ui.min.js" language="javascript" type="text/javascript"></script> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tools.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo AmpConfig::get('web_path');
?>/lib/vendor/needim/noty/js/noty/packaged/jquery.noty.packaged.min.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo AmpConfig::get('web_path');
?>/lib/components/jquery-cookie/jquery.cookie.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo AmpConfig::get('web_path');
?>/lib/javascript/base.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo AmpConfig::get('web_path');
?>/lib/javascript/ajax.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo AmpConfig::get('web_path');
?>/lib/javascript/tools.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
var jsAjaxServer = "<?php echo AmpConfig::get('ajax_server') ?>"; var jsAjaxServer = "<?php echo AmpConfig::get('ajax_server') ?>";
var jsAjaxUrl = "<?php echo AmpConfig::get('ajax_url') ?>"; var jsAjaxUrl = "<?php echo AmpConfig::get('ajax_url') ?>";
@ -48,8 +38,7 @@ function update_action()
<link href="<?php echo AmpConfig::get('web_path'); ?>/modules/UberViz/style.css" rel="stylesheet" type="text/css"> <link href="<?php echo AmpConfig::get('web_path'); ?>/modules/UberViz/style.css" rel="stylesheet" type="text/css">
<?php if (AmpConfig::get('webplayer_aurora')) { <?php if (AmpConfig::get('webplayer_aurora')) {
?> ?>
<script src="<?php echo AmpConfig::get('web_path'); <script src="<?php echo AmpConfig::get('web_path'); ?>/modules/aurora.js/aurora.js" language="javascript" type="text/javascript"></script>
?>/modules/aurora.js/aurora.js" language="javascript" type="text/javascript"></script>
<?php <?php
} ?> } ?>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/vendor/happyworm/jplayer/dist/jplayer/jquery.jplayer.min.js" language="javascript" type="text/javascript"></script> <script src="<?php echo AmpConfig::get('web_path'); ?>/lib/vendor/happyworm/jplayer/dist/jplayer/jquery.jplayer.min.js" language="javascript" type="text/javascript"></script>
@ -159,8 +148,7 @@ function NotifyOfNewSong(title, artist, icon)
function NotifyBrowser(title, artist, icon) function NotifyBrowser(title, artist, icon)
{ {
var notyTimeout = <?php echo AmpConfig::get('browser_notify_timeout'); var notyTimeout = <?php echo AmpConfig::get('browser_notify_timeout'); ?>;
?>;
var notification = new Notification(title, { var notification = new Notification(title, {
body: artist, body: artist,
icon: icon icon: icon
@ -234,8 +222,7 @@ function ShowVisualizer()
$('.jp-interface').css('background-color', '#000'); $('.jp-interface').css('background-color', '#000');
$('.jp-playlist').css('background-color', '#000'); $('.jp-playlist').css('background-color', '#000');
} else { } else {
alert("<?php echo T_('Your browser doesn\'t support this feature.'); alert("<?php echo T_('Your browser doesn\'t support this feature.'); ?>");
?>");
} }
} }
} }
@ -532,8 +519,7 @@ function stopBroadcast()
window.parent.onbeforeunload = function (evt) { window.parent.onbeforeunload = function (evt) {
if ($("#jquery_jplayer_1") !== undefined && $("#jquery_jplayer_1").data("jPlayer") !== undefined && !$("#jquery_jplayer_1").data("jPlayer").status.paused && if ($("#jquery_jplayer_1") !== undefined && $("#jquery_jplayer_1").data("jPlayer") !== undefined && !$("#jquery_jplayer_1").data("jPlayer").status.paused &&
(document.activeElement === undefined || (document.activeElement.href.indexOf('/batch.php') < 0 && document.activeElement.href.indexOf('/stream.php') < 0))) { (document.activeElement === undefined || (document.activeElement.href.indexOf('/batch.php') < 0 && document.activeElement.href.indexOf('/stream.php') < 0))) {
var message = '<?php echo T_('Media is currently playing. Are you sure you want to close') . ' ' . AmpConfig::get('site_title') . '?'; var message = '<?php echo T_('Media is currently playing. Are you sure you want to close') . ' ' . AmpConfig::get('site_title') . '?'; ?>';
?>';
if (typeof evt == 'undefined') { if (typeof evt == 'undefined') {
evt = window.event; evt = window.event;
} }

View file

@ -37,8 +37,7 @@ foreach (Plugin::get_plugins('display_home') as $plugin_name) {
<?php if (AmpConfig::get('home_now_playing')) { <?php if (AmpConfig::get('home_now_playing')) {
?> ?>
<div id="now_playing"> <div id="now_playing">
<?php show_now_playing(); <?php show_now_playing(); ?>
?>
</div> <!-- Close Now Playing Div --> </div> <!-- Close Now Playing Div -->
<?php <?php
} ?> } ?>
@ -46,29 +45,24 @@ foreach (Plugin::get_plugins('display_home') as $plugin_name) {
<?php <?php
if (Art::is_enabled()) { if (Art::is_enabled()) {
if (AmpConfig::get('home_moment_albums')) { if (AmpConfig::get('home_moment_albums')) {
echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=random_albums', 'random_albums')); echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=random_albums', 'random_albums')); ?>
?>
<div id="random_selection" class="random_selection"> <div id="random_selection" class="random_selection">
<?php UI::show_box_top(T_('Albums of the Moment')); <?php UI::show_box_top(T_('Albums of the Moment'));
echo T_('Loading...'); echo T_('Loading...');
UI::show_box_bottom(); UI::show_box_bottom(); ?>
?>
</div> </div>
<?php <?php
} }
if (AmpConfig::get('home_moment_videos') && AmpConfig::get('allow_video')) { if (AmpConfig::get('home_moment_videos') && AmpConfig::get('allow_video')) {
echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=random_videos', 'random_videos')); echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=random_videos', 'random_videos')); ?>
?>
<div id="random_video_selection" class="random_selection"> <div id="random_video_selection" class="random_selection">
<?php UI::show_box_top(T_('Videos of the Moment')); <?php UI::show_box_top(T_('Videos of the Moment'));
echo T_('Loading...'); echo T_('Loading...');
UI::show_box_bottom(); UI::show_box_bottom(); ?>
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php if (AmpConfig::get('home_recently_played')) { <?php if (AmpConfig::get('home_recently_played')) {
@ -78,8 +72,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') . UI::find_template('show_recently_played.inc.php'); require_once AmpConfig::get('prefix') . UI::find_template('show_recently_played.inc.php'); ?>
?>
</div> </div>
<?php <?php
} ?> } ?>

View file

@ -144,20 +144,16 @@ require $prefix . '/templates/install_header.inc.php';
$modes = install_get_transcode_modes(); $modes = install_get_transcode_modes();
foreach ($modes as $mode) { foreach ($modes as $mode) {
?> ?>
<option value="<?php echo $mode; <option value="<?php echo $mode; ?>" <?php if ($_REQUEST['transcode_template'] == $mode) {
?>" <?php if ($_REQUEST['transcode_template'] == $mode) {
echo 'selected'; echo 'selected';
} } ?>><?php echo $mode; ?></option>
?>><?php echo $mode;
?></option>
<?php <?php
} ?> } ?>
</select> </select>
<?php <?php
if (count($modes) == 0) { if (count($modes) == 0) {
?> ?>
<label><?php echo T_('No default transcoding application found. You may need to install a popular application (ffmpeg, avconv ...) or customize transcoding settings manually after installation.'); <label><?php echo T_('No default transcoding application found. You may need to install a popular application (ffmpeg, avconv ...) or customize transcoding settings manually after installation.'); ?></label>
?></label>
<?php <?php
} ?> } ?>
</div> </div>
@ -216,78 +212,54 @@ require $prefix . '/templates/install_header.inc.php';
?> ?>
<div class="col-sm-4">&nbsp;</div><div class="col-sm-8">&nbsp;</div> <div class="col-sm-4">&nbsp;</div><div class="col-sm-8">&nbsp;</div>
<div class="col-sm-4 control-label"> <div class="col-sm-4 control-label">
<?php echo T_('channel/.htaccess action'); <?php echo T_('channel/.htaccess action'); ?>
?>
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">
<button type="submit" class="btn btn-warning" name="download_htaccess_channel"><?php echo T_('Download'); <button type="submit" class="btn btn-warning" name="download_htaccess_channel"><?php echo T_('Download'); ?></button>
?></button>
<button type="submit" class="btn btn-warning" name="write_htaccess_channel" <?php if (!check_htaccess_channel_writable()) { <button type="submit" class="btn btn-warning" name="write_htaccess_channel" <?php if (!check_htaccess_channel_writable()) {
echo "disabled "; echo "disabled ";
} } ?>>
?>> <?php echo T_('Write'); ?>
<?php echo T_('Write');
?>
</button> </button>
</div> </div>
<div class="col-sm-4 control-label"><?php echo T_('channel/.htaccess exists?'); <div class="col-sm-4 control-label"><?php echo T_('channel/.htaccess exists?'); ?></div>
?></div> <div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_channel_file)); ?></div>
<div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_channel_file)); <div class="col-sm-4 control-label"><?php echo T_('channel/.htaccess configured?'); ?></div>
?></div> <div class="col-sm-8"><?php echo debug_result(install_check_rewrite_rules($htaccess_channel_file, $web_path_guess)); ?></div>
<div class="col-sm-4 control-label"><?php echo T_('channel/.htaccess configured?');
?></div>
<div class="col-sm-8"><?php echo debug_result(install_check_rewrite_rules($htaccess_channel_file, $web_path_guess));
?></div>
<div class="col-sm-4">&nbsp;</div><div class="col-sm-8">&nbsp;</div> <div class="col-sm-4">&nbsp;</div><div class="col-sm-8">&nbsp;</div>
<div class="col-sm-4 control-label"> <div class="col-sm-4 control-label">
<?php echo T_('rest/.htaccess action'); <?php echo T_('rest/.htaccess action'); ?>
?>
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">
<button type="submit" class="btn btn-warning" name="download_htaccess_rest"><?php echo T_('Download'); <button type="submit" class="btn btn-warning" name="download_htaccess_rest"><?php echo T_('Download'); ?></button>
?></button>
<button type="submit" class="btn btn-warning" name="write_htaccess_rest" <?php if (!check_htaccess_rest_writable()) { <button type="submit" class="btn btn-warning" name="write_htaccess_rest" <?php if (!check_htaccess_rest_writable()) {
echo "disabled "; echo "disabled ";
} } ?>>
?>> <?php echo T_('Write'); ?>
<?php echo T_('Write');
?>
</button> </button>
</div> </div>
<div class="col-sm-4 control-label"><?php echo T_('rest/.htaccess exists?'); <div class="col-sm-4 control-label"><?php echo T_('rest/.htaccess exists?'); ?></div>
?></div> <div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_rest_file)); ?></div>
<div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_rest_file)); <div class="col-sm-4 control-label"><?php echo T_('rest/.htaccess configured?'); ?></div>
?></div> <div class="col-sm-8"><?php echo debug_result(install_check_rewrite_rules($htaccess_rest_file, $web_path_guess)); ?></div>
<div class="col-sm-4 control-label"><?php echo T_('rest/.htaccess configured?');
?></div>
<div class="col-sm-8"><?php echo debug_result(install_check_rewrite_rules($htaccess_rest_file, $web_path_guess));
?></div>
<div class="col-sm-4">&nbsp;</div><div class="col-sm-8">&nbsp;</div> <div class="col-sm-4">&nbsp;</div><div class="col-sm-8">&nbsp;</div>
<div class="col-sm-4 control-label"> <div class="col-sm-4 control-label">
<?php echo T_('play/.htaccess action'); <?php echo T_('play/.htaccess action'); ?>
?>
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">
<button type="submit" class="btn btn-warning" name="download_htaccess_play"><?php echo T_('Download'); <button type="submit" class="btn btn-warning" name="download_htaccess_play"><?php echo T_('Download'); ?></button>
?></button>
<button type="submit" class="btn btn-warning" name="write_htaccess_play" <?php if (!check_htaccess_play_writable()) { <button type="submit" class="btn btn-warning" name="write_htaccess_play" <?php if (!check_htaccess_play_writable()) {
echo "disabled "; echo "disabled ";
} } ?>>
?>> <?php echo T_('Write'); ?>
<?php echo T_('Write');
?>
</button> </button>
</div> </div>
<div class="col-sm-4 control-label"><?php echo T_('play/.htaccess exists?'); <div class="col-sm-4 control-label"><?php echo T_('play/.htaccess exists?'); ?></div>
?></div> <div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_play_file)); ?></div>
<div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_play_file)); <div class="col-sm-4 control-label"><?php echo T_('play/.htaccess configured?'); ?></div>
?></div> <div class="col-sm-8"><?php echo debug_result(install_check_rewrite_rules($htaccess_play_file, $web_path_guess)); ?></div>
<div class="col-sm-4 control-label"><?php echo T_('play/.htaccess configured?');
?></div>
<div class="col-sm-8"><?php echo debug_result(install_check_rewrite_rules($htaccess_play_file, $web_path_guess));
?></div>
<?php <?php
} ?> } ?>

View file

@ -26,17 +26,13 @@
<li> <li>
<?php if (isset($_REQUEST['all'])) { <?php if (isset($_REQUEST['all'])) {
?> ?>
<a href="<?php echo AmpConfig::get('web_path')?>/admin/users.php?action=show_ip_history&user_id=<?php echo $working_user->id?>"><?php echo UI::get_icon('disable'); <a href="<?php echo AmpConfig::get('web_path')?>/admin/users.php?action=show_ip_history&user_id=<?php echo $working_user->id?>"><?php echo UI::get_icon('disable'); ?></a>
?></a> <?php echo T_('Show Unique'); ?>
<?php echo T_('Show Unique');
?>
<?php <?php
} else { } else {
?> ?>
<a href="<?php echo AmpConfig::get('web_path')?>/admin/users.php?action=show_ip_history&user_id=<?php echo $working_user->id?>&all"><?php echo UI::get_icon('add'); <a href="<?php echo AmpConfig::get('web_path')?>/admin/users.php?action=show_ip_history&user_id=<?php echo $working_user->id?>&all"><?php echo UI::get_icon('add'); ?></a>
?></a> <?php echo T_('Show All'); ?>
<?php echo T_('Show All');
?>
<?php <?php
}?> }?>
</li> </li>
@ -55,15 +51,12 @@
</tr> </tr>
<?php foreach ($history as $data) { <?php foreach ($history as $data) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>">
<td class="cel_date"> <td class="cel_date">
<?php echo date("d/m/Y H\hi", $data['date']); <?php echo date("d/m/Y H\hi", $data['date']); ?>
?>
</td> </td>
<td class="cel_ipaddress"> <td class="cel_ipaddress">
<?php echo inet_ntop($data['ip']); <?php echo inet_ntop($data['ip']); ?>
?>
</td> </td>
</tr> </tr>
<?php <?php

View file

@ -58,29 +58,18 @@ if ($label->website) {
<?php if (AmpConfig::get('sociable')) { <?php if (AmpConfig::get('sociable')) {
?> ?>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=label&id=<?php echo $label->id; ?>"><?php echo UI::get_icon('comment', T_('Post Shout')); ?></a>
?>/shout.php?action=show_add_shout&type=label&id=<?php echo $label->id; <a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=label&id=<?php echo $label->id; ?>"><?php echo T_('Post Shout'); ?></a>
?>"><?php echo UI::get_icon('comment', T_('Post Shout'));
?></a>
<a href="<?php echo AmpConfig::get('web_path');
?>/shout.php?action=show_add_shout&type=label&id=<?php echo $label->id;
?>"><?php echo T_('Post Shout');
?></a>
</li> </li>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php if ($label->email) { <?php if ($label->email) {
?> ?>
<li> <li>
<a href="mailto:<?php echo scrub_out($label->email); <a href="mailto:<?php echo scrub_out($label->email); ?>"><?php echo UI::get_icon('mail', T_('Send e-mail')); ?></a>
?>"><?php echo UI::get_icon('mail', T_('Send e-mail')); <a href="mailto:<?php echo scrub_out($label->email); ?>"><?php echo T_('Send e-mail'); ?></a>
?></a>
<a href="mailto:<?php echo scrub_out($label->email);
?>"><?php echo T_('Send e-mail');
?></a>
</li> </li>
<?php <?php
} ?> } ?>
@ -88,12 +77,10 @@ if ($label->website) {
?> ?>
<li> <li>
<a id="<?php echo 'edit_label_' . $label->id ?>" onclick="showEditDialog('label_row', '<?php echo $label->id ?>', '<?php echo 'edit_label_' . $label->id ?>', '<?php echo T_('Label edit') ?>', '')"> <a id="<?php echo 'edit_label_' . $label->id ?>" onclick="showEditDialog('label_row', '<?php echo $label->id ?>', '<?php echo 'edit_label_' . $label->id ?>', '<?php echo T_('Label edit') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<a id="<?php echo 'edit_label_' . $label->id ?>" onclick="showEditDialog('label_row', '<?php echo $label->id ?>', '<?php echo 'edit_label_' . $label->id ?>', '<?php echo T_('Label edit') ?>', '')"> <a id="<?php echo 'edit_label_' . $label->id ?>" onclick="showEditDialog('label_row', '<?php echo $label->id ?>', '<?php echo 'edit_label_' . $label->id ?>', '<?php echo T_('Label edit') ?>', '')">
<?php echo T_('Edit Label'); <?php echo T_('Edit Label'); ?>
?>
</a> </a>
</li> </li>
<?php <?php
@ -101,12 +88,8 @@ if ($label->website) {
<?php if (Catalog::can_remove($label)) { <?php if (Catalog::can_remove($label)) {
?> ?>
<li> <li>
<a id="<?php echo 'delete_label_' . $label->id ?>" href="<?php echo AmpConfig::get('web_path'); <a id="<?php echo 'delete_label_' . $label->id ?>" href="<?php echo AmpConfig::get('web_path'); ?>/labels.php?action=delete&label_id=<?php echo $label->id; ?>">
?>/labels.php?action=delete&label_id=<?php echo $label->id; <?php echo UI::get_icon('delete', T_('Delete')); ?> <?php echo T_('Delete'); ?>
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?> <?php echo T_('Delete');
?>
</a> </a>
</li> </li>
<?php <?php

View file

@ -22,11 +22,9 @@
?> ?>
<?php <?php
if (Art::is_enabled()) { if (Art::is_enabled()) {
$name = scrub_out($libitem->f_name); $name = scrub_out($libitem->f_name); ?>
?>
<td class="cel_cover"> <td class="cel_cover">
<?php Art::display('label', $libitem->id, $name, 1, AmpConfig::get('web_path') . '/labels.php?action=show&label=' . $libitem->id); <?php Art::display('label', $libitem->id, $name, 1, AmpConfig::get('web_path') . '/labels.php?action=show&label=' . $libitem->id); ?>
?>
</td> </td>
<?php <?php
} }

View file

@ -26,10 +26,7 @@ $thcount = 6;
?> ?>
<div id="information_actions"> <div id="information_actions">
<ul> <ul>
<li><?php echo UI::get_icon('add', T_('Add')); <li><?php echo UI::get_icon('add', T_('Add')); ?> <a href="<?php echo AmpConfig::get('web_path'); ?>/labels.php?action=show_add_label"><?php echo T_('Create a new label'); ?></a></li>
?> <a href="<?php echo AmpConfig::get('web_path');
?>/labels.php?action=show_add_label"><?php echo T_('Create a new label');
?></a></li>
</ul> </ul>
</div> </div>
<?php <?php
@ -41,10 +38,8 @@ $thcount = 6;
<thead> <thead>
<tr class="th-top"> <tr class="th-top">
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
++$thcount; ++$thcount; ?>
?> <th class="cel_cover optional"><?php echo T_('Art'); ?></th>
<th class="cel_cover optional"><?php echo T_('Art');
?></th>
<?php <?php
} ?> } ?>
<th class="cel_label essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=label&sort=name', T_('Label'), 'label_sort_name'); ?></th> <th class="cel_label essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=label&sort=name', T_('Label'), 'label_sort_name'); ?></th>
@ -58,23 +53,16 @@ $thcount = 6;
/* Foreach through every label that has been passed to us */ /* Foreach through every label that has been passed to us */
foreach ($object_ids as $label_id) { foreach ($object_ids as $label_id) {
$libitem = new Label($label_id); $libitem = new Label($label_id);
$libitem->format(); $libitem->format(); ?>
?> <tr id="label_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<tr id="label_<?php echo $libitem->id; <?php require AmpConfig::get('prefix') . UI::find_template('show_label_row.inc.php'); ?>
?>" class="<?php echo UI::flip_class();
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_label_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No label found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No label found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -83,8 +71,7 @@ $thcount = 6;
<tr class="th-bottom"> <tr class="th-bottom">
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
?> ?>
<th class="cel_cover"><?php echo T_('Art'); <th class="cel_cover"><?php echo T_('Art'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_label essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=label&sort=name', T_('Label'), 'label_sort_name'); ?></th> <th class="cel_label essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=label&sort=name', T_('Label'), 'label_sort_name'); ?></th>

View file

@ -35,15 +35,12 @@
<dd class="<?php echo $rowparity; ?>"> <dd class="<?php echo $rowparity; ?>">
<?php if (AmpConfig::get('directplay')) { <?php if (AmpConfig::get('directplay')) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=live_stream&object_id=' . $radio->id, 'play', T_('Play'), 'play_live_stream_' . $radio->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=live_stream&object_id=' . $radio->id, 'play', T_('Play'), 'play_live_stream_' . $radio->id); ?>
?>
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=live_stream&object_id=' . $radio->id . '&append=true', 'play_add', T_('Play last'), 'addplay_live_stream_' . $radio->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=live_stream&object_id=' . $radio->id . '&append=true', 'play_add', T_('Play last'), 'addplay_live_stream_' . $radio->id); ?>
?>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php echo Ajax::button('?action=basket&type=live_stream&id=' . $radio->id, 'add', T_('Add to temporary playlist'), 'add_live_stream_' . $radio->id); ?> <?php echo Ajax::button('?action=basket&type=live_stream&id=' . $radio->id, 'add', T_('Add to temporary playlist'), 'add_live_stream_' . $radio->id); ?>

View file

@ -44,8 +44,7 @@
if (Access::check('interface', '50')) { if (Access::check('interface', '50')) {
?> ?>
<a id="<?php echo 'edit_live_stream_' . $libitem->id ?>" onclick="showEditDialog('live_stream_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_live_stream_' . $libitem->id ?>', '<?php echo T_('Live Stream edit') ?>', 'live_stream_')"> <a id="<?php echo 'edit_live_stream_' . $libitem->id ?>" onclick="showEditDialog('live_stream_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_live_stream_' . $libitem->id ?>', '<?php echo T_('Live Stream edit') ?>', 'live_stream_')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<?php <?php
} }

View file

@ -22,20 +22,15 @@
?> ?>
<?php if (Access::check('interface', '50')) { <?php if (Access::check('interface', '50')) {
?> ?>
<?php UI::show_box_top(T_('Manage Radio Stations'), 'info-box'); <?php UI::show_box_top(T_('Manage Radio Stations'), 'info-box'); ?>
?>
<div id="information_actions"> <div id="information_actions">
<ul> <ul>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/radio.php?action=show_create"><?php echo UI::get_icon('add', T_('Add')); ?> <?php echo T_('Add Radio Station'); ?></a>
?>/radio.php?action=show_create"><?php echo UI::get_icon('add', T_('Add'));
?> <?php echo T_('Add Radio Station');
?></a>
</li> </li>
</ul> </ul>
</div> </div>
<?php UI::show_box_bottom(); <?php UI::show_box_bottom(); ?>
?>
<?php <?php
} ?> } ?>
<?php if ($browse->get_show_header()) { <?php if ($browse->get_show_header()) {
@ -56,21 +51,16 @@
<?php <?php
foreach ($object_ids as $radio_id) { foreach ($object_ids as $radio_id) {
$libitem = new Live_Stream($radio_id); $libitem = new Live_Stream($radio_id);
$libitem->format(); $libitem->format(); ?>
?> <tr id="live_stream_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<tr id="live_stream_<?php echo $libitem->id; <?php require AmpConfig::get('prefix') . UI::find_template('show_live_stream_row.inc.php'); ?>
?>" class="<?php echo UI::flip_class();
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_live_stream_row.inc.php');
?>
</tr> </tr>
<?php <?php
} //end foreach ($artists as $artist) ?> } //end foreach ($artists as $artist) ?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr> <tr>
<td colspan="6"><span class="nodata"><?php echo T_('No live stream found'); <td colspan="6"><span class="nodata"><?php echo T_('No live stream found'); ?></span></td>
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -26,11 +26,8 @@
<?php foreach ($fields as $key=>$field) { <?php foreach ($fields as $key=>$field) {
?> ?>
<tr> <tr>
<td><?php echo $field['description']; <td><?php echo $field['description']; ?></td>
?></td> <td><input type="<?php echo $field["type"]; ?>" name="<?php echo $key; ?>" /></td>
<td><input type="<?php echo $field["type"];
?>" name="<?php echo $key;
?>" /></td>
</tr> </tr>
<?php <?php

View file

@ -46,29 +46,18 @@ $web_path = AmpConfig::get('web_path');
} else { } else {
$action = 'install_localplay'; $action = 'install_localplay';
$action_txt = T_('Enable'); $action_txt = T_('Enable');
} } ?>
?> <tr class="<?php echo UI::flip_class(); ?>">
<tr class="<?php echo UI::flip_class(); <td class="cel_name"><?php echo scrub_out($localplay->f_name); ?></td>
?>"> <td class="cel_description"><?php echo scrub_out($localplay->f_description); ?></td>
<td class="cel_name"><?php echo scrub_out($localplay->f_name); <td class="cel_version"><?php echo scrub_out($localplay->f_version); ?></td>
?></td> <td class="cel_action"><a href="<?php echo $web_path; ?>/admin/modules.php?action=<?php echo $action; ?>&amp;type=<?php echo urlencode($controller); ?>"><?php echo $action_txt; ?></a></td>
<td class="cel_description"><?php echo scrub_out($localplay->f_description);
?></td>
<td class="cel_version"><?php echo scrub_out($localplay->f_version);
?></td>
<td class="cel_action"><a href="<?php echo $web_path;
?>/admin/modules.php?action=<?php echo $action;
?>&amp;type=<?php echo urlencode($controller);
?>"><?php echo $action_txt;
?></a></td>
</tr> </tr>
<?php <?php
} if (!count($controllers)) { } if (!count($controllers)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="4"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
<td colspan="4"><span class="error"><?php echo T_('No Records Found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -26,12 +26,8 @@
<?php foreach ($fields as $key=>$field) { <?php foreach ($fields as $key=>$field) {
?> ?>
<tr> <tr>
<td><?php echo $field['description']; <td><?php echo $field['description']; ?></td>
?></td> <td><input type="<?php echo $field['type']; ?>" name="<?php echo $key; ?>" value="<?php echo scrub_out($instance[$key]); ?>" /></td>
<td><input type="<?php echo $field['type'];
?>" name="<?php echo $key;
?>" value="<?php echo scrub_out($instance[$key]);
?>" /></td>
</tr> </tr>
<?php <?php

View file

@ -25,19 +25,15 @@
<tr> <tr>
<?php foreach ($fields as $key=>$field) { <?php foreach ($fields as $key=>$field) {
?> ?>
<th><?php echo $field['description']; <th><?php echo $field['description']; ?></th>
?></th>
<?php <?php
} ?> } ?>
<th><?php echo T_('Action'); ?></th> <th><?php echo T_('Action'); ?></th>
</tr> </tr>
<?php foreach ($instances as $uid=>$name) { <?php foreach ($instances as $uid=>$name) {
$instance = $localplay->get_instance($uid); $instance = $localplay->get_instance($uid); ?>
?> <tr class="<?php echo UI::flip_class(); ?>" id="localplay_instance_<?php echo $uid; ?>">
<tr class="<?php echo UI::flip_class();
?>" id="localplay_instance_<?php echo $uid;
?>">
<?php foreach ($fields as $key=>$field) { <?php foreach ($fields as $key=>$field) {
?> ?>
<td> <td>
@ -46,20 +42,14 @@
echo $instance[$key]; echo $instance[$key];
} else { } else {
echo "*****"; echo "*****";
} } ?>
?>
</td> </td>
<?php <?php
} } ?>
?>
<td> <td>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/localplay.php?action=edit_instance&instance=<?php echo $uid; ?>"><?php echo UI::get_icon('edit', T_('Edit Instance')); ?></a>
?>/localplay.php?action=edit_instance&instance=<?php echo $uid; <?php echo Ajax::button('?page=localplay&action=delete_instance&instance=' . $uid, 'delete', T_('Delete'), 'delete_instance_' . $uid); ?>
?>"><?php echo UI::get_icon('edit', T_('Edit Instance'));
?></a>
<?php echo Ajax::button('?page=localplay&action=delete_instance&instance=' . $uid, 'delete', T_('Delete'), 'delete_instance_' . $uid);
?>
</td> </td>
</tr> </tr>
<?php <?php

View file

@ -41,32 +41,23 @@ $status = $localplay->status();
$class = ' class="cel_name"'; $class = ' class="cel_name"';
if ($status['track'] == $object['track']) { if ($status['track'] == $object['track']) {
$class=' class="cel_name lp_current"'; $class=' class="cel_name lp_current"';
} } ?>
?> <tr class="<?php echo UI::flip_class(); ?>" id="localplay_playlist_<?php echo $object['id']; ?>">
<tr class="<?php echo UI::flip_class();
?>" id="localplay_playlist_<?php echo $object['id'];
?>">
<td class="cel_track"> <td class="cel_track">
<?php echo scrub_out($object['track']); <?php echo scrub_out($object['track']); ?>
?>
</td> </td>
<td<?php echo $class; <td<?php echo $class; ?>>
?>> <?php echo $localplay->format_name($object['name'], $object['id']); ?>
<?php echo $localplay->format_name($object['name'], $object['id']);
?>
</td> </td>
<td class="cel_action"> <td class="cel_action">
<?php echo Ajax::button('?page=localplay&action=delete_track&id=' . intval($object['id']), 'delete', T_('Delete'), 'localplay_delete_' . intval($object['id'])); <?php echo Ajax::button('?page=localplay&action=delete_track&id=' . intval($object['id']), 'delete', T_('Delete'), 'localplay_delete_' . intval($object['id'])); ?>
?>
</td> </td>
</tr> </tr>
<?php <?php
} if (!count($object_ids)) { } if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="3"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
<td colspan="3"><span class="error"><?php echo T_('No Records Found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -78,9 +78,7 @@ define('TABLE_RENDERED', 1);
<?php if (AmpConfig::get('allow_public_registration')) { <?php if (AmpConfig::get('allow_public_registration')) {
?> ?>
<a rel="nohtml" class="button" id="registerbutton" href="<?php echo AmpConfig::get('web_path'); <a rel="nohtml" class="button" id="registerbutton" href="<?php echo AmpConfig::get('web_path'); ?>/register.php"><?php echo T_('Register'); ?></a>
?>/register.php"><?php echo T_('Register');
?></a>
<?php <?php
} // end if allow_public_registration ?> } // end if allow_public_registration ?>
</div> </div>

View file

@ -61,9 +61,7 @@ if ($album != T_('Unknown (Orphaned)')) {
<div id="lyrics_text"><?php echo ($lyrics['text']) ? $lyrics['text'] : T_("No lyrics found."); ?></div> <div id="lyrics_text"><?php echo ($lyrics['text']) ? $lyrics['text'] : T_("No lyrics found."); ?></div>
<?php if ($lyrics['url']) { <?php if ($lyrics['url']) {
?> ?>
<div id="lyrics_url"><a href="<?php echo $lyrics['url']; <div id="lyrics_url"><a href="<?php echo $lyrics['url']; ?>" target="_blank"><?php echo T_('Show more'); ?></a></div>
?>" target="_blank"><?php echo T_('Show more');
?></a></div>
<?php <?php
} ?> } ?>
</div> </div>

View file

@ -36,37 +36,24 @@ UI::show_box_top(T_('Manage Democratic Playlists')); ?>
$democratic = new Democratic($democratic_id); $democratic = new Democratic($democratic_id);
$democratic->format(); $democratic->format();
$playlist = new Playlist($democratic->base_playlist); $playlist = new Playlist($democratic->base_playlist);
$playlist->format(); $playlist->format(); ?>
?> <tr class="<?php echo UI::flip_class(); ?>">
<tr class="<?php echo UI::flip_class(); <td><?php echo scrub_out($democratic->name); ?></td>
?>"> <td><?php echo $playlist->f_link; ?></td>
<td><?php echo scrub_out($democratic->name); <td><?php echo $democratic->f_cooldown; ?></td>
?></td> <td><?php echo $democratic->f_level; ?></td>
<td><?php echo $playlist->f_link; <td><?php echo $democratic->f_primary; ?></td>
?></td> <td><?php echo $democratic->count_items(); ?></td>
<td><?php echo $democratic->f_cooldown;
?></td>
<td><?php echo $democratic->f_level;
?></td>
<td><?php echo $democratic->f_primary;
?></td>
<td><?php echo $democratic->count_items();
?></td>
<td> <td>
<?php echo Ajax::button('?page=democratic&action=send_playlist&democratic_id=' . $democratic->id, 'all', T_('Play'), 'play_democratic'); <?php echo Ajax::button('?page=democratic&action=send_playlist&democratic_id=' . $democratic->id, 'all', T_('Play'), 'play_democratic'); ?>
?> <a href="<?php echo AmpConfig::get('web_path'); ?>/democratic.php?action=delete&amp;democratic_id=<?php echo scrub_out($democratic->id); ?>"><?php echo UI::get_icon('delete', T_('Delete')); ?></a>
<a href="<?php echo AmpConfig::get('web_path');
?>/democratic.php?action=delete&amp;democratic_id=<?php echo scrub_out($democratic->id);
?>"><?php echo UI::get_icon('delete', T_('Delete'));
?></a>
</td> </td>
</tr> </tr>
<?php <?php
} if (!count($playlists)) { } if (!count($playlists)) {
?> ?>
<tr> <tr>
<td colspan="7"><span class="nodata"><?php echo T_('No democratic found'); <td colspan="7"><span class="nodata"><?php echo T_('No democratic found'); ?></span></td>
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -43,15 +43,12 @@ $web_path = AmpConfig::get('web_path');
$libitem = new License($license_id); $libitem = new License($license_id);
$libitem->format(); $libitem->format();
require AmpConfig::get('prefix') . UI::find_template('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)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="6" class="error"><?php echo T_('No Licenses Found'); ?></td>
<td colspan="6" class="error"><?php echo T_('No Licenses Found');
?></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -44,15 +44,12 @@ $web_path = AmpConfig::get('web_path');
$client = new User($libitem->user); $client = new User($libitem->user);
$client->format(); $client->format();
require AmpConfig::get('prefix') . UI::find_template('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)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="6" class="error"><?php echo T_('No Records Found'); ?></td>
<td colspan="6" class="error"><?php echo T_('No Records Found');
?></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -36,11 +36,8 @@
if ($walbums) { if ($walbums) {
foreach ($walbums as $libitem) { foreach ($walbums as $libitem) {
?> ?>
<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') . UI::find_template('show_wanted_album_row.inc.php'); ?>
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_wanted_album_row.inc.php');
?>
</tr> </tr>
<?php <?php
@ -49,11 +46,8 @@
?> ?>
<?php if (!$walbums || !count($walbums)) { <?php if (!$walbums || !count($walbums)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No missing albums found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No missing albums found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -27,11 +27,9 @@ UI::show_box_top($wartist['name'], 'info-box');
?> ?>
<?php <?php
if (AmpConfig::get('lastfm_api_key')) { if (AmpConfig::get('lastfm_api_key')) {
echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=artist_info&fullname=' . rawurlencode($wartist['name']), 'artist_info')); echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=artist_info&fullname=' . rawurlencode($wartist['name']), 'artist_info')); ?>
?>
<div id="artist_biography"> <div id="artist_biography">
<?php echo T_('Loading...'); <?php echo T_('Loading...'); ?>
?>
</div> </div>
<?php <?php
} ?> } ?>
@ -39,8 +37,7 @@ if (AmpConfig::get('lastfm_api_key')) {
<?php <?php
if (AmpConfig::get('wanted')) { if (AmpConfig::get('wanted')) {
echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=wanted_missing_albums&artist_mbid=' . $wartist['mbid'], 'missing_albums')); echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=wanted_missing_albums&artist_mbid=' . $wartist['mbid'], 'missing_albums')); ?>
?>
<div id="missing_albums"></div> <div id="missing_albums"></div>
<?php <?php
} ?> } ?>

View file

@ -32,14 +32,9 @@
if ($wartists) { if ($wartists) {
foreach ($wartists as $libitem) { foreach ($wartists as $libitem) {
?> ?>
<tr id="wartist_<?php echo $libitem['mbid']; <tr id="wartist_<?php echo $libitem['mbid']; ?>" class="<?php echo UI::flip_class(); ?>">
?>" class="<?php echo UI::flip_class();
?>">
<td class="cel_artist"> <td class="cel_artist">
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/artists.php?action=show_missing&amp;mbid=<?php echo $libitem['mbid']; ?>"><?php echo $libitem['name']; ?></a>
?>/artists.php?action=show_missing&amp;mbid=<?php echo $libitem['mbid'];
?>"><?php echo $libitem['name'];
?></a>
</td> </td>
</tr> </tr>
<?php <?php
@ -49,11 +44,8 @@
?> ?>
<?php if (!$wartists || !count($wartists)) { <?php if (!$wartists || !count($wartists)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No missing artists found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No missing artists found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -28,10 +28,8 @@
*/ */
if (count($results)) { if (count($results)) {
$link = AmpConfig::get('use_rss') ? ' ' . Ampache_RSS::get_display('nowplaying') : ''; $link = AmpConfig::get('use_rss') ? ' ' . Ampache_RSS::get_display('nowplaying') : ''; ?>
?> <?php UI::show_box_top(T_('Now Playing') . $link); ?>
<?php UI::show_box_top(T_('Now Playing') . $link);
?>
<?php <?php
foreach ($results as $item) { foreach ($results as $item) {
$media = $item['media']; $media = $item['media'];
@ -45,22 +43,19 @@ foreach ($results as $item) {
} }
if (!$np_user->fullname) { if (!$np_user->fullname) {
$np_user->fullname = "Ampache User"; $np_user->fullname = "Ampache User";
} } ?>
?>
<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') . UI::find_template('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') . UI::find_template('show_now_playing_video_row.inc.php'); require AmpConfig::get('prefix') . UI::find_template('show_now_playing_video_row.inc.php');
} } ?>
?>
</div> </div>
<?php <?php
} // end foreach } // end foreach
?> ?>
<?php UI::show_box_bottom(); <?php UI::show_box_bottom(); ?>
?>
<?php <?php
} // end if count results ?> } // end if count results ?>

View file

@ -51,10 +51,8 @@
if (!empty($media->f_tags)) { if (!empty($media->f_tags)) {
?> ?>
<div id="np_song_tags_<?php echo $media->id?>" class="np_cell cel_artist"> <div id="np_song_tags_<?php echo $media->id?>" class="np_cell cel_artist">
<label><?php echo T_('Tags'); <label><?php echo T_('Tags'); ?></label>
?></label> <?php echo $media->f_tags; ?>
<?php echo $media->f_tags;
?>
</div> </div>
<?php <?php
} }
@ -70,8 +68,7 @@
if ($album->id) { if ($album->id) {
$album->format(); $album->format();
$album->display_art(1); $album->display_art(1);
} } ?>
?>
</div> </div>
</div> </div>
<?php <?php
@ -79,29 +76,23 @@
<?php if (AmpConfig::get('show_similar')) { <?php if (AmpConfig::get('show_similar')) {
?> ?>
<div class="np_group similars" id="similar_items_<?php echo $media->id; <div class="np_group similars" id="similar_items_<?php echo $media->id; ?>">
?>">
<div class="np_group similars"> <div class="np_group similars">
<div class="np_cell cel_similar"> <div class="np_cell cel_similar">
<label><?php echo T_('Similar Artists'); <label><?php echo T_('Similar Artists'); ?></label>
?></label> <p><?php echo T_('Loading...'); ?></p>
<p><?php echo T_('Loading...');
?></p>
</div> </div>
</div> </div>
<div class="np_group similars"> <div class="np_group similars">
<div class="np_cell cel_similar"> <div class="np_cell cel_similar">
<label><?php echo T_('Similar Songs'); <label><?php echo T_('Similar Songs'); ?></label>
?></label> <p><?php echo T_('Loading...'); ?></p>
<p><?php echo T_('Loading...');
?></p>
</div> </div>
</div> </div>
</div> </div>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
<?php echo Ajax::action('?page=index&action=similar_now_playing&media_id=' . $media->id . '&media_artist=' . $media->artist, 'similar_now_playing'); <?php echo Ajax::action('?page=index&action=similar_now_playing&media_id=' . $media->id . '&media_artist=' . $media->artist, 'similar_now_playing'); ?>
?>
}); });
</script> </script>
<?php <?php
@ -115,12 +106,9 @@ $(document).ready(function(){
if (AmpConfig::get('ratings')) { if (AmpConfig::get('ratings')) {
?> ?>
<div class="np_cell cel_rating"> <div class="np_cell cel_rating">
<label><?php echo T_('Rating'); <label><?php echo T_('Rating'); ?></label>
?></label> <div id="rating_<?php echo $media->id; ?>_song">
<div id="rating_<?php echo $media->id; <?php Rating::show($media->id, 'song'); ?>
?>_song">
<?php Rating::show($media->id, 'song');
?>
</div> </div>
</div> </div>
<?php <?php
@ -128,17 +116,13 @@ $(document).ready(function(){
if (AmpConfig::get('userflags')) { if (AmpConfig::get('userflags')) {
?> ?>
<div class="np_cell cel_userflag"> <div class="np_cell cel_userflag">
<label><?php echo T_('Fav.'); <label><?php echo T_('Fav.'); ?></label>
?></label> <div id="userflag_<?php echo $media->id; ?>_song">
<div id="userflag_<?php echo $media->id; <?php Userflag::show($media->id, 'song'); ?>
?>_song">
<?php Userflag::show($media->id, 'song');
?>
</div> </div>
</div> </div>
<?php <?php
} } ?>
?>
</div> </div>
<?php <?php
} }

View file

@ -25,8 +25,7 @@
?> ?>
<div class="np_group similars"> <div class="np_group similars">
<div class="np_cell cel_similar"> <div class="np_cell cel_similar">
<label><?php echo T_('Similar Artists'); <label><?php echo T_('Similar Artists'); ?></label>
?></label>
<?php foreach ($artists as $a) { <?php foreach ($artists as $a) {
?> ?>
<div class="np_cell cel_similar_artist"> <div class="np_cell cel_similar_artist">
@ -41,12 +40,10 @@
$artist = new Artist($a['id']); $artist = new Artist($a['id']);
$artist->format(); $artist->format();
echo $artist->f_link; echo $artist->f_link;
} } ?>
?>
</div> </div>
<?php <?php
} } ?>
?>
</div> </div>
</div> </div>
<?php <?php
@ -56,20 +53,17 @@
?> ?>
<div class="np_group similars"> <div class="np_group similars">
<div class="np_cell cel_similar"> <div class="np_cell cel_similar">
<label><?php echo T_('Similar Songs'); <label><?php echo T_('Similar Songs'); ?></label>
?></label>
<?php foreach ($songs as $s) { <?php foreach ($songs as $s) {
?> ?>
<div class="np_cell cel_similar_song"> <div class="np_cell cel_similar_song">
<?php <?php
$song = new Song($s['id']); $song = new Song($s['id']);
$song->format(); $song->format();
echo $song->f_link; echo $song->f_link; ?>
?>
</div> </div>
<?php <?php
} } ?>
?>
</div> </div>
</div> </div>
<?php <?php

View file

@ -50,8 +50,7 @@ $media->format();
<div class="np_cell cel_albumart"> <div class="np_cell cel_albumart">
<?php <?php
$release_art = $media->get_release_item_art(); $release_art = $media->get_release_item_art();
Art::display($release_art['object_type'], $release_art['object_id'], $media->get_fullname(), 6, $media->link); Art::display($release_art['object_type'], $release_art['object_id'], $media->get_fullname(), 6, $media->link); ?>
?>
</div> </div>
</div> </div>
<?php <?php
@ -63,21 +62,15 @@ $media->format();
if (AmpConfig::get('ratings')) { if (AmpConfig::get('ratings')) {
?> ?>
<div class="np_cell cel_rating"> <div class="np_cell cel_rating">
<label><?php echo T_('Rating'); <label><?php echo T_('Rating'); ?></label>
?></label> <div id="rating_<?php echo $media->id; ?>_video">
<div id="rating_<?php echo $media->id; <?php Rating::show($media->id, 'video'); ?>
?>_video">
<?php Rating::show($media->id, 'video');
?>
</div> </div>
</div> </div>
<div class="np_cell cel_userflag"> <div class="np_cell cel_userflag">
<label><?php echo T_('Fav.'); <label><?php echo T_('Fav.'); ?></label>
?></label> <div id="userflag_<?php echo $media->id; ?>_video">
<div id="userflag_<?php echo $media->id; <?php Userflag::show($media->id, 'video'); ?>
?>_video">
<?php Userflag::show($media->id, 'video');
?>
</div> </div>
</div> </div>
<?php <?php

View file

@ -54,8 +54,7 @@ if (!$rate) {
for ($i = 1; $i < 6; $i++) { for ($i = 1; $i < 6; $i++) {
?> ?>
<li> <li>
<?php echo Ajax::text($base_url . '&rating=' . $i, '', 'rating' . $i . '_' . $rating->id . '_' . $rating->type, '', 'star' . $i); <?php echo Ajax::text($base_url . '&rating=' . $i, '', 'rating' . $i . '_' . $rating->id . '_' . $rating->type, '', 'star' . $i); ?>
?>
</li> </li>
<?php <?php

View file

@ -37,26 +37,20 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<div style="display:table-cell;" id="rating_<?php echo $playlist->id; <div style="display:table-cell;" id="rating_<?php echo $playlist->id; ?>_playlist">
?>_playlist"> <?php Rating::show($playlist->id, 'playlist'); ?>
<?php Rating::show($playlist->id, 'playlist');
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<div style="display:table-cell;" id="userflag_<?php echo $playlist->id; <div style="display:table-cell;" id="userflag_<?php echo $playlist->id; ?>_playlist">
?>_playlist"> <?php Userflag::show($playlist->id, 'playlist'); ?>
<?php Userflag::show($playlist->id, 'playlist');
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
@ -65,32 +59,19 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
<?php if ($GLOBALS['user']->has_access('50')) { <?php if ($GLOBALS['user']->has_access('50')) {
?> ?>
<li> <li>
<a onclick="submitNewItemsOrder('<?php echo $playlist->id; <a onclick="submitNewItemsOrder('<?php echo $playlist->id; ?>', 'reorder_playlist_table', 'track_',
?>', 'reorder_playlist_table', 'track_', '<?php echo AmpConfig::get('web_path'); ?>/playlist.php?action=set_track_numbers&playlist_id=<?php echo $playlist->id; ?>', 'refresh_playlist_medias')">
'<?php echo AmpConfig::get('web_path'); <?php echo UI::get_icon('save', T_('Save Tracks Order')); ?>
?>/playlist.php?action=set_track_numbers&playlist_id=<?php echo $playlist->id; &nbsp;&nbsp;<?php echo T_('Save Tracks Order'); ?>
?>', 'refresh_playlist_medias')">
<?php echo UI::get_icon('save', T_('Save Tracks Order'));
?>
&nbsp;&nbsp;<?php echo T_('Save Tracks Order');
?>
</a> </a>
</li> </li>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/playlist.php?action=sort_tracks&playlist_id=<?php echo $playlist->id; ?>"><?php echo UI::get_icon('sort', T_('Sort Tracks by Artist, Album, Song')); ?>
?>/playlist.php?action=sort_tracks&playlist_id=<?php echo $playlist->id; &nbsp;&nbsp;<?php echo T_('Sort Tracks by Artist, Album, Song'); ?></a>
?>"><?php echo UI::get_icon('sort', T_('Sort Tracks by Artist, Album, Song'));
?>
&nbsp;&nbsp;<?php echo T_('Sort Tracks by Artist, Album, Song');
?></a>
</li> </li>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/playlist.php?action=remove_duplicates&playlist_id=<?php echo $playlist->id; ?>"><?php echo UI::get_icon('wand', T_('Remove duplicates')); ?>
?>/playlist.php?action=remove_duplicates&playlist_id=<?php echo $playlist->id; &nbsp;&nbsp;<?php echo T_('Remove duplicates'); ?></a>
?>"><?php echo UI::get_icon('wand', T_('Remove duplicates'));
?>
&nbsp;&nbsp;<?php echo T_('Remove duplicates');
?></a>
</li> </li>
<?php <?php
@ -98,13 +79,9 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
<?php if (Access::check_function('batch_download') && check_can_zip('playlist')) { <?php if (Access::check_function('batch_download') && check_can_zip('playlist')) {
?> ?>
<li> <li>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); <a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=playlist&amp;id=<?php echo $playlist->id; ?>">
?>/batch.php?action=playlist&amp;id=<?php echo $playlist->id; <?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
?>"> &nbsp;&nbsp;<?php echo T_('Batch Download'); ?>
<?php echo UI::get_icon('batch_download', T_('Batch Download'));
?>
&nbsp;&nbsp;<?php echo T_('Batch Download');
?>
</a> </a>
</li> </li>
<?php <?php
@ -113,10 +90,8 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
<?php if (AmpConfig::get('directplay')) { <?php if (AmpConfig::get('directplay')) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=playlist&object_id=' . $playlist->id, 'play', T_('Play all'), 'directplay_full_' . $playlist->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=playlist&object_id=' . $playlist->id, 'play', T_('Play all'), 'directplay_full_' . $playlist->id); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=playlist&object_id=' . $playlist->id, T_('Play all'), 'directplay_full_text_' . $playlist->id); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=playlist&object_id=' . $playlist->id, T_('Play all'), 'directplay_full_text_' . $playlist->id);
?>
</li> </li>
<?php <?php
@ -124,10 +99,8 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=playlist&object_id=' . $playlist->id . '&append=true', 'play_add', T_('Play all last'), 'addplay_playlist_' . $playlist->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=playlist&object_id=' . $playlist->id . '&append=true', 'play_add', T_('Play all last'), 'addplay_playlist_' . $playlist->id); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=playlist&object_id=' . $playlist->id . '&append=true', T_('Play all last'), 'addplay_playlist_text_' . $playlist->id); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=playlist&object_id=' . $playlist->id . '&append=true', T_('Play all last'), 'addplay_playlist_text_' . $playlist->id);
?>
</li> </li>
<?php <?php
@ -143,13 +116,9 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
<?php if ($GLOBALS['user']->has_access('50') && AmpConfig::get('channel')) { <?php if ($GLOBALS['user']->has_access('50') && AmpConfig::get('channel')) {
?> ?>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/channel.php?action=show_create&type=playlist&id=<?php echo $playlist->id; ?>">
?>/channel.php?action=show_create&type=playlist&id=<?php echo $playlist->id; <?php echo UI::get_icon('flow'); ?>
?>"> &nbsp;&nbsp;<?php echo T_('Create channel'); ?>
<?php echo UI::get_icon('flow');
?>
&nbsp;&nbsp;<?php echo T_('Create channel');
?>
</a> </a>
</li> </li>
<?php <?php
@ -158,14 +127,9 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
<?php if ($playlist->has_access()) { <?php if ($playlist->has_access()) {
?> ?>
<li> <li>
<a href="javascript:NavigateTo('<?php echo AmpConfig::get('web_path'); <a href="javascript:NavigateTo('<?php echo AmpConfig::get('web_path'); ?>/playlist.php?action=delete_playlist&playlist_id=<?php echo $playlist->id; ?>');" onclick="return confirm('<?php echo T_('Do you really want to delete the playlist?'); ?>');">
?>/playlist.php?action=delete_playlist&playlist_id=<?php echo $playlist->id; <?php echo UI::get_icon('delete'); ?>
?>');" onclick="return confirm('<?php echo T_('Do you really want to delete the playlist?'); &nbsp;&nbsp;<?php echo T_('Delete'); ?>
?>');">
<?php echo UI::get_icon('delete');
?>
&nbsp;&nbsp;<?php echo T_('Delete');
?>
</a> </a>
</li> </li>
<?php <?php

View file

@ -32,8 +32,7 @@ if (!isset($libitem->enabled) || $libitem->enabled || Access::check('interface',
if (Stream_Playlist::check_autoplay_append()) { if (Stream_Playlist::check_autoplay_append()) {
echo Ajax::button('?page=stream&action=directplay&object_type=' . $object_type . '&object_id=' . $libitem->id . '&append=true', 'play_add', T_('Play last'), 'addplay_' . $object_type . '_' . $libitem->id); echo Ajax::button('?page=stream&action=directplay&object_type=' . $object_type . '&object_id=' . $libitem->id . '&append=true', 'play_add', T_('Play last'), 'addplay_' . $object_type . '_' . $libitem->id);
} }
} } ?>
?>
</div> </div>
</td> </td>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
@ -41,12 +40,10 @@ if (!isset($libitem->enabled) || $libitem->enabled || Access::check('interface',
<td class="cel_cover"> <td class="cel_cover">
<?php <?php
$thumb = (isset($browse) && !$browse->get_grid_view()) ? 11 : 5; $thumb = (isset($browse) && !$browse->get_grid_view()) ? 11 : 5;
$libitem->display_art($thumb); $libitem->display_art($thumb); ?>
?>
</td> </td>
<?php <?php
} } ?>
?>
<td class="cel_title"><?php echo $libitem->f_link ?></td> <td class="cel_title"><?php echo $libitem->f_link ?></td>
<td class="cel_add"> <td class="cel_add">
<span class="cel_item_add"> <span class="cel_item_add">
@ -57,8 +54,7 @@ if (!isset($libitem->enabled) || $libitem->enabled || Access::check('interface',
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')) ?> <?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')) ?>
</a> </a>
<?php <?php
} } ?>
?>
</span> </span>
</td> </td>
<td class="cel_time"><?php echo $libitem->f_time ?></td> <td class="cel_time"><?php echo $libitem->f_time ?></td>
@ -73,8 +69,7 @@ if (!isset($libitem->enabled) || $libitem->enabled || Access::check('interface',
<td class="cel_userflag" id="userflag_<?php echo $libitem->id ?>_<?php echo $object_type ?>"><?php Userflag::show($libitem->id, $object_type) ?></td> <td class="cel_userflag" id="userflag_<?php echo $libitem->id ?>_<?php echo $object_type ?>"><?php Userflag::show($libitem->id, $object_type) ?></td>
<?php <?php
} }
} } ?>
?>
<td class="cel_action"> <td class="cel_action">
<?php if (AmpConfig::get('download')) { <?php if (AmpConfig::get('download')) {
?> ?>
@ -90,8 +85,7 @@ if (!isset($libitem->enabled) || $libitem->enabled || Access::check('interface',
} }
if (get_class($playlist) == "Playlist" && $playlist->has_access()) { if (get_class($playlist) == "Playlist" && $playlist->has_access()) {
echo Ajax::button('?page=playlist&action=delete_track&playlist_id=' . $playlist->id . '&track_id=' . $object['track_id'], 'delete', T_('Delete'), 'track_del_' . $object['track_id']); echo Ajax::button('?page=playlist&action=delete_track&playlist_id=' . $playlist->id . '&track_id=' . $object['track_id'], 'delete', T_('Delete'), 'track_del_' . $object['track_id']);
} } ?>
?>
</td> </td>
<?php if (Access::check('interface', '50') && get_class($playlist) == "Playlist") { <?php if (Access::check('interface', '50') && get_class($playlist) == "Playlist") {
?> ?>

View file

@ -41,20 +41,15 @@ $web_path = AmpConfig::get('web_path');
<?php if (User::is_registered()) { <?php if (User::is_registered()) {
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
; ; ?>
?> <th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
<th class="cel_rating optional"><?php echo T_('Rating');
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<?php <?php
} } ?>
?> <th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
<th class="cel_userflag optional"><?php echo T_('Fav.');
?></th>
<?php <?php
} ?> } ?>
<th class="cel_action essential"><?php echo T_('Action'); ?></th> <th class="cel_action essential"><?php echo T_('Action'); ?></th>
@ -70,11 +65,9 @@ $web_path = AmpConfig::get('web_path');
if (Core::is_library_item($object_type)) { if (Core::is_library_item($object_type)) {
$libitem = new $object_type($object['object_id']); $libitem = new $object_type($object['object_id']);
$libitem->format(); $libitem->format();
$playlist_track = $object['track']; $playlist_track = $object['track']; ?>
?>
<tr class="<?php echo UI::flip_class() ?>" id="track_<?php echo $object['track_id'] ?>"> <tr class="<?php echo UI::flip_class() ?>" id="track_<?php echo $object['track_id'] ?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_playlist_media_row.inc.php'); <?php require AmpConfig::get('prefix') . UI::find_template('show_playlist_media_row.inc.php'); ?>
?>
</tr> </tr>
<?php <?php
@ -96,18 +89,14 @@ $web_path = AmpConfig::get('web_path');
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<th class="cel_rating"><?php echo T_('Rating'); <th class="cel_rating"><?php echo T_('Rating'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<th class="cel_userflag"><?php echo T_('Fav.'); <th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action"><?php echo T_('Action'); ?></th> <th class="cel_action"><?php echo T_('Action'); ?></th>

View file

@ -40,8 +40,7 @@
?> ?>
<td class="cel_cover"> <td class="cel_cover">
<?php <?php
$libitem->display_art(3); $libitem->display_art(3); ?>
?>
</td> </td>
<?php <?php
} ?> } ?>
@ -51,11 +50,9 @@
<?php <?php
echo Ajax::button('?action=basket&type=playlist&id=' . $libitem->id, 'add', T_('Add to temporary playlist'), 'add_playlist_' . $libitem->id); echo Ajax::button('?action=basket&type=playlist&id=' . $libitem->id, 'add', T_('Add to temporary playlist'), 'add_playlist_' . $libitem->id);
if (Access::check('interface', '25')) { if (Access::check('interface', '25')) {
echo Ajax::button('?action=basket&type=playlist_random&id=' . $libitem->id, 'random', T_('Random to temporary playlist'), 'random_playlist_' . $libitem->id); echo Ajax::button('?action=basket&type=playlist_random&id=' . $libitem->id, 'random', T_('Random to temporary playlist'), 'random_playlist_' . $libitem->id); ?>
?>
<a id="<?php echo 'add_playlist_' . $libitem->id ?>" onclick="showPlaylistDialog(event, 'playlist', '<?php echo $libitem->id ?>')"> <a id="<?php echo 'add_playlist_' . $libitem->id ?>" onclick="showPlaylistDialog(event, 'playlist', '<?php echo $libitem->id ?>')">
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); <?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
?>
</a> </a>
<?php <?php
} }
@ -70,16 +67,12 @@
if (User::is_registered()) { if (User::is_registered()) {
if (AmpConfig::get('ratings')) { if (AmpConfig::get('ratings')) {
?> ?>
<td class="cel_rating" id="rating_<?php echo $libitem->id; <td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_playlist"><?php Rating::show($libitem->id, 'playlist'); ?></td>
?>_playlist"><?php Rating::show($libitem->id, 'playlist');
?></td>
<?php <?php
} }
if (AmpConfig::get('userflags')) { if (AmpConfig::get('userflags')) {
?> ?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; <td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_playlist"><?php Userflag::show($libitem->id, 'playlist'); ?></td>
?>_playlist"><?php Userflag::show($libitem->id, 'playlist');
?></td>
<?php <?php
} }
} }
@ -88,11 +81,8 @@
<?php <?php
if (Access::check_function('batch_download') && check_can_zip('playlist')) { if (Access::check_function('batch_download') && check_can_zip('playlist')) {
?> ?>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); <a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=playlist&amp;id=<?php echo $libitem->id; ?>">
?>/batch.php?action=playlist&amp;id=<?php echo $libitem->id; <?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
?>">
<?php echo UI::get_icon('batch_download', T_('Batch Download'));
?>
</a> </a>
<?php <?php
} }
@ -104,8 +94,7 @@
if ($libitem->has_access()) { if ($libitem->has_access()) {
?> ?>
<a id="<?php echo 'edit_playlist_' . $libitem->id ?>" onclick="showEditDialog('playlist_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_playlist_' . $libitem->id ?>', '<?php echo T_('Playlist edit') ?>', 'playlist_row_')"> <a id="<?php echo 'edit_playlist_' . $libitem->id ?>" onclick="showEditDialog('playlist_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_playlist_' . $libitem->id ?>', '<?php echo T_('Playlist edit') ?>', 'playlist_row_')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<?php echo Ajax::button('?page=browse&action=delete_object&type=playlist&id=' . $libitem->id, 'delete', T_('Delete'), 'delete_playlist_' . $libitem->id, '', '', T_('Do you really want to delete the playlist?')); <?php echo Ajax::button('?page=browse&action=delete_object&type=playlist&id=' . $libitem->id, 'delete', T_('Delete'), 'delete_playlist_' . $libitem->id, '', '', T_('Do you really want to delete the playlist?'));
} }

View file

@ -42,18 +42,14 @@
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<th class="cel_rating optional"><?php echo T_('Rating'); <th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<th class="cel_userflag optional"><?php echo T_('Fav.'); <th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action essential"><?php echo T_('Actions'); ?></th> <th class="cel_action essential"><?php echo T_('Actions'); ?></th>
@ -68,11 +64,8 @@
// Don't show empty playlist if not admin or the owner // Don't show empty playlist if not admin or the owner
if (Access::check('interface', '100') || $libitem->get_user_owner() == $GLOBALS['user']->id || $libitem->get_media_count() > 0) { if (Access::check('interface', '100') || $libitem->get_user_owner() == $GLOBALS['user']->id || $libitem->get_media_count() > 0) {
?> ?>
<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') . UI::find_template('show_playlist_row.inc.php'); ?>
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_playlist_row.inc.php');
?>
</tr> </tr>
<?php <?php
@ -80,10 +73,8 @@
} // end foreach ($playlists as $playlist) ?> } // end foreach ($playlists as $playlist) ?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="7"><span class="nodata"><?php echo T_('No playlist found'); ?></span></td>
<td colspan="7"><span class="nodata"><?php echo T_('No playlist found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -106,18 +97,14 @@
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<th class="cel_rating"><?php echo T_('Rating'); <th class="cel_rating"><?php echo T_('Rating'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<th class="cel_userflag"><?php echo T_('Fav.'); <th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action essential"><?php echo T_('Actions'); ?></th> <th class="cel_action essential"><?php echo T_('Actions'); ?></th>

View file

@ -32,15 +32,10 @@
Playlist::build_cache($playlists); Playlist::build_cache($playlists);
foreach ($playlists as $playlist_id) { foreach ($playlists as $playlist_id) {
$playlist = new Playlist($playlist_id); $playlist = new Playlist($playlist_id);
$playlist->format(); $playlist->format(); ?>
?>
<li> <li>
<a href="javascript:void(0);" id="rb_append_dplaylist_<?php echo $playlist->id; <a href="javascript:void(0);" id="rb_append_dplaylist_<?php echo $playlist->id; ?>" onclick="handlePlaylistAction('<?php echo AmpConfig::get('ajax_url') . '?page=playlist&action=append_item&playlist_id=' . $playlist->id . '&item_type=' . $object_type . '&item_id=' . $object_id; ?>', 'rb_append_dplaylist_<?php echo $playlist->id; ?>');">
?>" onclick="handlePlaylistAction('<?php echo AmpConfig::get('ajax_url') . '?page=playlist&action=append_item&playlist_id=' . $playlist->id . '&item_type=' . $object_type . '&item_id=' . $object_id; <?php echo $playlist->f_name; ?>
?>', 'rb_append_dplaylist_<?php echo $playlist->id;
?>');">
<?php echo $playlist->f_name;
?>
</a> </a>
</li> </li>
<?php <?php

View file

@ -33,38 +33,28 @@ if (Preference::has_access('play_type')) {
?> ?>
<option value="stream" <?php if (isset($is_stream)) { <option value="stream" <?php if (isset($is_stream)) {
echo $is_stream; echo $is_stream;
} } ?>><?php echo T_('Stream'); ?></option>
?>><?php echo T_('Stream');
?></option>
<?php <?php
} }
if (AmpConfig::get('allow_localplay_playback')) { if (AmpConfig::get('allow_localplay_playback')) {
?> ?>
<option value="localplay" <?php if (isset($is_localplay)) { <option value="localplay" <?php if (isset($is_localplay)) {
echo $is_localplay; echo $is_localplay;
} } ?>><?php echo T_('Localplay'); ?></option>
?>><?php echo T_('Localplay');
?></option>
<?php <?php
} }
if (AmpConfig::get('allow_democratic_playback')) { if (AmpConfig::get('allow_democratic_playback')) {
?> ?>
<option value="democratic" <?php if (isset($is_democratic)) { <option value="democratic" <?php if (isset($is_democratic)) {
echo $is_democratic; echo $is_democratic;
} } ?>><?php echo T_('Democratic'); ?></option>
?>><?php echo T_('Democratic');
?></option>
<?php <?php
} } ?>
?>
<option value="web_player" <?php if (isset($is_web_player)) { <option value="web_player" <?php if (isset($is_web_player)) {
echo $is_web_player; echo $is_web_player;
} } ?>><?php echo T_('Web Player'); ?></option>
?>><?php echo T_('Web Player');
?></option>
</select> </select>
<?php echo Ajax::observe('play_type_select', 'change', Ajax::action('?page=stream&action=set_play_type', 'play_type_select', 'play_type_form')); <?php echo Ajax::observe('play_type_select', 'change', Ajax::action('?page=stream&action=set_play_type', 'play_type_select', 'play_type_form')); ?>
?>
</form> </form>
<?php <?php

View file

@ -49,28 +49,19 @@ $web_path = AmpConfig::get('web_path');
'/admin/modules.php?action=upgrade_plugin&amp;plugin=' . '/admin/modules.php?action=upgrade_plugin&amp;plugin=' .
scrub_out($plugin_name) . '">' . T_('Upgrade') . '</a>'; scrub_out($plugin_name) . '">' . T_('Upgrade') . '</a>';
} }
} } ?>
?> <tr class="<?php echo UI::flip_class(); ?>">
<tr class="<?php echo UI::flip_class(); <td class="cel_name"><?php echo scrub_out($plugin->_plugin->name); ?></td>
?>"> <td class="cel_description"><?php echo scrub_out($plugin->_plugin->description); ?></td>
<td class="cel_name"><?php echo scrub_out($plugin->_plugin->name); <td class="cel_version"><?php echo scrub_out($plugin->_plugin->version); ?></td>
?></td> <td class="cel_iversion"><?php echo scrub_out($installed_version); ?></td>
<td class="cel_description"><?php echo scrub_out($plugin->_plugin->description); <td class="cel_action"><?php echo $action; ?></td>
?></td>
<td class="cel_version"><?php echo scrub_out($plugin->_plugin->version);
?></td>
<td class="cel_iversion"><?php echo scrub_out($installed_version);
?></td>
<td class="cel_action"><?php echo $action;
?></td>
</tr> </tr>
<?php <?php
} if (!count($plugins)) { } if (!count($plugins)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="5"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
<td colspan="5"><span class="error"><?php echo T_('No Records Found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -33,8 +33,7 @@ UI::show_box_top($podcast->f_title, 'info-box');
<?php if ($podcast->description) { <?php if ($podcast->description) {
?> ?>
<div id="item_summary"> <div id="item_summary">
<?php echo $podcast->description; <?php echo $podcast->description; ?>
?>
</div> </div>
<?php <?php
} ?> } ?>
@ -44,24 +43,18 @@ UI::show_box_top($podcast->f_title, 'info-box');
<?php <?php
if (AmpConfig::get('ratings')) { if (AmpConfig::get('ratings')) {
?> ?>
<div id="rating_<?php echo intval($podcast->id); <div id="rating_<?php echo intval($podcast->id); ?>_podcast" style="display:inline;">
?>_podcast" style="display:inline;"> <?php show_rating($podcast->id, 'podcast'); ?>
<?php show_rating($podcast->id, 'podcast');
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<div style="display:table-cell;" id="userflag_<?php echo $podcast->id; <div style="display:table-cell;" id="userflag_<?php echo $podcast->id; ?>_podcast">
?>_podcast"> <?php Userflag::show($podcast->id, 'podcast'); ?>
<?php Userflag::show($podcast->id, 'podcast');
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<div id="information_actions"> <div id="information_actions">
@ -70,20 +63,16 @@ UI::show_box_top($podcast->f_title, 'info-box');
<?php if (AmpConfig::get('directplay')) { <?php if (AmpConfig::get('directplay')) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast&object_id=' . $podcast->id, 'play', T_('Play all'), 'directplay_full_' . $podcast->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast&object_id=' . $podcast->id, 'play', T_('Play all'), 'directplay_full_' . $podcast->id); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=podcast&object_id=' . $podcast->id, T_('Play all'), 'directplay_full_text_' . $podcast->id); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=podcast&object_id=' . $podcast->id, T_('Play all'), 'directplay_full_text_' . $podcast->id);
?>
</li> </li>
<?php <?php
} ?> } ?>
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<li> <li>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast&object_id=' . $podcast->id . '&append=true', 'play_add', T_('Play all last'), 'addplay_podcast_' . $podcast->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast&object_id=' . $podcast->id . '&append=true', 'play_add', T_('Play all last'), 'addplay_podcast_' . $podcast->id); ?>
?> <?php echo Ajax::text('?page=stream&action=directplay&object_type=podcast&object_id=' . $podcast->id . '&append=true', T_('Play all last'), 'addplay_podcast_text_' . $podcast->id); ?>
<?php echo Ajax::text('?page=stream&action=directplay&object_type=podcast&object_id=' . $podcast->id . '&append=true', T_('Play all last'), 'addplay_podcast_text_' . $podcast->id);
?>
</li> </li>
<?php <?php
} ?> } ?>
@ -92,54 +81,37 @@ UI::show_box_top($podcast->f_title, 'info-box');
<?php if (AmpConfig::get('statistical_graphs')) { <?php if (AmpConfig::get('statistical_graphs')) {
?> ?>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/stats.php?action=graph&object_type=podcast&object_id=<?php echo $podcast->id; ?>"><?php echo UI::get_icon('statistics', T_('Graphs')); ?></a>
?>/stats.php?action=graph&object_type=podcast&object_id=<?php echo $podcast->id; <a href="<?php echo AmpConfig::get('web_path'); ?>/stats.php?action=graph&object_type=podcast&object_id=<?php echo $podcast->id; ?>"><?php echo T_('Graphs'); ?></a>
?>"><?php echo UI::get_icon('statistics', T_('Graphs'));
?></a>
<a href="<?php echo AmpConfig::get('web_path');
?>/stats.php?action=graph&object_type=podcast&object_id=<?php echo $podcast->id;
?>"><?php echo T_('Graphs');
?></a>
</li> </li>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('use_rss')) { <?php if (AmpConfig::get('use_rss')) {
?> ?>
<li> <li>
<?php echo Ampache_RSS::get_display('podcast', T_('Podcast'), array('object_type' => 'podcast', 'object_id' => $podcast->id)); <?php echo Ampache_RSS::get_display('podcast', T_('Podcast'), array('object_type' => 'podcast', 'object_id' => $podcast->id)); ?>
?>
</li> </li>
<?php <?php
} } ?>
?>
<li> <li>
<a id="<?php echo 'edit_podcast_' . $podcast->id ?>" onclick="showEditDialog('podcast_row', '<?php echo $podcast->id ?>', '<?php echo 'edit_podcast_' . $podcast->id ?>', '<?php echo T_('Podcast edit') ?>', '')"> <a id="<?php echo 'edit_podcast_' . $podcast->id ?>" onclick="showEditDialog('podcast_row', '<?php echo $podcast->id ?>', '<?php echo 'edit_podcast_' . $podcast->id ?>', '<?php echo T_('Podcast edit') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<a id="<?php echo 'edit_podcast_' . $podcast->id ?>" onclick="showEditDialog('podcast_row', '<?php echo $podcast->id ?>', '<?php echo 'edit_podcast_' . $podcast->id ?>', '<?php echo T_('Podcast edit') ?>', '')"> <a id="<?php echo 'edit_podcast_' . $podcast->id ?>" onclick="showEditDialog('podcast_row', '<?php echo $podcast->id ?>', '<?php echo 'edit_podcast_' . $podcast->id ?>', '<?php echo T_('Podcast edit') ?>', '')">
<?php echo T_('Edit Podcast'); <?php echo T_('Edit Podcast'); ?>
?>
</a> </a>
</li> </li>
<li> <li>
<?php echo Ajax::button('?page=podcast&action=sync&podcast_id=' . $podcast->id, 'file_refresh', T_('Sync'), 'sync_podcast_' . $podcast->id); <?php echo Ajax::button('?page=podcast&action=sync&podcast_id=' . $podcast->id, 'file_refresh', T_('Sync'), 'sync_podcast_' . $podcast->id); ?>
?> <?php echo Ajax::text('?page=podcast&action=sync&podcast_id=' . $podcast->id, T_('Sync'), 'sync_podcast_text_' . $podcast->id); ?>
<?php echo Ajax::text('?page=podcast&action=sync&podcast_id=' . $podcast->id, T_('Sync'), 'sync_podcast_text_' . $podcast->id);
?>
</li> </li>
<?php <?php
} ?> } ?>
<?php if (Access::check('interface', '75')) { <?php if (Access::check('interface', '75')) {
?> ?>
<li> <li>
<a id="<?php echo 'delete_podcast_' . $podcast->id ?>" href="<?php echo AmpConfig::get('web_path'); <a id="<?php echo 'delete_podcast_' . $podcast->id ?>" href="<?php echo AmpConfig::get('web_path'); ?>/podcast.php?action=delete&podcast_id=<?php echo $podcast->id; ?>">
?>/podcast.php?action=delete&podcast_id=<?php echo $podcast->id; <?php echo UI::get_icon('delete', T_('Delete')); ?> &nbsp;<?php echo T_('Delete'); ?>
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?> &nbsp;<?php echo T_('Delete');
?>
</a> </a>
</li> </li>
<?php <?php

View file

@ -27,41 +27,27 @@
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<?php $rowparity = UI::flip_class(); <?php $rowparity = UI::flip_class(); ?>
?> <dt class="<?php echo $rowparity; ?>"><?php echo T_('Rating'); ?></dt>
<dt class="<?php echo $rowparity; <dd class="<?php echo $rowparity; ?>">
?>"><?php echo T_('Rating'); <div id="rating_<?php echo $episode->id; ?>_podcast_episode"><?php Rating::show($episode->id, 'podcast_episode'); ?>
?></dt>
<dd class="<?php echo $rowparity;
?>">
<div id="rating_<?php echo $episode->id;
?>_podcast_episode"><?php Rating::show($episode->id, 'podcast_episode');
?>
</div> </div>
</dd> </dd>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<?php $rowparity = UI::flip_class(); <?php $rowparity = UI::flip_class(); ?>
?> <dt class="<?php echo $rowparity; ?>"><?php echo T_('Fav.'); ?></dt>
<dt class="<?php echo $rowparity; <dd class="<?php echo $rowparity; ?>">
?>"><?php echo T_('Fav.'); <div id="userflag_<?php echo $episode->id; ?>_podcast_episode"><?php Userflag::show($episode->id, 'podcast_episode'); ?>
?></dt>
<dd class="<?php echo $rowparity;
?>">
<div id="userflag_<?php echo $episode->id;
?>_podcast_episode"><?php Userflag::show($episode->id, 'podcast_episode');
?>
</div> </div>
</dd> </dd>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
@ -72,46 +58,35 @@
?> ?>
<?php if (AmpConfig::get('directplay')) { <?php if (AmpConfig::get('directplay')) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast_episode&object_id=' . $episode->id, 'play', T_('Play'), 'play_podcast_episode_' . $episode->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast_episode&object_id=' . $episode->id, 'play', T_('Play'), 'play_podcast_episode_' . $episode->id); ?>
?>
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast_episode&object_id=' . $episode->id . '&append=true', 'play_add', T_('Play last'), 'addplay_podcast_episode_' . $episode->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast_episode&object_id=' . $episode->id . '&append=true', 'play_add', T_('Play last'), 'addplay_podcast_episode_' . $episode->id); ?>
?>
<?php <?php
} } ?>
?>
<?php if (Stream_Playlist::check_autoplay_next()) { <?php if (Stream_Playlist::check_autoplay_next()) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast_episode&object_id=' . $episode->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_podcast_episode_' . $episode->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=podcast_episode&object_id=' . $episode->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_podcast_episode_' . $episode->id); ?>
?>
<?php <?php
} } ?>
?>
<?php <?php
} } ?>
?> <?php echo Ajax::button('?action=basket&type=podcast_episode&id=' . $episode->id, 'add', T_('Add to temporary playlist'), 'add_podcast_episode_' . $episode->id); ?>
<?php echo Ajax::button('?action=basket&type=podcast_episode&id=' . $episode->id, 'add', T_('Add to temporary playlist'), 'add_podcast_episode_' . $episode->id);
?>
<?php <?php
} ?> } ?>
<?php if (!AmpConfig::get('use_auth') || Access::check('interface', '25')) { <?php if (!AmpConfig::get('use_auth') || Access::check('interface', '25')) {
?> ?>
<?php if (AmpConfig::get('sociable')) { <?php if (AmpConfig::get('sociable')) {
?> ?>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=podcast_episode&id=<?php echo $episode->id; ?>">
?>/shout.php?action=show_add_shout&type=podcast_episode&id=<?php echo $episode->id; <?php echo UI::get_icon('comment', T_('Post Shout')); ?>
?>">
<?php echo UI::get_icon('comment', T_('Post Shout'));
?>
</a> </a>
<?php <?php
} } ?>
?>
<?php <?php
} }
?> ?>
@ -119,24 +94,17 @@
?> ?>
<?php if (AmpConfig::get('share')) { <?php if (AmpConfig::get('share')) {
?> ?>
<?php Share::display_ui('podcast_episode', $episode->id, false); <?php Share::display_ui('podcast_episode', $episode->id, false); ?>
?>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<?php if (Access::check_function('download') && !empty($episode->file)) { <?php if (Access::check_function('download') && !empty($episode->file)) {
?> ?>
<a rel="nohtml" href="<?php echo Podcast_Episode::play_url($episode->id); <a rel="nohtml" href="<?php echo Podcast_Episode::play_url($episode->id); ?>"><?php echo UI::get_icon('link', T_('Link')); ?></a>
?>"><?php echo UI::get_icon('link', T_('Link')); <a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>/stream.php?action=download&amp;podcast_episode_id=<?php echo $episode->id; ?>"><?php echo UI::get_icon('download', T_('Download')); ?></a>
?></a>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path');
?>/stream.php?action=download&amp;podcast_episode_id=<?php echo $episode->id;
?>"><?php echo UI::get_icon('download', T_('Download'));
?></a>
<?php <?php
} ?> } ?>
@ -144,28 +112,20 @@
?> ?>
<?php if (AmpConfig::get('statistical_graphs')) { <?php if (AmpConfig::get('statistical_graphs')) {
?> ?>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/stats.php?action=graph&object_type=podcast_episode&object_id=<?php echo $episode->id; ?>"><?php echo UI::get_icon('statistics', T_('Graphs')); ?></a>
?>/stats.php?action=graph&object_type=podcast_episode&object_id=<?php echo $episode->id;
?>"><?php echo UI::get_icon('statistics', T_('Graphs'));
?></a>
<?php <?php
} } ?>
?>
<a onclick="showEditDialog('podcast_episode_row', '<?php echo $episode->id ?>', '<?php echo 'edit_podcast_episode_' . $episode->id ?>', '<?php echo T_('Edit') ?>', '')"> <a onclick="showEditDialog('podcast_episode_row', '<?php echo $episode->id ?>', '<?php echo 'edit_podcast_episode_' . $episode->id ?>', '<?php echo T_('Edit') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<?php <?php
} ?> } ?>
<?php if (Catalog::can_remove($episode)) { <?php if (Catalog::can_remove($episode)) {
?> ?>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/podcast_episode.php?action=delete&podcast_episode_id=<?php echo $episode->id; ?>">
?>/podcast_episode.php?action=delete&podcast_episode_id=<?php echo $episode->id; <?php echo UI::get_icon('delete', T_('Delete')); ?>
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?>
</a> </a>
<?php <?php

View file

@ -44,8 +44,7 @@
if (Access::check('interface', '25')) { if (Access::check('interface', '25')) {
?> ?>
<a id="<?php echo 'add_playlist_' . $libitem->id ?>" onclick="showPlaylistDialog(event, 'podcast_episode', '<?php echo $libitem->id ?>')"> <a id="<?php echo 'add_playlist_' . $libitem->id ?>" onclick="showPlaylistDialog(event, 'podcast_episode', '<?php echo $libitem->id ?>')">
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); <?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
?>
</a> </a>
<?php <?php
@ -61,19 +60,15 @@
if (User::is_registered()) { if (User::is_registered()) {
if (AmpConfig::get('ratings')) { if (AmpConfig::get('ratings')) {
?> ?>
<td class="cel_rating" id="rating_<?php echo $libitem->id; <td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_podcast_episode">
?>_podcast_episode"> <?php Rating::show($libitem->id, 'podcast_episode'); ?>
<?php Rating::show($libitem->id, 'podcast_episode');
?>
</td> </td>
<?php <?php
} }
if (AmpConfig::get('userflags')) { if (AmpConfig::get('userflags')) {
?> ?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; <td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_podcast_episode">
?>_podcast_episode"> <?php Userflag::show($libitem->id, 'podcast_episode'); ?>
<?php Userflag::show($libitem->id, 'podcast_episode');
?>
</td> </td>
<?php <?php
} }
@ -82,34 +77,25 @@
<td class="cel_action"> <td class="cel_action">
<?php if (Access::check_function('download') && !empty($libitem->file)) { <?php if (Access::check_function('download') && !empty($libitem->file)) {
?> ?>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); <a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>/stream.php?action=download&amp;podcast_episode_id=<?php echo $libitem->id; ?>"><?php echo UI::get_icon('download', T_('Download')); ?></a>
?>/stream.php?action=download&amp;podcast_episode_id=<?php echo $libitem->id;
?>"><?php echo UI::get_icon('download', T_('Download'));
?></a>
<?php <?php
} ?> } ?>
<?php <?php
if (Access::check('interface', '50')) { if (Access::check('interface', '50')) {
?> ?>
<span id="button_sync_<?php echo $libitem->id; <span id="button_sync_<?php echo $libitem->id; ?>">
?>"> <?php echo Ajax::button('?page=podcast&action=sync&podcast_episode_id=' . $libitem->id, 'file_refresh', T_('Sync'), 'sync_podcast_episode_' . $libitem->id); ?>
<?php echo Ajax::button('?page=podcast&action=sync&podcast_episode_id=' . $libitem->id, 'file_refresh', T_('Sync'), 'sync_podcast_episode_' . $libitem->id);
?>
</span> </span>
<a id="<?php echo 'edit_podcast_episode_' . $libitem->id ?>" onclick="showEditDialog('podcast_episode_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_podcast_episode_' . $libitem->id ?>', '<?php echo T_('Podcast Episode edit') ?>', 'podcast_episode_')"> <a id="<?php echo 'edit_podcast_episode_' . $libitem->id ?>" onclick="showEditDialog('podcast_episode_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_podcast_episode_' . $libitem->id ?>', '<?php echo T_('Podcast Episode edit') ?>', 'podcast_episode_')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<?php <?php
} }
if (Catalog::can_remove($libitem)) { if (Catalog::can_remove($libitem)) {
?> ?>
<a id="<?php echo 'delete_podcast_episode_' . $libitem->id ?>" href="<?php echo AmpConfig::get('web_path'); <a id="<?php echo 'delete_podcast_episode_' . $libitem->id ?>" href="<?php echo AmpConfig::get('web_path'); ?>/podcast_episode.php?action=delete&podcast_episode_id=<?php echo $libitem->id; ?>">
?>/podcast_episode.php?action=delete&podcast_episode_id=<?php echo $libitem->id; <?php echo UI::get_icon('delete', T_('Delete')); ?>
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?>
</a> </a>
<?php <?php
} }

View file

@ -37,21 +37,15 @@ $thcount = 7;
<?php if (User::is_registered()) { <?php if (User::is_registered()) {
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
<th class="cel_rating optional"><?php echo T_('Rating');
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
<th class="cel_userflag optional"><?php echo T_('Fav.');
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action essential"><?php echo T_('Actions'); ?></th> <th class="cel_action essential"><?php echo T_('Actions'); ?></th>
@ -68,23 +62,16 @@ $thcount = 7;
foreach ($object_ids as $episode_id) { foreach ($object_ids as $episode_id) {
$libitem = new Podcast_Episode($episode_id); $libitem = new Podcast_Episode($episode_id);
$libitem->format(); $libitem->format(); ?>
?> <tr id="podcast_episode_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<tr id="podcast_episode_<?php echo $libitem->id; <?php require AmpConfig::get('prefix') . UI::find_template('show_podcast_episode_row.inc.php'); ?>
?>" class="<?php echo UI::flip_class();
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_podcast_episode_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No podcast episode found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No podcast episode found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -94,8 +81,7 @@ $thcount = 7;
<th class="cel_play"></th> <th class="cel_play"></th>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
?> ?>
<th class="cel_cover"><?php echo T_('Art'); <th class="cel_cover"><?php echo T_('Art'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_title"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=title', T_('Title'), 'podcast_episode_sort_title_bottom'); ?></th> <th class="cel_title"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=title', T_('Title'), 'podcast_episode_sort_title_bottom'); ?></th>
@ -108,18 +94,14 @@ $thcount = 7;
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<th class="cel_rating"><?php echo T_('Rating'); <th class="cel_rating"><?php echo T_('Rating'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<th class="cel_userflag"><?php echo T_('Fav.'); <th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action"><?php echo T_('Actions'); ?></th> <th class="cel_action"><?php echo T_('Actions'); ?></th>

View file

@ -36,8 +36,7 @@
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
?> ?>
<td class="cel_cover"> <td class="cel_cover">
<?php Art::display('podcast', $libitem->id, $libitem->f_name, 2, $libitem->link); <?php Art::display('podcast', $libitem->id, $libitem->f_name, 2, $libitem->link); ?>
?>
</td> </td>
<?php <?php
} ?> } ?>
@ -47,19 +46,15 @@
if (User::is_registered()) { if (User::is_registered()) {
if (AmpConfig::get('ratings')) { if (AmpConfig::get('ratings')) {
?> ?>
<td class="cel_rating" id="rating_<?php echo $libitem->id; <td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_podcast">
?>_podcast"> <?php Rating::show($libitem->id, 'podcast'); ?>
<?php Rating::show($libitem->id, 'podcast');
?>
</td> </td>
<?php <?php
} }
if (AmpConfig::get('userflags')) { if (AmpConfig::get('userflags')) {
?> ?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; <td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_podcast">
?>_podcast"> <?php Userflag::show($libitem->id, 'podcast'); ?>
<?php Userflag::show($libitem->id, 'podcast');
?>
</td> </td>
<?php <?php
} }
@ -70,23 +65,17 @@
if (Access::check('interface', '50')) { if (Access::check('interface', '50')) {
?> ?>
<a id="<?php echo 'edit_podcast_' . $libitem->id ?>" onclick="showEditDialog('podcast_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_podcast_' . $libitem->id ?>', '<?php echo T_('Podcast edit') ?>', 'podcast_')"> <a id="<?php echo 'edit_podcast_' . $libitem->id ?>" onclick="showEditDialog('podcast_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_podcast_' . $libitem->id ?>', '<?php echo T_('Podcast edit') ?>', 'podcast_')">
<?php echo UI::get_icon('edit', T_('Edit')); <?php echo UI::get_icon('edit', T_('Edit')); ?>
?>
</a> </a>
<span id="button_sync_<?php echo $libitem->id; <span id="button_sync_<?php echo $libitem->id; ?>">
?>"> <?php echo Ajax::button('?page=podcast&action=sync&podcast_id=' . $libitem->id, 'file_refresh', T_('Sync'), 'sync_podcast_' . $libitem->id); ?>
<?php echo Ajax::button('?page=podcast&action=sync&podcast_id=' . $libitem->id, 'file_refresh', T_('Sync'), 'sync_podcast_' . $libitem->id);
?>
</span> </span>
<?php <?php
} }
if (Access::check('interface', '75')) { if (Access::check('interface', '75')) {
?> ?>
<a id="<?php echo 'delete_podcast_' . $libitem->id ?>" href="<?php echo AmpConfig::get('web_path'); <a id="<?php echo 'delete_podcast_' . $libitem->id ?>" href="<?php echo AmpConfig::get('web_path'); ?>/podcast.php?action=delete&podcast_id=<?php echo $libitem->id; ?>">
?>/podcast.php?action=delete&podcast_id=<?php echo $libitem->id; <?php echo UI::get_icon('delete', T_('Delete')); ?>
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?>
</a> </a>
<?php <?php
} }

View file

@ -26,10 +26,7 @@ $thcount = 5;
<?php if (Access::check('interface', 75)) { <?php if (Access::check('interface', 75)) {
?> ?>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/podcast.php?action=show_create"><?php echo UI::get_icon('add', T_('Add')); ?> <?php echo T_('Subscribe Podcast'); ?></a>
?>/podcast.php?action=show_create"><?php echo UI::get_icon('add', T_('Add'));
?> <?php echo T_('Subscribe Podcast');
?></a>
</li> </li>
<?php <?php
} ?> } ?>
@ -43,10 +40,8 @@ $thcount = 5;
<tr class="th-top"> <tr class="th-top">
<th class="cel_play essential"></th> <th class="cel_play essential"></th>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
++$thcount; ++$thcount; ?>
?> <th class="cel_cover"><?php echo T_('Art'); ?></th>
<th class="cel_cover"><?php echo T_('Art');
?></th>
<?php <?php
} ?> } ?>
<th class="cel_title essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=title', T_('Title'), 'podcast_sort_title'); ?></th> <th class="cel_title essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=title', T_('Title'), 'podcast_sort_title'); ?></th>
@ -54,21 +49,15 @@ $thcount = 5;
<?php if (User::is_registered()) { <?php if (User::is_registered()) {
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
<th class="cel_rating optional"><?php echo T_('Rating');
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
<th class="cel_userflag optional"><?php echo T_('Fav.');
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action essential"><?php echo T_('Actions'); ?></th> <th class="cel_action essential"><?php echo T_('Actions'); ?></th>
@ -85,23 +74,16 @@ $thcount = 5;
foreach ($object_ids as $podcast_id) { foreach ($object_ids as $podcast_id) {
$libitem = new Podcast($podcast_id); $libitem = new Podcast($podcast_id);
$libitem->format(); $libitem->format(); ?>
?> <tr id="podcast_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<tr id="podcast_<?php echo $libitem->id; <?php require AmpConfig::get('prefix') . UI::find_template('show_podcast_row.inc.php'); ?>
?>" class="<?php echo UI::flip_class();
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_podcast_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No podcast found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No podcast found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -111,8 +93,7 @@ $thcount = 5;
<th class="cel_play"></th> <th class="cel_play"></th>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
?> ?>
<th class="cel_cover"><?php echo T_('Art'); <th class="cel_cover"><?php echo T_('Art'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_title"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=title', T_('Title'), 'podcast_sort_title_bottom'); ?></th> <th class="cel_title"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=title', T_('Title'), 'podcast_sort_title_bottom'); ?></th>
@ -121,18 +102,14 @@ $thcount = 5;
?> ?>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<th class="cel_rating"><?php echo T_('Rating'); <th class="cel_rating"><?php echo T_('Rating'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<th class="cel_userflag"><?php echo T_('Fav.'); <th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
?></th>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>
<th class="cel_action"><?php echo T_('Actions'); ?></th> <th class="cel_action"><?php echo T_('Actions'); ?></th>

View file

@ -33,27 +33,16 @@ UI::show_box_top(T_('Preference Administration'));
<th class="cel_level"><?php echo T_('Level'); ?></th> <th class="cel_level"><?php echo T_('Level'); ?></th>
</tr> </tr>
<?php foreach ($preferences as $preference) { <?php foreach ($preferences as $preference) {
unset($is_25, $is_5, $is_100); unset($is_25, $is_5, $is_100); ?>
?> <tr class="<?php echo UI::flip_class(); ?>">
<tr class="<?php echo UI::flip_class(); <td class="cel_preference"><?php echo scrub_out(T_($preference['description'])); ?></td>
?>">
<td class="cel_preference"><?php echo scrub_out(T_($preference['description']));
?></td>
<td class="cel_level"> <td class="cel_level">
<?php $level_name = "is_" . $preference['level']; <?php $level_name = "is_" . $preference['level'];
${$level_name} = 'selected="selected"'; ${$level_name} = 'selected="selected"'; ?>
?> <select name="prefs[<?php echo scrub_out($preference['name']); ?>]">
<select name="prefs[<?php echo scrub_out($preference['name']); <option value="5" <?php echo $is_5; ?>><?php echo T_('Guest'); ?></option>
?>]"> <option value="25" <?php echo $is_25; ?>><?php echo T_('User'); ?></option>
<option value="5" <?php echo $is_5; <option value="100" <?php echo $is_100; ?>><?php echo T_('Admin'); ?></option>
?>><?php echo T_('Guest');
?></option>
<option value="25" <?php echo $is_25;
?>><?php echo T_('User');
?></option>
<option value="100" <?php echo $is_100;
?>><?php echo T_('Admin');
?></option>
</select> </select>
</td> </td>
</tr> </tr>

View file

@ -45,10 +45,8 @@ if (Access::check('interface', '100') && $_REQUEST['action'] == 'admin') {
<th class="cel_value"><?php echo T_('Value'); ?></th> <th class="cel_value"><?php echo T_('Value'); ?></th>
<?php if ($is_admin) { <?php if ($is_admin) {
?> ?>
<th class="cel_applytoall"><?php echo T_('Apply to All'); <th class="cel_applytoall"><?php echo T_('Apply to All'); ?></th>
?></th> <th class="cel_level"><?php echo T_('Access Level'); ?></th>
<th class="cel_level"><?php echo T_('Access Level');
?></th>
<?php <?php
} ?> } ?>
</tr> </tr>
@ -61,53 +59,34 @@ if (Access::check('interface', '100') && $_REQUEST['action'] == 'admin') {
$lastsubcat = $pref['subcategory']; $lastsubcat = $pref['subcategory'];
$fsubcat = $lastsubcat; $fsubcat = $lastsubcat;
if (!empty($fsubcat)) { if (!empty($fsubcat)) {
$fsubcat = ucwords($fsubcat); $fsubcat = ucwords($fsubcat); ?>
?>
<tr class="<?php echo UI::flip_class() ?>"><td colspan="4"><h5><?php echo T_($fsubcat) ?></h5></td></tr> <tr class="<?php echo UI::flip_class() ?>"><td colspan="4"><h5><?php echo T_($fsubcat) ?></h5></td></tr>
<?php <?php
} }
} } ?>
?>
<tr class="<?php echo UI::flip_class() ?>"> <tr class="<?php echo UI::flip_class() ?>">
<td class="cel_preference"><?php echo T_($pref['description']); <td class="cel_preference"><?php echo T_($pref['description']); ?></td>
?></td>
<td class="cel_value"> <td class="cel_value">
<?php create_preference_input($pref['name'], $pref['value']); <?php create_preference_input($pref['name'], $pref['value']); ?>
?>
</td> </td>
<?php if ($is_admin) { <?php if ($is_admin) {
?> ?>
<td class="cel_applytoall"><input type="checkbox" name="check_<?php echo $pref['name']; <td class="cel_applytoall"><input type="checkbox" name="check_<?php echo $pref['name']; ?>" value="1" /></td>
?>" value="1" /></td>
<td class="cel_level"> <td class="cel_level">
<?php $name = 'on_' . $pref['level']; <?php $name = 'on_' . $pref['level'];
${$name} = 'selected="selected"'; ${$name} = 'selected="selected"'; ?>
?> <select name="level_<?php echo $pref['name']; ?>">
<select name="level_<?php echo $pref['name']; <option value="5" <?php echo $on_5; ?>><?php echo T_('Guest'); ?></option>
?>"> <option value="25" <?php echo $on_25; ?>><?php echo T_('User'); ?></option>
<option value="5" <?php echo $on_5; <option value="50" <?php echo $on_50; ?>><?php echo T_('Content Manager'); ?></option>
?>><?php echo T_('Guest'); <option value="75" <?php echo $on_75; ?>><?php echo T_('Catalog Manager'); ?></option>
?></option> <option value="100" <?php echo $on_100; ?>><?php echo T_('Admin'); ?></option>
<option value="25" <?php echo $on_25;
?>><?php echo T_('User');
?></option>
<option value="50" <?php echo $on_50;
?>><?php echo T_('Content Manager');
?></option>
<option value="75" <?php echo $on_75;
?>><?php echo T_('Catalog Manager');
?></option>
<option value="100" <?php echo $on_100;
?>><?php echo T_('Admin');
?></option>
</select> </select>
<?php unset(${$name}); <?php unset(${$name}); ?>
?>
</td> </td>
<?php <?php
} } ?>
?>
</tr> </tr>
<?php <?php
} // End foreach ($preferences['prefs'] as $pref) ?> } // End foreach ($preferences['prefs'] as $pref) ?>
@ -118,10 +97,8 @@ if (Access::check('interface', '100') && $_REQUEST['action'] == 'admin') {
<th class="cel_value"><?php echo T_('Value'); ?></th> <th class="cel_value"><?php echo T_('Value'); ?></th>
<?php if ($is_admin) { <?php if ($is_admin) {
?> ?>
<th class="cel_applytoall"><?php echo T_('Apply to All'); <th class="cel_applytoall"><?php echo T_('Apply to All'); ?></th>
?></th> <th class="cel_level"><?php echo T_('Access Level'); ?></th>
<th class="cel_level"><?php echo T_('Access Level');
?></th>
<?php <?php
} ?> } ?>
</tr> </tr>

View file

@ -30,26 +30,18 @@
<?php if ($_REQUEST['tab'] != 'account' && $_REQUEST['tab'] != 'modules') { <?php if ($_REQUEST['tab'] != 'account' && $_REQUEST['tab'] != 'modules') {
?> ?>
<form method="post" name="preferences" action="<?php echo AmpConfig::get('web_path'); <form method="post" name="preferences" action="<?php echo AmpConfig::get('web_path'); ?>/preferences.php?action=update_preferences" enctype="multipart/form-data">
?>/preferences.php?action=update_preferences" enctype="multipart/form-data"> <?php show_preference_box($preferences[$_REQUEST['tab']]); ?>
<?php show_preference_box($preferences[$_REQUEST['tab']]);
?>
<div class="formValidation"> <div class="formValidation">
<input class="button" type="submit" value="<?php echo T_('Update Preferences'); <input class="button" type="submit" value="<?php echo T_('Update Preferences'); ?>" />
?>" /> <?php echo Core::form_register('update_preference'); ?>
<?php echo Core::form_register('update_preference'); <input type="hidden" name="tab" value="<?php echo scrub_out($_REQUEST['tab']); ?>" />
?> <input type="hidden" name="method" value="<?php echo scrub_out($_REQUEST['action']); ?>" />
<input type="hidden" name="tab" value="<?php echo scrub_out($_REQUEST['tab']);
?>" />
<input type="hidden" name="method" value="<?php echo scrub_out($_REQUEST['action']);
?>" />
<?php if (Access::check('interface', '100')) { <?php if (Access::check('interface', '100')) {
?> ?>
<input type="hidden" name="user_id" value="<?php echo scrub_out($_REQUEST['user_id']); <input type="hidden" name="user_id" value="<?php echo scrub_out($_REQUEST['user_id']); ?>" />
?>" />
<?php <?php
} } ?>
?>
</div> </div>
<?php <?php

View file

@ -59,23 +59,16 @@ $thcount = 5;
/* Foreach through every label that has been passed to us */ /* Foreach through every label that has been passed to us */
foreach ($object_ids as $pvmg_id) { foreach ($object_ids as $pvmg_id) {
$libitem = new PrivateMsg($pvmg_id); $libitem = new PrivateMsg($pvmg_id);
$libitem->format(); $libitem->format(); ?>
?> <tr id="label_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?> <?php echo (!$libitem->is_read) ? "unread" : "" ?>">
<tr id="label_<?php echo $libitem->id; <?php require AmpConfig::get('prefix') . UI::find_template('show_pvmsg_row.inc.php'); ?>
?>" class="<?php echo UI::flip_class();
?> <?php echo (!$libitem->is_read) ? "unread" : "" ?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_pvmsg_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
<?php if (!count($object_ids)) { <?php if (!count($object_ids)) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No message found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No message found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>

View file

@ -25,23 +25,17 @@
<table class="tabledata" cellpadding="3" cellspacing="0"> <table class="tabledata" cellpadding="3" cellspacing="0">
<tr id="search_location"> <tr id="search_location">
<td><?php if ($_REQUEST['type'] != 'song') { <td><?php if ($_REQUEST['type'] != 'song') {
?><a href="<?php echo AmpConfig::get('web_path'); ?><a href="<?php echo AmpConfig::get('web_path'); ?>/random.php?action=advanced&type=song"><?php echo T_('Songs'); ?></a><?php
?>/random.php?action=advanced&type=song"><?php echo T_('Songs');
?></a><?php
} else { } else {
echo T_('Songs'); echo T_('Songs');
} ?></td> } ?></td>
<td><?php if ($_REQUEST['type'] != 'album') { <td><?php if ($_REQUEST['type'] != 'album') {
?><a href="<?php echo AmpConfig::get('web_path'); ?><a href="<?php echo AmpConfig::get('web_path'); ?>/random.php?action=advanced&type=album"><?php echo T_('Albums'); ?></a><?php
?>/random.php?action=advanced&type=album"><?php echo T_('Albums');
?></a><?php
} else { } else {
echo T_('Albums'); echo T_('Albums');
} ?></td> } ?></td>
<td><?php if ($_REQUEST['type'] != 'artist') { <td><?php if ($_REQUEST['type'] != 'artist') {
?><a href="<?php echo AmpConfig::get('web_path'); ?><a href="<?php echo AmpConfig::get('web_path'); ?>/random.php?action=advanced&type=artist"><?php echo T_('Artists'); ?></a><?php
?>/random.php?action=advanced&type=artist"><?php echo T_('Artists');
?></a><?php
} else { } else {
echo T_('Artists'); echo T_('Artists');
} ?></td> } ?></td>

View file

@ -29,8 +29,7 @@ if ($albums) {
foreach ($albums as $album_id) { foreach ($albums as $album_id) {
$album = new Album($album_id); $album = new Album($album_id);
$album->format(); $album->format();
$show_play = true; $show_play = true; ?>
?>
<div class="random_album"> <div class="random_album">
<div id="album_<?php echo $album_id ?>" class="art_album libitem_menu"> <div id="album_<?php echo $album_id ?>" class="art_album libitem_menu">
<?php <?php
@ -43,49 +42,38 @@ if ($albums) {
$album->display_art($thumb, true); $album->display_art($thumb, true);
} else { } else {
?> ?>
<a href="<?php $album->link; <a href="<?php $album->link; ?>">
?>"> <?php echo '[' . $album->f_artist . '] ' . $album->f_name; ?>
<?php echo '[' . $album->f_artist . '] ' . $album->f_name;
?>
</a> </a>
<?php <?php
} } ?>
?>
</div> </div>
<?php if ($show_play) { <?php if ($show_play) {
?> ?>
<div class="play_album"> <div class="play_album">
<?php if (AmpConfig::get('directplay')) { <?php if (AmpConfig::get('directplay')) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), 'play', T_('Play'), 'play_album_' . $album->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), 'play', T_('Play'), 'play_album_' . $album->id); ?>
?>
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $album->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $album->id); ?>
?>
<?php <?php
} } ?>
?>
<?php <?php
} } ?>
?> <?php echo Ajax::button('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $album->id); ?>
<?php echo Ajax::button('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $album->id);
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php <?php
if (AmpConfig::get('ratings') && Access::check('interface', '25')) { if (AmpConfig::get('ratings') && Access::check('interface', '25')) {
echo "<div id=\"rating_" . $album->id . "_album\">"; echo "<div id=\"rating_" . $album->id . "_album\">";
show_rating($album->id, 'album'); show_rating($album->id, 'album');
echo "</div>"; echo "</div>";
} } ?>
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>

View file

@ -28,8 +28,7 @@ $button = Ajax::button('?page=index&action=random_videos', 'random', T_('Refre
if ($videos) { if ($videos) {
foreach ($videos as $video_id) { foreach ($videos as $video_id) {
$video = Video::create_from_id($video_id); $video = Video::create_from_id($video_id);
$video->format(); $video->format(); ?>
?>
<div class="random_video"> <div class="random_video">
<div id="video_<?php echo $video_id ?>" class="art_album libitem_menu"> <div id="video_<?php echo $video_id ?>" class="art_album libitem_menu">
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
@ -38,39 +37,31 @@ if ($videos) {
Art::display($release_art['object_type'], $release_art['object_id'], $video->get_fullname(), $thumb, $video->link); Art::display($release_art['object_type'], $release_art['object_id'], $video->get_fullname(), $thumb, $video->link);
} else { } else {
?> ?>
<?php echo $video->get_fullname(); <?php echo $video->get_fullname(); ?>
?>
<?php <?php
} } ?>
?>
</div> </div>
<div class="play_video"> <div class="play_video">
<?php if (AmpConfig::get('directplay')) { <?php if (AmpConfig::get('directplay')) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=video&object_id=' . $video->id, 'play', T_('Play'), 'play_album_' . $video->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=video&object_id=' . $video->id, 'play', T_('Play'), 'play_album_' . $video->id); ?>
?>
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=video&object_id=' . $video->id . '&append=true', 'play_add', T_('Play last'), 'addplay_video_' . $video->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=video&object_id=' . $video->id . '&append=true', 'play_add', T_('Play last'), 'addplay_video_' . $video->id); ?>
?>
<?php <?php
} } ?>
?>
<?php <?php
} } ?>
?>
</div> </div>
<?php <?php
if (AmpConfig::get('ratings') && Access::check('interface', '25')) { if (AmpConfig::get('ratings') && Access::check('interface', '25')) {
echo "<div id=\"rating_" . $video->id . "_video\">"; echo "<div id=\"rating_" . $video->id . "_video\">";
show_rating($video->id, 'video'); show_rating($video->id, 'video');
echo "</div>"; echo "</div>";
} } ?>
?>
</div> </div>
<?php <?php
} } ?>
?>
<?php <?php
} ?> } ?>

View file

@ -35,8 +35,7 @@ UI::show_box_top(T_('Recently Played') . $link, 'box box_recently_played');
<th class="cel_lastplayed"><?php echo T_('Last Played'); ?></th> <th class="cel_lastplayed"><?php echo T_('Last Played'); ?></th>
<?php if (Access::check('interface', 50)) { <?php if (Access::check('interface', 50)) {
?> ?>
<th class="cel_agent"><?php echo T_('Agent'); <th class="cel_agent"><?php echo T_('Agent'); ?></th>
?></th>
<?php <?php
} ?> } ?>
</tr> </tr>
@ -94,73 +93,54 @@ foreach ($data as $row) {
$time_string = sprintf(nT_('%d decade ago', '%d decades ago', $interval), $interval); $time_string = sprintf(nT_('%d decade ago', '%d decades ago', $interval), $interval);
} }
} }
$song->format(); $song->format(); ?>
?> <tr class="<?php echo UI::flip_class(); ?>">
<tr class="<?php echo UI::flip_class();
?>">
<td class="cel_play"> <td class="cel_play">
<span class="cel_play_content">&nbsp;</span> <span class="cel_play_content">&nbsp;</span>
<div class="cel_play_hover"> <div class="cel_play_hover">
<?php if (AmpConfig::get('directplay')) { <?php if (AmpConfig::get('directplay')) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=song&object_id=' . $song->id, 'play', T_('Play'), 'play_song_' . $nb . '_' . $song->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=song&object_id=' . $song->id, 'play', T_('Play'), 'play_song_' . $nb . '_' . $song->id); ?>
?>
<?php if (Stream_Playlist::check_autoplay_append()) { <?php if (Stream_Playlist::check_autoplay_append()) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=song&object_id=' . $song->id . '&append=true', 'play_add', T_('Play last'), 'addplay_song_' . $nb . '_' . $song->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=song&object_id=' . $song->id . '&append=true', 'play_add', T_('Play last'), 'addplay_song_' . $nb . '_' . $song->id); ?>
?>
<?php <?php
} } ?>
?>
<?php if (Stream_Playlist::check_autoplay_next()) { <?php if (Stream_Playlist::check_autoplay_next()) {
?> ?>
<?php echo Ajax::button('?page=stream&action=directplay&object_type=song&object_id=' . $song->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_song_' . $nb . '_' . $song->id); <?php echo Ajax::button('?page=stream&action=directplay&object_type=song&object_id=' . $song->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_song_' . $nb . '_' . $song->id); ?>
?>
<?php <?php
} } ?>
?>
<?php <?php
} } ?>
?>
</div> </div>
</td> </td>
<td class="cel_song"><?php echo $song->f_link; <td class="cel_song"><?php echo $song->f_link; ?></td>
?></td>
<td class="cel_add"> <td class="cel_add">
<span class="cel_item_add"> <span class="cel_item_add">
<?php echo Ajax::button('?action=basket&type=song&id=' . $song->id, 'add', T_('Add to temporary playlist'), 'add_' . $nb . '_' . $song->id); <?php echo Ajax::button('?action=basket&type=song&id=' . $song->id, 'add', T_('Add to temporary playlist'), 'add_' . $nb . '_' . $song->id); ?>
?>
<a id="<?php echo 'add_playlist_' . $nb . '_' . $song->id ?>" onclick="showPlaylistDialog(event, 'song', '<?php echo $song->id ?>')"> <a id="<?php echo 'add_playlist_' . $nb . '_' . $song->id ?>" onclick="showPlaylistDialog(event, 'song', '<?php echo $song->id ?>')">
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); <?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
?>
</a> </a>
</span> </span>
</td> </td>
<td class="cel_album"><?php echo $song->f_album_link; <td class="cel_album"><?php echo $song->f_album_link; ?></td>
?></td> <td class="cel_artist"><?php echo $song->f_artist_link; ?></td>
<td class="cel_artist"><?php echo $song->f_artist_link;
?></td>
<td class="cel_username"> <td class="cel_username">
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/stats.php?action=show_user&amp;user_id=<?php echo scrub_out($row_user->id); ?>">
?>/stats.php?action=show_user&amp;user_id=<?php echo scrub_out($row_user->id); <?php echo scrub_out($row_user->fullname); ?>
?>">
<?php echo scrub_out($row_user->fullname);
?>
</a> </a>
</td> </td>
<td class="cel_lastplayed"><?php echo $time_string; <td class="cel_lastplayed"><?php echo $time_string; ?></td>
?></td>
<?php if (Access::check('interface', 50)) { <?php if (Access::check('interface', 50)) {
?> ?>
<td class="cel_agent"> <td class="cel_agent">
<?php if (!empty($agent)) { <?php if (!empty($agent)) {
echo UI::get_icon('info', $agent); echo UI::get_icon('info', $agent);
} } ?>
?>
</td> </td>
<?php <?php
} } ?>
?>
</tr> </tr>
<?php <?php
++$nb; ++$nb;
@ -169,8 +149,7 @@ foreach ($data as $row) {
<?php if (!count($data)) { <?php if (!count($data)) {
?> ?>
<tr> <tr>
<td colspan="8"><span class="nodata"><?php echo T_('No recently item found'); <td colspan="8"><span class="nodata"><?php echo T_('No recently item found'); ?></span></td>
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -186,8 +165,7 @@ foreach ($data as $row) {
<th class="cel_lastplayed"><?php echo T_('Last Played'); ?></th> <th class="cel_lastplayed"><?php echo T_('Last Played'); ?></th>
<?php if (Access::check('interface', 50)) { <?php if (Access::check('interface', 50)) {
?> ?>
<th class="cel_agent"><?php echo T_('Agent'); <th class="cel_agent"><?php echo T_('Agent'); ?></th>
?></th>
<?php <?php
} ?> } ?>
</tr> </tr>

View file

@ -28,10 +28,8 @@ $thcount = 8;
<tr class="th-top"> <tr class="th-top">
<th class="cel_play"></th> <th class="cel_play"></th>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
++$thcount; ++$thcount; ?>
?> <th class="cel_cover optional"><?php echo T_('Art'); ?></th>
<th class="cel_cover optional"><?php echo T_('Art');
?></th>
<?php <?php
} }
?> ?>
@ -42,17 +40,13 @@ $thcount = 8;
<th class="cel_time"><?php echo T_('Time'); ?></th> <th class="cel_time"><?php echo T_('Time'); ?></th>
<th class="cel_tags"><?php echo T_('Tags'); ?></th> <th class="cel_tags"><?php echo T_('Tags'); ?></th>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_rating"><?php echo T_('Rating'); ?></th>
<th class="cel_rating"><?php echo T_('Rating');
?></th>
<?php <?php
} ?> } ?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
++$thcount; ++$thcount; ?>
?> <th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
<th class="cel_userflag"><?php echo T_('Fav.');
?></th>
<?php <?php
} ?> } ?>
<th class="cel_action"> <?php echo T_('Action'); ?> </th> <th class="cel_action"> <?php echo T_('Action'); ?> </th>
@ -72,13 +66,9 @@ $thcount = 8;
/* Foreach through every artist that has been passed to us */ /* Foreach through every artist that has been passed to us */
foreach ($object_ids as $artist_id) { foreach ($object_ids as $artist_id) {
$libitem = new Artist($artist_id); $libitem = new Artist($artist_id);
$libitem->format(); $libitem->format(); ?>
?> <tr id="artist_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<tr id="artist_<?php echo $libitem->id; <?php require AmpConfig::get('prefix') . UI::find_template('show_artist_row.inc.php'); ?>
?>" class="<?php echo UI::flip_class();
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_artist_row.inc.php');
?>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -86,26 +76,16 @@ $thcount = 8;
/* Foreach through every missing artist that has been passed to us */ /* Foreach through every missing artist that has been passed to us */
foreach ($missing_objects as $missing) { foreach ($missing_objects as $missing) {
?> ?>
<tr id="missing_artist_<?php echo $missing['mbid']; <tr id="missing_artist_<?php echo $missing['mbid']; ?>" class="<?php echo UI::flip_class(); ?>">
?>" class="<?php echo UI::flip_class();
?>">
<td></td> <td></td>
<td colspan="<?php echo($thcount - 1); <td colspan="<?php echo($thcount - 1); ?>"><a class="missing_album" href="<?php echo AmpConfig::get('web_path'); ?>/artists.php?action=show_missing&mbid=<?php echo $missing['mbid']; ?>" title="<?php echo scrub_out($missing['name']); ?>"><?php echo scrub_out($missing['name']); ?></a></td>
?>"><a class="missing_album" href="<?php echo AmpConfig::get('web_path');
?>/artists.php?action=show_missing&mbid=<?php echo $missing['mbid'];
?>" title="<?php echo scrub_out($missing['name']);
?>"><?php echo scrub_out($missing['name']);
?></a></td>
</tr> </tr>
<?php <?php
} ?> } ?>
<?php if ((!$object_ids || !count($object_ids)) && (!$missing_objects || !count($missing_objects))) { <?php if ((!$object_ids || !count($object_ids)) && (!$missing_objects || !count($missing_objects))) {
?> ?>
<tr class="<?php echo UI::flip_class(); <tr class="<?php echo UI::flip_class(); ?>">
?>"> <td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No similar artist found'); ?></span></td>
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No similar artist found');
?></span></td>
</tr> </tr>
<?php <?php
} ?> } ?>
@ -115,8 +95,7 @@ $thcount = 8;
<th class="cel_play"></th> <th class="cel_play"></th>
<?php if (Art::is_enabled()) { <?php if (Art::is_enabled()) {
?> ?>
<th class="cel_cover"><?php echo T_('Art'); <th class="cel_cover"><?php echo T_('Art'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_artist"><?php echo T_('Artist'); ?></th> <th class="cel_artist"><?php echo T_('Artist'); ?></th>
@ -127,14 +106,12 @@ $thcount = 8;
<th class="cel_tags"><?php echo T_('Tags'); ?></th> <th class="cel_tags"><?php echo T_('Tags'); ?></th>
<?php if (AmpConfig::get('ratings')) { <?php if (AmpConfig::get('ratings')) {
?> ?>
<th class="cel_rating"><?php echo T_('Rating'); <th class="cel_rating"><?php echo T_('Rating'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<?php if (AmpConfig::get('userflags')) { <?php if (AmpConfig::get('userflags')) {
?> ?>
<th class="cel_userflag"><?php echo T_('Fav.'); <th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
?></th>
<?php <?php
} ?> } ?>
<th class="cel_action"> <?php echo T_('Action'); ?> </th> <th class="cel_action"> <?php echo T_('Action'); ?> </th>

View file

@ -32,12 +32,8 @@ UI::show_box_top('<div id="smartplaylist_row_' . $playlist->id . '">' . $title .
<?php if (Access::check_function('batch_download') && check_can_zip('search')) { <?php if (Access::check_function('batch_download') && check_can_zip('search')) {
?> ?>
<li> <li>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); <a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=search&amp;id=<?php echo $playlist->id; ?>"><?php echo UI::get_icon('batch_download', T_('Batch Download')); ?></a>
?>/batch.php?action=search&amp;id=<?php echo $playlist->id; <?php echo T_('Batch Download'); ?>
?>"><?php echo UI::get_icon('batch_download', T_('Batch Download'));
?></a>
<?php echo T_('Batch Download');
?>
</li> </li>
<?php <?php
} ?> } ?>
@ -48,14 +44,10 @@ UI::show_box_top('<div id="smartplaylist_row_' . $playlist->id . '">' . $title .
<?php if ($playlist->has_access()) { <?php if ($playlist->has_access()) {
?> ?>
<li> <li>
<a href="<?php echo AmpConfig::get('web_path'); <a href="<?php echo AmpConfig::get('web_path'); ?>/smartplaylist.php?action=delete_playlist&playlist_id=<?php echo $playlist->id; ?>">
?>/smartplaylist.php?action=delete_playlist&playlist_id=<?php echo $playlist->id; <?php echo UI::get_icon('delete'); ?>
?>">
<?php echo UI::get_icon('delete');
?>
</a> </a>
<?php echo T_('Delete'); <?php echo T_('Delete'); ?>
?>
</li> </li>
<?php <?php
} ?> } ?>

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