1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 01:39:28 +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
if ($force || !defined('TABLE_RENDERED')) {
define('TABLE_RENDERED', 1);
?>
<script src="<?php echo AmpConfig::get('web_path');
?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
define('TABLE_RENDERED', 1); ?>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php if (isset($render) && $render) {
?>
<script language="javascript" type="text/javascript">sortPlaylistRender();</script>

View file

@ -172,8 +172,7 @@ switch ($plexact) {
<input type="hidden" name="plexact" value="auth_myplex" />
<div class="field">
<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 class="field">
<label for="myplex_password">myPlex Password:</label>
@ -181,19 +180,16 @@ switch ($plexact) {
</div>
<div class="field">
<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>
<?php if ($plex_local_port != 32400) {
?>
<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;
?>. Ampache applies a small URI `hack` to work with custom 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
as Plex server, but be aware that this will not work with all clients.
</div>
<?php
}
?>
} ?>
<div class="formbuttons">
<input type="submit" value="Auth/Publish" />
</div>
@ -205,11 +201,8 @@ switch ($plexact) {
<div class="configform">
<h3>myPlex authentication / server publish</h3>
<form action="" method="POST" enctype="multipart/form-data">
<label>myPlex user: <b><?php echo $myplex_username;
?></b></label><br />
<label>Public server address: <b><?php echo $plex_public_address;
?>:<?php echo $plex_public_port;
?></b></label>
<label>myPlex user: <b><?php echo $myplex_username; ?></b></label><br />
<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" />
<div class="formbuttons">
<input type="submit" value="Unregister" />

View file

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

View file

@ -37,8 +37,7 @@
<div id="footer" class="<?php echo(($count_temp_playlist || AmpConfig::get('play_type') == 'localplay') ? '' : 'footer-wild'); ?>">
<?php if (AmpConfig::get('show_donate')) {
?>
<a id="donate" href="//ampache.github.io/donate.html" title="Donate" target="_blank"><?php echo ".:: " . T_('Donate') . " ::.";
?></a> |
<a id="donate" href="//ampache.github.io/donate.html" title="Donate" target="_blank"><?php echo ".:: " . T_('Donate') . " ::."; ?></a> |
<?php
} ?>
<?php
@ -46,25 +45,17 @@
echo AmpConfig::get('custom_text_footer');
} 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>
<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>
<?php
} ?>
<?php if (AmpConfig::get('show_footer_statistics')) {
?>
<br />
<?php echo T_('Queries:');
?><?php echo Dba::$stats['query'];
?> <?php echo T_('Cache Hits:');
?><?php echo database_object::$cache_hit;
?>
<?php echo T_('Queries:'); ?><?php echo Dba::$stats['query']; ?> <?php echo T_('Cache Hits:'); ?><?php echo database_object::$cache_hit; ?>
<?php
$load_time_end = microtime(true);
$load_time = number_format(($load_time_end - AmpConfig::get('load_time_begin')), 4);
?>
| <?php echo T_('Load time:');
?><?php echo $load_time;
?>
$load_time = number_format(($load_time_end - AmpConfig::get('load_time_begin')), 4); ?>
| <?php echo T_('Load time:'); ?><?php echo $load_time; ?>
<?php
} ?>
</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" />
<?php if (AmpConfig::get('use_rss')) {
?>
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Now Playing');
?>" href="<?php echo $web_path;
?>/rss.php" />
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Recently Played');
?>" 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" />
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Now Playing'); ?>" href="<?php echo $web_path; ?>/rss.php" />
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Recently Played'); ?>" 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')) {
?>
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Newest Shouts');
?>" href="<?php echo $web_path;
?>/rss.php?type=latest_shout" />
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Newest Shouts'); ?>" href="<?php echo $web_path; ?>/rss.php?type=latest_shout" />
<?php
}
?>
} ?>
<?php
} ?>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?php echo AmpConfig::get('site_charset'); ?>" />
@ -111,13 +100,10 @@ $_SESSION['login'] = false;
<?php
if (AmpConfig::get('ajax_load')) {
$iframed = true;
?>
<script src="<?php echo $web_path;
?>/lib/javascript/dynamicpage.js" language="javascript" type="text/javascript"></script>
$iframed = true; ?>
<script src="<?php echo $web_path; ?>/lib/javascript/dynamicpage.js" language="javascript" type="text/javascript"></script>
<?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">
function NavigateTo(url)
{
@ -310,8 +296,7 @@ $_SESSION['login'] = false;
?>
<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."))),
"<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',
layout: 'bottom',
timeout: false,
@ -370,41 +355,26 @@ $_SESSION['login'] = false;
<?php require_once AmpConfig::get('prefix') . UI::find_template('show_search_bar.inc.php'); ?>
<?php if (User::is_registered()) {
?>
<?php require_once AmpConfig::get('prefix') . 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">
<a href="<?php echo $web_path;
?>/stats.php?action=show_user&user_id=<?php echo $GLOBALS['user']->id;
?>"><?php echo $GLOBALS['user']->fullname;
?></a>
<a href="<?php echo $web_path; ?>/stats.php?action=show_user&user_id=<?php echo $GLOBALS['user']->id; ?>"><?php echo $GLOBALS['user']->fullname; ?></a>
<?php if (AmpConfig::get('sociable')) {
?>
<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>
<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>
<?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>
<?php
} else {
?>
<span id="loginInfo">
<a href="<?php echo $web_path;
?>/login.php" rel="nohtml"><?php echo T_('Login');
?></a>
<a href="<?php echo $web_path; ?>/login.php" rel="nohtml"><?php echo T_('Login'); ?></a>
<?php if (AmpConfig::get('allow_public_registration')) {
?>
/ <a href="<?php echo $web_path;
?>/register.php" rel="nohtml"><?php echo T_('Register');
?></a>
/ <a href="<?php echo $web_path; ?>/register.php" rel="nohtml"><?php echo T_('Register'); ?></a>
<?php
}
?>
} ?>
</span>
<?php
} ?>
@ -415,8 +385,7 @@ $_SESSION['login'] = false;
<?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">
<a href="<?php echo $web_path ?>/index.php">
<img src="<?php echo $web_path ?>/images/topmenu-home.png" />
@ -450,8 +419,7 @@ $_SESSION['login'] = false;
</a>
</div>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('allow_upload') && Access::check('interface', '25')) {
?>
<div id="topmenu_item">
@ -461,8 +429,7 @@ $_SESSION['login'] = false;
</a>
</div>
<?php
}
?>
} ?>
</div>
<?php
} ?>
@ -533,15 +500,10 @@ $_SESSION['login'] = false;
if (AmpConfig::get('int_config_version') != AmpConfig::get('config_version')) {
?>
<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 />
<a rel="nohtml" href="<?php echo $web_path;
?>/admin/system.php?action=generate_config"><?php echo T_('Generate and download new config file');
?></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>
<a rel="nohtml" href="<?php echo $web_path; ?>/admin/system.php?action=generate_config"><?php echo T_('Generate and download new config file'); ?></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>
<?php

View file

@ -48,13 +48,11 @@ $sides = 0;
?>
<?php if (!$browse->get_use_pages() && !$is_header) {
?>
<?php $this->show_next_link();
?>
<?php $this->show_next_link(); ?>
</p>
</div>
<script type="text/javascript">
$('#browse_<?php echo $browse->id;
?>_scroll').jscroll({
$('#browse_<?php echo $browse->id; ?>_scroll').jscroll({
autoTrigger: true,
nextSelector: 'a.jscroll-next:last',
autoTriggerUntil: 5,
@ -102,8 +100,7 @@ if ($limit > 0 && $total > $limit) {
$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, '');
}
?>
} ?>
</div>
<?php
} ?>
@ -116,26 +113,15 @@ if ($limit > 0 && $total > $limit) {
if ($browse->get_use_pages()) {
?>
<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>
<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>
&nbsp;
<?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;
?>');">
<?php echo T_('of') . '&nbsp;' . $pages;
?>
<?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; ?>');">
<?php echo T_('of') . '&nbsp;' . $pages; ?>
&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>
<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>
&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>
<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>
<?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>
<?php if (!$browse->is_static_content()) {
?>
<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>
<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>
<?php
} ?>
<?php if ($browse->get_use_pages()) {
?>
<span>|</span>
<span>
<form id="browse_<?php echo $browse->id;
?>_limit_form_<?php echo $is_header;
?>" method="post" action="javascript:void(0);">
<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 id="browse_<?php echo $browse->id; ?>_limit_form_<?php echo $is_header; ?>" method="post" action="javascript:void(0);">
<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>
</span>
<?php
@ -186,8 +156,7 @@ if ($limit > 0 && $total > $limit) {
<span class="item-count"><?php echo T_('Item Count') . ': ' . $total; ?></span>
<?php if (!$browse->get_use_pages() && $is_header) {
?>
<div id="browse_<?php echo $browse->id;
?>_scroll">
<div id="browse_<?php echo $browse->id; ?>_scroll">
<p>
<?php
} ?>

View file

@ -27,27 +27,22 @@
<?php if (Access::check('interface', '25')) {
?>
<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">
<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>
<?php
$playlists = Playlist::get_users($GLOBALS['user']->id);
Playlist::build_cache($playlists);
foreach ($playlists as $playlist_id) {
$playlist = new Playlist($playlist_id);
$playlist->format();
?>
$playlist->format(); ?>
<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>
<?php
}
?>
} ?>
</ul>
</li>
<?php
@ -55,11 +50,8 @@
<?php if (Access::check_function('batch_download') && check_can_zip('tmp_playlist')) {
?>
<li>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path');
?>/batch.php?action=tmp_playlist&amp;id=<?php echo $GLOBALS['user']->playlist->id;
?>">
<?php echo UI::get_icon('batch_download', T_('Batch Download'));
?>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=tmp_playlist&amp;id=<?php echo $GLOBALS['user']->playlist->id; ?>">
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
</a>
</li>
<?php
@ -131,28 +123,21 @@
if (in_array($type, $normal_array)) {
$object = new $type(array_shift($object_data));
$object->format();
}
?>
<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');
?>
} ?>
<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'); ?>
</li>
<?php
} if (!count($objects)) {
?>
<li><span class="nodata"><?php echo T_('No items');
?></span></li>
<li><span class="nodata"><?php echo T_('No items'); ?></span></li>
<?php
} ?>
<?php if (isset($truncated)) {
?>
<li class="<?php echo UI::flip_class();
?>">
<?php echo $truncated . ' ' . T_('More');
?>...
<li class="<?php echo UI::flip_class(); ?>">
<?php echo $truncated . ' ' . T_('More'); ?>...
</li>
<?php
} ?>

View file

@ -44,20 +44,13 @@
<table cellspacing="1" cellpadding="3" class="tabledata">
<thead>
<tr class="th-top">
<th><?php echo T_('Name');
?></th>
<th><?php echo T_('Start Address');
?></th>
<th><?php echo T_('End Address');
?></th>
<th><?php echo T_('Level');
?></th>
<th><?php echo T_('User');
?></th>
<th><?php echo T_('Type');
?></th>
<th><?php echo T_('Action');
?></th>
<th><?php echo T_('Name'); ?></th>
<th><?php echo T_('Start Address'); ?></th>
<th><?php echo T_('End Address'); ?></th>
<th><?php echo T_('Level'); ?></th>
<th><?php echo T_('User'); ?></th>
<th><?php echo T_('Type'); ?></th>
<th><?php echo T_('Action'); ?></th>
</tr>
</thead>
<tbody>
@ -65,31 +58,17 @@
/* Start foreach List Item */
foreach ($list as $access_id) {
$access = new Access($access_id);
$access->format();
?>
<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 $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>
$access->format(); ?>
<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 $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>
<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>
<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>
<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>
<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>
</tr>
<?php

View file

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

View file

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

View file

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

View file

@ -60,11 +60,9 @@
<?php if ((($_REQUEST['type'] == 'song' || $_REQUEST['type'] == 'video') && Access::check_function('download')) || Access::check_function('batch_download')) {
?>
<tr>
<td><?php echo T_('Allow Download');
?></td>
<td><?php echo T_('Allow Download'); ?></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>
</tr>
<?php

View file

@ -31,14 +31,11 @@ $boxtitle = T_('Post to Shoutbox');
if ($data) {
$boxtitle .= ' (' . $data . ')';
}
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">
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">
<table id="shoutbox-input" cellpadding="0" cellspacing="0">
<tr>
<td><strong><?php echo T_('Comment:');
?></strong>
<td><strong><?php echo T_('Comment:'); ?></strong>
</tr>
<tr>
<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')) {
?>
<tr>
<td><input type="checkbox" name="sticky" /> <strong><?php echo T_('Stick this comment');
?></strong></td>
<td><input type="checkbox" name="sticky" /> <strong><?php echo T_('Stick this comment'); ?></strong></td>
</tr>
<?php
}
?>
} ?>
<tr>
<td>
<?php echo Core::form_register('add_shout');
?>
<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="submit" value="<?php echo T_('Create');
?>" />
<?php echo Core::form_register('add_shout'); ?>
<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="submit" value="<?php echo T_('Create'); ?>" />
</td>
</tr>
</table>
</form>
<?php UI::show_box_bottom();
?>
<?php UI::show_box_bottom(); ?>
</div>
<?php
} ?>

View file

@ -166,8 +166,7 @@ $(function () {
// Display a max file size client side if we know it
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
}
@ -178,11 +177,9 @@ if ($upload_max > 0) {
<tr>
<td class="edit_dialog_content_header"><?php echo T_('Artist') ?></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">
<?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>
</td>
</tr>
@ -202,11 +199,9 @@ if ($upload_max > 0) {
<tr>
<td class="edit_dialog_content_header"><?php echo T_('Music License') ?></td>
<td>
<?php show_license_select('license', '', '0');
?>
<?php show_license_select('license', '', '0'); ?>
<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>
</td>
</tr>

View file

@ -62,32 +62,25 @@ if ($directplay_limit > 0) {
?>
<?php if (AmpConfig::get('ratings')) {
?>
<div style="display:table-cell;" id="rating_<?php echo $album->id;
?>_album">
<?php Rating::show($album->id, 'album');
?>
<div style="display:table-cell;" id="rating_<?php echo $album->id; ?>_album">
<?php Rating::show($album->id, 'album'); ?>
</div>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<div style="display:table-cell;" id="userflag_<?php echo $album->id;
?>_album">
<?php Userflag::show($album->id, 'album');
?>
<div style="display:table-cell;" id="userflag_<?php echo $album->id; ?>_album">
<?php Userflag::show($album->id, 'album'); ?>
</div>
<?php
}
?>
} ?>
<?php
} ?>
<?php
if (AmpConfig::get('show_played_times')) {
?>
<br />
<div style="display:inline;"><?php echo T_('Played') . ' ' . $album->object_cnt . ' ' . T_('times');
?></div>
<div style="display:inline;"><?php echo T_('Played') . ' ' . $album->object_cnt . ' ' . T_('times'); ?></div>
<?php
}
@ -97,12 +90,9 @@ if (AmpConfig::get('show_played_times')) {
$owner_id = $album->get_user_owner();
if (AmpConfig::get('sociable') && $owner_id > 0) {
$owner = new User($owner_id);
$owner->format();
?>
$owner->format(); ?>
<div class="item_uploaded_by">
<?php echo T_('Uploaded by');
?> <?php echo $owner->f_link;
?>
<?php echo T_('Uploaded by'); ?> <?php echo $owner->f_link; ?>
</div>
<?php
} ?>
@ -113,43 +103,33 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if ($show_direct_play) {
?>
<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::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::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); ?>
</li>
<?php if (Stream_Playlist::check_autoplay_append()) {
?>
<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::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::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); ?>
</li>
<?php
}
?>
} ?>
<?php
} ?>
<?php if ($show_playlist_add) {
?>
<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::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::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); ?>
</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::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::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); ?>
</li>
<li>
<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 id="<?php echo 'add_playlist_' . $album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php echo $album->id ?>')">
<?php echo T_('Add to existing playlist') ?>
@ -160,8 +140,7 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('use_rss')) {
?>
<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>
<?php
} ?>
@ -169,17 +148,10 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
?>
<?php if (AmpConfig::get('sociable')) {
?>
<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>
<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>
<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>
<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
}
?>
@ -188,12 +160,10 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('share')) {
?>
<li>
<?php Share::display_ui('album', $album->id);
?>
<?php Share::display_ui('album', $album->id); ?>
</li>
<?php
}
?>
} ?>
<?php
} ?>
<?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')) {
?>
<li>
<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>
<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>
<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>
<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>
<?php
}
?>
} ?>
<li>
<a onclick="submitNewItemsOrder('<?php echo $album->id;
?>', 'reorder_songs_table_<?php echo $album->id;
?>', 'song_',
'<?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'));
?>
&nbsp;&nbsp;<?php echo T_('Save Tracks Order');
?>
<a onclick="submitNewItemsOrder('<?php echo $album->id; ?>', 'reorder_songs_table_<?php echo $album->id; ?>', 'song_',
'<?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')); ?>
&nbsp;&nbsp;<?php echo T_('Save Tracks Order'); ?>
</a>
</li>
<li>
<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>
<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>
</li>
<?php
} ?>
@ -240,26 +193,19 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('allow_upload')) {
?>
<li>
<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 ?>">
<?php echo UI::get_icon('upload', T_('Upload'));
?>
&nbsp;&nbsp;<?php echo T_('Upload');
?>
<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 ?>">
<?php echo UI::get_icon('upload', T_('Upload')); ?>
&nbsp;&nbsp;<?php echo T_('Upload'); ?>
</a>
</li>
<?php
}
?>
} ?>
<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') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</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') ?>', '')">
<?php echo T_('Edit Album');
?>
<?php echo T_('Edit Album'); ?>
</a>
</li>
<?php
@ -267,26 +213,16 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (Access::check_function('batch_download') && check_can_zip('album')) {
?>
<li>
<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>
<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>
<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>
<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>
<?php
} ?>
<?php if (Catalog::can_remove($album)) {
?>
<li>
<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;
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?> <?php echo T_('Delete');
?>
<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; ?>">
<?php echo UI::get_icon('delete', T_('Delete')); ?> <?php echo T_('Delete'); ?>
</a>
</li>
<?php

View file

@ -61,51 +61,36 @@ if ($directplay_limit > 0) {
<?php if ($show_direct_play) {
?>
<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::text('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id'), T_('Play'), 'directplay_full_text_');
?>
<?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_'); ?>
</li>
<?php if (Stream_Playlist::check_autoplay_append()) {
?>
<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::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::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_'); ?>
</li>
<?php
}
?>
} ?>
<?php
} ?>
<?php if ($show_playlist_add) {
?>
<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::text('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), T_('Add to temporary playlist'), 'play_full_text_');
?>
<?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_'); ?>
</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::text('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), T_('Random to temporary playlist'), 'play_random_text_');
?>
<?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_'); ?>
</li>
<?php
} ?>
<?php if (Access::check_function('batch_download') && check_can_zip('album')) {
?>
<li>
<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>
<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>
<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>
<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>
<?php
} ?>
@ -129,10 +114,8 @@ if ($directplay_limit > 0) {
if ($show_direct_play) {
$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">
<?php
if ($show_direct_play) {
@ -144,56 +127,42 @@ if ($directplay_limit > 0) {
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_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 (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>
<?php
}
?>
} ?>
<?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 if (Access::check_function('batch_download') && check_can_zip('album')) {
?>
<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>
<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>
<?php
}
?>
} ?>
<?php if (Access::check('interface', '50')) {
?>
<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 UI::get_icon('save', T_('Save Tracks Order'));
?>
<?php echo UI::get_icon('save', T_('Save Tracks Order')); ?>
</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?') ?>');">
<?php echo UI::get_icon('file_refresh', T_('Update from tags'));
?>
<?php echo UI::get_icon('file_refresh', T_('Update from tags')); ?>
</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') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</a>
<?php
}
?>
} ?>
</div>
<div id='reordered_list_<?php echo $album_id;
?>'>
<div id='reordered_list_<?php echo $album_id; ?>'>
<?php
$browse = new Browse();
$browse->set_show_header(false);
@ -203,8 +172,7 @@ if ($directplay_limit > 0) {
$browse->set_sort('track', 'ASC');
$browse->get_objects();
$browse->show_objects(null, true); // true argument is set to show the reorder column
$browse->store();
?>
$browse->store(); ?>
</div><br />
<?php
} ?>

View file

@ -38,13 +38,11 @@
</td>
<?php
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">
<?php
$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>
<?php
} ?>
@ -54,16 +52,13 @@ if (Art::is_enabled()) {
<?php
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_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)) {
echo $libitem->id;
} else {
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>
<?php
} ?>
@ -77,8 +72,7 @@ if (Art::is_enabled()) {
<?php
if (AmpConfig::get('show_played_times')) {
?>
<td class="cel_counter"><?php echo $libitem->object_cnt;
?></td>
<td class="cel_counter"><?php echo $libitem->object_cnt; ?></td>
<?php
}
@ -88,16 +82,12 @@ if (Art::is_enabled()) {
if (User::is_registered()) {
if (AmpConfig::get('ratings')) {
?>
<td class="cel_rating" id="rating_<?php echo $libitem->id;
?>_album"><?php Rating::show($libitem->id, 'album');
?></td>
<td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_album"><?php Rating::show($libitem->id, 'album'); ?></td>
<?php
}
if (AmpConfig::get('userflags')) {
?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id;
?>_album"><?php Userflag::show($libitem->id, 'album');
?></td>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_album"><?php Userflag::show($libitem->id, 'album'); ?></td>
<?php
}
}
@ -106,11 +96,8 @@ if (Art::is_enabled()) {
<?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)))) {
?>
<a href="<?php echo AmpConfig::get('web_path');
?>/shout.php?action=show_add_shout&type=album&amp;id=<?php echo $libitem->id;
?>">
<?php echo UI::get_icon('comment', T_('Post Shout'));
?>
<a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=album&amp;id=<?php echo $libitem->id; ?>">
<?php echo UI::get_icon('comment', T_('Post Shout')); ?>
</a>
<?php
}
@ -122,24 +109,21 @@ if (Art::is_enabled()) {
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') ?>">
<?php echo UI::get_icon('batch_download', T_('Batch Download'));
?>
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
</a>
<?php
}
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_')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</a>
<?php
}
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 ?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?>
<?php echo UI::get_icon('delete', T_('Delete')); ?>
</a>
<?php
}

View file

@ -31,10 +31,8 @@ $thcount = 8;
<tr class="th-top">
<th class="cel_play essential"></th>
<?php if (Art::is_enabled()) {
++$thcount;
?>
<th class="cel_cover optional"><?php echo T_('Art');
?></th>
++$thcount; ?>
<th class="cel_cover optional"><?php echo T_('Art'); ?></th>
<?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>
@ -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>
<?php if (AmpConfig::get('show_played_times')) {
?>
<th class="cel_counter optional"><?php echo T_('# Played');
?></th>
<th class="cel_counter optional"><?php echo T_('# Played'); ?></th>
<?php
} ?>
<th class="cel_tags optional"><?php echo T_('Tags'); ?></th>
<?php if (User::is_registered()) {
?>
<?php if (AmpConfig::get('ratings')) {
++$thcount;
?>
<th class="cel_rating optional"><?php echo T_('Rating');
?></th>
++$thcount; ?>
<th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
++$thcount;
?>
<th class="cel_userflag optional"><?php echo T_('Fav.');
?></th>
++$thcount; ?>
<th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
<?php
}
?>
} ?>
<?php
} ?>
<th class="cel_action essential"><?php echo T_('Actions'); ?></th>
@ -96,21 +87,16 @@ $thcount = 8;
if ($show_direct_play) {
$show_direct_play = $show_playlist_add;
}
}
?>
} ?>
<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>
<?php
}?>
<?php if (!count($object_ids)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No album found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No album found'); ?></span></td>
</tr>
<?php
} ?>
@ -120,8 +106,7 @@ $thcount = 8;
<th class="cel_play"></th>
<?php if (Art::is_enabled()) {
?>
<th class="cel_cover"><?php echo T_('Art');
?></th>
<th class="cel_cover"><?php echo T_('Art'); ?></th>
<?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>
@ -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>
<?php if (AmpConfig::get('show_played_times')) {
?>
<th class="cel_counter optional"><?php echo T_('# Played');
?></th>
<th class="cel_counter optional"><?php echo T_('# Played'); ?></th>
<?php
} ?>
<th class="cel_tags"><?php echo T_('Tags'); ?></th>
@ -140,18 +124,14 @@ $thcount = 8;
?>
<?php if (AmpConfig::get('ratings')) {
?>
<th class="cel_rating"><?php echo T_('Rating');
?></th>
<th class="cel_rating"><?php echo T_('Rating'); ?></th>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<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_('Actions'); ?></th>

View file

@ -37,26 +37,16 @@ UI::show_box_top($artist->f_name, 'info-box');
?>
<?php
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="external_links">
<a href="http://www.google.com/search?q=%22<?php echo rawurlencode($artist->f_name);
?>%22" target="_blank"><?php echo UI::get_icon('google', T_('Search on Google ...'));
?></a>
<a href="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 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>
<a href="http://www.google.com/search?q=%22<?php echo rawurlencode($artist->f_name); ?>%22" target="_blank"><?php echo UI::get_icon('google', T_('Search on Google ...')); ?></a>
<a href="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 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 id="artist_biography">
<?php echo T_('Loading...');
?>
<?php echo T_('Loading...'); ?>
</div>
</div>
<?php
@ -67,32 +57,25 @@ if (AmpConfig::get('lastfm_api_key')) {
<?php
if (AmpConfig::get('ratings')) {
?>
<div id="rating_<?php echo intval($artist->id);
?>_artist" style="display:inline;">
<?php show_rating($artist->id, 'artist');
?>
<div id="rating_<?php echo intval($artist->id); ?>_artist" style="display:inline;">
<?php show_rating($artist->id, 'artist'); ?>
</div>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<div style="display:table-cell;" id="userflag_<?php echo $artist->id;
?>_artist">
<?php Userflag::show($artist->id, 'artist');
?>
<div style="display:table-cell;" id="userflag_<?php echo $artist->id; ?>_artist">
<?php Userflag::show($artist->id, 'artist'); ?>
</div>
<?php
}
?>
} ?>
<?php
} ?>
<?php
if (AmpConfig::get('show_played_times')) {
?>
<br />
<div style="display:inline;"><?php echo T_('Played') . ' ' . $artist->object_cnt . ' ' . T_('times');
?></div>
<div style="display:inline;"><?php echo T_('Played') . ' ' . $artist->object_cnt . ' ' . T_('times'); ?></div>
<?php
}
@ -102,12 +85,9 @@ if (AmpConfig::get('show_played_times')) {
$owner_id = $artist->get_user_owner();
if (AmpConfig::get('sociable') && $owner_id > 0) {
$owner = new User($owner_id);
$owner->format();
?>
$owner->format(); ?>
<div class="item_uploaded_by">
<?php echo T_('Uploaded by');
?> <?php echo $owner->f_link;
?>
<?php echo T_('Uploaded by'); ?> <?php echo $owner->f_link; ?>
</div>
<?php
} ?>
@ -118,77 +98,55 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<li>
<?php if ($object_type == 'album') {
?>
<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"));
?></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 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")); ?></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>
<?php
} else {
?>
<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"));
?></a>
<a href="<?php echo $web_path;
?>/artists.php?action=show&amp;artist=<?php echo $artist->id;
?>">
<?php echo 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")); ?></a>
<a href="<?php echo $web_path; ?>/artists.php?action=show&amp;artist=<?php echo $artist->id; ?>">
<?php echo T_("Show albums"); ?></a>
<?php
} ?>
</li>
<?php if ($show_direct_play) {
?>
<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::text('?page=stream&action=directplay&object_type=artist&object_id=' . $artist->id, T_('Play all'), 'directplay_full_text_' . $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); ?>
</li>
<?php if (Stream_Playlist::check_autoplay_append()) {
?>
<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::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::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); ?>
</li>
<?php
}
?>
} ?>
<?php
} ?>
<?php if ($show_playlist_add) {
?>
<li>
<?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::text('?action=basket&type=artist&id=' . $artist->id, T_('Add all to temporary playlist'), 'add_text_' . $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); ?>
</li>
<li>
<?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::text('?action=basket&type=artist_random&id=' . $artist->id, T_('Random all to temporary playlist'), 'random_text_' . $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); ?>
</li>
<?php
} ?>
<?php if (AmpConfig::get('use_rss')) {
?>
<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>
<?php
} ?>
@ -196,30 +154,17 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
?>
<?php if (AmpConfig::get('sociable')) {
?>
<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>
<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>
<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>
<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 if (Access::check_function('batch_download') && check_can_zip('artist')) {
?>
<li>
<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>
<a rel="nohtml" href="<?php echo $web_path;
?>/batch.php?action=artist&id=<?php echo $artist->id;
?>"><?php echo T_('Download');
?></a>
<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>
<a rel="nohtml" href="<?php echo $web_path; ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>"><?php echo T_('Download'); ?></a>
</li>
<?php
@ -229,18 +174,11 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('statistical_graphs')) {
?>
<li>
<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>
<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>
<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>
<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>
<?php
}
?>
} ?>
<?php
} ?>
<?php if ($artist->can_edit()) {
@ -248,26 +186,19 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (AmpConfig::get('allow_upload')) {
?>
<li>
<a href="<?php echo $web_path;
?>/upload.php?artist=<?php echo $artist->id;
?>">
<?php echo UI::get_icon('upload', T_('Upload'));
?>
&nbsp;&nbsp;<?php echo T_('Upload');
?>
<a href="<?php echo $web_path; ?>/upload.php?artist=<?php echo $artist->id; ?>">
<?php echo UI::get_icon('upload', T_('Upload')); ?>
&nbsp;&nbsp;<?php echo T_('Upload'); ?>
</a>
</li>
<?php
}
?>
} ?>
<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') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</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') ?>', '')">
<?php echo T_('Edit Artist');
?>
<?php echo T_('Edit Artist'); ?>
</a>
</li>
<?php
@ -275,12 +206,8 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
<?php if (Catalog::can_remove($artist)) {
?>
<li>
<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;
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?> <?php echo T_('Delete');
?>
<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; ?>">
<?php echo UI::get_icon('delete', T_('Delete')); ?> <?php echo T_('Delete'); ?>
</a>
</li>
<?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>
<?php if (AmpConfig::get('wanted')) {
?>
<li><a id="missing_albums_link" href="#missing_albums"><?php echo T_('Missing Albums');
?></a></li>
<li><a id="missing_albums_link" href="#missing_albums"><?php echo T_('Missing Albums'); ?></a></li>
<?php
} ?>
<?php if (AmpConfig::get('show_similar')) {
?>
<li><a id="similar_artist_link" href="#similar_artist"><?php echo T_('Similar Artists');
?></a></li>
<li><a id="similar_artist_link" href="#similar_artist"><?php echo T_('Similar Artists'); ?></a></li>
<?php
} ?>
<?php if (AmpConfig::get('show_concerts')) {
?>
<li><a id="concerts_link" href="#concerts"><?php echo T_('Events');
?></a></li>
<li><a id="concerts_link" href="#concerts"><?php echo T_('Events'); ?></a></li>
<?php
} ?>
<?php if (AmpConfig::get('label')) {
?>
<li><a id="labels_link" href="#labels"><?php echo T_('Labels');
?></a></li>
<li><a id="labels_link" href="#labels"><?php echo T_('Labels'); ?></a></li>
<?php
} ?>
<!-- Needed to avoid the 'only one' bug -->
@ -342,49 +265,41 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
</div>
<?php
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">
<?php UI::show_box_top(T_('Missing Albums'), 'info-box');
echo T_('Loading...');
UI::show_box_bottom();
?>
UI::show_box_bottom(); ?>
</div>
<?php
} ?>
<?php
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">
<?php UI::show_box_top(T_('Similar Artists'), 'info-box');
echo T_('Loading...');
UI::show_box_bottom();
?>
UI::show_box_bottom(); ?>
</div>
<?php
} ?>
<?php
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">
<?php UI::show_box_top(T_('Events'), 'info-box');
echo T_('Loading...');
UI::show_box_bottom();
?>
UI::show_box_bottom(); ?>
</div>
<?php
} ?>
<?php
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">
<?php UI::show_box_top(T_('Labels'), 'info-box');
echo T_('Loading...');
UI::show_box_bottom();
?>
UI::show_box_bottom(); ?>
</div>
<?php
} ?>

View file

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

View file

@ -38,13 +38,11 @@
</td>
<?php
if (Art::is_enabled()) {
$name = scrub_out($libitem->full_name);
?>
$name = scrub_out($libitem->full_name); ?>
<td class="cel_cover">
<?php
$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>
<?php
} ?>
@ -54,11 +52,9 @@ if (Art::is_enabled()) {
<?php
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_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 ?>')">
<?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>
<?php
@ -70,8 +66,7 @@ if (Art::is_enabled()) {
<td class="cel_time"><?php echo $libitem->f_time; ?></td>
<?php if (AmpConfig::get('show_played_times')) {
?>
<td class="cel_counter"><?php echo $libitem->object_cnt;
?></td>
<td class="cel_counter"><?php echo $libitem->object_cnt; ?></td>
<?php
} ?>
<td class="cel_tags"><?php echo $libitem->f_tags; ?></td>
@ -79,16 +74,12 @@ if (Art::is_enabled()) {
if (User::is_registered()) {
if (AmpConfig::get('ratings')) {
?>
<td class="cel_rating" id="rating_<?php echo $libitem->id;
?>_artist"><?php Rating::show($libitem->id, 'artist');
?></td>
<td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_artist"><?php Rating::show($libitem->id, 'artist'); ?></td>
<?php
}
if (AmpConfig::get('userflags')) {
?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id;
?>_artist"><?php Userflag::show($libitem->id, 'artist');
?></td>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_artist"><?php Userflag::show($libitem->id, 'artist'); ?></td>
<?php
}
}
@ -97,29 +88,22 @@ if (Art::is_enabled()) {
<?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)))) {
?>
<a href="<?php echo AmpConfig::get('web_path');
?>/shout.php?action=show_add_shout&type=artist&amp;id=<?php echo $libitem->id;
?>">
<?php echo UI::get_icon('comment', T_('Post Shout'));
?>
<a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=artist&amp;id=<?php echo $libitem->id; ?>">
<?php echo UI::get_icon('comment', T_('Post Shout')); ?>
</a>
<?php
}
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_')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</a>
<?php
}
if (Catalog::can_remove($libitem)) {
?>
<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;
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?>
<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; ?>">
<?php echo UI::get_icon('delete', T_('Delete')); ?>
</a>
<?php
}

View file

@ -33,10 +33,8 @@ $thcount = 8;
<tr class="th-top">
<th class="cel_play essential"></th>
<?php if (Art::is_enabled()) {
++$thcount;
?>
<th class="cel_cover optional"><?php echo T_('Art');
?></th>
++$thcount; ?>
<th class="cel_cover optional"><?php echo T_('Art'); ?></th>
<?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>
@ -46,29 +44,22 @@ $thcount = 8;
<th class="cel_time optional"><?php echo T_('Time'); ?></th>
<?php if (AmpConfig::get('show_played_times')) {
?>
<th class="cel_counter optional"><?php echo T_('# Played');
?></th>
<th class="cel_counter optional"><?php echo T_('# Played'); ?></th>
<?php
} ?>
<th class="cel_tags optional"><?php echo T_('Tags'); ?></th>
<?php if (User::is_registered()) {
?>
<?php if (AmpConfig::get('ratings')) {
++$thcount;
?>
<th class="cel_rating optional"><?php echo T_('Rating');
?></th>
++$thcount; ?>
<th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
++$thcount;
?>
<th class="cel_userflag optional"><?php echo T_('Fav.');
?></th>
++$thcount; ?>
<th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
<?php
}
?>
} ?>
<?php
} ?>
<th class="cel_action essential"><?php echo T_('Action'); ?></th>
@ -98,21 +89,16 @@ $thcount = 8;
if ($show_direct_play) {
$show_direct_play = $show_playlist_add;
}
}
?>
} ?>
<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>
<?php
} //end foreach ($artists as $artist) ?>
<?php if (!count($object_ids)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No artist found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No artist found'); ?></span></td>
</tr>
<?php
} ?>
@ -122,8 +108,7 @@ $thcount = 8;
<th class="cel_play essential"></th>
<?php if (Art::is_enabled()) {
?>
<th class="cel_cover"><?php echo T_('Art');
?></th>
<th class="cel_cover"><?php echo T_('Art'); ?></th>
<?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>
@ -133,8 +118,7 @@ $thcount = 8;
<th class="cel_time essential"><?php echo T_('Time'); ?></th>
<?php if (AmpConfig::get('show_played_times')) {
?>
<th class="cel_counter optional"><?php echo T_('# Played');
?></th>
<th class="cel_counter optional"><?php echo T_('# Played'); ?></th>
<?php
} ?>
<th class="cel_tags optional"><?php echo T_('Tags'); ?></th>
@ -142,18 +126,14 @@ $thcount = 8;
?>
<?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 if (AmpConfig::get('userflags')) {
?>
<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>

View file

@ -40,33 +40,19 @@ while ($i <= $rows) {
} else {
?>
<td align="center">
<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>
<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>
<br />
<p align="center">
<?php if (is_array($dimensions)) {
?>
[<?php echo intval($dimensions['width']);
?>x<?php echo intval($dimensions['height']);
?>]
[<?php echo intval($dimensions['width']); ?>x<?php echo intval($dimensions['height']); ?>]
<?php
} else {
?>
<span class="error"><?php echo T_('Invalid');
?></span>
<span class="error"><?php echo T_('Invalid'); ?></span>
<?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>
</td>
<?php

View file

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

View file

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

View file

@ -26,15 +26,10 @@
$broadcasts = Broadcast::get_broadcasts($GLOBALS['user']->id);
foreach ($broadcasts as $broadcast_id) {
$broadcast = new Broadcast($broadcast_id);
$broadcast->format();
?>
$broadcast->format(); ?>
<li>
<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;
?>');">
<?php echo $broadcast->f_name;
?>
<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; ?>');">
<?php echo $broadcast->f_name; ?>
</a>
</li>
<?php

View file

@ -33,26 +33,18 @@ $button_flip_state_id = 'button_flip_state_' . $libitem->id;
<td class="cel_action cel_action_text">
<?php if (!$libitem->isReady()) {
?>
<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 />
<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 />
<?php
} ?>
<form>
<select name="catalog_action_menu">
<?php if ($libitem->isReady()) {
?>
<option value="add_to_catalog"><?php echo T_('Add');
?></option>
<option value="update_catalog"><?php echo T_('Verify');
?></option>
<option value="clean_catalog"><?php echo T_('Clean');
?></option>
<option value="full_service"><?php echo T_('Update');
?></option>
<option value="gather_media_art"><?php echo T_('Gather Art');
?></option>
<option value="add_to_catalog"><?php echo T_('Add'); ?></option>
<option value="update_catalog"><?php echo T_('Verify'); ?></option>
<option value="clean_catalog"><?php echo T_('Clean'); ?></option>
<option value="full_service"><?php echo T_('Update'); ?></option>
<option value="gather_media_art"><?php echo T_('Gather Art'); ?></option>
<?php
} ?>
<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'); ?>">
<?php if (AmpConfig::get('catalog_disable')) {
?>
<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);
?>
<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); ?>
</span>
<?php
} ?>

View file

@ -46,29 +46,18 @@ $web_path = AmpConfig::get('web_path');
} else {
$action = 'install_catalog_type';
$action_txt = T_('Activate');
}
?>
<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_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 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_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>
<?php
} if (!count($catalogs)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="4"><span class="error"><?php echo T_('No Records Found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="4"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
</tr>
<?php
} ?>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -28,39 +28,29 @@ UI::show_box_top($string, 'info-box');
<?php if ($democratic->is_enabled()) {
?>
<li>
<?php echo T_('Cooldown');
?>:<?php echo $democratic->f_cooldown;
?>
<?php echo T_('Cooldown'); ?>:<?php echo $democratic->f_cooldown; ?>
</li>
<?php
} ?>
<?php if (Access::check('interface', '75')) {
?>
<li>
<a href="<?php echo AmpConfig::get('web_path');
?>/democratic.php?action=manage"><?php echo UI::get_icon('server_lightning', T_('Configure Democratic Playlist'));
?>
<a href="<?php echo AmpConfig::get('web_path'); ?>/democratic.php?action=manage"><?php echo UI::get_icon('server_lightning', T_('Configure Democratic Playlist')); ?>
&nbsp;
<?php echo T_('Configure Democratic Playlist');
?></a>
<?php echo T_('Configure Democratic Playlist'); ?></a>
</li>
<?php if ($democratic->is_enabled()) {
?>
<li>
<?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::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'); ?>
</li>
<li>
<?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::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'); ?>
</li>
<?php
}
?>
} ?>
<?php
} ?>
</ul>

View file

@ -41,12 +41,10 @@ $web_path = AmpConfig::get('web_path');
</colgroup>
<?php
if (!count($object_ids)) {
$playlist = new Playlist($democratic->base_playlist);
?>
$playlist = new Playlist($democratic->base_playlist); ?>
<tr>
<td>
<?php echo T_('Playing from base Playlist');
?>.
<?php echo T_('Playing from base Playlist'); ?>.
</a>
</td>
</tr>
@ -58,25 +56,17 @@ else {
?>
<thead>
<tr class="th-top">
<th class="cel_action"><?php echo T_('Action');
?></th>
<th class="cel_votes"><?php echo T_('Votes');
?></th>
<th class="cel_title"><?php echo T_('Title');
?></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>
<th class="cel_action"><?php echo T_('Action'); ?></th>
<th class="cel_votes"><?php echo T_('Votes'); ?></th>
<th class="cel_title"><?php echo T_('Title'); ?></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')) {
?>
<th class="cel_admin"><?php echo T_('Admin');
?></th>
<th class="cel_admin"><?php echo T_('Admin'); ?></th>
<?php
}
?>
} ?>
</tr>
</thead>
<tbody>
@ -88,43 +78,31 @@ $democratic = Democratic::get_current_playlist();
$item = (array) $item;
}
$media = new $item['object_type']($item['object_id']);
$media->format();
?>
<tr class="<?php echo UI::flip_class();
?>">
$media->format(); ?>
<tr class="<?php echo UI::flip_class(); ?>">
<td class="cel_action">
<?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
} 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
}
?>
} ?>
</td>
<td class="cel_votes" ><?php echo scrub_out($democratic->get_vote($item['id']));
?></td>
<td class="cel_title"><?php echo $media->f_link;
?></td>
<td class="cel_album"><?php echo $media->f_album_link;
?></td>
<td class="cel_artist"><?php echo $media->f_artist_link;
?></td>
<td class="cel_time"><?php echo $media->f_time;
?></td>
<td class="cel_votes" ><?php echo scrub_out($democratic->get_vote($item['id'])); ?></td>
<td class="cel_title"><?php echo $media->f_link; ?></td>
<td class="cel_album"><?php echo $media->f_album_link; ?></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')) {
?>
<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>
<?php
}
?>
} ?>
</tr>
<?php
@ -133,25 +111,17 @@ $democratic = Democratic::get_current_playlist();
</tbody>
<tfoot>
<tr class="th-bottom">
<th class="cel_action"><?php echo T_('Action');
?></th>
<th class="cel_votes"><?php echo T_('Votes');
?></th>
<th class="cel_title"><?php echo T_('Title');
?></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>
<th class="cel_action"><?php echo T_('Action'); ?></th>
<th class="cel_votes"><?php echo T_('Votes'); ?></th>
<th class="cel_title"><?php echo T_('Title'); ?></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')) {
?>
<th class="cel_admin"><?php echo T_('Admin');
?></th>
<th class="cel_admin"><?php echo T_('Admin'); ?></th>
<?php
}
?>
} ?>
</tr>
</tfoot>
<?php

View file

@ -55,17 +55,13 @@ $web_path = AmpConfig::get('web_path');
<div class="alert alert-danger">
<?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>
<p><?php echo T_('If you believe this is an error please contact an Ampache administrator.');
?></p>
<p><?php echo T_('This event has been logged.');
?></p>
<p><?php echo T_('You have been redirected to this page because you do not have access to this function.'); ?></p>
<p><?php echo T_('If you believe this is an error please contact an Ampache administrator.'); ?></p>
<p><?php echo T_('This event has been logged.'); ?></p>
<?php
} 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>
<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
} ?>
</div>

View file

@ -36,28 +36,19 @@
<tbody>
<?php foreach ($songs as $song) {
?>
<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_song"><?php echo $song->title;
?></td>
<td class="cel_album"><?php echo $song->get_album_name($song->album);
?></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 class="<?php echo UI::flip_class(); ?>">
<td class="cel_select"><input type="checkbox" name="song[]" value="<?php echo $song->id; ?>" /></td>
<td class="cel_song"><?php echo $song->title; ?></td>
<td class="cel_album"><?php echo $song->get_album_name($song->album); ?></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>
<?php
} if (!count($songs)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="6"><span class="error"><?php echo T_('No Records Found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="6"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
</tr>
<?php
} ?>

View file

@ -44,30 +44,18 @@
$row_key = 'duplicate_' . $song_id;
$button_flip_state_id = 'button_flip_state_' . $song_id;
$current_class = ($key == '0') ? 'row-highlight' : UI::flip_class();
$button = $song->enabled ? 'disable' : 'enable';
?>
<tr id="<?php echo $row_key;
?>" class="<?php echo $current_class;
?>">
<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);
?>
$button = $song->enabled ? 'disable' : 'enable'; ?>
<tr id="<?php echo $row_key; ?>" class="<?php echo $current_class; ?>">
<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 class="cel_song"><?php echo $song->f_link;
?></td>
<td class="cel_artist"><?php echo $song->f_artist_link;
?></td>
<td class="cel_album"><?php echo $song->f_album_link;
?></td>
<td class="cel_length"><?php echo $song->f_time;
?></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>
<td class="cel_song"><?php echo $song->f_link; ?></td>
<td class="cel_artist"><?php echo $song->f_artist_link; ?></td>
<td class="cel_album"><?php echo $song->f_album_link; ?></td>
<td class="cel_length"><?php echo $song->f_time; ?></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>
<?php

View file

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

View file

@ -48,11 +48,9 @@
<td>
<?php
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 ?>">
<?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>
<?php
@ -75,8 +73,7 @@
<td>
<?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
} else {
@ -90,8 +87,7 @@
<td>
<?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
} else {

View file

@ -32,8 +32,7 @@
<td>
<?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
} else {
echo $libitem->mbid;
@ -60,8 +59,7 @@
?>
<tr>
<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>
<td><input type="text" name="edit_labels" id="edit_labels" value="<?php echo Label::get_display($libitem->labels); ?>" /></td>
</tr>
<?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">
<?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
} ?>
<table class="tabledata" cellpadding="0" cellspacing="0">

View file

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

View file

@ -33,22 +33,18 @@
<tr>
<td class="edit_dialog_content_header"><?php echo T_('Artist') ?></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 ?>">
<?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>
</td>
</tr>
<tr>
<td class="edit_dialog_content_header"><?php echo T_('Album') ?></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 ?>">
<?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>
</td>
</tr>
@ -65,8 +61,7 @@
<?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
} else {
echo $libitem->mbid;
@ -98,11 +93,9 @@
<tr>
<td class="edit_dialog_content_header"><?php echo T_('Music License') ?></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 ?>">
<?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>
</td>
</tr>

View file

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

View file

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

View file

@ -29,12 +29,8 @@ if ($blink) {
<div class="stats_graph">
<?php
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;
?>
<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>
$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>
<br /><br />
<?php
} ?>
@ -46,8 +42,7 @@ if (AmpConfig::get('geolocation')) {
<div class="stats_graph">
<?php
$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>
<?php

View file

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

View file

@ -12,26 +12,16 @@ if ($iframed || $is_share) {
}
if (!$iframed) {
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');
?>/modules/jquery-ui-ampache/jquery-ui.min.css" 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>
<script src="<?php echo AmpConfig::get('web_path');
?>/lib/components/jquery-ui/jquery-ui.min.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>
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'); ?>/modules/jquery-ui-ampache/jquery-ui.min.css" 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>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/components/jquery-ui/jquery-ui.min.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">
var jsAjaxServer = "<?php echo AmpConfig::get('ajax_server') ?>";
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">
<?php if (AmpConfig::get('webplayer_aurora')) {
?>
<script src="<?php echo AmpConfig::get('web_path');
?>/modules/aurora.js/aurora.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo AmpConfig::get('web_path'); ?>/modules/aurora.js/aurora.js" language="javascript" type="text/javascript"></script>
<?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>
@ -159,8 +148,7 @@ function NotifyOfNewSong(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, {
body: artist,
icon: icon
@ -234,8 +222,7 @@ function ShowVisualizer()
$('.jp-interface').css('background-color', '#000');
$('.jp-playlist').css('background-color', '#000');
} 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) {
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))) {
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') {
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')) {
?>
<div id="now_playing">
<?php show_now_playing();
?>
<?php show_now_playing(); ?>
</div> <!-- Close Now Playing Div -->
<?php
} ?>
@ -46,29 +45,24 @@ foreach (Plugin::get_plugins('display_home') as $plugin_name) {
<?php
if (Art::is_enabled()) {
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">
<?php UI::show_box_top(T_('Albums of the Moment'));
echo T_('Loading...');
UI::show_box_bottom();
?>
UI::show_box_bottom(); ?>
</div>
<?php
}
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">
<?php UI::show_box_top(T_('Videos of the Moment'));
echo T_('Loading...');
UI::show_box_bottom();
?>
UI::show_box_bottom(); ?>
</div>
<?php
}
?>
} ?>
<?php
} ?>
<?php if (AmpConfig::get('home_recently_played')) {
@ -78,8 +72,7 @@ if (Art::is_enabled()) {
<?php
$data = Song::get_recently_played();
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>
<?php
} ?>

View file

@ -144,20 +144,16 @@ require $prefix . '/templates/install_header.inc.php';
$modes = install_get_transcode_modes();
foreach ($modes as $mode) {
?>
<option value="<?php echo $mode;
?>" <?php if ($_REQUEST['transcode_template'] == $mode) {
<option value="<?php echo $mode; ?>" <?php if ($_REQUEST['transcode_template'] == $mode) {
echo 'selected';
}
?>><?php echo $mode;
?></option>
} ?>><?php echo $mode; ?></option>
<?php
} ?>
</select>
<?php
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>
<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
} ?>
</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 control-label">
<?php echo T_('channel/.htaccess action');
?>
<?php echo T_('channel/.htaccess action'); ?>
</div>
<div class="col-sm-8">
<button type="submit" class="btn btn-warning" name="download_htaccess_channel"><?php echo T_('Download');
?></button>
<button type="submit" class="btn btn-warning" name="download_htaccess_channel"><?php echo T_('Download'); ?></button>
<button type="submit" class="btn btn-warning" name="write_htaccess_channel" <?php if (!check_htaccess_channel_writable()) {
echo "disabled ";
}
?>>
<?php echo T_('Write');
?>
} ?>>
<?php echo T_('Write'); ?>
</button>
</div>
<div class="col-sm-4 control-label"><?php echo T_('channel/.htaccess exists?');
?></div>
<div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_channel_file));
?></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 control-label"><?php echo T_('channel/.htaccess exists?'); ?></div>
<div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_channel_file)); ?></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 control-label">
<?php echo T_('rest/.htaccess action');
?>
<?php echo T_('rest/.htaccess action'); ?>
</div>
<div class="col-sm-8">
<button type="submit" class="btn btn-warning" name="download_htaccess_rest"><?php echo T_('Download');
?></button>
<button type="submit" class="btn btn-warning" name="download_htaccess_rest"><?php echo T_('Download'); ?></button>
<button type="submit" class="btn btn-warning" name="write_htaccess_rest" <?php if (!check_htaccess_rest_writable()) {
echo "disabled ";
}
?>>
<?php echo T_('Write');
?>
} ?>>
<?php echo T_('Write'); ?>
</button>
</div>
<div class="col-sm-4 control-label"><?php echo T_('rest/.htaccess exists?');
?></div>
<div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_rest_file));
?></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 control-label"><?php echo T_('rest/.htaccess exists?'); ?></div>
<div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_rest_file)); ?></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 control-label">
<?php echo T_('play/.htaccess action');
?>
<?php echo T_('play/.htaccess action'); ?>
</div>
<div class="col-sm-8">
<button type="submit" class="btn btn-warning" name="download_htaccess_play"><?php echo T_('Download');
?></button>
<button type="submit" class="btn btn-warning" name="download_htaccess_play"><?php echo T_('Download'); ?></button>
<button type="submit" class="btn btn-warning" name="write_htaccess_play" <?php if (!check_htaccess_play_writable()) {
echo "disabled ";
}
?>>
<?php echo T_('Write');
?>
} ?>>
<?php echo T_('Write'); ?>
</button>
</div>
<div class="col-sm-4 control-label"><?php echo T_('play/.htaccess exists?');
?></div>
<div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_play_file));
?></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>
<div class="col-sm-4 control-label"><?php echo T_('play/.htaccess exists?'); ?></div>
<div class="col-sm-8"><?php echo debug_result(is_readable($htaccess_play_file)); ?></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
} ?>

View file

@ -26,17 +26,13 @@
<li>
<?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>
<?php echo T_('Show Unique');
?>
<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>
<?php echo T_('Show Unique'); ?>
<?php
} 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>
<?php echo T_('Show All');
?>
<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>
<?php echo T_('Show All'); ?>
<?php
}?>
</li>
@ -55,15 +51,12 @@
</tr>
<?php foreach ($history as $data) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<tr class="<?php echo UI::flip_class(); ?>">
<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 class="cel_ipaddress">
<?php echo inet_ntop($data['ip']);
?>
<?php echo inet_ntop($data['ip']); ?>
</td>
</tr>
<?php

View file

@ -58,29 +58,18 @@ if ($label->website) {
<?php if (AmpConfig::get('sociable')) {
?>
<li>
<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>
<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>
<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>
<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>
<?php
}
?>
} ?>
<?php
} ?>
<?php if ($label->email) {
?>
<li>
<a href="mailto:<?php echo scrub_out($label->email);
?>"><?php echo UI::get_icon('mail', T_('Send e-mail'));
?></a>
<a href="mailto:<?php echo scrub_out($label->email);
?>"><?php echo T_('Send e-mail');
?></a>
<a href="mailto:<?php echo scrub_out($label->email); ?>"><?php echo UI::get_icon('mail', T_('Send e-mail')); ?></a>
<a href="mailto:<?php echo scrub_out($label->email); ?>"><?php echo T_('Send e-mail'); ?></a>
</li>
<?php
} ?>
@ -88,12 +77,10 @@ if ($label->website) {
?>
<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') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</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') ?>', '')">
<?php echo T_('Edit Label');
?>
<?php echo T_('Edit Label'); ?>
</a>
</li>
<?php
@ -101,12 +88,8 @@ if ($label->website) {
<?php if (Catalog::can_remove($label)) {
?>
<li>
<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;
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?> <?php echo T_('Delete');
?>
<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; ?>">
<?php echo UI::get_icon('delete', T_('Delete')); ?> <?php echo T_('Delete'); ?>
</a>
</li>
<?php

View file

@ -22,11 +22,9 @@
?>
<?php
if (Art::is_enabled()) {
$name = scrub_out($libitem->f_name);
?>
$name = scrub_out($libitem->f_name); ?>
<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>
<?php
}

View file

@ -26,10 +26,7 @@ $thcount = 6;
?>
<div id="information_actions">
<ul>
<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>
<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>
</ul>
</div>
<?php
@ -41,10 +38,8 @@ $thcount = 6;
<thead>
<tr class="th-top">
<?php if (Art::is_enabled()) {
++$thcount;
?>
<th class="cel_cover optional"><?php echo T_('Art');
?></th>
++$thcount; ?>
<th class="cel_cover optional"><?php echo T_('Art'); ?></th>
<?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>
@ -58,23 +53,16 @@ $thcount = 6;
/* Foreach through every label that has been passed to us */
foreach ($object_ids as $label_id) {
$libitem = new Label($label_id);
$libitem->format();
?>
<tr id="label_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class();
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_label_row.inc.php');
?>
$libitem->format(); ?>
<tr id="label_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_label_row.inc.php'); ?>
</tr>
<?php
} ?>
<?php if (!count($object_ids)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No label found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No label found'); ?></span></td>
</tr>
<?php
} ?>
@ -83,8 +71,7 @@ $thcount = 6;
<tr class="th-bottom">
<?php if (Art::is_enabled()) {
?>
<th class="cel_cover"><?php echo T_('Art');
?></th>
<th class="cel_cover"><?php echo T_('Art'); ?></th>
<?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>

View file

@ -35,15 +35,12 @@
<dd class="<?php echo $rowparity; ?>">
<?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 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 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')) {
?>
<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>
<?php
}

View file

@ -22,20 +22,15 @@
?>
<?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">
<ul>
<li>
<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>
<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>
</li>
</ul>
</div>
<?php UI::show_box_bottom();
?>
<?php UI::show_box_bottom(); ?>
<?php
} ?>
<?php if ($browse->get_show_header()) {
@ -56,21 +51,16 @@
<?php
foreach ($object_ids as $radio_id) {
$libitem = new Live_Stream($radio_id);
$libitem->format();
?>
<tr id="live_stream_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class();
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_live_stream_row.inc.php');
?>
$libitem->format(); ?>
<tr id="live_stream_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_live_stream_row.inc.php'); ?>
</tr>
<?php
} //end foreach ($artists as $artist) ?>
<?php if (!count($object_ids)) {
?>
<tr>
<td colspan="6"><span class="nodata"><?php echo T_('No live stream found');
?></span></td>
<td colspan="6"><span class="nodata"><?php echo T_('No live stream found'); ?></span></td>
</tr>
<?php
} ?>

View file

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

View file

@ -46,29 +46,18 @@ $web_path = AmpConfig::get('web_path');
} else {
$action = 'install_localplay';
$action_txt = T_('Enable');
}
?>
<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_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 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_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>
<?php
} if (!count($controllers)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="4"><span class="error"><?php echo T_('No Records Found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="4"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
</tr>
<?php
} ?>

View file

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

View file

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

View file

@ -41,32 +41,23 @@ $status = $localplay->status();
$class = ' class="cel_name"';
if ($status['track'] == $object['track']) {
$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">
<?php echo scrub_out($object['track']);
?>
<?php echo scrub_out($object['track']); ?>
</td>
<td<?php echo $class;
?>>
<?php echo $localplay->format_name($object['name'], $object['id']);
?>
<td<?php echo $class; ?>>
<?php echo $localplay->format_name($object['name'], $object['id']); ?>
</td>
<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>
</tr>
<?php
} if (!count($object_ids)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="3"><span class="error"><?php echo T_('No Records Found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="3"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
</tr>
<?php
} ?>

View file

@ -78,9 +78,7 @@ define('TABLE_RENDERED', 1);
<?php if (AmpConfig::get('allow_public_registration')) {
?>
<a rel="nohtml" class="button" id="registerbutton" href="<?php echo AmpConfig::get('web_path');
?>/register.php"><?php echo T_('Register');
?></a>
<a rel="nohtml" class="button" id="registerbutton" href="<?php echo AmpConfig::get('web_path'); ?>/register.php"><?php echo T_('Register'); ?></a>
<?php
} // end if allow_public_registration ?>
</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>
<?php if ($lyrics['url']) {
?>
<div id="lyrics_url"><a href="<?php echo $lyrics['url'];
?>" target="_blank"><?php echo T_('Show more');
?></a></div>
<div id="lyrics_url"><a href="<?php echo $lyrics['url']; ?>" target="_blank"><?php echo T_('Show more'); ?></a></div>
<?php
} ?>
</div>

View file

@ -36,37 +36,24 @@ UI::show_box_top(T_('Manage Democratic Playlists')); ?>
$democratic = new Democratic($democratic_id);
$democratic->format();
$playlist = new Playlist($democratic->base_playlist);
$playlist->format();
?>
<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 $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>
$playlist->format(); ?>
<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 $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>
<?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>
<?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>
</td>
</tr>
<?php
} if (!count($playlists)) {
?>
<tr>
<td colspan="7"><span class="nodata"><?php echo T_('No democratic found');
?></span></td>
<td colspan="7"><span class="nodata"><?php echo T_('No democratic found'); ?></span></td>
</tr>
<?php
} ?>

View file

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

View file

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

View file

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

View file

@ -27,11 +27,9 @@ UI::show_box_top($wartist['name'], 'info-box');
?>
<?php
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">
<?php echo T_('Loading...');
?>
<?php echo T_('Loading...'); ?>
</div>
<?php
} ?>
@ -39,8 +37,7 @@ if (AmpConfig::get('lastfm_api_key')) {
<?php
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>
<?php
} ?>

View file

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

View file

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

View file

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

View file

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

View file

@ -50,8 +50,7 @@ $media->format();
<div class="np_cell cel_albumart">
<?php
$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>
<?php
@ -63,21 +62,15 @@ $media->format();
if (AmpConfig::get('ratings')) {
?>
<div class="np_cell cel_rating">
<label><?php echo T_('Rating');
?></label>
<div id="rating_<?php echo $media->id;
?>_video">
<?php Rating::show($media->id, 'video');
?>
<label><?php echo T_('Rating'); ?></label>
<div id="rating_<?php echo $media->id; ?>_video">
<?php Rating::show($media->id, 'video'); ?>
</div>
</div>
<div class="np_cell cel_userflag">
<label><?php echo T_('Fav.');
?></label>
<div id="userflag_<?php echo $media->id;
?>_video">
<?php Userflag::show($media->id, 'video');
?>
<label><?php echo T_('Fav.'); ?></label>
<div id="userflag_<?php echo $media->id; ?>_video">
<?php Userflag::show($media->id, 'video'); ?>
</div>
</div>
<?php

View file

@ -54,8 +54,7 @@ if (!$rate) {
for ($i = 1; $i < 6; $i++) {
?>
<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>
<?php

View file

@ -37,26 +37,20 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
?>
<?php if (AmpConfig::get('ratings')) {
?>
<div style="display:table-cell;" id="rating_<?php echo $playlist->id;
?>_playlist">
<?php Rating::show($playlist->id, 'playlist');
?>
<div style="display:table-cell;" id="rating_<?php echo $playlist->id; ?>_playlist">
<?php Rating::show($playlist->id, 'playlist'); ?>
</div>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<div style="display:table-cell;" id="userflag_<?php echo $playlist->id;
?>_playlist">
<?php Userflag::show($playlist->id, 'playlist');
?>
<div style="display:table-cell;" id="userflag_<?php echo $playlist->id; ?>_playlist">
<?php Userflag::show($playlist->id, 'playlist'); ?>
</div>
<?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')) {
?>
<li>
<a onclick="submitNewItemsOrder('<?php echo $playlist->id;
?>', '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 UI::get_icon('save', T_('Save Tracks Order'));
?>
&nbsp;&nbsp;<?php echo T_('Save Tracks Order');
?>
<a onclick="submitNewItemsOrder('<?php echo $playlist->id; ?>', '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 UI::get_icon('save', T_('Save Tracks Order')); ?>
&nbsp;&nbsp;<?php echo T_('Save Tracks Order'); ?>
</a>
</li>
<li>
<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'));
?>
&nbsp;&nbsp;<?php echo T_('Sort Tracks by Artist, Album, Song');
?></a>
<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')); ?>
&nbsp;&nbsp;<?php echo T_('Sort Tracks by Artist, Album, Song'); ?></a>
</li>
<li>
<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'));
?>
&nbsp;&nbsp;<?php echo T_('Remove duplicates');
?></a>
<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')); ?>
&nbsp;&nbsp;<?php echo T_('Remove duplicates'); ?></a>
</li>
<?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')) {
?>
<li>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path');
?>/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');
?>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>/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'); ?>
</a>
</li>
<?php
@ -113,10 +90,8 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
<?php if (AmpConfig::get('directplay')) {
?>
<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::text('?page=stream&action=directplay&object_type=playlist&object_id=' . $playlist->id, T_('Play all'), 'directplay_full_text_' . $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); ?>
</li>
<?php
@ -124,10 +99,8 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
<?php if (Stream_Playlist::check_autoplay_append()) {
?>
<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::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::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); ?>
</li>
<?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')) {
?>
<li>
<a href="<?php echo AmpConfig::get('web_path');
?>/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');
?>
<a href="<?php echo AmpConfig::get('web_path'); ?>/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'); ?>
</a>
</li>
<?php
@ -158,14 +127,9 @@ UI::show_box_top('<div id="playlist_row_' . $playlist->id . '">' . $title . '</d
<?php if ($playlist->has_access()) {
?>
<li>
<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?');
?>');">
<?php echo UI::get_icon('delete');
?>
&nbsp;&nbsp;<?php echo T_('Delete');
?>
<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?'); ?>');">
<?php echo UI::get_icon('delete'); ?>
&nbsp;&nbsp;<?php echo T_('Delete'); ?>
</a>
</li>
<?php

View file

@ -32,8 +32,7 @@ if (!isset($libitem->enabled) || $libitem->enabled || Access::check('interface',
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);
}
}
?>
} ?>
</div>
</td>
<?php if (Art::is_enabled()) {
@ -41,12 +40,10 @@ if (!isset($libitem->enabled) || $libitem->enabled || Access::check('interface',
<td class="cel_cover">
<?php
$thumb = (isset($browse) && !$browse->get_grid_view()) ? 11 : 5;
$libitem->display_art($thumb);
?>
$libitem->display_art($thumb); ?>
</td>
<?php
}
?>
} ?>
<td class="cel_title"><?php echo $libitem->f_link ?></td>
<td class="cel_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')) ?>
</a>
<?php
}
?>
} ?>
</span>
</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>
<?php
}
}
?>
} ?>
<td class="cel_action">
<?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()) {
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>
<?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 (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 if (AmpConfig::get('userflags')) {
?>
<?php
}
?>
<th class="cel_userflag optional"><?php echo T_('Fav.');
?></th>
} ?>
<th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
<?php
} ?>
<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)) {
$libitem = new $object_type($object['object_id']);
$libitem->format();
$playlist_track = $object['track'];
?>
$playlist_track = $object['track']; ?>
<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>
<?php
@ -96,18 +89,14 @@ $web_path = AmpConfig::get('web_path');
?>
<?php if (AmpConfig::get('ratings')) {
?>
<th class="cel_rating"><?php echo T_('Rating');
?></th>
<th class="cel_rating"><?php echo T_('Rating'); ?></th>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<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>

View file

@ -40,8 +40,7 @@
?>
<td class="cel_cover">
<?php
$libitem->display_art(3);
?>
$libitem->display_art(3); ?>
</td>
<?php
} ?>
@ -51,11 +50,9 @@
<?php
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')) {
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 ?>')">
<?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>
<?php
}
@ -70,16 +67,12 @@
if (User::is_registered()) {
if (AmpConfig::get('ratings')) {
?>
<td class="cel_rating" id="rating_<?php echo $libitem->id;
?>_playlist"><?php Rating::show($libitem->id, 'playlist');
?></td>
<td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_playlist"><?php Rating::show($libitem->id, 'playlist'); ?></td>
<?php
}
if (AmpConfig::get('userflags')) {
?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id;
?>_playlist"><?php Userflag::show($libitem->id, 'playlist');
?></td>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_playlist"><?php Userflag::show($libitem->id, 'playlist'); ?></td>
<?php
}
}
@ -88,11 +81,8 @@
<?php
if (Access::check_function('batch_download') && check_can_zip('playlist')) {
?>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path');
?>/batch.php?action=playlist&amp;id=<?php echo $libitem->id;
?>">
<?php echo UI::get_icon('batch_download', T_('Batch Download'));
?>
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=playlist&amp;id=<?php echo $libitem->id; ?>">
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
</a>
<?php
}
@ -104,8 +94,7 @@
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_')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</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?'));
}

View file

@ -42,18 +42,14 @@
?>
<?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 if (AmpConfig::get('userflags')) {
?>
<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_('Actions'); ?></th>
@ -68,11 +64,8 @@
// 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) {
?>
<tr class="<?php echo UI::flip_class();
?>" id="playlist_row_<?php echo $libitem->id;
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_playlist_row.inc.php');
?>
<tr class="<?php echo UI::flip_class(); ?>" id="playlist_row_<?php echo $libitem->id; ?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_playlist_row.inc.php'); ?>
</tr>
<?php
@ -80,10 +73,8 @@
} // end foreach ($playlists as $playlist) ?>
<?php if (!count($object_ids)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="7"><span class="nodata"><?php echo T_('No playlist found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="7"><span class="nodata"><?php echo T_('No playlist found'); ?></span></td>
</tr>
<?php
} ?>
@ -106,18 +97,14 @@
?>
<?php if (AmpConfig::get('ratings')) {
?>
<th class="cel_rating"><?php echo T_('Rating');
?></th>
<th class="cel_rating"><?php echo T_('Rating'); ?></th>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<th class="cel_userflag"><?php echo T_('Fav.');
?></th>
<th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
<?php
}
?>
} ?>
<?php
} ?>
<th class="cel_action essential"><?php echo T_('Actions'); ?></th>

View file

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

View file

@ -33,38 +33,28 @@ if (Preference::has_access('play_type')) {
?>
<option value="stream" <?php if (isset($is_stream)) {
echo $is_stream;
}
?>><?php echo T_('Stream');
?></option>
} ?>><?php echo T_('Stream'); ?></option>
<?php
}
if (AmpConfig::get('allow_localplay_playback')) {
?>
<option value="localplay" <?php if (isset($is_localplay)) {
echo $is_localplay;
}
?>><?php echo T_('Localplay');
?></option>
} ?>><?php echo T_('Localplay'); ?></option>
<?php
}
if (AmpConfig::get('allow_democratic_playback')) {
?>
<option value="democratic" <?php if (isset($is_democratic)) {
echo $is_democratic;
}
?>><?php echo T_('Democratic');
?></option>
} ?>><?php echo T_('Democratic'); ?></option>
<?php
}
?>
} ?>
<option value="web_player" <?php if (isset($is_web_player)) {
echo $is_web_player;
}
?>><?php echo T_('Web Player');
?></option>
} ?>><?php echo T_('Web Player'); ?></option>
</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>
<?php

View file

@ -49,28 +49,19 @@ $web_path = AmpConfig::get('web_path');
'/admin/modules.php?action=upgrade_plugin&amp;plugin=' .
scrub_out($plugin_name) . '">' . T_('Upgrade') . '</a>';
}
}
?>
<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_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 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_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>
<?php
} if (!count($plugins)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="5"><span class="error"><?php echo T_('No Records Found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="5"><span class="error"><?php echo T_('No Records Found'); ?></span></td>
</tr>
<?php
} ?>

View file

@ -33,8 +33,7 @@ UI::show_box_top($podcast->f_title, 'info-box');
<?php if ($podcast->description) {
?>
<div id="item_summary">
<?php echo $podcast->description;
?>
<?php echo $podcast->description; ?>
</div>
<?php
} ?>
@ -44,24 +43,18 @@ UI::show_box_top($podcast->f_title, 'info-box');
<?php
if (AmpConfig::get('ratings')) {
?>
<div id="rating_<?php echo intval($podcast->id);
?>_podcast" style="display:inline;">
<?php show_rating($podcast->id, 'podcast');
?>
<div id="rating_<?php echo intval($podcast->id); ?>_podcast" style="display:inline;">
<?php show_rating($podcast->id, 'podcast'); ?>
</div>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<div style="display:table-cell;" id="userflag_<?php echo $podcast->id;
?>_podcast">
<?php Userflag::show($podcast->id, 'podcast');
?>
<div style="display:table-cell;" id="userflag_<?php echo $podcast->id; ?>_podcast">
<?php Userflag::show($podcast->id, 'podcast'); ?>
</div>
<?php
}
?>
} ?>
<?php
} ?>
<div id="information_actions">
@ -70,20 +63,16 @@ UI::show_box_top($podcast->f_title, 'info-box');
<?php if (AmpConfig::get('directplay')) {
?>
<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::text('?page=stream&action=directplay&object_type=podcast&object_id=' . $podcast->id, T_('Play all'), 'directplay_full_text_' . $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); ?>
</li>
<?php
} ?>
<?php if (Stream_Playlist::check_autoplay_append()) {
?>
<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::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::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); ?>
</li>
<?php
} ?>
@ -92,54 +81,37 @@ UI::show_box_top($podcast->f_title, 'info-box');
<?php if (AmpConfig::get('statistical_graphs')) {
?>
<li>
<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>
<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>
<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>
<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>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('use_rss')) {
?>
<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>
<?php
}
?>
} ?>
<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') ?>', '')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</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') ?>', '')">
<?php echo T_('Edit Podcast');
?>
<?php echo T_('Edit Podcast'); ?>
</a>
</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::text('?page=podcast&action=sync&podcast_id=' . $podcast->id, T_('Sync'), 'sync_podcast_text_' . $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); ?>
</li>
<?php
} ?>
<?php if (Access::check('interface', '75')) {
?>
<li>
<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;
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?> &nbsp;<?php echo T_('Delete');
?>
<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; ?>">
<?php echo UI::get_icon('delete', T_('Delete')); ?> &nbsp;<?php echo T_('Delete'); ?>
</a>
</li>
<?php

View file

@ -27,41 +27,27 @@
?>
<?php if (AmpConfig::get('ratings')) {
?>
<?php $rowparity = UI::flip_class();
?>
<dt class="<?php echo $rowparity;
?>"><?php echo T_('Rating');
?></dt>
<dd class="<?php echo $rowparity;
?>">
<div id="rating_<?php echo $episode->id;
?>_podcast_episode"><?php Rating::show($episode->id, 'podcast_episode');
?>
<?php $rowparity = UI::flip_class(); ?>
<dt class="<?php echo $rowparity; ?>"><?php echo T_('Rating'); ?></dt>
<dd class="<?php echo $rowparity; ?>">
<div id="rating_<?php echo $episode->id; ?>_podcast_episode"><?php Rating::show($episode->id, 'podcast_episode'); ?>
</div>
</dd>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<?php $rowparity = UI::flip_class();
?>
<dt class="<?php echo $rowparity;
?>"><?php echo T_('Fav.');
?></dt>
<dd class="<?php echo $rowparity;
?>">
<div id="userflag_<?php echo $episode->id;
?>_podcast_episode"><?php Userflag::show($episode->id, 'podcast_episode');
?>
<?php $rowparity = UI::flip_class(); ?>
<dt class="<?php echo $rowparity; ?>"><?php echo T_('Fav.'); ?></dt>
<dd class="<?php echo $rowparity; ?>">
<div id="userflag_<?php echo $episode->id; ?>_podcast_episode"><?php Userflag::show($episode->id, 'podcast_episode'); ?>
</div>
</dd>
<?php
}
?>
} ?>
<?php
} ?>
@ -72,46 +58,35 @@
?>
<?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 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 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 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 if (!AmpConfig::get('use_auth') || Access::check('interface', '25')) {
?>
<?php if (AmpConfig::get('sociable')) {
?>
<a href="<?php echo AmpConfig::get('web_path');
?>/shout.php?action=show_add_shout&type=podcast_episode&id=<?php echo $episode->id;
?>">
<?php echo UI::get_icon('comment', T_('Post Shout'));
?>
<a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=podcast_episode&id=<?php echo $episode->id; ?>">
<?php echo UI::get_icon('comment', T_('Post Shout')); ?>
</a>
<?php
}
?>
} ?>
<?php
}
?>
@ -119,24 +94,17 @@
?>
<?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 if (Access::check_function('download') && !empty($episode->file)) {
?>
<a rel="nohtml" href="<?php echo Podcast_Episode::play_url($episode->id);
?>"><?php echo UI::get_icon('link', T_('Link'));
?></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>
<a rel="nohtml" href="<?php echo Podcast_Episode::play_url($episode->id); ?>"><?php echo UI::get_icon('link', T_('Link')); ?></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
} ?>
@ -144,28 +112,20 @@
?>
<?php if (AmpConfig::get('statistical_graphs')) {
?>
<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>
<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>
<?php
}
?>
} ?>
<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>
<?php
} ?>
<?php if (Catalog::can_remove($episode)) {
?>
<a href="<?php echo AmpConfig::get('web_path');
?>/podcast_episode.php?action=delete&podcast_episode_id=<?php echo $episode->id;
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?>
<a href="<?php echo AmpConfig::get('web_path'); ?>/podcast_episode.php?action=delete&podcast_episode_id=<?php echo $episode->id; ?>">
<?php echo UI::get_icon('delete', T_('Delete')); ?>
</a>
<?php

View file

@ -44,8 +44,7 @@
if (Access::check('interface', '25')) {
?>
<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>
<?php
@ -61,19 +60,15 @@
if (User::is_registered()) {
if (AmpConfig::get('ratings')) {
?>
<td class="cel_rating" id="rating_<?php echo $libitem->id;
?>_podcast_episode">
<?php Rating::show($libitem->id, 'podcast_episode');
?>
<td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_podcast_episode">
<?php Rating::show($libitem->id, 'podcast_episode'); ?>
</td>
<?php
}
if (AmpConfig::get('userflags')) {
?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id;
?>_podcast_episode">
<?php Userflag::show($libitem->id, 'podcast_episode');
?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_podcast_episode">
<?php Userflag::show($libitem->id, 'podcast_episode'); ?>
</td>
<?php
}
@ -82,34 +77,25 @@
<td class="cel_action">
<?php if (Access::check_function('download') && !empty($libitem->file)) {
?>
<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>
<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>
<?php
} ?>
<?php
if (Access::check('interface', '50')) {
?>
<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);
?>
<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); ?>
</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_')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</a>
<?php
}
if (Catalog::can_remove($libitem)) {
?>
<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;
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?>
<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; ?>">
<?php echo UI::get_icon('delete', T_('Delete')); ?>
</a>
<?php
}

View file

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

View file

@ -36,8 +36,7 @@
<?php if (Art::is_enabled()) {
?>
<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>
<?php
} ?>
@ -47,19 +46,15 @@
if (User::is_registered()) {
if (AmpConfig::get('ratings')) {
?>
<td class="cel_rating" id="rating_<?php echo $libitem->id;
?>_podcast">
<?php Rating::show($libitem->id, 'podcast');
?>
<td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_podcast">
<?php Rating::show($libitem->id, 'podcast'); ?>
</td>
<?php
}
if (AmpConfig::get('userflags')) {
?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id;
?>_podcast">
<?php Userflag::show($libitem->id, 'podcast');
?>
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_podcast">
<?php Userflag::show($libitem->id, 'podcast'); ?>
</td>
<?php
}
@ -70,23 +65,17 @@
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_')">
<?php echo UI::get_icon('edit', T_('Edit'));
?>
<?php echo UI::get_icon('edit', T_('Edit')); ?>
</a>
<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);
?>
<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); ?>
</span>
<?php
}
if (Access::check('interface', '75')) {
?>
<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;
?>">
<?php echo UI::get_icon('delete', T_('Delete'));
?>
<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; ?>">
<?php echo UI::get_icon('delete', T_('Delete')); ?>
</a>
<?php
}

View file

@ -26,10 +26,7 @@ $thcount = 5;
<?php if (Access::check('interface', 75)) {
?>
<li>
<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>
<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>
</li>
<?php
} ?>
@ -43,10 +40,8 @@ $thcount = 5;
<tr class="th-top">
<th class="cel_play essential"></th>
<?php if (Art::is_enabled()) {
++$thcount;
?>
<th class="cel_cover"><?php echo T_('Art');
?></th>
++$thcount; ?>
<th class="cel_cover"><?php echo T_('Art'); ?></th>
<?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>
@ -54,21 +49,15 @@ $thcount = 5;
<?php if (User::is_registered()) {
?>
<?php if (AmpConfig::get('ratings')) {
++$thcount;
?>
<th class="cel_rating optional"><?php echo T_('Rating');
?></th>
++$thcount; ?>
<th class="cel_rating optional"><?php echo T_('Rating'); ?></th>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
++$thcount;
?>
<th class="cel_userflag optional"><?php echo T_('Fav.');
?></th>
++$thcount; ?>
<th class="cel_userflag optional"><?php echo T_('Fav.'); ?></th>
<?php
}
?>
} ?>
<?php
} ?>
<th class="cel_action essential"><?php echo T_('Actions'); ?></th>
@ -85,23 +74,16 @@ $thcount = 5;
foreach ($object_ids as $podcast_id) {
$libitem = new Podcast($podcast_id);
$libitem->format();
?>
<tr id="podcast_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class();
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_podcast_row.inc.php');
?>
$libitem->format(); ?>
<tr id="podcast_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_podcast_row.inc.php'); ?>
</tr>
<?php
} ?>
<?php if (!count($object_ids)) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No podcast found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No podcast found'); ?></span></td>
</tr>
<?php
} ?>
@ -111,8 +93,7 @@ $thcount = 5;
<th class="cel_play"></th>
<?php if (Art::is_enabled()) {
?>
<th class="cel_cover"><?php echo T_('Art');
?></th>
<th class="cel_cover"><?php echo T_('Art'); ?></th>
<?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>
@ -121,18 +102,14 @@ $thcount = 5;
?>
<?php if (AmpConfig::get('ratings')) {
?>
<th class="cel_rating"><?php echo T_('Rating');
?></th>
<th class="cel_rating"><?php echo T_('Rating'); ?></th>
<?php
}
?>
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<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_('Actions'); ?></th>

View file

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

View file

@ -45,10 +45,8 @@ if (Access::check('interface', '100') && $_REQUEST['action'] == 'admin') {
<th class="cel_value"><?php echo T_('Value'); ?></th>
<?php if ($is_admin) {
?>
<th class="cel_applytoall"><?php echo T_('Apply to All');
?></th>
<th class="cel_level"><?php echo T_('Access Level');
?></th>
<th class="cel_applytoall"><?php echo T_('Apply to All'); ?></th>
<th class="cel_level"><?php echo T_('Access Level'); ?></th>
<?php
} ?>
</tr>
@ -61,53 +59,34 @@ if (Access::check('interface', '100') && $_REQUEST['action'] == 'admin') {
$lastsubcat = $pref['subcategory'];
$fsubcat = $lastsubcat;
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>
<?php
}
}
?>
} ?>
<tr class="<?php echo UI::flip_class() ?>">
<td class="cel_preference"><?php echo T_($pref['description']);
?></td>
<td class="cel_preference"><?php echo T_($pref['description']); ?></td>
<td class="cel_value">
<?php create_preference_input($pref['name'], $pref['value']);
?>
<?php create_preference_input($pref['name'], $pref['value']); ?>
</td>
<?php if ($is_admin) {
?>
<td class="cel_applytoall"><input type="checkbox" name="check_<?php echo $pref['name'];
?>" value="1" /></td>
<td class="cel_applytoall"><input type="checkbox" name="check_<?php echo $pref['name']; ?>" value="1" /></td>
<td class="cel_level">
<?php $name = 'on_' . $pref['level'];
${$name} = 'selected="selected"';
?>
<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="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>
${$name} = 'selected="selected"'; ?>
<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="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>
<?php unset(${$name});
?>
<?php unset(${$name}); ?>
</td>
<?php
}
?>
} ?>
</tr>
<?php
} // 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>
<?php if ($is_admin) {
?>
<th class="cel_applytoall"><?php echo T_('Apply to All');
?></th>
<th class="cel_level"><?php echo T_('Access Level');
?></th>
<th class="cel_applytoall"><?php echo T_('Apply to All'); ?></th>
<th class="cel_level"><?php echo T_('Access Level'); ?></th>
<?php
} ?>
</tr>

View file

@ -30,26 +30,18 @@
<?php if ($_REQUEST['tab'] != 'account' && $_REQUEST['tab'] != 'modules') {
?>
<form method="post" name="preferences" action="<?php echo AmpConfig::get('web_path');
?>/preferences.php?action=update_preferences" enctype="multipart/form-data">
<?php show_preference_box($preferences[$_REQUEST['tab']]);
?>
<form method="post" name="preferences" action="<?php echo AmpConfig::get('web_path'); ?>/preferences.php?action=update_preferences" enctype="multipart/form-data">
<?php show_preference_box($preferences[$_REQUEST['tab']]); ?>
<div class="formValidation">
<input class="button" type="submit" value="<?php echo T_('Update Preferences');
?>" />
<?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 class="button" type="submit" value="<?php echo T_('Update Preferences'); ?>" />
<?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']); ?>" />
<?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
}
?>
} ?>
</div>
<?php

View file

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

View file

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

View file

@ -29,8 +29,7 @@ if ($albums) {
foreach ($albums as $album_id) {
$album = new Album($album_id);
$album->format();
$show_play = true;
?>
$show_play = true; ?>
<div class="random_album">
<div id="album_<?php echo $album_id ?>" class="art_album libitem_menu">
<?php
@ -43,49 +42,38 @@ if ($albums) {
$album->display_art($thumb, true);
} else {
?>
<a href="<?php $album->link;
?>">
<?php echo '[' . $album->f_artist . '] ' . $album->f_name;
?>
<a href="<?php $album->link; ?>">
<?php echo '[' . $album->f_artist . '] ' . $album->f_name; ?>
</a>
<?php
}
?>
} ?>
</div>
<?php if ($show_play) {
?>
<div class="play_album">
<?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 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 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>
<?php
}
?>
} ?>
<?php
if (AmpConfig::get('ratings') && Access::check('interface', '25')) {
echo "<div id=\"rating_" . $album->id . "_album\">";
show_rating($album->id, 'album');
echo "</div>";
}
?>
} ?>
</div>
<?php
}
?>
} ?>
<?php
} ?>

View file

@ -28,8 +28,7 @@ $button = Ajax::button('?page=index&action=random_videos', 'random', T_('Refre
if ($videos) {
foreach ($videos as $video_id) {
$video = Video::create_from_id($video_id);
$video->format();
?>
$video->format(); ?>
<div class="random_video">
<div id="video_<?php echo $video_id ?>" class="art_album libitem_menu">
<?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);
} else {
?>
<?php echo $video->get_fullname();
?>
<?php echo $video->get_fullname(); ?>
<?php
}
?>
} ?>
</div>
<div class="play_video">
<?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 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
}
?>
} ?>
</div>
<?php
if (AmpConfig::get('ratings') && Access::check('interface', '25')) {
echo "<div id=\"rating_" . $video->id . "_video\">";
show_rating($video->id, 'video');
echo "</div>";
}
?>
} ?>
</div>
<?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>
<?php if (Access::check('interface', 50)) {
?>
<th class="cel_agent"><?php echo T_('Agent');
?></th>
<th class="cel_agent"><?php echo T_('Agent'); ?></th>
<?php
} ?>
</tr>
@ -94,73 +93,54 @@ foreach ($data as $row) {
$time_string = sprintf(nT_('%d decade ago', '%d decades ago', $interval), $interval);
}
}
$song->format();
?>
<tr class="<?php echo UI::flip_class();
?>">
$song->format(); ?>
<tr class="<?php echo UI::flip_class(); ?>">
<td class="cel_play">
<span class="cel_play_content">&nbsp;</span>
<div class="cel_play_hover">
<?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 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 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
}
?>
} ?>
</div>
</td>
<td class="cel_song"><?php echo $song->f_link;
?></td>
<td class="cel_song"><?php echo $song->f_link; ?></td>
<td class="cel_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 ?>')">
<?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>
</span>
</td>
<td class="cel_album"><?php echo $song->f_album_link;
?></td>
<td class="cel_artist"><?php echo $song->f_artist_link;
?></td>
<td class="cel_album"><?php echo $song->f_album_link; ?></td>
<td class="cel_artist"><?php echo $song->f_artist_link; ?></td>
<td class="cel_username">
<a href="<?php echo AmpConfig::get('web_path');
?>/stats.php?action=show_user&amp;user_id=<?php echo scrub_out($row_user->id);
?>">
<?php echo scrub_out($row_user->fullname);
?>
<a href="<?php echo AmpConfig::get('web_path'); ?>/stats.php?action=show_user&amp;user_id=<?php echo scrub_out($row_user->id); ?>">
<?php echo scrub_out($row_user->fullname); ?>
</a>
</td>
<td class="cel_lastplayed"><?php echo $time_string;
?></td>
<td class="cel_lastplayed"><?php echo $time_string; ?></td>
<?php if (Access::check('interface', 50)) {
?>
<td class="cel_agent">
<?php if (!empty($agent)) {
echo UI::get_icon('info', $agent);
}
?>
} ?>
</td>
<?php
}
?>
} ?>
</tr>
<?php
++$nb;
@ -169,8 +149,7 @@ foreach ($data as $row) {
<?php if (!count($data)) {
?>
<tr>
<td colspan="8"><span class="nodata"><?php echo T_('No recently item found');
?></span></td>
<td colspan="8"><span class="nodata"><?php echo T_('No recently item found'); ?></span></td>
</tr>
<?php
} ?>
@ -186,8 +165,7 @@ foreach ($data as $row) {
<th class="cel_lastplayed"><?php echo T_('Last Played'); ?></th>
<?php if (Access::check('interface', 50)) {
?>
<th class="cel_agent"><?php echo T_('Agent');
?></th>
<th class="cel_agent"><?php echo T_('Agent'); ?></th>
<?php
} ?>
</tr>

View file

@ -28,10 +28,8 @@ $thcount = 8;
<tr class="th-top">
<th class="cel_play"></th>
<?php if (Art::is_enabled()) {
++$thcount;
?>
<th class="cel_cover optional"><?php echo T_('Art');
?></th>
++$thcount; ?>
<th class="cel_cover optional"><?php echo T_('Art'); ?></th>
<?php
}
?>
@ -42,17 +40,13 @@ $thcount = 8;
<th class="cel_time"><?php echo T_('Time'); ?></th>
<th class="cel_tags"><?php echo T_('Tags'); ?></th>
<?php if (AmpConfig::get('ratings')) {
++$thcount;
?>
<th class="cel_rating"><?php echo T_('Rating');
?></th>
++$thcount; ?>
<th class="cel_rating"><?php echo T_('Rating'); ?></th>
<?php
} ?>
<?php if (AmpConfig::get('userflags')) {
++$thcount;
?>
<th class="cel_userflag"><?php echo T_('Fav.');
?></th>
++$thcount; ?>
<th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
<?php
} ?>
<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 ($object_ids as $artist_id) {
$libitem = new Artist($artist_id);
$libitem->format();
?>
<tr id="artist_<?php echo $libitem->id;
?>" class="<?php echo UI::flip_class();
?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_artist_row.inc.php');
?>
$libitem->format(); ?>
<tr id="artist_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
<?php require AmpConfig::get('prefix') . UI::find_template('show_artist_row.inc.php'); ?>
</tr>
<?php
} ?>
@ -86,26 +76,16 @@ $thcount = 8;
/* Foreach through every missing artist that has been passed to us */
foreach ($missing_objects as $missing) {
?>
<tr id="missing_artist_<?php echo $missing['mbid'];
?>" class="<?php echo UI::flip_class();
?>">
<tr id="missing_artist_<?php echo $missing['mbid']; ?>" class="<?php echo UI::flip_class(); ?>">
<td></td>
<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>
<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>
</tr>
<?php
} ?>
<?php if ((!$object_ids || !count($object_ids)) && (!$missing_objects || !count($missing_objects))) {
?>
<tr class="<?php echo UI::flip_class();
?>">
<td colspan="<?php echo $thcount;
?>"><span class="nodata"><?php echo T_('No similar artist found');
?></span></td>
<tr class="<?php echo UI::flip_class(); ?>">
<td colspan="<?php echo $thcount; ?>"><span class="nodata"><?php echo T_('No similar artist found'); ?></span></td>
</tr>
<?php
} ?>
@ -115,8 +95,7 @@ $thcount = 8;
<th class="cel_play"></th>
<?php if (Art::is_enabled()) {
?>
<th class="cel_cover"><?php echo T_('Art');
?></th>
<th class="cel_cover"><?php echo T_('Art'); ?></th>
<?php
} ?>
<th class="cel_artist"><?php echo T_('Artist'); ?></th>
@ -127,14 +106,12 @@ $thcount = 8;
<th class="cel_tags"><?php echo T_('Tags'); ?></th>
<?php if (AmpConfig::get('ratings')) {
?>
<th class="cel_rating"><?php echo T_('Rating');
?></th>
<th class="cel_rating"><?php echo T_('Rating'); ?></th>
<?php
} ?>
<?php if (AmpConfig::get('userflags')) {
?>
<th class="cel_userflag"><?php echo T_('Fav.');
?></th>
<th class="cel_userflag"><?php echo T_('Fav.'); ?></th>
<?php
} ?>
<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')) {
?>
<li>
<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>
<?php echo T_('Batch Download');
?>
<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>
<?php echo T_('Batch Download'); ?>
</li>
<?php
} ?>
@ -48,14 +44,10 @@ UI::show_box_top('<div id="smartplaylist_row_' . $playlist->id . '">' . $title .
<?php if ($playlist->has_access()) {
?>
<li>
<a href="<?php echo AmpConfig::get('web_path');
?>/smartplaylist.php?action=delete_playlist&playlist_id=<?php echo $playlist->id;
?>">
<?php echo UI::get_icon('delete');
?>
<a href="<?php echo AmpConfig::get('web_path'); ?>/smartplaylist.php?action=delete_playlist&playlist_id=<?php echo $playlist->id; ?>">
<?php echo UI::get_icon('delete'); ?>
</a>
<?php echo T_('Delete');
?>
<?php echo T_('Delete'); ?>
</li>
<?php
} ?>

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