#!/usr/local/bin/perl
require "/home/roger/lib/weblib.lib";
require "/home/todd/toddweb.env";
$MP3DIR="/home/todd/public_html/sounds/mp3";
$MP3URL="/todd/deliver/sounds/mp3";
$RADIR="/home/todd/public_html/sounds/ra";
$RAURL="/todd/deliver/stream/sounds/ra";
$DQYDJII="/home/todd/DQYDJII";
$DQYDJIIDIR="/home/todd/public_html/DQYDJII";
$DQYDJIIURL="/~todd/DQYDJII";
chop(@songinfo=<DATA>);
if($sid=substr($ENV{PATH_INFO},1)){
	foreach(@songinfo){
		($song,$artist,$songid,$digital,$email)=split(/\t/);
		next unless $sid eq $songid;
		$artistsave=$artist;
		$rapresent=-s "$RADIR/$songid.rm";
		$mp3present=-s "$MP3DIR/$songid.mp3";
		last unless (-f "$DQYDJII/$songid") || $rapresent || $mp3present;
		&htmlopen("Reflections of \"$song\"|");
		if(substr($artist,-1,1) eq "s"){$artist.="'";}
		else{$artist.="'s";}
		print qq{<img src="/~todd/pictures/DQYDJII.jpg"}.
			qq{ width=75 height=98 align=right>\n};
		print "<h1>$artist Reflections on<br>\"$song\"</h1>\n";
		if(-f "$DQYDJII/$songid"){
			open(FILE,"$DQYDJII/$songid");
			print <FILE>;
			close FILE;
			print "<hr>\n";
		}
		else{
			print "$artistsave has yet to reflect...\n";
		}
		$ra=$mp3="";
		$rapresent=-s "$RADIR/$songid.rm";
		$mp3present=-s "$MP3DIR/$songid.mp3";
		if($rapresent){
			$rapresent=sprintf("%.1f",$rapresent/1024);
			$ra="<tr><td valign=top>".
				"<a href=$RAURL/$songid.rm>Real Audio stream</a>".
				" (<font size=-2>$rapresent KB</font>)</td></tr>\n";
		}
		if($mp3present){
			$mp3present=sprintf("%.1f",$mp3present/1024);
			$mp3="<tr><td valign=top>".
			"<a href=$MP3URL/$songid.mp3>MPEG Layer III</a>".
			" (<font size=-2>$mp3present KB</font>)</td></tr>\n";
		}
		print "<br clear=right><table>$ra$mp3\n";
		print "<tr><th>Song not yet available (Soon though!)</th></tr>" unless $mp3||$ra;
		print "</table>\n<p><a href=$weblib::URL>Return to DQYDJ TR-iBute II</a>\n";
		print $PAGETAIL;
		&htmlclose;
		exit;
	}
}
&htmlopen("Don't Quit Your Day Job TRi-Bute II|");
print <<EOF;
<center><h2>Don't Quit Your Day Job TRi-Bute II</h2></center>
In December 1998, the followup to 
<a href=http://www.geocities.com/SouthBeach/Lagoon/4029/tribute.html>DQYDJ
TR-iBute</a> was released. Included were 
19 performances by Todd Rundgren fans, primarily members of the
<a href="http://www.rocemabra.com/todd/join-awizard.pl">awizard\@rocemabra.com</a>
mailing list. The project was coordinated by Liz Wilkinson, who also contributed
the artwork and a selection of her own.
<p>Here you may hear complete full-fidelity versions of the songs that appear
on the tape in Real Audio and MPEG formats. Just click on the name of the song.
Songs marked with a "*" are from the original digital source and sound
even better than the versions on the tape!<P>
Where available, song links also present the artist's
reflections upon recording it. You may also send comments to the artists by
clicking on their name.
<p>
<center>
<table border="0">
<tr> 
<th width="30%">Side One</th>
<td rowspan="2" width="40%" align="center" valign="top">
<img src="/~todd/pictures/DQYDJII.jpg" width="301" height="392"><p>
<table>
<tr><td><a href=http://www.real.com/>
<img src=http://images.real.com/pics/general/rnsite_logo.gif
 width=30 height=27></a>
</td>
<td><a href=http://www.real.com/>Real Audio Info and software</a></td></tr>
<tr><td><a href=http://www.mpeg.org/MPEG/>
<img src=http://www.mpeg.org/~tristan/MPEG/images/mpeg.org.gif
 width=115 height=18></a></td>
<td><a href=http://www.mpeg.org/MPEG/>MPEG Info and software</a></td></tr>
</table>
</td>
<th width="30%">Side Two</th>
</tr>
<tr>
EOF
foreach $side(1,2){
	print "<td valign=top><table border=0 cellpadding=0 cellspacing=0>\n";
	print "<tr><td><hr width=90%></td></tr>\n";
	while($_=shift @songinfo){
		last if /^EOF$/;
		($song,$artist,$filestub,$digital,$email)=split(/\t/);
		$digital="* " if $digital;
		if(-f "$DQYDJII/$filestub" || -f "$MP3DIR/$filestub.mp3" || -f "$RADIR/$filestub.rm"){
			$song="<a href=$weblib::URL/$filestub>$song</a>";
		}
		$artist="<a href=mailto:$email>$artist</a>" if $email;
		print "<tr><td valign=top><b>$digital$song</b></td></tr>\n";
		print "<tr><td valign=top>$artist</td></tr>\n";
		print "<tr><td><hr width=90%></td></tr>\n";
	}
	print "</table></td>\n";
}
print <<EOF;
</tr></table>
</center>
$PAGETAIL
EOF
&htmlclose;
__END__
Honest Work	Jean Regan	HonestWork-jr
Black Maria	Robert Henry, Family and Friends	BlackMaria-rh		rh1@worldnet.att.net
Gonna Cry Today	Lin Sprague	GonnaCry-ls	1	lsprague@channel1.com
It's Not That Easy	Jackie Rae	NotThatEasy-jr		wolfgirl@sound.net
Can We Still Be Friends?	Liz Wilkinson	StillFriends-lw	1	lys@flash.net
Sidewalk Cafe	Ron Napoli	SidewalkCafe-rn
Useless Begging	Melissa Braeger	UselessBegging-mb		onionhead1@webtv.net
I Saw The Light	Jay Hallett	SawLight-jh		Jeanjay@aol.com
A Dream Goes On Forever	Lee McClellan	DreamForever-lm		leebo97@hotmail.com
Born To Synthesize	Josh Chasin	BornSynth-jc		jchasin@tiac.net
EOF
Buffalo Grass	Ray Gilman	BuffaloGrass-rg	1	rgilman@uswest.net
Gonna Cry Today	Jim Whittemore	GonnaCry-jw
Where Does The World Go To Hide	Paul Spire	WorldHide-ps	1	paulumos@interaccess.com
Drunken Blue Rooster	Lin Sprague	dbr-ls	1	lsprague@channel1.com
Pretending To Care	Randy Walters	pretending-rw	1
Born To Synthesize	Billy Marsh	BornSynth-bm	1	fender6@earthlink.net
My Angel	Lin Sprague	myangel-ls	1	lsprague@channel1.com
The Ballad (Denny &amp; Jean)	Jeane Regan	Ballad-jr
Worldwide Epiphany	Steve Schumacher	WorldWide-ss	1
