version 1.2, 2006/08/12 01:14:53 |
version 1.4, 2007/02/08 23:03:15 |
|
|
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
# $RedRiver$ |
# $RedRiver: search.pl,v 1.3 2007/02/08 20:04:03 andrew Exp $ |
######################################################################## |
######################################################################## |
# Search.pl *** Searches the full list of songs and finds matches. |
# Search.pl *** Searches the full list of songs and finds matches. |
# |
# |
|
|
#use MP3::Info; |
#use MP3::Info; |
#my qw/ $list @playlist $maplay $filename $basedir $htmldir /; |
#my qw/ $list @playlist $maplay $filename $basedir $htmldir /; |
|
|
my $listfile = 'fulllist.lst'; |
|
|
|
my $list = '/var/www/mp3/playlist/' . $listfile; |
|
|
|
my $exe = 'addmp3playlist.pl'; |
my $exe = 'addmp3playlist.pl'; |
my $Add_Search = 'addsearch.pl'; |
my $Add_Search = 'addsearch.pl'; |
|
|
####################################################################### |
####################################################################### |
# *** MAIN *** |
# *** MAIN *** |
####################################################################### |
####################################################################### |
|
my ($prefix) = split /\&/, $ENV{'QUERY_STRING'}; |
|
if ($prefix) { |
|
$prefix =~ s/%(..)/pack("c",hex($1))/ge; |
|
} else { |
|
$prefix =''; |
|
} |
|
|
|
my $listfile = 'fulllist.lst'; |
|
my $list = '/var/www/mp3/playlist/' . $listfile; |
|
|
print "Content-Type: text/html\n\n"; |
print "Content-Type: text/html\n\n"; |
print "\n\n<html>\n<head>\n\t<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'> <title>MP3 Search</title>\n"; |
print "\n\n<html>\n<head>\n\t<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'> <title>MP3 Search</title>\n"; |
|
|
print $Query->hidden($key, $Query->param($key)); |
print $Query->hidden($key, $Query->param($key)); |
} |
} |
|
|
print $Query->submit(-name=>'Submit', |
print $Query->submit(-name=>'Submit', -value=>'Play All'); |
-value=>'Add All'), |
|
$Query->end_form, "\n";; |
|
|
|
|
print $Query->submit(-name=>'Submit', -value=>'Approve All') if $prefix; |
|
|
|
print $Query->end_form, "\n";; |
|
|
#List_Recipes(%recipes); |
#List_Recipes(%recipes); |
|
|
|
|
|
|
my $counter; |
my $counter; |
|
|
foreach my $filename (@playlist) { |
foreach my $filename (@playlist) { |
print "\t<li><a href=\"$exe\?" . EncodeURL($filename) . "\" target=\"bottom\">$filename</a></li>\n"; |
print "\t<li><a href=\"$exe\?" . EncodeURL($prefix) . '&' . EncodeURL($filename) . "\" target=\"bottom\">$filename</a>"; |
|
print " - <a href=\"$exe\?" . EncodeURL($prefix) . '&' . EncodeURL($filename) . '&' . EncodeURL('fulllist.lst') . "\" target=\"bottom\">Approve</a>"; |
|
print "</li>\n"; |
$counter++; |
$counter++; |
} |
} |
print "<H3>Total displayed: $counter</h3>\n"; |
print "<H3>Total displayed: $counter</h3>\n"; |