summaryrefslogtreecommitdiffstats
path: root/templates/list_duplicates.inc
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-09 16:34:40 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-09 16:34:40 +0000
commitbcad40a05ab2dc2a341a3227e30b96668bce4500 (patch)
tree6fca27588d53a1b24705bd2834e9e643bb729bd1 /templates/list_duplicates.inc
downloadampache-bcad40a05ab2dc2a341a3227e30b96668bce4500.tar.gz
ampache-bcad40a05ab2dc2a341a3227e30b96668bce4500.tar.bz2
ampache-bcad40a05ab2dc2a341a3227e30b96668bce4500.zip
New Import
Diffstat (limited to 'templates/list_duplicates.inc')
-rw-r--r--templates/list_duplicates.inc87
1 files changed, 87 insertions, 0 deletions
diff --git a/templates/list_duplicates.inc b/templates/list_duplicates.inc
new file mode 100644
index 00000000..ec1a8632
--- /dev/null
+++ b/templates/list_duplicates.inc
@@ -0,0 +1,87 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 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
+ A template file for listing duplicate songs
+
+*/
+?>
+
+<?php show_duplicate_searchbox($search_type) ?>
+<?php if ( $flags ) { ?>
+</form>
+<form method="post" enctype="multipart/form-data" action="<?php echo conf('web_path') . "/admin/song.php?action=disable"; ?>">
+<p style="font-size: 10pt; font-weight: bold;">Duplicate Songs</p>
+<table class="tabledata" cellspacing="0" cellpadding="0" border="1">
+ <tr class="table-header">
+ <td>Disable</td>
+ <td>Song</td>
+ <td>Artist</td>
+ <td>Album</td>
+ <td>Length</td>
+ <td>Bitrate</td>
+ <td>Size</td>
+ <td>Filename</td>
+ </tr>
+<?php
+ $class="odd";
+ foreach ($flags as $flag) {
+ $song = new Song($flag['song']);
+ $song->format_song();
+ $class = (++$i%2)?'odd':'even';
+ $alt_title = $song->title;
+ $formated_title = $song->f_title;
+
+ $artist = $song->f_artist;
+ $alt_artist = $song->f_full_artist;
+
+ $dinfolist = get_duplicate_info($song,$search_type);
+ foreach ($dinfolist as $dinfo)
+ {
+ echo "<tr class=\"".$class."\">".
+ "<td><input type=\"checkbox\" name=\"song_ids[]\" value=\"" . $dinfo['songid'] . "\">".
+ "<td><a href=\"".conf('web_path')."/song.php?action=m3u&song=$song->id\">$formated_title</td>".
+ "<td><a href=\"".conf('web_path')."/artists.php?action=show&amp;artist=".$dinfo['artistid']."\" title=\"".$dinfo['artist']."\">".$dinfo['artist']."</a> </td>".
+ "<td><a href=\"".conf('web_path')."/albums.php?action=show&amp;album=".$dinfo['albumid']."\" title=\"".$dinfo['album']."\">".$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 $class; ?>"><input height="15px" type="submit" value="Disable Songs" /></td>
+</tr>
+</table>
+<?php } else { ?>
+
+<p> You don't have any duplicate songs. </p>
+
+<?php } ?>
+