=================================================================== RCS file: /cvs/mp3/bin/addsearch.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mp3/bin/addsearch.pl 2007/02/08 20:04:03 1.3 +++ mp3/bin/addsearch.pl 2007/02/08 23:03:15 1.4 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# $RedRiver: addsearch.pl,v 1.2 2006/08/12 00:14:53 andrew Exp $ +# $RedRiver: addsearch.pl,v 1.3 2007/02/08 20:04:03 andrew Exp $ ######################################################################## # Search.pl *** Searches the full list of songs and finds matches. # @@ -27,10 +27,6 @@ $prefix =''; } -my $listfile = $prefix . 'fulllist.lst'; -my $list = '/var/www/mp3/playlist/' . $listfile; -my $playlist = '/var/www/mp3/playlist/' . $prefix . 'playlist.lst'; - print "Content-Type: text/html\n\n"; print "\n\n\n\n\t MP3 Search\n"; #print "\n"; @@ -52,9 +48,17 @@ my @Fields_To_Search = $Query->param('Fields'); @Fields_To_Search = ('Artist', 'Album', 'Song') unless @Fields_To_Search; +my $listfile = $prefix . 'fulllist.lst'; +my $list = '/var/www/mp3/playlist/' . $listfile; +my $playlist = '/var/www/mp3/playlist/' . $prefix . 'playlist.lst'; +if ($prefix && $Query->param('Submit') eq 'Approve All') { + $playlist = '/var/www/mp3/playlist/' . $prefix . 'fulllist.lst'; +} + #print $Query->header; #print "Search_Term: $Search_Term
\n"; + print $Query->start_form(-action=>$Search); # $Query->hidden('Fields', \@Fields_To_Search);