summaryrefslogtreecommitdiffstats
path: root/templates/list_duplicates.inc
blob: 8bf052dc28c1731346e13e3437317c71746a0b2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/*

 Copyright (c) 2001 - 2006 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.

*/
?>

<?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" >
	<tr class="table-header">
		<td><?php echo _('Disable'); ?></td>
		<td><?php echo _('Song'); ?></td>
		<td><?php echo _('Artist'); ?></td>
		<td><?php echo _('Album'); ?></td>
		<td><?php echo _('Length'); ?></td>
		<td><?php echo _('Bitrate'); ?></td>
		<td><?php echo _('Size'); ?></td>
		<td><?php echo _('Filename'); ?></td>
	</tr>
<?php 
	foreach ($flags as $flag) {
		$song = new Song($flag['song']);
		$song->format_song();
		$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=\"".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>
<?php  } else { ?>
<p><?php _('You don't have any duplicate songs.'); ?></p>
<?php  } ?>
</form>