blob: d48f5bf7c96885865b009b857149e1786c000698 (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
<?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 v2
as published by the Free Software Foundation.
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.
*/
$web_path = conf('web_path');
?>
<?php show_box_top(_('Similar Artists')); ?>
<form name="artists" method="post" enctype="multipart/form-data" action="<?php echo $web_path; ?>/artists.php?action=rename_similar&artist=<?php echo $artist_id;?>" style="Display:inline;">
<h3><?php _('Please check the artists you want to merge with the current one'); ?> (<span style='text-decoration: underline;'><?php echo $artist_name;?></span>)</h3>
<table class="tabledata" cellspacing="0" cellpadding="0" border="0">
<tr class="table-header">
<th> Select</th>
<th><?php echo _("Artist"); ?></th>
</tr>
<?php
if (count($similar_artists) > 0) {
$show = true;
foreach ($similar_artists as $artist_array) {
?>
<tr class="<?php echo flip_class(); ?>">
<td align="center">
<input type="checkbox" name="artists[]" value="<?php echo $artist_array[0]; ?>" />
</td>
<td>
<a href="<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $artist_array[0]; ?>" title="<?php echo htmlspecialchars($artist_array[1]); ?>" <?php echo $text_class; ?>><?php echo htmlspecialchars($artist_array[1]); ?></a>
</td>
</tr>
<?php
}// foreach loop
} else { // no similar artists
$show = false;
?>
<tr class="<?php echo flip_class(); ?>">
<td align="center">
</td>
<td>
No Similar Artists found
</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td align="center">
</td>
<td>
<input class="button" type="button" name="action" value="<?php echo _("Back"); ?>" onclick="window.location.href = '<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $artist_id;?>';" />
</td>
</tr>
<?php
}
?>
<?php
if ($show) {
?>
<tr align="left" class="<?php echo flip_class(); ?>">
<td colspan='2'>
<input class="button" type="button" name="action" value="<?php echo _("Rename selected"); ?>" onclick="document.artists.submit();" />
<input class="button" type="button" name="action" value="<?php echo _("Cancel"); ?>" onclick="window.location.href = '<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $artist_id;?>';" />
</td>
</tr>
<?php
}
?>
</table>
</form>
<?php show_box_bottom(); ?>
<?php show_box_top(_('Advanced Options')); ?>
<form name='advanced' action='<?php echo $web_path; ?>/artists.php?action=show_similar&artist=<?php echo $artist_id; ?>' method='POST'>
<table class="border" cellspacing="0" cellpadding="0" border="0" style='margin-left: 10px; margin-top: 20px;'>
<!--Advanced-->
<tr class="<?php echo flip_class(); ?>">
<th colspan='2' style='text-align: left;'>Normalize options</th>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td colspan='2'>
<label for='n_rep_uml' style='display: inline;'>Replace �mlauts and �ccents with normal letters</label>
<input type='checkbox' name='n_rep_uml' id='n_rep_uml' value='yes' style='display: inline;' <?php echo (is_null($_POST['n_rep_uml']) || make_bool($_POST['n_rep_uml']) ? "checked='checked'" : ''); ?>/>
<br/>
<label for='n_filter' style='display: inline;'>filter out (regexp)</label>
<input type='text' name='n_filter' id='n_filter' value='<?php echo (is_null($_POST['n_filter']) ? "/[^a-z ]/" : $_POST['n_filter']); ?>' style='display: inline;'/>
<a href='javascript:default_filter();'>default</a>
<br/>
<label for='n_ignore' style='display: inline;'>ignore (regexp)</label>
<input type='text' name='n_ignore' id='n_ignore' value='<?php echo (is_null($_POST['n_ignore']) ? "/\s(the|an?)\s/" : $_POST['n_ignore']); ?>' style='display: inline;'/>
<a href='javascript:default_ignore();'>default</a>
<br/>
</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<th colspan='2' style='text-align: left;'>Compare options</th>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td>
<label for='c_mode' style='display: inline;'>Line mode</label>
<input type='radio' name='c_mode' id='c_mode' value='line' style='display: inline;' <?php echo (is_null($_POST['c_mode']) || $_POST['c_mode'] == "line" ? "checked='checked'" : ''); ?> />
</td>
<td>
<No Options>
</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td>
<label for='c_mode' style='display: inline;'>Word mode</label>
<input type='radio' name='c_mode' id='c_mode' value='word' style='display: inline;' <?php echo (is_null($_POST['c_mode']) || $_POST['c_mode'] == "word" ? "checked='checked'" : ''); ?> />
</td>
<td>
<label for='c_count_w' style='display: inline;'># words to match (0=disable)</label>
<input type='text' name='c_count_w' id='c_count_w' value='<?php echo (is_null($_POST['c_count_w']) ? "0" : $_POST['c_count_w']); ?>' style='display: inline;' size='2'/>
<br/>OR<br/>
<label for='c_percent_w' style='display: inline;'>% words to match (0=disable)</label>
<input type='text' name='c_percent_w' id='c_percent_w' value='<?php echo (is_null($_POST['c_percent_w']) ? "50" : $_POST['c_percent_w']); ?>' style='display: inline;' size='4'/>%
<br/>
</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td>
<label for='c_mode' style='display: inline;'>Letter mode</label>
<input type='radio' name='c_mode' id='c_mode' value='letter' style='display: inline;' <?php echo ($_POST['c_mode'] == "letter" ? "checked='checked'" : ''); ?> />
</td>
<td>
<label for='c_distance_l' style='display: inline;'>Max (levenshtein) difference, the larger the looser</label>
<input type='text' name='c_distance_l' id='c_distance_l' value='<?php echo (is_null($_POST['c_distance_l']) ? "2" : $_POST['c_distance_l']); ?>' style='display: inline;' size='2'/>
</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td colspan='2'>
<input class="button" type="button" name="action" value="<?php echo _("Search Again"); ?>" onclick="document.advanced.submit();" />
</td>
</tr>
</table>
</form>
<?php show_box_bottom(); ?>
<script language='javascript'>
function default_filter() {
document.getElementById('n_filter').value = "/[^a-z ]/";
}
function default_ignore() {
document.getElementById('n_ignore').value = "/\s(the|an?)\s/";
}
</script>
|