summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxgizzmo <xgizzmo@ampache>2005-08-13 21:55:09 +0000
committerxgizzmo <xgizzmo@ampache>2005-08-13 21:55:09 +0000
commitbe06d6de81799dd879ff878fb1babe8d80cc2fe9 (patch)
tree33d624adb0d6e86073c2d9c6d29a4566576b28ae
parentc3bcd9b2bd77e642f201838bc1cb17ec56d1690f (diff)
downloadampache-be06d6de81799dd879ff878fb1babe8d80cc2fe9.tar.gz
ampache-be06d6de81799dd879ff878fb1babe8d80cc2fe9.tar.bz2
ampache-be06d6de81799dd879ff878fb1babe8d80cc2fe9.zip
HTML clean up
-rw-r--r--index.php5
-rw-r--r--lib/class/genre.class.php8
-rw-r--r--templates/javascript_refresh.inc4
-rw-r--r--templates/show_alphabet_form.inc.php2
-rw-r--r--templates/show_genre.inc.php6
-rw-r--r--templates/show_mpdpl.inc278
-rw-r--r--templates/show_mpdplay.inc11
7 files changed, 156 insertions, 158 deletions
diff --git a/index.php b/index.php
index ec6b965a..c293668d 100644
--- a/index.php
+++ b/index.php
@@ -31,6 +31,7 @@ require_once("modules/init.php");
$myMpd = init_mpd();
show_template('header');
+if (conf('refresh_limit') > 0) { show_template('javascript_refresh'); }
show_menu_items('Home');
show_clear();
$action = scrub_in($_REQUEST['action']);
@@ -153,6 +154,4 @@ $action = scrub_in($_REQUEST['action']);
</tr>
</table>
-<?php show_page_footer ('Home', '', $user->prefs['display_menu']);
-if (conf('refresh_limit') > 0) { show_template('javascript_refresh'); }
-?>
+<?php show_page_footer ('Home', '', $user->prefs['display_menu']);?>
diff --git a/lib/class/genre.class.php b/lib/class/genre.class.php
index bd6c4201..63f15531 100644
--- a/lib/class/genre.class.php
+++ b/lib/class/genre.class.php
@@ -71,10 +71,10 @@ class Genre {
*/
function format_genre() {
- $this->link = "<a href=\"" . conf('web_path') . "/genre.php?action=show_genre&genre_id=" . $this->id . "\">" . $this->name . "</a>";
+ $this->link = "<a href=\"" . conf('web_path') . "/genre.php?action=show_genre&amp;genre_id=" . $this->id . "\">" . $this->name . "</a>";
- $this->play_link = conf('web_path') . "/song.php?action=genre&genre=" . $this->id;
- $this->random_link = conf('web_path') . "/song.php?action=random_genre&genre=" . $this->id;
+ $this->play_link = conf('web_path') . "/song.php?action=genre&amp;genre=" . $this->id;
+ $this->random_link = conf('web_path') . "/song.php?action=random_genre&amp;genre=" . $this->id;
} // format_genre
@@ -275,7 +275,7 @@ class Genre {
function show_match_list($match) {
show_alphabet_list('genre','browse.php',$match,'genre');
- show_alphabet_form($match,_("Show Genres starting with"),"browse.php?action=genre&match=$match");
+ show_alphabet_form($match,_("Show Genres starting with"),"browse.php?action=genre&amp;match=$match");
} // show_match_list
diff --git a/templates/javascript_refresh.inc b/templates/javascript_refresh.inc
index a1d5e333..957eddf7 100644
--- a/templates/javascript_refresh.inc
+++ b/templates/javascript_refresh.inc
@@ -1,4 +1,5 @@
-<script language="JavaScript">
+<script type="text/javascript" language="javascript">
+<!-- Begin
// Set refresh interval (in seconds)
var refreshinterval=<?= conf('refresh_limit'); ?>
@@ -61,5 +62,6 @@ function countdown() {
// start with page-load
window.onload=starttime
+// End -->
</script>
diff --git a/templates/show_alphabet_form.inc.php b/templates/show_alphabet_form.inc.php
index 383683b6..b5e83bd9 100644
--- a/templates/show_alphabet_form.inc.php
+++ b/templates/show_alphabet_form.inc.php
@@ -28,7 +28,7 @@
?>
<form name="f" method="get" action="<?php echo conf('web_path') . "/$action"; ?>" enctype="multipart/form-data">
- <label for="match" accesskey="S"><?php echo $text; ?>
+ <label for="match" accesskey="S"><?php echo $text; ?></label>
<input type="text" size="3" id="match" name="match" value="<?php echo $match; ?>" />
<input type="hidden" name="action" value="match" />
</form>
diff --git a/templates/show_genre.inc.php b/templates/show_genre.inc.php
index c867e2f5..6323a7a3 100644
--- a/templates/show_genre.inc.php
+++ b/templates/show_genre.inc.php
@@ -32,17 +32,17 @@
<span class="header1"><?php echo _("Viewing") . " " . $genre->name . " " . _("Genre"); ?></span>
<br />
[<?php echo $genre->get_album_count(); ?>]
- <a href="<?php echo conf('web_path'); ?>/genre.php?action=show_albums&genre_id=<?php echo $genre->id; ?>">
+ <a href="<?php echo conf('web_path'); ?>/genre.php?action=show_albums&amp;genre_id=<?php echo $genre->id; ?>">
<?php echo _("Albums"); ?>
</a>
<br />
[<?php echo $genre->get_artist_count(); ?>]
- <a href="<?php echo conf('web_path'); ?>/genre.php?action=show_artists&genre_id=<?php echo $genre->id; ?>">
+ <a href="<?php echo conf('web_path'); ?>/genre.php?action=show_artists&amp;genre_id=<?php echo $genre->id; ?>">
<?php echo _("Artists"); ?>
</a>
<br />
[<?php echo $genre->get_song_count(); ?>]
- <a href="<?php echo conf('web_path'); ?>/genre.php?action=show_songs&genre_id=<?php echo $genre->id; ?>">
+ <a href="<?php echo conf('web_path'); ?>/genre.php?action=show_songs&amp;genre_id=<?php echo $genre->id; ?>">
<?php echo _("Songs"); ?>
</a>
<br />
diff --git a/templates/show_mpdpl.inc b/templates/show_mpdpl.inc
index 777053d3..a8bdac20 100644
--- a/templates/show_mpdpl.inc
+++ b/templates/show_mpdpl.inc
@@ -43,161 +43,157 @@ $myMpd = init_mpd();
<tr>
<td align="center" class="table-header">
<b><?php echo _("MPD Server Playlist"); ?></b><br />
- <i>[<a title="<?php echo _("Refresh the Playlist Window"); ?>" href="<?php echo $_SERVER['PHP_SELF']; ?>">refresh</a>]
- <?php if ( $myMpd->playlist_count > 0 ) { $un = (conf('condPL')) ? "un" : ""; ?>
- [<a title="<?php echo _("Click to shuffle (randomize) the playlist");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=shuffle"><?php echo _("shuffle")?></a>]
- [<a title="<?php echo _("Click to the clear the playlist");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=clear">clear</a>]
- <?php if( $myMpd->playlist_count > 10 ) { ?>
- [<a title="<?php echo 'Click to '.$un.'condense playlist';?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=condPL"><?php echo $un?>condense</a>]
- <?php } ?>
- [<a title="<?php echo _("Click to the remove all except the Now Playing");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=crop">crop</a>]
- <?php } ?> </i>
+ <i>
+ [<a title="<?php echo _("Refresh the Playlist Window"); ?>" href="<?php echo $_SERVER['PHP_SELF']; ?>">refresh</a>]
+ <?php if( $myMpd->playlist_count > 0 ) { $un = (conf('condPL')) ? "un" : ""; ?>
+ [<a title="<?php echo _("Click to shuffle (randomize) the playlist");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=shuffle"><?php echo _("shuffle")?></a>]
+ [<a title="<?php echo _("Click to the clear the playlist");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=clear">clear</a>]
+ <?php if( $myMpd->playlist_count > 10 ) { ?>
+ [<a title="<?php echo 'Click to '.$un.'condense playlist';?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=condPL"><?php echo $un?>condense</a>]
+ <?php } ?>
+ [<a title="<?php echo _("Click to the remove all except the Now Playing");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=crop">crop</a>]
+ <?php } ?>
+ </i>
</td>
</tr>
<tr>
<td <?php echo $nopad ?>>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
- <tr class="table-header">
- <th <?php echo $minpad ?>><a href="#" onclick="check_songs(); return false;">Select</a> - <a href="#" onclick="invert_songs(); return false;">Invert</a></th>
- <th align="left"><?php echo _("Song title"); ?></th>
- <th align="left"><?php echo _("Artist"); ?></th>
- <th align="left"><?php echo _("Album"); ?></th>
- <th align="right" <?php echo $minpad ?>><?php echo _("Track"); ?></th>
- <th align="right" <?php echo $minpad ?>><?php echo _("Time"); ?></th>
- <th <?php echo $minpad ?>><?php echo _("Genre"); ?></th>
- <th><?php echo _("Action"); ?></th>
- </tr>
- <?php
- $pl = $myMpd->playlist;
- if (is_null($pl)) echo "ERROR: ".$myMpd->errStr."\n";
- else {
- $maxlen = strlen (count($pl));
- $condPL = conf('condPL');
- if ($condPL) {
+ <tr class="table-header">
+ <th <?php echo $minpad ?>><a href="#" onclick="check_songs(); return false;">Select</a> - <a href="#" onclick="invert_songs(); return false;">Invert</a></th>
+ <th align="left"><?php echo _("Song title"); ?></th>
+ <th align="left"><?php echo _("Artist"); ?></th>
+ <th align="left"><?php echo _("Album"); ?></th>
+ <th align="right" <?php echo $minpad ?>><?php echo _("Track"); ?></th>
+ <th align="right" <?php echo $minpad ?>><?php echo _("Time"); ?></th>
+ <th <?php echo $minpad ?>><?php echo _("Genre"); ?></th>
+ <th><?php echo _("Action"); ?></th>
+ </tr>
+ <?php
+ $pl = $myMpd->playlist;
+ if (is_null($pl)) echo "ERROR: ".$myMpd->errStr."\n";
+ else {
+ $maxlen = strlen (count($pl));
+ $condPL = conf('condPL');
+ if ($condPL) {
+ echo "<tr class=\"".flip_class()."\"><td colspan=\"8\" align=\"center\" style=\"padding: 3px 0px 3px 0px\">... Condensed Playlist ...</td></tr>";
+ }
+ else {
+ echo "<tr><td>&nbsp;</td></tr>";
+ }
+
+ foreach ($pl as $id=>$entry) {
+ if ( ($condPL) and (($id < $myMpd->current_track_id-1) or ($id > $myMpd->current_track_id + 10)) ) {
+ continue;
+ }
+
+ unset($text_class);
+ $track = $id+1;
+ $len=strlen($track);
+
+ while ($len < $maxlen) {
+ $track = "0".$track;
+ $len++;
+ }
+
+ echo "<tr class=\"".flip_class()."\">";
+
+ if ($id==$myMpd->current_track_id) {
+ $tdstyle = "style='padding: 0px 2px 0px 2px; font-weight: bold;' class='error'";
+ $linkstyle = "class='error'";
+ }
+ else {
+ $tdstyle = $minpad;
+ $linkstyle = "";
+ }
+
+ $mpddir = conf('mpd_dir')."/";
+
+ if (strtolower(conf('mpd_method')) == 'file') {
+ $sql = "SELECT genre.name, song.genre, song.id, song.album, song.artist FROM song, genre WHERE file = \"".$mpddir.$entry['file']."\" AND song.genre=genre.id";
+ $db_results = @mysql_query($sql,dbh());
+ $r = @mysql_fetch_object ($db_results);
+ $entry['genre'] = $r->name;
+ }
+ else {
+ list($tmp, $id, $tmp) = preg_split("/(song=|&)/", $entry['file']);
+ $r = new Song($id);
+ $entry['Title'] = $r->title;
+ $entry['Artist'] = $r->get_artist_name();
+ $entry['Album'] = $r->get_album_name();
+ $entry['genre'] = $r->get_genre_name();
+ $entry['Time'] = $r->time;
+ $entry['Track'] = $r->track;
+ }
+
+ $totaltime += $entry['Time'];
+ $count=0; // Didn't move this because I wasn't sure what it was for...
+ ?>
+ <td align="center" <?php echo $minpad ?>> <input type="checkbox" name="song[]" value="<?php echo $entry['Pos']?>" id="song_<?php echo $entry['Pos']; ?>"></input></td>
+ <td align="left" <?php echo $tdstyle ?>> <?php echo $track.". ";?><a <?php echo $linkstyle ?> href="<?php echo $web_path; ?>/amp-mpd.php?action=skipto&amp;val=<?php echo $entry['Pos']; ?>" title=" <?php echo htmlspecialchars($entry['Title']); ?>"<?php echo $text_class; ?>><?php echo htmlspecialchars($entry['Title']); ?> </a></td>
+ <td align="left" <?php echo $tdstyle ?>> <a <?php echo $linkstyle ?> href="<?php echo $web_path; ?>/artists.php?action=show&amp;artist=<?php echo htmlspecialchars($r->artist); ?>" title="More from <?php echo htmlspecialchars($entry['Artist']);?>"<?php echo $text_class; ?>><?php echo htmlspecialchars($entry['Artist']);?> </a></td>
+ <td align="left" <?php echo $tdstyle ?>> <a <?php echo $linkstyle ?> href="<?php echo $web_path; ?>/albums.php?action=show&amp;album=<?php echo htmlspecialchars($r->album); ?>" title="More on <?php echo htmlspecialchars($entry['Album']); ?>"<?php echo $text_class; ?>><?php echo htmlspecialchars($entry['Album']); ?> </a></td>
+ <td align="right" <?php echo $tdstyle ?>> <?php echo $entry['Track']; ?></td>
+ <td align="right" <?php echo $tdstyle ?>> <?php echo sprintf ("%d:%02d",$entry['Time']/60,$entry['Time']%60) ?>&nbsp;</td>
+ <td align="left" <?php echo $tdstyle ?>> &nbsp;<?php echo $entry['genre'] ?></td>
+ <td <?php echo $tdstyle ?>>
+ <a href="<?php echo $web_path;?>/flag.php?song=<?php echo $r->id;?>&amp;action=flag" title="Flag '<?php echo htmlspecialchars($entry['file']);?>' by <?php echo htmlspecialchars($entry['Artist']);?>"<?php echo $text_class;?>>f</a>&nbsp;
+ <a href="<?php echo $web_path;?>/amp-mpd.php?action=movenext&amp;val=<?php echo $entry['Pos'];?>" title="Move '<?php echo htmlspecialchars($entry['Title']);?>' to play next "<?php echo $text_class;?>>n</a>&nbsp;
+ <a href="<?php echo $web_path;?>/amp-mpd.php?action=rem&amp;id=<?php echo $entry['Pos'];?>" title="Remove '<?php echo htmlspecialchars($entry['Title']);?>' from playlist "<?php echo $text_class;?>>x</a>
+ </td>
+ </tr>
+ <?php
+ }// foreach loop
+ if (($condPL) && ($myMpd->current_track_id+10 <= $myMpd->playlistcount)) {
+ echo "<tr class=\"".flip_class()."\"><td colspan=\"8\" align=\"center\" style=\"padding: 3px 0px 3px 0px\">... Condensed Playlist ...</td></tr>";
+ }
+ } //else
+
+ $time = floor($totaltime/60) . ":" . sprintf("%02d", ($totaltime%60) );
+ $num = count($pl);
+ if ($condPL) {
echo "<tr class=\"".flip_class()."\"><td colspan=\"8\" align=\"center\" style=\"padding: 3px 0px 3px 0px\">... Condensed Playlist ...</td></tr>";
+ }
+ else {
+ echo "<tr><td>&nbsp;</td></tr>";
}
- else {
- echo "<tr><td>&nbsp;</td></tr>";
- }
-
- foreach ($pl as $id=>$entry) {
-
- if ( ($condPL) and (($id < $myMpd->current_track_id-1) or ($id > $myMpd->current_track_id + 10)) ) {
- continue;
- }
-
- unset($text_class);
-
- $track = $id+1;
- $len=strlen($track);
- while ($len < $maxlen) {
- $track = "0".$track;
- $len++;
- }
-
- ?>
-<tr class="<?php echo flip_class(); ?>">
- <?php
- if ($id==$myMpd->current_track_id) {
- $tdstyle = "style='padding: 0px 2px 0px 2px; font-weight: bold;' class='error'";
- $linkstyle = "class='error'";
- }
- else {
- $tdstyle = $minpad;
- $linkstyle = "";
- }
- ?>
- <?php
- $mpddir = conf('mpd_dir')."/";
- if (strtolower(conf('mpd_method')) == 'file') {
- $sql = "SELECT genre.name, song.genre, song.id, song.album, song.artist FROM song, genre WHERE file = \"".$mpddir.$entry['file']."\" AND song.genre=genre.id";
- $db_results = @mysql_query($sql,dbh());
- $r = @mysql_fetch_object ($db_results);
- $entry['genre'] = $r->name;
- }
- else {
- list($tmp, $id, $tmp) = preg_split("/(song=|&)/", $entry['file']);
- $r = new Song($id);
- $entry['Title'] = $r->title;
- $entry['Artist'] = $r->get_artist_name();
- $entry['Album'] = $r->get_album_name();
- $entry['genre'] = $r->get_genre_name();
- $entry['Time'] = $r->time;
- $entry['Track'] = $r->track;
- }
-
- $totaltime += $entry['Time'];
- $count=0; // Didn't move this because I wasn't sure what it was for...
- ?>
- <td align="center" <?php echo $minpad ?>> <input type="checkbox" name="song[]" value="<?php echo $entry['Pos']?>" id="song_<?php echo $entry['Pos']; ?>"></input></td>
- <td align="left" <?php echo $tdstyle ?>> <?php echo $track.". ";?><a <?php echo $linkstyle ?> href="<?php echo $web_path; ?>/amp-mpd.php?action=skipto&amp;val=<?php echo $entry['Pos']; ?>" title=" <?php echo htmlspecialchars($entry['Title']); ?>"<?php echo $text_class; ?>><?php echo htmlspecialchars($entry['Title']); ?> </a></td>
- <td align="left" <?php echo $tdstyle ?>> <a <?php echo $linkstyle ?> href="<?php echo $web_path; ?>/artists.php?action=show&amp;artist=<?php echo htmlspecialchars($r->artist); ?>" title="More from <?php echo htmlspecialchars($entry['Artist']);?>"<?php echo $text_class; ?>><?php echo htmlspecialchars($entry['Artist']);?> </a></td>
- <td align="left" <?php echo $tdstyle ?>> <a <?php echo $linkstyle ?> href="<?php echo $web_path; ?>/albums.php?action=show&amp;album=<?php echo htmlspecialchars($r->album); ?>" title="More on <?php echo htmlspecialchars($entry['Album']); ?>"<?php echo $text_class; ?>><?php echo htmlspecialchars($entry['Album']); ?> </a></td>
- <td align="right" <?php echo $tdstyle ?>> <?php echo $entry['Track']; ?></td>
- <td align="right" <?php echo $tdstyle ?>> <?php echo sprintf ("%d:%02d",$entry['Time']/60,$entry['Time']%60) ?>&nbsp;</td>
- <td align="left" <?php echo $tdstyle ?>> &nbsp;<?php echo $entry['genre'] ?></td>
-
- <td <?php echo $tdstyle ?>>
- <a href="<?php echo $web_path;?>/flag.php?song=<?php echo $r->id;?>&amp;action=flag" title="Flag '<?php echo htmlspecialchars($entry['file']);?>' by <?php echo htmlspecialchars($entry['Artist']);?>"<?php echo $text_class;?>>f</a>&nbsp;
- <a href="<?php echo $web_path;?>/amp-mpd.php?action=movenext&amp;val=<?php echo $entry['Pos'];?>" title="Move '<?php echo htmlspecialchars($entry['Title']);?>' to play next "<?php echo $text_class;?>>n</a>&nbsp;
- <a href="<?php echo $web_path;?>/amp-mpd.php?action=rem&amp;id=<?php echo $entry['Pos'];?>" title="Remove '<?php echo htmlspecialchars($entry['Title']);?>' from playlist "<?php echo $text_class;?>>x</a>
- </td>
-</tr>
-<?php
- }// foreach loop
- if (($condPL) && ($myMpd->current_track_id+10 <= $myMpd->playlistcount)) {
- echo "<tr class=\"".flip_class()."\"><td colspan=\"8\" align=\"center\" style=\"padding: 3px 0px 3px 0px\">... Condensed Playlist ...</td></tr>";
- }
-
- } //else
-
- $time = floor($totaltime/60) . ":" . sprintf("%02d", ($totaltime%60) );
- $num = count($pl);
- if ($condPL) {
- echo "<tr class=\"".flip_class()."\"><td colspan=\"8\" align=\"center\" style=\"padding: 3px 0px 3px 0px\">... Condensed Playlist ...</td></tr>";
- }
- else {
- echo "<tr><td>&nbsp;</td></tr>";
- }
-?>
-<tr class="table-header" valign="middle">
- <td>
- <input type="hidden" name="action" value="plact" /> <button name="submit" value="submit" type="submit" style = "font-family: <?php echo conf('font')?>; font-size: <?php echo conf('font_size')?>px" title="Take Action on the checked songs">Do</button>
+ ?>
+ <tr class="table-header" valign="middle">
+ <td>
+ <input type="hidden" name="action" value="plact" /> <button name="submit" value="submit" type="submit" style = "font-family: <?php echo conf('font')?>; font-size: <?php echo conf('font_size')?>px" title="Take Action on the checked songs">Do</button>
+ </td>
+ <td valign="middle">
+ <select name="todo" style = "font-family: <?php echo conf('font')?>; font-size: <?php echo conf('font_size')?>px" size="1">
+ <option>Add to Playlist</option>
+ <option>Delete</option>
+ <!--<option>Move Next</option> This isn't working yet -->
+ </select>
+ </td>
+ <td valign="middle"><?php show_playlist_dropdown($GLOBALS['playlist_id']); ?></td>
+ <td valign="middle"><?php echo $num; ?> song(s)</td>
+ <td>&nbsp;</td>
+ <td valign="middle" align="right" <?php echo $minpad; ?> nowrap="nowrap"><?php echo $time; ?></td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
</td>
- <td valign="middle">
- <select name="todo" style = "font-family: <?php echo conf('font')?>; font-size: <?php echo conf('font_size')?>px" size="1">
- <option>Add to Playlist</option>
- <option>Delete</option>
- <!-- <option>move Next This isn't working yet -->
- </select>
- </td>
- <td valign="middle"><?php show_playlist_dropdown($GLOBALS['playlist_id']); ?></td>
- <td valign="middle"><?php echo $num; ?> song(s)</td>
- <td></td>
- <td valign="middle" align="right" <?php echo $minpad; ?> nowrap="nowrap"><?php echo $time; ?></td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
</tr>
-</table>
<tr>
<td align="center" valign="bottom" class="table-header">
- <i>[<a title="<?php echo _("Refresh the Playlist Window"); ?>" href="<?php echo $_SERVER['PHP_SELF']; ?>">refresh</a>]
- <?php
- if ( $myMpd->playlist_count > 0 ) {
- $un = (conf('condPL')) ? "un" : "";
- ?>
- [<a title="<?php echo _("Click to shuffle (randomize) the playlist");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=shuffle"><?php echo _("shuffle")?></a>]
- [<a title="<?php echo _("Click to the clear the playlist");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=clear">clear</a>]
- <?php if($myMpd->playlist_count > 10) { ?>
- [<a title="<?php echo 'Click to '.$un.'condense playlist';?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=condPL"><?php echo $un?>condense</a>]
- <?php } ?>
- [<a title="<?php echo _("Click to the remove all except the Now Playing");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=crop">crop</a>]
- <?php } ?>
+ <i>
+ [<a title="<?php echo _("Refresh the Playlist Window"); ?>" href="<?php echo $_SERVER['PHP_SELF']; ?>">refresh</a>]
+ <?php if($myMpd->playlist_count > 0 ) {$un = (conf('condPL')) ? "un" : ""; ?>
+ [<a title="<?php echo _("Click to shuffle (randomize) the playlist");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=shuffle"><?php echo _("shuffle")?></a>]
+ [<a title="<?php echo _("Click to the clear the playlist");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=clear">clear</a>]
+ <?php if($myMpd->playlist_count > 10) { ?>
+ [<a title="<?php echo 'Click to '.$un.'condense playlist';?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=condPL"><?php echo $un?>condense</a>]
+ <?php } ?>
+ [<a title="<?php echo _("Click to the remove all except the Now Playing");?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=crop">crop</a>]
+ <?php } ?>
</i>
</td>
</tr>
-</td>
-</tr>
</table>
<br />
</form>
diff --git a/templates/show_mpdplay.inc b/templates/show_mpdplay.inc
index c12f8f91..d71ae02b 100644
--- a/templates/show_mpdplay.inc
+++ b/templates/show_mpdplay.inc
@@ -101,11 +101,6 @@ global $condPL;
</table>
</td></tr>
-<?php
-echo '<script language="JavaScript" type="text/javascript"> var mpd_elapsed = '. $myMpd->current_track_position.' </script>';
-echo '<script language="JavaScript" type="text/javascript"> var mpd_song_length = '. $myMpd->current_track_length .' </script>';
-echo '<script language="JavaScript" type="text/javascript"> var mpd_state = "'. $myMpd->state .'" </script>';
-?>
<?php if ( $myMpd->state == MPD_STATE_PLAYING or $myMpd->state == MPD_STATE_PAUSED ) { ?>
<tr><td>
@@ -162,6 +157,12 @@ echo '<script language="JavaScript" type="text/javascript"> var mpd_state = "'.
</td></tr>
<?php } ?>
</table>
+<?php
+echo '<script language="JavaScript" type="text/javascript"> var mpd_elapsed = '. $myMpd->current_track_position.' </script>';
+echo '<script language="JavaScript" type="text/javascript"> var mpd_song_length = '. $myMpd->current_track_length .' </script>';
+echo '<script language="JavaScript" type="text/javascript"> var mpd_state = "'. $myMpd->state .'" </script>';
+?>
+
<?php /**************** Comment the playlist out now that the big playlist is done
<br />