summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorxgizzmo <xgizzmo@ampache>2006-01-10 05:03:18 +0000
committerxgizzmo <xgizzmo@ampache>2006-01-10 05:03:18 +0000
commit67d76f09c28d0c6abae6d966f4cc00a5428bdc74 (patch)
treec52e3c1c1d9bf75de21b2bc812fa34aa78aa10af /templates
parent883cd9e478cf740f7b6bdd5fa089c4eefda97b7a (diff)
downloadampache-67d76f09c28d0c6abae6d966f4cc00a5428bdc74.tar.gz
ampache-67d76f09c28d0c6abae6d966f4cc00a5428bdc74.tar.bz2
ampache-67d76f09c28d0c6abae6d966f4cc00a5428bdc74.zip
Code clean up
Diffstat (limited to 'templates')
-rw-r--r--templates/add_catalog.inc40
-rw-r--r--templates/catalog.inc139
-rw-r--r--templates/customize_catalog.inc25
-rw-r--r--templates/flag.inc205
-rw-r--r--templates/footer.inc2
-rw-r--r--templates/header.inc68
-rw-r--r--templates/list_duplicates.inc66
-rw-r--r--templates/list_flagged.inc61
-rw-r--r--templates/list_header.inc53
-rw-r--r--templates/menu.inc95
-rw-r--r--templates/show_access_list.inc47
-rw-r--r--templates/show_add_access.inc78
-rw-r--r--templates/show_admin_index.inc24
-rw-r--r--templates/show_album.inc28
-rw-r--r--templates/show_album_art.inc.php18
-rw-r--r--templates/show_albums.inc49
-rw-r--r--templates/show_artist.inc80
-rw-r--r--templates/show_artist_box.inc.php32
-rw-r--r--templates/show_artists.inc42
-rw-r--r--templates/show_mpdpl.inc2
20 files changed, 552 insertions, 602 deletions
diff --git a/templates/add_catalog.inc b/templates/add_catalog.inc
index 5d156d99..498eaa81 100644
--- a/templates/add_catalog.inc
+++ b/templates/add_catalog.inc
@@ -36,20 +36,19 @@ $default_sort = "%a/%A";
<tr>
<td><?php echo _("Catalog Name"); ?>: </td>
<td><input size="60" type="text" name="name" value="<?php echo $_REQUEST['name']; ?>" /></td>
- <td style="vertical-align:top; font-family: monospace;" rowspan="6">
- <strong><?php echo _("Auto-inserted Fields"); ?>:</strong><br />
- %A = <?php echo _("album name"); ?><br />
- %a = <?php echo _("artist name"); ?><br />
- %c = <?php echo _("id3 comment"); ?><br />
- %g = <?php echo _("genre"); ?><br />
- %T = <?php echo _("track number (padded with leading 0)"); ?><br />
- %t = <?php echo _("song title"); ?><br />
- %y = <?php echo _("year"); ?><br />
- %o = <?php echo _("other"); ?><br />
-
- </td>
-
+ <td style="vertical-align:top; font-family: monospace;" rowspan="6">
+ <strong><?php echo _("Auto-inserted Fields"); ?>:</strong><br />
+ %A = <?php echo _("album name"); ?><br />
+ %a = <?php echo _("artist name"); ?><br />
+ %c = <?php echo _("id3 comment"); ?><br />
+ %g = <?php echo _("genre"); ?><br />
+ %T = <?php echo _("track number (padded with leading 0)"); ?><br />
+ %t = <?php echo _("song title"); ?><br />
+ %y = <?php echo _("year"); ?><br />
+ %o = <?php echo _("other"); ?><br />
+ </td>
</tr>
+
<tr>
<td><?php echo _("Path"); ?>: </td>
<td><input size="60" type="text" name="path" value="<?php echo $_REQUEST['path']; ?>" /></td>
@@ -63,31 +62,38 @@ $default_sort = "%a/%A";
</select>
</td>
</tr>
+
<tr>
<td><?php echo _("ID3 Set Command"); ?>: </td>
<td><input size="60" type="text" name="id3set_command" value="<?php echo $default_id3; ?>" /></td>
</tr>
+
<tr>
<td><?php echo _("Filename Pattern"); ?>: </td>
<td><input size="60" type="text" name="rename_pattern" value="<?php echo $default_rename; ?>" /></td>
</tr>
+
<tr>
<td><?php echo _("Folder Pattern"); ?>:<br /><?php echo _("(no leading or ending '/')"); ?></td>
<td valign="top"><input size="60" type="text" name="sort_pattern" value="<?php echo $default_sort; ?>" /></td>
</tr>
+
<tr>
<td valign="top"><?php echo _("Gather Album Art"); ?>:</td>
<td><input type="checkbox" onclick="flipField('artextra1');flipField('artextra2');flipField('artextra3');" name="gather_art" value="1" /><br />
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr class="even">
<td><?php echo _("ID3V2 Tags"); ?>:</td>
- <td><input id="artextra1" disabled="disabled" type="checkbox" name="art_id3v2" value="1" /></td></tr>
+ <td><input id="artextra1" disabled="disabled" type="checkbox" name="art_id3v2" value="1" /></td>
+ </tr>
<tr class="even">
<td><?php echo _("Amazon"); ?>:</td>
- <td><input id="artextra2" disabled="disabled" type="checkbox" name="art_amazon" value="1" /></td></tr>
+ <td><input id="artextra2" disabled="disabled" type="checkbox" name="art_amazon" value="1" /></td>
+ </tr>
<tr class="even">
<td><?php echo _("File Folder"); ?>:</td>
- <td><input id="artextra3" disabled="disabled" type="checkbox" name="art_folder" value="1" /></td></tr>
+ <td><input id="artextra3" disabled="disabled" type="checkbox" name="art_folder" value="1" /></td>
+ </tr>
</table>
<br />
</td>
@@ -96,6 +102,7 @@ $default_sort = "%a/%A";
<td valign="top"><?php echo _("Build Playlists from m3u Files"); ?>:</td>
<td><input type="checkbox" name="parse_m3u" value="1" /></td>
</tr>
+
<tr>
<td>&nbsp;</td>
<td>
@@ -104,6 +111,7 @@ $default_sort = "%a/%A";
<input class="button" type="submit" name="action" value="Cancel" />
</td>
</tr>
+
</table>
</form>
</div>
diff --git a/templates/catalog.inc b/templates/catalog.inc
index ab2fb3f3..13639940 100644
--- a/templates/catalog.inc
+++ b/templates/catalog.inc
@@ -24,84 +24,81 @@
* This template displays all of the catalogs... Currently it's a little cluttered
* It would be great if someone cleaned this up
*/
+$web_path = conf('web_path');
+$tools = array( _("Add a catalog") => $web_path . "/admin/catalog.php?action=show_add_catalog",
+ _("Access Lists") => $web_path . "/admin/access.php",
+ _("Show Duplicate Songs") => $web_path . "/admin/duplicates.php",
+ _("Show Disabled Songs") => $web_path . "/admin/catalog.php?action=show_disabled",
+ _("Clear Catalog Stats") => $web_path . "/admin/catalog.php?action=clear_stats",
+ _("Clear Now Playing") => $web_path . "/admin/catalog.php?action=clear_now_playing",
+ _("Dump Album Art") => $web_path . "/admin/catalog.php?action=dump_album_art",
+ _("Gather Album Art") => $web_path . "/admin/catalog.php?action=gather_album_art",
+ _("View flagged songs") => $web_path . "/admin/flags.php");
?>
+
<br />
<?php if (!function_exists('iconv')) { ?>
<div class="fatalerror"><?php echo _("Error: ICONV not found, ID3V2 Tags will not import correctly. See <a href=\"http://php.oregonstate.edu/iconv\">Iconv</a> for information on getting ICONV"); ?></div>
<?php } ?>
-<table cellpadding="5" border="0" cellspacing="0">
+<table cellpadding="5" border="0" cellspacing="0">
<tr>
<td valign="top"><?php show_local_catalog_info(); ?></td>
- <td valign="top">
- <form name="catalog" method="post" action="<?php echo conf('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data">
- <table class="border" cellspacing="1" cellpadding="3">
- <tr class="table-header" align="center">
- <td colspan="4"><?php echo _("Update Catalogs"); ?></td>
- </tr>
- <?php
- $catalogs = $catalog->get_catalogs();
-
- if ( $catalogs ) {
- foreach ($catalogs as $catalog) {
- print("<tr class=\"even\"><td>".
- "<input type=\"checkbox\" name=\"catalogs[]\" value=\"$catalog->id\"></input></td>".
- "<td>".
- "<a href=\"". conf('web_path') ."/admin/catalog.php?action=show_customize_catalog&amp;catalog_id=$catalog->id\">".
- "$catalog->path".
- "</a>".
- "</td>".
- "<td>".
- date("H:i - m/d/y",$catalog->last_update).
- "</td>".
- "<td>".
- "<a href=\"" . conf('web_path') . "/admin/catalog.php?action=show_delete_catalog&amp;catalog_id=$catalog->id\">" . _("Delete") . "</a>".
- "</td></tr>\n");
- } // end foreach
- ?>
- <tr>
- <td class="even" colspan="4">
- <input class="button" type="submit" name="action" value="<?php echo _("Add to Catalog(s)"); ; ?>" />&nbsp;&nbsp;
- <input class="button" type="submit" name="action" value="<?php echo _("Add to all Catalogs"); ; ?>" /><br />
- <?php echo _("Fast Add"); ; ?>:<input type="checkbox" name="update_type" value="fast_add" />
- </td>
- </tr>
- <tr>
- <td class="even" colspan="4">
- <input class="button" type="submit" name="action" value="<?php echo _("Update Catalog(s)"); ; ?>" />&nbsp;&nbsp;&nbsp;
- <input class="button" type="submit" name="action" value="<?php echo _("Update All Catalogs"); ; ?>" /><br />
- <?php echo _("Fast Update"); ; ?>:<input type="checkbox" name="update_type" value="fast_update" /><br />
- </td>
- </tr>
- <tr>
- <td class="even" colspan="4">
- <input class="button" type="submit" name="action" value="<?php echo _("Clean Catalog(s)"); ; ?>" />&nbsp;&nbsp;&nbsp;
- <input class="button" type="submit" name="action" value="<?php echo _("Clean All Catalogs"); ; ?>" /><br />
- </td>
+ <td valign="top">
+ <form name="catalog" method="post" action="<?php echo $web_path; ?>/admin/catalog.php" enctype="multipart/form-data">
+ <table class="border" cellspacing="1" cellpadding="3">
+ <tr class="table-header" align="center">
+ <td colspan="4"><?php echo _("Update Catalogs"); ?></td>
</tr>
+ <?php
+ $catalogs = $catalog->get_catalogs();
+ if ($catalogs) {
+ foreach ($catalogs as $catalog) {
+ print("<tr class=\"even\"><td>".
+ "<input type=\"checkbox\" name=\"catalogs[]\" value=\"$catalog->id\"></input></td>".
+ "<td>".
+ "<a href=\"". $web_path ."/admin/catalog.php?action=show_customize_catalog&amp;catalog_id=$catalog->id\">".
+ "$catalog->path".
+ "</a>".
+ "</td>".
+ "<td>".
+ date("H:i - m/d/y",$catalog->last_update).
+ "</td>".
+ "<td>".
+ "<a href=\"" . $web_path . "/admin/catalog.php?action=show_delete_catalog&amp;catalog_id=$catalog->id\">" . _("Delete") . "</a>".
+ "</td></tr>\n");
+ } // end foreach
+ ?>
+ <tr>
+ <td class="even" colspan="4">
+ <input class="button" type="submit" name="action" value="<?php echo _("Add to Catalog(s)"); ?>" />&nbsp;&nbsp;&nbsp;
+ <input class="button" type="submit" name="action" value="<?php echo _("Add to all Catalogs"); ?>" /><br />
+ <?php echo _("Fast Add"); ?>:<input type="checkbox" name="update_type" value="fast_add" /><br />
+ </td>
+ </tr>
+ <tr>
+ <td class="even" colspan="4">
+ <input class="button" type="submit" name="action" value="<?php echo _("Update Catalog(s)"); ?>" />&nbsp;&nbsp;&nbsp;
+ <input class="button" type="submit" name="action" value="<?php echo _("Update All Catalogs"); ?>" /><br />
+ <?php echo _("Fast Update"); ?>:<input type="checkbox" name="update_type" value="fast_update" /><br />
+ </td>
+ </tr>
+ <tr>
+ <td class="even" colspan="4">
+ <input class="button" type="submit" name="action" value="<?php echo _("Clean Catalog(s)"); ?>" />&nbsp;&nbsp;&nbsp;
+ <input class="button" type="submit" name="action" value="<?php echo _("Clean All Catalogs"); ?>" /><br />
+ </td>
+ </tr>
<?php
- } // end if catalogs
- else {
- print("<tr class=\"even\"><td colspan=\"4\" >".
- _("You don't have any catalogs.") .
- "</td></tr>");
- }
- ?>
- </table>
- </form>
- </td>
- <td valign="top">
- <?php
- $tools = array(_("Add a catalog") => conf('web_path') . "/admin/catalog.php?action=show_add_catalog",
- _("Access Lists") => conf('web_path') . "/admin/access.php",
- _("Show Duplicate Songs") => conf('web_path') . "/admin/duplicates.php",
- _("Show Disabled Songs") => conf('web_path') . "/admin/catalog.php?action=show_disabled",
- _("Clear Catalog Stats") => conf('web_path') . "/admin/catalog.php?action=clear_stats",
- _("Clear Now Playing") => conf('web_path') . "/admin/catalog.php?action=clear_now_playing",
- _("Dump Album Art") => conf('web_path') . "/admin/catalog.php?action=dump_album_art",
- _("Gather Album Art") => conf('web_path') . "/admin/catalog.php?action=gather_album_art",
- _("View flagged songs") => conf('web_path') . "/admin/flags.php");
- show_tool_box(_("Catalog Tools"), $tools);
- ?>
- </td>
- </tr>
+ } // end if catalogs
+ else {
+ print("<tr class=\"even\"><td colspan=\"4\" >" . _("You don't have any catalogs.") . "</td></tr>");
+ } // end else
+ ?>
+ </table>
+ </form>
+ </td>
+ <td valign="top">
+ <?php show_tool_box(_("Catalog Tools"), $tools); ?>
+ </td>
+</tr>
</table>
diff --git a/templates/customize_catalog.inc b/templates/customize_catalog.inc
index a0813036..4bd09746 100644
--- a/templates/customize_catalog.inc
+++ b/templates/customize_catalog.inc
@@ -20,8 +20,9 @@
*/
?>
+
<br />
-<div class="header2"><?php echo _("Settings for catalog in"); ?> <?php echo $catalog->path; ?></div><br />
+<div class="header2"><?php echo _("Settings for catalog in"); echo $catalog->path; ?></div><br />
<div class="text-box">
<form method="get" action="<?php echo conf('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data">
<table class="tabledata" cellspacing="0" cellpadding="0" border="0">
@@ -29,22 +30,22 @@
<td><?php echo _("Name"); ?>:</td>
<td><input size="60" type="text" name="name" value="<?php echo scrub_out($catalog->name); ?>"></input></td>
<td style="vertical-align:top; font-family: monospace;" rowspan="5">
- <strong><?php echo _("Auto-inserted Fields"); ?>:</strong><br />
- %A = <?php echo _("album name"); ?><br />
- %a = <?php echo _("artist name"); ?><br />
- %C = <?php echo _("catalog path"); ?><br />
- %c = <?php echo _("id3 comment"); ?><br />
- %g = <?php echo _("genre"); ?><br />
- %T = <?php echo _("track number (padded with leading 0)"); ?><br />
- %t = <?php echo _("song title"); ?><br />
- %y = <?php echo _("year"); ?><br />
- %o = <?php echo _("other"); ?><br />
+ <strong><?php echo _("Auto-inserted Fields"); ?>:</strong><br />
+ %A = <?php echo _("album name"); ?><br />
+ %a = <?php echo _("artist name"); ?><br />
+ %C = <?php echo _("catalog path"); ?><br />
+ %c = <?php echo _("id3 comment"); ?><br />
+ %g = <?php echo _("genre"); ?><br />
+ %T = <?php echo _("track number (padded with leading 0)"); ?><br />
+ %t = <?php echo _("song title"); ?><br />
+ %y = <?php echo _("year"); ?><br />
+ %o = <?php echo _("other"); ?><br />
</td>
</tr>
<tr>
<td><?php echo _("ID3 set command"); ?>:</td>
<td>
- <input size="60" type="text" name="id3_set_command" value="<?php echo scrub_out($catalog->id3_set_command); ?>" />
+ <input size="60" type="text" name="id3_set_command" value="<?php echo scrub_out($catalog->id3_set_command); ?>" />
</td>
</tr>
<tr>
diff --git a/templates/flag.inc b/templates/flag.inc
index 6a35ee7c..fde096ab 100644
--- a/templates/flag.inc
+++ b/templates/flag.inc
@@ -26,124 +26,107 @@
A template file
*/
-
+$web_path = conf('web_path');
// let's put a couple of things in this file
-if ( $type == 'show_flagged_form' ) {
+if ($type == 'show_flagged_form') {
$song = new Song($song_id);
$song->format_song();
- if(!preg_match('/\.mp3$/',$song->file))
- {
- echo "<p>Ampache can only edit MP3 file tags currently.<br/>";
- echo "<a href=\"".$_SERVER['HTTP_REFERER']."\">Back</a>";
- return;
- }
+ if (!preg_match('/\.mp3$/', $song->file)) {
+ echo "<p>Ampache can only edit MP3 file tags currently.<br/>";
+ echo "<a href=\"".$_SERVER['HTTP_REFERER']."\">Back</a>";
+ return;
+ } // end if (!preg_match('/\.mp3$/',$song->file))
?>
-
-<p style="font-size: 10pt; font-weight: bold;"><?php echo _("Flag song"); ?></p>
-
-<p><?php echo _("Flag the following song as having one of the problems listed below. Site admins will then take the appropriate action for the flagged files."); ?></p>
-
-<?php if ( $flag_text ) { ?>
-<p style="color: red;"><?php echo $flag_text ; ?></p>
-<?php } ?>
-
-<form name="flag_song" method="post" action="<?php echo conf('web_path'); ?>/flag.php">
-<table class="tabledata" cellpadding="3" cellspacing="1">
- <tr class="even">
- <td>File:</td>
- <td><?php echo $song->file ; ?></td>
- </tr>
- <tr class="even">
- <td><?php echo _("Song"); ?>:</td>
- <td><b><?php echo $song->f_title ; ?></b> by <?php echo $song->f_artist_full; ; ?></td>
- </tr>
- <tr class="even">
- <td><?php echo _("Reason to flag"); ?>:</td>
- <td><?php show_flagged_popup($reason); ?></td>
- </tr>
- <tr class="even">
- <td><?php echo _("Comment"); ?>:</td>
- <td><input name="comment" type="text" size="50" value="<?php echo $comment ; ?>"></input>
- </td>
- </tr>
- <tr class="odd">
- <td> &nbsp; </td>
- <td>
- <input type="submit" value="<?php echo _("Flag Song"); ?>" />
- <input type="hidden" name="action" value="flag_song" />
- </td>
- </tr>
-</table>
-<input type="hidden" name="song" value="<?php echo $song->id ; ?>" />
-</form>
+
+ <p style="font-size: 10pt; font-weight: bold;"><?php echo _("Flag song"); ?></p>
+ <p><?php echo _("Flag the following song as having one of the problems listed below. Site admins will then take the appropriate action for the flagged files."); ?></p>
+
+ <?php if ($flag_text) { ?>
+ <p style="color: red;"><?php echo $flag_text ; ?></p>
+ <?php } ?>
+
+ <form name="flag_song" method="post" action="<?php echo $web_path; ?>/flag.php">
+ <table class="tabledata" cellpadding="3" cellspacing="1">
+ <tr class="even">
+ <td><?php echo _("File"); ?>:</td>
+ <td><?php echo $song->file; ?></td>
+ </tr>
+ <tr class="even">
+ <td><?php echo _("Song"); ?>:</td>
+ <td><b><?php echo $song->f_title; ?></b> by <?php echo $song->f_artist_full; ?></td>
+ </tr>
+ <tr class="even">
+ <td><?php echo _("Reason to flag"); ?>:</td>
+ <td><?php show_flagged_popup($reason); ?></td>
+ </tr>
+ <tr class="even">
+ <td><?php echo _("Comment"); ?>:</td>
+ <td><input name="comment" type="text" size="50" value="<?php echo $comment; ?>"></input>
+ </td>
+ </tr>
+ <tr class="odd">
+ <td> &nbsp; </td>
+ <td>
+ <input type="submit" value="<?php echo _("Flag Song"); ?>" />
+ <input type="hidden" name="action" value="flag_song" />
+ </td>
+ </tr>
+ </table>
+ <input type="hidden" name="song" value="<?php echo $song->id; ?>" />
+ </form>
<?php
-
-}
-elseif ( $type == 'show_flagged_songs' ) {
+} // end if ($type == 'show_flagged_form')
+elseif ($type == 'show_flagged_songs') {
$flags = get_flagged();
?>
-
-<p style="font-size: 10pt; font-weight: bold;">View Flagged Songs</p>
-
-<p>This is the list of songs that have been flagged by your Ampache users. Use
-this list to determine what songs you need to re-rip or tags you need to update.</p>
-
-<?php if ( $flags ) { ?>
-<form name="flag_update" action="<?php echo conf('web_path'); ?>/flag.php" method="post">
-
-<table class="tabledata" cellspacing="0" cellpadding="0" border="1">
- <tr class="table-header">
- <td>&nbsp;</td>
- <td>Song</td>
- <td>Flag</td>
- <td>New Flag:</td>
- <td>Flagged by</td>
- <td>ID3 Update:</td>
- </tr>
-<?php
- foreach ($flags as $flag) {
- $song = new Song($flag->song);
- $song->format_song();
- $alt_title = $song->title;
-
- $artist = $song->f_artist;
- $alt_artist = $song->f_full_artist;
-
- echo "<tr class=\"even\">".
- "<td><input type=\"checkbox\" id=\"flag_".$flag->id."\" name=\"flag[]\" value=\"".$flag->id."\"></input></td>".
- "<td><a href=\"".conf('web_path')."/song.php?song=$flag->song\" title=\"$alt_title\">$song->f_title</a> by ".
- "<a href=\"".conf('web_path')."/artist.php?action=show&amp;artist=$song->artist_id\" title=\"$alt_artist\">$artist</a></td>".
- "<td>$flag->type</td>";
- echo "<td>";
- $onchange = "onchange=\"document.getElementById('flag_".$flag->id."').checked='checked';\"";
- show_flagged_popup($flag->type,'type',$flag->id."_newflag", $onchange);
- echo "</td>";
- echo "<td>".$flag->username."<br />".date('m/d/y',$flag->date)."</td>";
-/* echo "<td><a href=\"catalog.php?action=fixed&flag=$flag->id\">Fixed</a></td></tr>\n";*/
- if($flag->type === 'newid3')
- {
- echo "<td>";
- echo "<input type=\"radio\" name=\"accept_".$flag->id."\" value=\"accept\" />Accept";
- echo "<input type=\"radio\" name=\"accept_".$flag->id."\" value=\"reject\" />Reject";
- echo "</td>";
- }
- else echo "<td><a href=\"".conf('web_path')."/admin/song.php?action=edit&amp;song=".$flag->song."\">edit/view</a></td>";
- echo "</tr>\n";
-
- }
-?>
-<tr class="even"><td colspan="6"><input type="submit" name="action" value="Update Flags"></input></td></tr>
-</table>
-</form>
-<?php } else { ?>
-
-<p> You don't have any flagged songs. </p>
-
-<?php } ?>
-
-<?php
-
-}
+ <p style="font-size: 10pt; font-weight: bold;">View Flagged Songs</p>
+ <p>This is the list of songs that have been flagged by your Ampache users. Use
+ this list to determine what songs you need to re-rip or tags you need to update.</p>
+ <?php
+ if ($flags) { ?>
+ <form name="flag_update" action="<?php echo $web_path; ?>/flag.php" method="post">
+ <table class="tabledata" cellspacing="0" cellpadding="0" border="1">
+ <tr class="table-header">
+ <td>&nbsp;</td>
+ <td>Song</td>
+ <td>Flag</td>
+ <td>New Flag:</td>
+ <td>Flagged by</td>
+ <td>ID3 Update:</td>
+ </tr>
+ <?php
+ foreach ($flags as $flag) {
+ $song = new Song($flag->song);
+ $song->format_song();
+ $alt_title = $song->title;
+ $artist = $song->f_artist;
+ $alt_artist = $song->f_full_artist;
+
+ echo "<tr class=\"even\">".
+ "<td><input type=\"checkbox\" id=\"flag_".$flag->id."\" name=\"flag[]\" value=\"".$flag->id."\"></input></td>".
+ "<td><a href=\"".$web_path."/song.php?song=$flag->song\" title=\"$alt_title\">$song->f_title</a> by ".
+ "<a href=\"".$web_path."/artist.php?action=show&amp;artist=$song->artist_id\" title=\"$alt_artist\">$artist</a></td>".
+ "<td>$flag->type</td><td>";
+ $onchange = "onchange=\"document.getElementById('flag_".$flag->id."').checked='checked';\"";
+ show_flagged_popup($flag->type, 'type', $flag->id."_newflag", $onchange);
+ echo "</td><td>".$flag->username."<br />".date('m/d/y',$flag->date)."</td>";
+ /*echo "<td><a href=\"catalog.php?action=fixed&flag=$flag->id\">Fixed</a></td></tr>\n";*/
+ if ($flag->type === 'newid3') {
+ echo "<td><input type=\"radio\" name=\"accept_".$flag->id."\" value=\"accept\" />Accept";
+ echo "<input type=\"radio\" name=\"accept_".$flag->id."\" value=\"reject\" />Reject</td></tr>";
+ } else {
+ echo "<td><a href=\"".$web_path."/admin/song.php?action=edit&amp;song=".$flag->song."\">edit/view</a></td>";
+ echo "</tr>\n";
+ } // end if ($flag->type === 'newid3') and else
+ } // end foreach ($flags as $flag)
+ ?>
+ <tr class="even"><td colspan="6"><input type="submit" name="action" value="Update Flags"></input></td></tr>
+ </table>
+ </form>
+<?php } else { ?>
+ <p> You don't have any flagged songs. </p>
+<?php } // end if ($flags) and else
+} // end elseif ($type == 'show_flagged_songs')
?>
diff --git a/templates/footer.inc b/templates/footer.inc
index 853da337..4f6db43c 100644
--- a/templates/footer.inc
+++ b/templates/footer.inc
@@ -20,7 +20,7 @@
*/
?>
-</td></tr></table>
+</td></tr></table><!-- End Main Page Table-->
</div> <!-- end id="content"-->
</div> <!-- end id="maincontainer"-->
</body>
diff --git a/templates/header.inc b/templates/header.inc
index 205c1da2..d0ddff1e 100644
--- a/templates/header.inc
+++ b/templates/header.inc
@@ -19,57 +19,51 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
+$web_path = conf('web_path');
$htmllang = str_replace("_","-",conf('lang'));
$location = get_location();
?>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>">
+
<head>
-<link rel="shortcut icon" href="<?php echo conf('web_path'); ?>/favicon.ico" />
+<link rel="shortcut icon" href="<?php echo $web_path; ?>/favicon.ico" />
<?php
-if (conf('use_rss')){
-?>
-<link rel="alternate" type="application/rss+xml" title="<?php echo conf('rss_main_title'); ?>" href="<?php echo conf('web_path'); ?>/rss.php" />
+if (conf('use_rss')) { ?>
+<link rel="alternate" type="application/rss+xml" title="<?php echo conf('rss_main_title'); ?>" href="<?php echo $web_path; ?>/rss.php" />
<?php } ?>
-
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" />
-<?php show_template('menustyle'); ?>
-<?php show_template('style'); ?>
+<?php show_template('menustyle'); show_template('style'); ?>
<title><?php echo conf('site_title'); ?> - <?php echo $location['title']; ?></title>
</head>
-<body>
-<script src="<?php echo conf('web_path'); ?>/lib/general.js" language="javascript" type="text/javascript"></script>
+<body>
+<script src="<?php echo $web_path; ?>/lib/general.js" language="javascript" type="text/javascript"></script>
<div id="maincontainer">
-<!-- This is the topbar row -->
-<div id="topbar">
- <div id="topbarleft">
- <a href="http://www.ampache.org">
- <img class="pageheader" src="<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache.gif" border="0" title="Ampache: For the love of music" alt="Ampache: For the love of music" />
- </a>
- </div>
- <div id="topbarright">
+ <div id="topbar"><!-- This is the topbar row -->
+ <div id="topbarleft">
+ <a href="http://www.ampache.org">
+ <img class="pageheader" src="<?php echo $web_path; ?><?php echo conf('theme_path'); ?>/images/ampache.gif" border="0" title="Ampache: For the love of music" alt="Ampache: For the love of music" />
+ </a>
+ </div><!--End topbarleft -->
+ <div id="topbarright">
<a href="http://www.ampache.org/index.php">Ampache v.<?php echo conf('version'); ?></a><br />
<b><?php echo _("You are currently logged in as") . " " . $GLOBALS['user']->fullname; ?></b>
<br />
- <?php echo _("Browse"); ?>:
- <form method="post" action="<?php echo conf('web_path'); ?>/browse.php" enctype="multipart/form-data" style="Display:inline;">
- <select name="action">
- <option value="album">Album</option>
- <option value="artist">Artist</option>
- <option value="genre">Genre</option>
- </select>
- <input type="submit" value="<?php echo _("Go!"); ?>" class="button" />
- </form>
- </div>
-</div>
-<!-- This is the row for body + sidebar -->
-<div id="sidebar">
- <!-- This is the sidebar -->
- <?php require_once(conf('prefix') . '/templates/sidebar.inc.php'); ?>
-</div>
+ <?php echo _("Browse"); ?>:
+ <form method="post" action="<?php echo $web_path; ?>/browse.php" enctype="multipart/form-data" style="Display:inline;">
+ <select name="action">
+ <option value="album">Album</option>
+ <option value="artist">Artist</option>
+ <option value="genre">Genre</option>
+ </select>
+ <input type="submit" value="<?php echo _("Go!"); ?>" class="button" />
+ </form>
+ </div><!-- End topbarright -->
+ </div><!-- End topbar -->
+ <div id="sidebar"><!-- This is the sidebar -->
+ <?php require_once(conf('prefix') . '/templates/sidebar.inc.php'); ?>
+ </div><!-- End sidebar -->
<div id="content">
- <table><tr><td>
- <!-- Start Main Page -->
+ <table> <!-- Start Main Page Table-->
+<tr><td> \ No newline at end of file
diff --git a/templates/list_duplicates.inc b/templates/list_duplicates.inc
index 620d0ee9..c96058c4 100644
--- a/templates/list_duplicates.inc
+++ b/templates/list_duplicates.inc
@@ -21,12 +21,13 @@
*/
?>
-<?php show_duplicate_searchbox($search_type) ?>
-<?php if ( $flags ) { ?>
-
-<form method="post" enctype="multipart/form-data" action="<?php echo conf('web_path') . "/admin/song.php?action=disable"; ?>">
-<p class="header1"><?php echo _('Duplicate Songs'); ?></p>
-<table class="tabledata" cellspacing="0" cellpadding="0" >
+<?php
+$web_path = conf('web_path');
+show_duplicate_searchbox($search_type);
+if ($flags) { ?>
+ <form method="post" enctype="multipart/form-data" action="<?php echo $web_path . "/admin/song.php?action=disable"; ?>">
+ <p class="header1"><?php echo _('Duplicate Songs'); ?></p>
+ <table class="tabledata" cellspacing="0" cellpadding="0" >
<tr class="table-header">
<td><?php echo _('Disable'); ?></td>
<td><?php echo _('Song'); ?></td>
@@ -37,40 +38,35 @@
<td><?php echo _('Size'); ?></td>
<td><?php echo _('Filename'); ?></td>
</tr>
-<?php
+ <?php
foreach ($flags as $flag) {
$song = new Song($flag['song']);
$song->format_song();
$alt_title = $song->title;
- $formated_title = $song->f_title;
-
+ $formated_title = $song->f_title;
$artist = $song->f_artist;
- $alt_artist = $song->f_full_artist;
-
+ $alt_artist = $song->f_full_artist;
$dinfolist = get_duplicate_info($song,$search_type);
- foreach ($dinfolist as $dinfo)
- {
- echo "<tr class=\"".flip_class()."\">".
- "<td><input type=\"checkbox\" name=\"song_ids[]\" value=\"" . $dinfo['songid'] . "\" /></td>".
- "<td><a href=\"".conf('web_path')."/song.php?action=m3u&amp;song=$song->id\">".scrub_out($formated_title)."</a> </td>".
- "<td><a href=\"".conf('web_path')."/artists.php?action=show&amp;artist=".$dinfo['artistid']."\" title=\"".scrub_out($dinfo['artist'])."\">".scrub_out($dinfo['artist'])."</a> </td>".
- "<td><a href=\"".conf('web_path')."/albums.php?action=show&amp;album=".$dinfo['albumid']."\" title=\"".scrub_out($dinfo['album'])."\">".scrub_out($dinfo['album'])."</a> </td>".
- "<td>".floor($dinfo['time']/60).":".sprintf("%02d", ($dinfo['time']%60) )."</td>".
- "<td>".intval($dinfo['bitrate']/1000)."</td>".
- "<td>".sprintf("%.2f", ($dinfo['size']/1000000))."Mb</td>".
- "<td>".$dinfo['file']."</td>";
- echo "</tr>\n";
-
- }
-
-
- }
-?>
-<tr>
-<td colspan="8" class="<?php echo flip_class(); ?>"><input height="15" type="submit" value="Disable Songs" /></td>
-</tr>
-</table>
+ foreach ($dinfolist as $dinfo) {
+ echo "<tr class=\"".flip_class()."\">".
+ "<td><input type=\"checkbox\" name=\"song_ids[]\" value=\"" . $dinfo['songid'] . "\" /></td>".
+ "<td><a href=\"".$web_path."/song.php?action=m3u&amp;song=$song->id\">".scrub_out($formated_title)."</a> </td>".
+ "<td><a href=\"".$web_path."/artists.php?action=show&amp;artist=".$dinfo['artistid']."\" title=\"".scrub_out($dinfo['artist'])."\">".scrub_out($dinfo['artist'])."</a> </td>".
+ "<td><a href=\"".$web_path."/albums.php?action=show&amp;album=".$dinfo['albumid']."\" title=\"".scrub_out($dinfo['album'])."\">".scrub_out($dinfo['album'])."</a> </td>".
+ "<td>".floor($dinfo['time']/60).":".sprintf("%02d", ($dinfo['time']%60) )."</td>".
+ "<td>".intval($dinfo['bitrate']/1000)."</td>".
+ "<td>".sprintf("%.2f", ($dinfo['size']/1000000))."Mb</td>".
+ "<td>".$dinfo['file']."</td>";
+ echo "</tr>\n";
+ } // end foreach ($dinfolist as $dinfo)
+ } // end foreach ($flags as $flag)
+ ?>
+ <tr>
+ <td colspan="8" class="<?php echo flip_class(); ?>"><input height="15" type="submit" value="Disable Songs" /></td>
+ </tr>
+ </table>
+ </form>
<?php } else { ?>
<p><?php _('You don\'t have any duplicate songs.'); ?></p>
-<?php } ?>
-</form>
+<?php } // end if ($flags) and else ?>
+
diff --git a/templates/list_flagged.inc b/templates/list_flagged.inc
index 2207c9f0..2605c879 100644
--- a/templates/list_flagged.inc
+++ b/templates/list_flagged.inc
@@ -25,19 +25,19 @@
A template file
*/
+$web_path = conf('web_path');
?>
<p style="font-size: 10pt; font-weight: bold;">View Flagged Songs</p>
-
<p>This is the list of songs that have been flagged by you or other Ampache users. Use
this list to determine what songs you need to re-rip or tags you need to update.</p>
-<?php if ( $flags ) { ?>
-<form name="songs" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
-
-<table class="tabledata" cellspacing="0" cellpadding="0" >
+<?php
+if ($flags) { ?>
+ <form name="songs" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+ <table class="tabledata" cellspacing="0" cellpadding="0" >
<tr class="table-header">
- <td><a href="#" onclick="check_songs(); return false;">Select</a></td>
+ <td><a href="#" onclick="check_songs(); return false;">Select</a></td>
<td><?php echo _("Song"); ?></td>
<td><?php echo _("Flag"); ?></td>
<td><?php echo _("New Flag"); ?>:</td>
@@ -45,48 +45,45 @@ this list to determine what songs you need to re-rip or tags you need to update.
<td><?php echo _("ID3 Update"); ?>:</td>
<td><?php echo _("Comment"); ?>:</td>
</tr>
-<?php
+ <?php
foreach ($flags as $flag) {
$song = new Song($flag['song']);
$song->format_song();
$alt_title = $song->title;
-
$artist = $song->f_artist;
$alt_artist = $song->artist;
-
+
echo "<tr class=\"even\">" .
"<td><input type=\"checkbox\" name=\"song[]\" id=\"flag_".$flag['song']."\" value=\"".$flag['song']."\"></input></td>" .
- "<td><a href=\"".conf('web_path')."/song.php?song=".$flag['song']."\" title=\"$alt_title\">$song->f_title</a> by " .
- "<a href=\"".conf('web_path')."/artist.php?action=show&amp;artist=$song->artist_id\" title=\"$alt_artist\">$artist</a></td>" .
- "<td>".$flag['type']."</td>";
- echo "<td>";
+ "<td><a href=\"".$web_path."/song.php?song=".$flag['song']."\" title=\"$alt_title\">$song->f_title</a> by " .
+ "<a href=\"".$web_path."/artist.php?action=show&amp;artist=$song->artist_id\" title=\"$alt_artist\">$artist</a></td>" .
+ "<td>".$flag['type']."</td><td>";
$onchange = "onchange=\"document.getElementById('flag_".$flag['song']."').checked='checked';\"";
show_flagged_popup($flag['type'],'type',$flag['song']."_newflag", $onchange);
- echo "</td>";
- echo "<td>".$flag['username']."<br />".date('m/d/y',$flag['date'])."</td>";
- if($flag['type'] === 'newid3') {
- echo "<td>";
- echo "<input type=\"radio\" name=\"".$flag['song']."_accept\" value=\"accept\" $onchange />" . _("Accept") . "<br />";
+ echo "</td><td>".$flag['username']."<br />".date('m/d/y',$flag['date'])."</td>";
+ if ($flag['type'] === 'newid3') {
+ echo "<td><input type=\"radio\" name=\"".$flag['song']."_accept\" value=\"accept\" $onchange />" . _("Accept") . "<br />";
echo "<input type=\"radio\" name=\"".$flag['song']."_accept\" value=\"reject\" $onchange />" . _("Reject");
echo "</td>";
}
else {
- echo "<td><a href=\"".conf('web_path')."/admin/song.php?action=edit&amp;song=".$flag['song']."\">edit/view</a></td>";
- }
+ echo "<td><a href=\"".$web_path."/admin/song.php?action=edit&amp;song=".$flag['song']."\">edit/view</a></td>";
+ } //end ($flag['type'] === 'newid3') and else
echo "<td>" . $flag['comment'] . "</td>";
echo "</tr>\n";
- }
-?>
-<tr class="even"><td colspan="7">
- <input type="submit" name="action" value="Update Flags"></input>
- <input type="submit" name="action" value="Edit Selected"></input>
- <input type="submit" name="action" value="Clear Edit List"></input>
- </td></tr>
-</table>
-</form>
+ } //end foreach ($flags as $flag)
+ ?>
+ <tr class="even">
+ <td colspan="7">
+ <input type="submit" name="action" value="Update Flags"></input>
+ <input type="submit" name="action" value="Edit Selected"></input>
+ <input type="submit" name="action" value="Clear Edit List"></input>
+ </td>
+ </tr>
+ </table>
+ </form>
<?php } else { ?>
-
-<p><?php echo ("You don't have any flagged songs"); ?>. </p>
-
+<p><?php echo _("You don't have any flagged songs"); ?></p>
<?php } ?>
+
diff --git a/templates/list_header.inc b/templates/list_header.inc
index 71410eac..488b55f6 100644
--- a/templates/list_header.inc
+++ b/templates/list_header.inc
@@ -31,7 +31,7 @@
if (!$total_items) { $total_items = $_SESSION['view_total_items']; }
// do some math here
-if ( $view->offset >= $view->offset_limit ) {
+if ($view->offset >= $view->offset_limit) {
$offset2 = $view->offset - 25;
}
else {
@@ -43,10 +43,8 @@ else {
$offset1 = $view->offset - $view->offset_limit;
if ($offset1 < 1) { $offset1 = 0; }
-
// since we have an array of objects, let's build a purdy thingie
$pages = ceil($total_items/$view->offset_limit);
-
$offset4 = ($pages - 1);
$offset4 = ($offset4 * $view->offset_limit);
@@ -56,44 +54,39 @@ if ($offset3 >= $offset4) { $offset3 = $offset4; }
//setup the next action
-preg_match("/.*\/(.+\.php)$/",$_SERVER['SCRIPT_NAME'],$matches);
-
+preg_match("/.*\/(.+\.php)$/", $_SERVER['SCRIPT_NAME'], $matches);
$action = "action=" . scrub_in($_REQUEST['action']);
$script = conf('web_path') . "/" . $admin_menu . $matches[1];
// are there enough items to even need this view?
-if ( $pages > 1 && $_SESSION['view_script']) {
+if (($pages > 1) && ($_SESSION['view_script'])) {
?>
-
-<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td align="center" valign="top">
- <a href="<?php echo $script; ?>?<?php echo $action; ?>&amp;offset=<?php echo $offset1; ?>&amp;keep_view=true">[&nbsp;<?php echo _("Prev"); ?>&nbsp;]</a>&nbsp;
+ <a href="<?php echo $script; ?>?<?php echo $action; ?>&amp;offset=<?php echo $offset1; ?>&amp;keep_view=true">[&nbsp;<?php echo _("Prev"); ?>&nbsp;]</a>&nbsp;
</td>
<td align="center">
- <?php
- $counter = 1;
- $offset_pages = 0;
-
- while ( $counter <= $pages ) {
- if ( $view->offset == $offset_pages ) {
- ?>
- <a href="<?php echo $script; ?>?<?php echo $action ; ?>&amp;sort_type=<?php echo $view->sort_type ; ?>&amp;offset=<?php echo $offset_pages ; ?>&amp;keep_view=true"><b><?php echo $counter; ?></b></a>&nbsp;
- <?php
- } else {
- ?>
- <a href="<?php echo $script; ?>?<?php echo $action; ?>&amp;sort_type=<?php echo $view->sort_type; ?>&amp;offset=<?php echo $offset_pages; ?>&amp;keep_view=true"><?php echo $counter; ?></a>&nbsp;
- <?php
- }
- $offset_pages += $view->offset_limit;
- $counter++;
- }
- ?>
+ <?php
+ $counter = 1;
+ $offset_pages = 0;
+ while ($counter <= $pages) {
+ if ($view->offset == $offset_pages) {
+ ?> <a href="<?php echo $script; ?>?<?php echo $action ; ?>&amp;sort_type=<?php echo $view->sort_type ; ?>&amp;offset=<?php echo $offset_pages ; ?>&amp;keep_view=true"><b><?php echo $counter; ?></b></a>&nbsp;
+ <?php
+ } else { ?>
+ <a href="<?php echo $script; ?>?<?php echo $action; ?>&amp;sort_type=<?php echo $view->sort_type; ?>&amp;offset=<?php echo $offset_pages; ?>&amp;keep_view=true"><?php echo $counter; ?></a>&nbsp;
+ <?php
+ } // end if ($view->offset == $offset_pages) and else
+ $offset_pages += $view->offset_limit;
+ $counter++;
+ } // end while ($counter <= $pages) ?>
</td>
<td align="center" valign="top">
<a href="<?php echo $script; ?>?<?php echo $action; ?>&amp;offset=<?php echo $offset3; ?>&amp;keep_view=true">[&nbsp;<?php echo _("Next"); ?>&nbsp;]</a>&nbsp;
</td>
</tr>
-</table>
-
-<?php } // if ?>
+ </table>
+<?php
+} // if (($pages > 1) && ($_SESSION['view_script']))
+?>
diff --git a/templates/menu.inc b/templates/menu.inc
index 4573725c..54e0ba05 100644
--- a/templates/menu.inc
+++ b/templates/menu.inc
@@ -25,65 +25,62 @@
A template file
*/
-
-$items = array(_("Home") => htmlspecialchars(conf('web_path') . "/index.php"));
+$web_path = conf('web_path');
+$items = array(_("Home") => htmlspecialchars($web_path . "/index.php"));
if ($GLOBALS['user']->prefs['play_type'] == 'mpd' && conf('localplay_menu')) {
- $items += array(_("Local Play") => htmlspecialchars(conf('web_path') . "/mpd.php"));
+ $items += array(_("Local Play") => htmlspecialchars($web_path . "/mpd.php"));
}
-$items += array(_("Browse") => htmlspecialchars(conf('web_path') . "/browse.php"),
-// _("Albums") => htmlspecialchars(conf('web_path') . "/albums.php"),
-// _("Artists") => htmlspecialchars(conf('web_path') . "/artists.php"),
- _("Playlists") => htmlspecialchars(conf('web_path') . "/playlist.php"),
- _("Search") => htmlspecialchars(conf('web_path') . "/search.php"),
- _("Preferences") => htmlspecialchars(conf('web_path') . "/preferences.php")
+$items += array(_("Browse") => htmlspecialchars($web_path . "/browse.php"),
+// _("Albums") => htmlspecialchars($web_path . "/albums.php"),
+// _("Artists") => htmlspecialchars($web_path . "/artists.php"),
+ _("Playlists") => htmlspecialchars($web_path . "/playlist.php"),
+ _("Search") => htmlspecialchars($web_path . "/search.php"),
+ _("Preferences") => htmlspecialchars($web_path . "/preferences.php")
);
if ($GLOBALS['user']->prefs['upload']) {
- $items = array_merge($items, array(_("Upload") => conf('web_path') . "/upload.php"));
+ $items = array_merge($items, array(_("Upload") => $web_path . "/upload.php"));
}
-
-
?>
<ul id="mainmenu">
<?php
- foreach ( array_keys($items) as $item ) {
- if ( _($high) == $item ) {
- print("\t\t<li class=\"active\"><a class=\"active\" href=\"$items[$item]\">$item</a></li>\n");
- }
- else {
- print("\t\t<li><a href=\"$items[$item]\">$item</a></li>\n");
- }
- } // end foreach items
-
-
- if (!conf('use_auth') || $GLOBALS['user']->has_access(100) ) {
- if ( $high == 'Admin' ) {
- print("\t\t<li class=\"active\"><a class=\"active\" href=\"" . conf('web_path') . "/admin/\">" . _("Admin") . "</a></li>\n");
- }
- else {
- print("\t\t<li><a href=\"" . conf('web_path') . "/admin/\">" . _("Admin") . "</a></li>\n");
- }
- } // if we aren't using auth or 100
-
- // now do the user specific stuff
- if (conf('use_auth')) {
- if ( $high == 'Stats' || $high == 'Profile' ) {
- print("\t\t<li class=\"active\">".$GLOBALS['user']->username.": <a class=\"active\" href=\"".conf('web_path')."/user.php?action=show_edit_profile\">" . _("Account") . "</a> |".
- " <a class=\"active\" href=\"".conf('web_path')."/stats.php\">" . _("Stats") . "</a> |".
- " <a class=\"active\" href=\"".conf('web_path')."/logout.php\">" . _("Logout") . "</a> </li>\n");
- } // if stats or profile
- else {
- echo "\t\t<li>".$GLOBALS['user']->username.": " .
- "<a href=\"".conf('web_path')."/user.php?action=show_edit_profile\">" . _("Account") . "</a> |".
- " <a href=\"".conf('web_path')."/stats.php\">" . _("Stats") . "</a> |".
- " <a href=\"".conf('web_path')."/logout.php\">" . _("Logout") . "</a> </li>\n";
- } // else
- } // if use_auth
- elseif ( $_SESSION['userdata']['id'] != '-1') {
- print("\t\t<li><a href=\"".conf('web_path')."/logout.php\">" . _("Logout") . "</a> </li>\n");
- } // else no user
+foreach (array_keys($items) as $item) {
+ if (_($high) == $item) {
+ print("\t\t<li class=\"active\"><a class=\"active\" href=\"$items[$item]\">$item</a></li>\n");
+ }
+ else {
+ print("\t\t<li><a href=\"$items[$item]\">$item</a></li>\n");
+ }
+} // end foreach items
+
+if ((!conf('use_auth')) || ($GLOBALS['user']->has_access(100))) {
+ if ($high == 'Admin') {
+ print("\t\t<li class=\"active\"><a class=\"active\" href=\"" . $web_path . "/admin/\">" . _("Admin") . "</a></li>\n");
+ }
+ else {
+ print("\t\t<li><a href=\"" . $web_path . "/admin/\">" . _("Admin") . "</a></li>\n");
+ }
+} // if we aren't using auth or 100
+
+// now do the user specific stuff
+if (conf('use_auth')) {
+ if (($high == 'Stats') || ($high == 'Profile')) {
+ print("\t\t<li class=\"active\">".$GLOBALS['user']->username.": <a class=\"active\" href=\"".$web_path."/user.php?action=show_edit_profile\">" . _("Account") . "</a> |".
+ "<a class=\"active\" href=\"".$web_path."/stats.php\">" . _("Stats") . "</a> |".
+ "<a class=\"active\" href=\"".$web_path."/logout.php\">" . _("Logout") . "</a> </li>\n");
+ } // if stats or profile
+ else {
+ echo "\t\t<li>".$GLOBALS['user']->username.": " .
+ "<a href=\"".$web_path."/user.php?action=show_edit_profile\">" . _("Account") . "</a> |".
+ "<a href=\"".$web_path."/stats.php\">" . _("Stats") . "</a> |".
+ "<a href=\"".$web_path."/logout.php\">" . _("Logout") . "</a> </li>\n";
+ } // else
+} // if use_auth
+elseif ($_SESSION['userdata']['id'] != '-1') {
+ print("\t\t<li><a href=\"".$web_path."/logout.php\">" . _("Logout") . "</a> </li>\n");
+} // else no user
?>
- </ul>
+</ul>
<br />
diff --git a/templates/show_access_list.inc b/templates/show_access_list.inc
index a2aa79d0..25729ded 100644
--- a/templates/show_access_list.inc
+++ b/templates/show_access_list.inc
@@ -29,6 +29,7 @@
*/
$row_classes = array('even','odd');
+$web_path = conf('web_path');
?>
<p class="header1"><?php print _("Host Access to Your Catalog"); ?></p>
@@ -40,34 +41,34 @@ other Ampache servers to connect to it to share catalog information. Use tool b
to add any server's IP address that you want to access your Ampache catalog or be able to
stream from this server.</p>
-<p><a href="<?php print conf('web_path'); ?>/admin/access.php?action=show_add_host"><?php print _("Add Entry"); ?></a></p>
+<p><a href="<?php echo $web_path; ?>/admin/access.php?action=show_add_host"><?php echo _("Add Entry"); ?></a></p>
<table cellspacing="1" cellpadding="3" class="border">
- <tr class="table-header" align="center">
- <td><?php print _("Name"); ?></td>
- <td><?php print _("Start Address"); ?></td>
- <td><?php print _("End Address"); ?></td>
- <td><?php print _("Level"); ?></td>
- <td><?php print _("Action"); ?></td>
- </tr>
+<tr class="table-header" align="center">
+ <td><?php print _("Name"); ?></td>
+ <td><?php print _("Start Address"); ?></td>
+ <td><?php print _("End Address"); ?></td>
+ <td><?php print _("Level"); ?></td>
+ <td><?php print _("Action"); ?></td>
+</tr>
<?php
if (count($list)) {
-/* Start foreach List Item */
-foreach ($list as $access) {
+ /* Start foreach List Item */
+ foreach ($list as $access) {
?>
-<tr class="<?php print $row_classes[0]; ?>">
- <td><?php print scrub_out($access->name); ?></td>
- <td><?php print int2ip($access->start); ?></td>
- <td><?php print int2ip($access->end); ?></td>
- <td><?php print $access->get_level_name(); ?></td>
- <td>
- <a href="<?php echo conf('web_path'); ?>/admin/access.php?action=show_edit_host&amp;access_id=<?php echo scrub_out($access->id); ?>"><?php echo _('Edit'); ?></a>
- |
- <a href="<?php echo conf('web_path'); ?>/admin/access.php?action=show_confirm_delete&amp;access_id=<?php print scrub_out($access->id); ?>"><?php print _("Revoke"); ?></a>
- </td>
-</tr>
-<?php $row_classes = array_reverse($row_classes); ?>
-<?php } // end foreach ?>
+ <tr class="<?php print $row_classes[0]; ?>">
+ <td><?php print scrub_out($access->name); ?></td>
+ <td><?php print int2ip($access->start); ?></td>
+ <td><?php print int2ip($access->end); ?></td>
+ <td><?php print $access->get_level_name(); ?></td>
+ <td>
+ <a href="<?php echo $web_path; ?>/admin/access.php?action=show_edit_host&amp;access_id=<?php echo scrub_out($access->id); ?>"><?php echo _('Edit'); ?></a>
+ |
+ <a href="<?php echo $web_path; ?>/admin/access.php?action=show_confirm_delete&amp;access_id=<?php print scrub_out($access->id); ?>"><?php print _("Revoke"); ?></a>
+ </td>
+ </tr>
+ <?php $row_classes = array_reverse($row_classes); ?>
+ <?php } // end foreach ?>
<?php } // end if count ?>
</table>
diff --git a/templates/show_add_access.inc b/templates/show_add_access.inc
index 4c1888b9..d1bbcdc2 100644
--- a/templates/show_add_access.inc
+++ b/templates/show_add_access.inc
@@ -28,49 +28,47 @@
?>
-<p style="font-size: 10pt; font-weight: bold;"><?php print _("Add Access for a Host"); ?></p>
-
-<p><?php print _("Use the form below to add a host that you want to have access to your Ampache catalog."); ?></p>
+<p style="font-size: 10pt; font-weight: bold;"><?php echo _("Add Access for a Host"); ?></p>
+<p><?php echo _("Use the form below to add a host that you want to have access to your Ampache catalog."); ?></p>
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ?>/admin/access.php">
-
<table cellpadding="5" cellspacing="0" border="0">
- <tr>
- <td><?php print _("Name"); ?>: </td>
- <td>
- <input type="text" name="name" value="<?php echo $_REQUEST['name']; ?>" size="30" />
- </td>
- </tr>
- <tr>
- <td><?php print _("Start IP Address"); ?>:</td>
- <td>
- <input type="text" name="start" value="<?php echo $_REQUEST['start']; ?>" size="20" maxlength="15" />
- </td>
- </tr>
- <tr>
- <td><?php print _("End IP Address"); ?>:</td>
- <td>
- <input type="text" name="end" value="<?php echo $_REQUEST['end']; ?>" size="20" maxlength="15" />
- </td>
- </tr>
- <tr>
- <td><?php print _("Level"); ?>:</td>
- <td>
- <select name="level">
- <option selected="selected" value="5" >Demo</option>
- <option value="25">Stream</option>
- <option value="50">Stream/Download</option>
- <option value="75">XML-RPC</option>
- </select>
- </td>
- </tr>
- <tr>
- <td>&nbsp;</td>
- <td>
- <input type="hidden" name="action" value="add_host" />
- <input type="submit" value="<?php print _("Add Host"); ?>" />
- </td>
- </tr>
+<tr>
+ <td><?php echo _("Name"); ?>: </td>
+ <td>
+ <input type="text" name="name" value="<?php echo $_REQUEST['name']; ?>" size="30" />
+ </td>
+</tr>
+<tr>
+ <td><?php echo _("Start IP Address"); ?>:</td>
+ <td>
+ <input type="text" name="start" value="<?php echo $_REQUEST['start']; ?>" size="20" maxlength="15" />
+ </td>
+</tr>
+<tr>
+ <td><?php echo _("End IP Address"); ?>:</td>
+ <td>
+ <input type="text" name="end" value="<?php echo $_REQUEST['end']; ?>" size="20" maxlength="15" />
+ </td>
+</tr>
+<tr>
+ <td><?php echo _("Level"); ?>:</td>
+ <td>
+ <select name="level">
+ <option selected="selected" value="5" >Demo</option>
+ <option value="25">Stream</option>
+ <option value="50">Stream/Download</option>
+ <option value="75">XML-RPC</option>
+ </select>
+ </td>
+</tr>
+<tr>
+ <td>&nbsp;</td>
+ <td>
+ <input type="hidden" name="action" value="add_host" />
+ <input type="submit" value="<?php echo _("Add Host"); ?>" />
+ </td>
+</tr>
</table>
</form>
diff --git a/templates/show_admin_index.inc b/templates/show_admin_index.inc
index 6bb01272..057aa9c1 100644
--- a/templates/show_admin_index.inc
+++ b/templates/show_admin_index.inc
@@ -23,24 +23,24 @@
@header Show Admin Index
@discussion shows the admin index
*/
-
-$sections = array(_("User Management") => conf('web_path') . "/admin/users.php",
- _("E-mail Management") => conf('web_path') . "/admin/mail.php",
- _("Catalog Managment") => conf('web_path') . "/admin/catalog.php",
- _("Admin Preferences") => conf('web_path') . "/admin/preferences.php",
- _("Access Lists") => conf('web_path') . "/admin/access.php");
+$web_path = conf('web_path');
+$sections = array(_("User Management") => $web_path . "/admin/users.php",
+ _("E-mail Management") => $web_path . "/admin/mail.php",
+ _("Catalog Managment") => $web_path . "/admin/catalog.php",
+ _("Admin Preferences") => $web_path . "/admin/preferences.php",
+ _("Access Lists") => $web_path . "/admin/access.php");
-$common = array(_("Add a catalog") => conf('web_path') . "/admin/catalog.php?action=show_add_catalog",
- _("Add a new user") => conf('web_path') . "/admin/users.php?action=show_add_user",
- _("Clear Now Playing") => conf('web_path') . "/admin/catalog.php?action=clear_now_playing",
- _("Add Access List Entry") => conf('web_path') . "/admin/access.php?action=show_add_host");
+$common = array(_("Add a catalog") => $web_path . "/admin/catalog.php?action=show_add_catalog",
+ _("Add a new user") => $web_path . "/admin/users.php?action=show_add_user",
+ _("Clear Now Playing") => $web_path . "/admin/catalog.php?action=clear_now_playing",
+ _("Add Access List Entry") => $web_path . "/admin/access.php?action=show_add_host");
?>
<table cellpadding="5" border="0" cellspacing="0">
<tr>
- <td valign="top"><?php show_tool_box(_("Common Functions"),$common); ?><?php show_clear(); ?></td>
+ <td valign="top"><?php show_tool_box(_("Common Functions"), $common); ?><?php show_clear(); ?></td>
</tr>
<tr>
- <td valign="top"><?php show_tool_box(_("Admin Sections"),$sections); ?></td>
+ <td valign="top"><?php show_tool_box(_("Admin Sections"), $sections); ?></td>
</tr>
</table>
diff --git a/templates/show_album.inc b/templates/show_album.inc
index 136df4b8..b9a2aa2d 100644
--- a/templates/show_album.inc
+++ b/templates/show_album.inc
@@ -23,7 +23,7 @@
@header Show Album
@discussion shows a single album
*/
-
+$web_path = conf('web_path');
// Build array of the table classes we are using
$row_classes = array('even','odd');
@@ -49,31 +49,29 @@ $username=$user->username;
<td width="140" align="center">
<?php
if ($album_name != "Unknown (Orphaned)") {
- $aa_url = conf('web_path') . "/albumart.php?id=" . $album->id . "&amp;type=popup";
+ $aa_url = $web_path . "/albumart.php?id=" . $album->id . "&amp;type=popup";
echo "<a target=\"_blank\" href=\"$aa_url\" onclick=\"popup_art('$aa_url'); return false;\">";
- echo "<img border=\"0\" src=\"" . conf('web_path') . "/albumart.php?id=" . $album->id . "&amp;thumb=2\" alt=\"Album Art\" height=\"128\" />";
+ echo "<img border=\"0\" src=\"" . $web_path . "/albumart.php?id=" . $album->id . "&amp;thumb=2\" alt=\"Album Art\" height=\"128\" />";
echo "</a>\n";
}
?>
</td>
<td valign="top">
<?php
- if (conf('ratings')) {
- show_rating($album->id,'album');
- } // end if ratings
+ if (conf('ratings')) { show_rating($album->id, 'album');} // end if ratings
echo "<br />\n";
?>
<b>Actions:</b><br />
- &nbsp;&nbsp;<a href="<?php echo conf('web_path'); ; ?>/song.php?action=m3u&amp;album=<?php echo $album->id; ; ?>"><?php echo _("Play Album"); ; ?></a><br />
- &nbsp;&nbsp;<a href="<?php echo conf('web_path'); ; ?>/song.php?action=m3u&amp;album_random=<?php echo $album->id; ; ?>"><?php echo _("Play Random from Album"); ; ?></a><br />
- &nbsp;&nbsp;<a href="<?php echo conf('web_path'); ; ?>/albums.php?action=clear_art&amp;album_id=<?php echo $album->id; ; ?>"><?php echo _("Reset Album Art"); ; ?></a><br />
- &nbsp;&nbsp;<a href="<?php echo conf('web_path'); ; ?>/albums.php?action=find_art&amp;album_id=<?php echo $album->id; ; ?>"><?php echo _("Find Album Art"); ; ?></a><br />
- <?php if ($user->has_access('100') || !conf('use_auth')) { ?>
- &nbsp;&nbsp;<a href="<?php echo conf('web_path'); ; ?>/albums.php?action=update_from_tags&amp;album_id=<?php echo $album->id; ; ?>"><?php echo _("Update from tags"); ; ?></a><br />
+ &nbsp;&nbsp;<a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;album=<?php echo $album->id; ; ?>"><?php echo _("Play Album"); ; ?></a><br />
+ &nbsp;&nbsp;<a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;album_random=<?php echo $album->id; ; ?>"><?php echo _("Play Random from Album"); ; ?></a><br />
+ &nbsp;&nbsp;<a href="<?php echo $web_path; ?>/albums.php?action=clear_art&amp;album_id=<?php echo $album->id; ; ?>"><?php echo _("Reset Album Art"); ; ?></a><br />
+ &nbsp;&nbsp;<a href="<?php echo $web_path; ?>/albums.php?action=find_art&amp;album_id=<?php echo $album->id; ; ?>"><?php echo _("Find Album Art"); ; ?></a><br />
+ <?php if (($user->has_access('100')) || (!conf('use_auth'))) { ?>
+ &nbsp;&nbsp;<a href="<?php echo $web_path; ?>/albums.php?action=update_from_tags&amp;album_id=<?php echo $album->id; ; ?>"><?php echo _("Update from tags"); ?></a><br />
<?php } ?>
- <?php if( batch_ok() ) { ?>
- &nbsp;&nbsp;<a href="<?php echo conf('web_path'); ; ?>/batch.php?action=alb&amp;id=<?php echo $album->id; ; ?>"><?php echo _("Download"); ?></a><br />
- <?php } ?>
+ <?php if (batch_ok()) { ?>
+ &nbsp;&nbsp;<a href="<?php echo $web_path; ?>/batch.php?action=alb&amp;id=<?php echo $album->id; ; ?>"><?php echo _("Download"); ?></a><br />
+ <?php } ?>
</td>
</tr>
</table>
diff --git a/templates/show_album_art.inc.php b/templates/show_album_art.inc.php
index 78ff1fb3..e65339a6 100644
--- a/templates/show_album_art.inc.php
+++ b/templates/show_album_art.inc.php
@@ -23,8 +23,6 @@
// Gotta do some math here!
$total_images = count($images);
$rows = floor($total_images/3);
-
-
$i = 0;
?>
@@ -38,14 +36,14 @@ while ($i <= $rows) {
if (!isset($images[$key])) { echo "<td>&nbsp;</td>\n"; }
else {
?>
- <td align="center">
- <a href="<?php echo $images[$key]['url']; ?>" target="_blank">
- <img src="<?php echo scrub_out($images[$key]['url']); ?>" border="0" height="175" width="175" /><br />
- </a>
- <p align="center">
- [<a href="<?php echo conf('web_path'); ?>/albums.php?action=select_art&amp;image=<?php echo $i; ?>&amp;album_id=<?php echo urlencode($_REQUEST['album_id']); ?>">Select</a>]
- </p>
- </td>
+ <td align="center">
+ <a href="<?php echo $images[$key]['url']; ?>" target="_blank">
+ <img src="<?php echo scrub_out($images[$key]['url']); ?>" border="0" height="175" width="175" /><br />
+ </a>
+ <p align="center">
+ [<a href="<?php echo conf('web_path'); ?>/albums.php?action=select_art&amp;image=<?php echo $i; ?>&amp;album_id=<?php echo urlencode($_REQUEST['album_id']); ?>">Select</a>]
+ </p>
+ </td>
<?php
} // end else
$j++;
diff --git a/templates/show_albums.inc b/templates/show_albums.inc
index 9a259e3d..da6a505c 100644
--- a/templates/show_albums.inc
+++ b/templates/show_albums.inc
@@ -23,7 +23,7 @@
@header Show Albums
@discussion shows a list of albums
*/
-
+$web_path = conf('web_path');
// Build array of the table classes we are using
$total_items = $view->total_items;
?>
@@ -35,45 +35,44 @@ $total_items = $view->total_items;
</tr>
<tr class="table-header">
<td>
- <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.name&amp;sort_order=0"><?php echo _("Album"); ?></a>
+ <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.name&amp;sort_order=0"><?php echo _("Album"); ?></a>
</td>
<td> <?php echo _("Artist"); ?> </td>
<td> <?php echo _("Songs"); ?> </td>
<td>
- <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.year&amp;sort_order=0"><?php echo _("Year"); ?></a>
+ <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.year&amp;sort_order=0"><?php echo _("Year"); ?></a>
</td>
<td> <?php echo _("Action"); ?> </td>
-
</tr>
+
<?php
/* Foreach through the albums */
foreach ($albums as $album) {
?>
-<tr class="<?php echo flip_class(); ?>">
- <td><?php echo $album->f_name; ?></td>
- <td><?php echo $album->f_artist; ?></td>
- <td><?php echo $album->songs; ?></td>
- <td><?php echo $album->year; ?></td>
- <td nowrap="nowrap"> <?php echo _("Play"); ?> :
- <a href="<?php echo conf('web_path'); ?>/song.php?action=m3u&amp;album=<?php echo $album->id; ?>"><?php echo _("All"); ?></a> |
- <a href="<?php echo conf('web_path'); ?>/song.php?action=m3u&amp;album_random=<?php echo $album->id; ?>"><?php echo _("Random"); ?></a>
- <?php if( batch_ok() ) { ?>
- | <a href="<?php echo conf('web_path'); ?>/batch.php?action=alb&amp;id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a>
- <?php } ?>
- </td>
-</tr>
-<?php } ?>
+ <tr class="<?php echo flip_class(); ?>">
+ <td><?php echo $album->f_name; ?></td>
+ <td><?php echo $album->f_artist; ?></td>
+ <td><?php echo $album->songs; ?></td>
+ <td><?php echo $album->year; ?></td>
+ <td nowrap="nowrap"> <?php echo _("Play"); ?> :
+ <a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;album=<?php echo $album->id; ?>"><?php echo _("All"); ?></a> |
+ <a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;album_random=<?php echo $album->id; ?>"><?php echo _("Random"); ?></a>
+ <?php if (batch_ok()) { ?>
+ | <a href="<?php echo $web_path; ?>/batch.php?action=alb&amp;id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a>
+ <?php } ?>
+ </td>
+ </tr>
+<?php } //end foreach ($albums as $album) ?>
<tr class="table-header">
- <td>
- <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.name&amp;sort_order=0"><?php echo _("Album"); ?></a>
- </td>
- <td> <?php echo _("Artist"); ?> </td>
- <td> <?php echo _("Songs"); ?> </td>
<td>
- <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.year&amp;sort_order=0"><?php echo _("Year"); ?></a>
+ <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.name&amp;sort_order=0"><?php echo _("Album"); ?></a>
+ </td>
+ <td> <?php echo _("Artist"); ?> </td>
+ <td> <?php echo _("Songs"); ?> </td>
+ <td>
+ <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.year&amp;sort_order=0"><?php echo _("Year"); ?></a>
</td>
<td> <?php echo _("Action"); ?> </td>
-
</tr>
<tr class="even" align="center">
<td colspan="5">
diff --git a/templates/show_artist.inc b/templates/show_artist.inc
index a71ddaca..ac72703f 100644
--- a/templates/show_artist.inc
+++ b/templates/show_artist.inc
@@ -21,7 +21,7 @@
*/
//FIXME: I don't like having to re-create this friggin object.. :(
-global $user;
+global $user;
$artist_id = $artist->id;
$web_path = conf('web_path');
?>
@@ -31,53 +31,49 @@ $web_path = conf('web_path');
<br />
<form name="songs" method="post" enctype="multipart/form-data" action="artists.php">
<table class="border" cellspacing="0" cellpadding="0" border="0">
- <tr class="table-header">
- <th align="center">
+<tr class="table-header">
+ <th align="center">
&nbsp;&nbsp;<a href="#" onclick="check_songs(); return false;"><?php echo _("Select"); ?></a>
</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>
-
+ <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
- foreach ($albums as $album) {
- $id = $album->id;
- $album_name = $album->name;
- $count = $album->songs;
+foreach ($albums as $album) {
+ $id = $album->id;
+ $album_name = $album->name;
+ $count = $album->songs;
?>
-
- <tr class="<?php echo flip_class(); ?>">
- <td align="center">
- <input name="song[]" value="<?php print $id; ?>" type="checkbox" />
- </td>
- <td height="87">
- <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&amp;thumb=1" title="<?php print scrub_out($album_name); ?>" height="75" width="75" />
- </a>
- </td>
- <td>
- <a href="<?php echo $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&amp;album=<?php print $id; ?>"><?php print _("Play"); ?></a>
- <?php if( batch_ok() ) { ?>
- | <a href="<?php echo conf('web_path'); ?>/batch.php?action=alb&amp;id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a>
- <?php } ?>
- </td>
-
-
- </tr>
-<?php } ?>
+ <tr class="<?php echo flip_class(); ?>">
+ <td align="center">
+ <input name="song[]" value="<?php echo $id; ?>" type="checkbox" />
+ </td>
+ <td height="87">
+ <a href="<?php echo $web_path; ?>/albums.php?album=<?php echo $id; ?>&amp;artist=<?php echo $artist->id; ?>">
+ <img border="0" src="<?php echo $web_path; ?>/albumart.php?id=<?php echo $id; ?>&amp;fast=1&amp;thumb=1" title="<?php echo scrub_out($album_name); ?>" height="75" width="75" />
+ </a>
+ </td>
+ <td>
+ <a href="<?php echo $web_path; ?>/albums.php?album=<?php echo $id; ?>&amp;artist=<?php echo $artist->id; ?>"><?php echo $album_name; ?></a>
+ </td>
+ <td><?php echo $album->year; ?></td>
+ <td><?php echo $count; ?></td>
+ <td>
+ <a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;album=<?php echo $id; ?>"><?php echo _("Play"); ?></a>
+ <?php if (batch_ok()) { ?>
+ | <a href="<?php echo $web_path; ?>/batch.php?action=alb&amp;id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a>
+ <?php } ?>
+ </td>
+ </tr>
+<?php } //end foreach ($albums as $album)?>
</table>
- <br /><br />
-
+<br /><br />
+
<?php show_play_selected(); ?>
<input type="hidden" name="type" value="album" />
-<input type="hidden" name="artist_id" value="<?php print $artist_id; ?>" />
+<input type="hidden" name="artist_id" value="<?php echo $artist_id; ?>" />
</form>
diff --git a/templates/show_artist_box.inc.php b/templates/show_artist_box.inc.php
index 83908e94..75026d7e 100644
--- a/templates/show_artist_box.inc.php
+++ b/templates/show_artist_box.inc.php
@@ -19,26 +19,22 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+$web_path = conf('web_path');
?>
<table class="text-box">
<tr>
- <td>
- <span class="header1"><?php print _("Albums by") . " " . $artist->full_name; ?></span>
- <ul>
- <?php
- if (conf('ratings')) {
- show_rating($artist->id,'artist');
- } // end if ratings
- echo "<br />\n";
- ?>
- <li><a href="<?php print $web_path; ?>/artists.php?action=show_all_songs&amp;artist=<?php print $artist_id; ?>"><?php print _("Show All Songs By") . " " . $artist->full_name; ?></a></li>
- <li><a href="<?php print $web_path; ?>/song.php?action=m3u&amp;artist=<?php print $artist_id; ?>"><?php print _("Play All Songs By") . " " . $artist->full_name; ?></a></li>
- <li><a href="<?php print $web_path; ?>/song.php?action=m3u&amp;artist_random=<?php print $artist_id; ?>"><?php print _("Play Random Songs By") . " " . $artist->full_name; ?></a></li>
- <?php if ($user->has_access('100')) { ?>
- <li><a href="<?php echo $web_path; ?>/artists.php?action=update_from_tags&amp;artist=<?php print $artist_id; ?>"><?php print _("Update from tags"); ?></a></li>
- <li><a href="<?php echo $web_path; ?>/artists.php?action=show_rename&amp;artist=<?php echo $artist_id; ?>"><?php echo _("Rename Artist"); ?></a></li>
- <?php } ?>
- </ul>
- </td>
+ <td>
+ <span class="header1"><?php echo _("Albums by") . " " . $artist->full_name; ?></span>
+ <br /><?php if (conf('ratings')) { show_rating($artist->id, 'artist'); } // end if ratings ?><br />
+ <ul>
+ <li><a href="<?php echo $web_path; ?>/artists.php?action=show_all_songs&amp;artist=<?php echo $artist_id; ?>"><?php echo _("Show All Songs By") . " " . $artist->full_name; ?></a></li>
+ <li><a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;artist=<?php echo $artist_id; ?>"><?php echo _("Play All Songs By") . " " . $artist->full_name; ?></a></li>
+ <li><a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;artist_random=<?php echo $artist_id; ?>"><?php echo _("Play Random Songs By") . " " . $artist->full_name; ?></a></li>
+ <?php if ($user->has_access('100')) { ?>
+ <li><a href="<?php echo $web_path; ?>/artists.php?action=update_from_tags&amp;artist=<?php echo $artist_id; ?>"><?php echo _("Update from tags"); ?></a></li>
+ <li><a href="<?php echo $web_path; ?>/artists.php?action=show_rename&amp;artist=<?php echo $artist_id; ?>"><?php echo _("Rename Artist"); ?></a></li>
+ <?php } ?>
+ </ul>
+ </td>
</tr>
</table>
diff --git a/templates/show_artists.inc b/templates/show_artists.inc
index c3c6149f..19c174d1 100644
--- a/templates/show_artists.inc
+++ b/templates/show_artists.inc
@@ -24,7 +24,7 @@
Shows multiple artists.... takes an array of artist objects
*/
-
+$web_path = conf('web_path');
// Build array of the table classes we are using
$total_items = $view->total_items;
?>
@@ -36,35 +36,33 @@ $total_items = $view->total_items;
</tr>
<tr class="table-header">
<td>
- <a href="<?php print conf('web_path'); ?>/<?php print $_SESSION['view_script']; ?>?action=<?php print $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=artist.name&amp;sort_order=0"> <?php print _("Artist"); ?> </a>
+ <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=artist.name&amp;sort_order=0"> <?php echo _("Artist"); ?> </a>
</td>
- <td> <?php print _("Songs"); ?> </td>
- <td> <?php print _("Albums"); ?> </td>
- <td> <?php print _("Action"); ?> </td>
+ <td> <?php echo _("Songs"); ?> </td>
+ <td> <?php echo _("Albums"); ?> </td>
+ <td> <?php echo _("Action"); ?> </td>
</tr>
<?php
/* Foreach through every artist that has been passed to us */
//FIXME: These should come in as objects...
-foreach ($artists as $artist) {
-?>
-<tr class="<?php echo flip_class(); ?>">
- <td><?php print $artist['name']; ?></td>
- <td><?php print $artist['songs']; ?></td>
- <td><?php print $artist['albums']; ?></td>
- <td nowrap="nowrap"> <?php print _("Play"); ?> :
- <a href="<?php print conf('web_path'); ?>/song.php?action=m3u&amp;artist=<?php print $artist['id']; ?>"><?php print _("All"); ?></a> |
- <a href="<?php print conf('web_path'); ?>/song.php?action=m3u&amp;artist_random=<?php print $artist['id']; ?>"><?php print _("Random"); ?></a>
- </td>
-</tr>
-<?php } ?>
+foreach ($artists as $artist) { ?>
+ <tr class="<?php echo flip_class(); ?>">
+ <td><?php echo $artist['name']; ?></td>
+ <td><?php echo $artist['songs']; ?></td>
+ <td><?php echo $artist['albums']; ?></td>
+ <td nowrap="nowrap"> <?php echo _("Play"); ?> :
+ <a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;artist=<?php echo $artist['id']; ?>"><?php echo _("All"); ?></a> |
+ <a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;artist_random=<?php echo $artist['id']; ?>"><?php echo _("Random"); ?></a>
+ </td>
+ </tr>
+<?php } //end foreach ($artists as $artist) ?>
<tr class="table-header">
<td>
- <a href="<?php print conf('web_path'); ?>/<?php print $_SESSION['view_script']; ?>?action=<?php print $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=artist.name&amp;sort_order=0"> <?php print _("Artist"); ?> </a>
+ <a href="<?php echo $web_path; ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=artist.name&amp;sort_order=0"> <?php echo _("Artist"); ?> </a>
</td>
- <td> <?php print _("Songs"); ?> </td>
- <td> <?php print _("Albums"); ?> </td>
-
- <td> <?php print _("Action"); ?> </td>
+ <td><?php echo _("Songs"); ?></td>
+ <td><?php echo _("Albums"); ?></td>
+ <td><?php echo _("Action"); ?></td>
</tr>
<tr class="even" align="center">
diff --git a/templates/show_mpdpl.inc b/templates/show_mpdpl.inc
index 199e425f..0e5561ee 100644
--- a/templates/show_mpdpl.inc
+++ b/templates/show_mpdpl.inc
@@ -58,7 +58,7 @@ $myMpd = init_mpd();
<td <?php echo $nopad ?>>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr class="table-header">
- <th><a href="#" onclick="check_songs(); return false;">Select</a>/<br><a href="#" onclick="invert_songs(); return false;">Invert</a></th>
+ <th><a href="#" onclick="check_songs(); return false;">Select</a>/<br /><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>