summaryrefslogtreecommitdiffstats
path: root/templates/list_duplicates.inc
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/list_duplicates.inc
parent883cd9e478cf740f7b6bdd5fa089c4eefda97b7a (diff)
downloadampache-67d76f09c28d0c6abae6d966f4cc00a5428bdc74.tar.gz
ampache-67d76f09c28d0c6abae6d966f4cc00a5428bdc74.tar.bz2
ampache-67d76f09c28d0c6abae6d966f4cc00a5428bdc74.zip
Code clean up
Diffstat (limited to 'templates/list_duplicates.inc')
-rw-r--r--templates/list_duplicates.inc66
1 files changed, 31 insertions, 35 deletions
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 ?>
+