summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-19 01:23:35 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-19 01:23:35 +0000
commit49f48af532c2d3196d94b444c3514bdb1a499436 (patch)
tree253259963084d489364332a98762f2ae8116d5b7 /templates
parent7206d2c97bce26f10daf9a4bdc662c261d461799 (diff)
downloadampache-49f48af532c2d3196d94b444c3514bdb1a499436.tar.gz
ampache-49f48af532c2d3196d94b444c3514bdb1a499436.tar.bz2
ampache-49f48af532c2d3196d94b444c3514bdb1a499436.zip
fixed add to playlists from albums, and multi-artist album display flaw
Diffstat (limited to 'templates')
-rw-r--r--templates/show_artist.inc22
-rw-r--r--templates/show_mpd.inc97
2 files changed, 11 insertions, 108 deletions
diff --git a/templates/show_artist.inc b/templates/show_artist.inc
index 1b6609d6..aab2f48b 100644
--- a/templates/show_artist.inc
+++ b/templates/show_artist.inc
@@ -47,13 +47,13 @@ $artist_id = $artist->id;
<table class="border" cellspacing="0" cellpadding="0" border="0">
<tr class="table-header">
<th align="center">
- &nbsp;&nbsp;<a href="#" onclick="check_songs(); return false;"><?php print _("Select"); ?></a>
+ &nbsp;&nbsp;<a href="#" onclick="check_songs(); return false;"><?php echo _("Select"); ?></a>
</th>
- <th><?php print _("Cover"); ?></th>
- <th><?php print _("Album Name"); ?></th>
- <th><?php print _("Album Year"); ?></th>
- <th><?php print _("Total Tracks"); ?></th>
- <th><?php print _("Action"); ?></th>
+ <th><?php echo _("Cover"); ?></th>
+ <th><?php echo _("Album Name"); ?></th>
+ <th><?php echo _("Album Year"); ?></th>
+ <th><?php echo _("Total Tracks"); ?></th>
+ <th><?php echo _("Action"); ?></th>
</tr>
<?php
@@ -68,17 +68,17 @@ $artist_id = $artist->id;
<input name="song[]" value="<?php print $id; ?>" type="checkbox" />
</td>
<td height="87">
- <a href="<?php print $web_path; ?>/albums.php?album=<?php print $id; ?>&amp;artist=<?php print $artist_id; ?>">
- <img border="0" src="<?php print $web_path; ?>/albumart.php?id=<?php print $id; ?>&amp;fast=1" alt="<?php print $album_name; ?>" title="<?php print $album_name; ?>" height="75" width="75">
+ <a href="<?php print $web_path; ?>/albums.php?album=<?php echo $id; ?>&amp;artist=<?php echo $artist->id; ?>">
+ <img border="0" src="<?php print $web_path; ?>/albumart.php?id=<?php print $id; ?>&amp;fast=1" alt="<?php echo $album_name; ?>" title="<?php print $album_name; ?>" height="75" width="75">
</a>
</td>
- <td><a href="<?php print $web_path; ?>/albums.php?album=<?php print $id; ?>&amp;artist=<?php print $artist_id; ?>"><?php print $album_name; ?></a></td>
+ <td><a href="<?php print $web_path; ?>/albums.php?album=<?php print $id; ?>&amp;artist=<?php echo $artist->id; ?>"><?php print $album_name; ?></a></td>
<td><?php print $album->year; ?></td>
<td><?php print $count; ?></td>
<td>
- <a href="<?php print $web_path; ?>/song.php?action=m3u&album=<?php print $id; ?>"><?php print _("Play"); ?></a>
+ <a href="<?php print $web_path; ?>/song.php?action=m3u&album=<?php echo $id; ?>"><?php echo _("Play"); ?></a>
<?php if( batch_ok() ) { ?>
- | <a href="<?php echo conf('web_path'); ; ?>/batch.php?action=alb&id=<?php echo $album->id; ; ?>"><?php echo _("Download"); ; ?></a>
+ | <a href="<?php echo conf('web_path'); ?>/batch.php?action=alb&id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a>
<?php } ?>
</td>
diff --git a/templates/show_mpd.inc b/templates/show_mpd.inc
deleted file mode 100644
index bac3b8de..00000000
--- a/templates/show_mpd.inc
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-/*
-
- Copyright (c) 2004 Ampache.org
- All rights reserved.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-/*!
- @header Show mpd form
-*/
-?>
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="0">
-<tr>
- <td>
- <table border="0" cellpadding="0" cellspacing="0" bgcolor="<?php conf('base_color1'); ?>" width="100%">
- <TR><TD CLASS="content">
-State: <?php
- switch ($myMpd->state) {
- case MPD_STATE_PLAYING: echo "<B>Playing</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=pause'>Pause</A>] [<A HREF='".$_SERVER[PHP_SELF]."?m=stop'>Stop</A>]"; break;
- case MPD_STATE_PAUSED: echo "<B>Paused</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=pause'>Unpause</A>]"; break;
- case MPD_STATE_STOPPED: echo "<B>Idle</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=play'>Play</A>]"; break;
- default: echo "(Unknown State!)"; break;
- } ?>
- </TD></TR>
- <TR><TD CLASS="content">
- Loop: <?php
- switch ($myMpd->repeat) {
- case 0: echo "<B>Loop is off</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=loop&val=1'>On</A>]"; break;
- case 1: echo "<B>Loop is on</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=loop&val=0'>Off</A>]"; break;
- default: echo "(Unknown State!)"; break;
- } ?>
- </TD></TR>
- <TR><TD CLASS="content">
- &nbsp;
- </TD></TR>
- </TABLE>
- </TR></TD>
-<?php if ( $myMpd->state == MPD_STATE_PLAYING or $myMpd->state == MPD_STATE_PAUSED ) { ?>
- <TR><TD>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="WHITE" WIDTH="100%">
- <TR><TD CLASS="content">Now Playing: (<?php echo (round(($myMpd->current_track_position/$myMpd->current_track_length),2)*100) ?>% cmpl.)</TD></TR>
- <TR><TD CLASS="content" ALIGN=CENTER><SPAN CLASS=SongPlaying><?php echo $myMpd->playlist[$myMpd->current_track_id]['Artist']." - ".$myMpd->playlist[$myMpd->current_track_id]['Title'] ?> </SPAN></TD></TR>
- </TABLE>
- </TD></TR>
-<?php } ?>
- <TR><TD>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="WHITE" WIDTH="100%">
- <TR><TD CLASS="content" ALIGN=CENTER>[ <A TITLE="Refresh the Playlist Window" HREF="<?php echo $_SERVER[PHP_SELF] ?>">refresh now</A> ]</TD></TR>
- </TABLE>
- </TD></TR>
-</TABLE>
-<BR>
-<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=<?php echo $PG_WIDTH ?>>
- <TR><TD ALIGN="CENTER"><B>Server Playlist</B></TD></TR>
- <TR><TD>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="WHITE" WIDTH="100%">
-<?php
- $pl = $myMpd->GetPlaylist();
- if ( is_null($pl) ) echo "ERROR: " .$myMpd->errStr."\n";
- else {
- foreach ($pl as $id => $entry) {
- $tblClass = ( $id == $myMpd->current_track_id ? "SongPlaying" : "Song" );
- echo "<TR HEIGHT=35><TD CLASS=\"content\"><SPAN CLASS=\"".$tblClass."\">";
- echo "<A TITLE=\"Click to remove '".$entry['Title']."' from playlist\" HREF='".$_SERVER[PHP_SELF]."?m=rem&val=".$id."'>".($id+1)."</A>" . ". <A TITLE=\"Click to jump to '".$entry['Title']."' from playlist\" HREF='".$_SERVER[PHP_SELF]."?m=skipto&id=".$id."'>".$entry['Artist']." - ".$entry['Title']."</A>";
- echo "</SPAN></TD></TR>";
- echo "\n"; // make it perty
- }
- }
- if ( $myMpd->playlist_count == 0 ) {
- echo "<TR><TD CLASS=\"content\" ALIGN=CENTER><SPAN CLASS=\"Song\"><I>(Playlist is empty)</I></SPAN></TD></TR>";
- }
-?>
- </TABLE>
- </TD></TR>
-<?php if ( $myMpd->playlist_count > 0 ) { ?>
- <TR HEIGHT=20><TD ALIGN=CENTER>[<A TITLE="Click to shuffle (randomize) the playlist" HREF="<?php echo $_SERVER[PHP_SELF] ?>?m=shuffle">shuffle</A>] [<A TITLE="Click the clear the playlist" HREF="<?php echo $_SERVER[PHP_SELF] ?>?m=clear">clear</A>]</TD></TR>
-<?php } ?>
-</TABLE>
-</DIV>
-<!-- MPD-Class version: <?php echo $myMpd->mpd_class_version ?> -->
-</BODY></HTML>