<?php
// send wml headers
/*

.htaccess should have:

DirectoryIndex index.html

DirectoryIndex index.wml
addtype text/vnd.wap.wml wml
AddType application/x-httpd-php .wml

*/


/*  $htmlredirect = "home.html";
if(!stristr($_SERVER['HTTP_ACCEPT'],"wap")){
    header("302 Moved Temporarily");
    header("Location: ".$htmlredirect);
    exit;
}
*/
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
   . " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";



$tones['Sevendust']['Enemy']="enemy.mp3";
$tones['Sevendust']['Hero']="hero.mp3";
$tones['Sevendust']['Broken']="brokendown.mp3";
$tones['Sevendust']['Waffle']="waffle.mp3";
$tones['Led_Zepplin']['Ocena']="theocean.mp3";
$tones['DND']['Evergreen']="e2.mp3";
$tones['DND']['Taking_me_alive']="takingme.mp3";
$tones['DND']['Bare_Bones']="barebones.mp3";
$tones['Lamb_of_God']['Palaces']="palaces.mp3";
$tones['In_Flames']['Leeches']="leeches.mp3";
$tones['Crystal']['cominback']="cominback.mp3";
$tones['JT']['mylove']="mylove.mp3";
$tones['JT']['sexyback']="sexyback.mp3";

$tones['Nonpoint']['Air Tonight']="air_tonight.mp3";
$tones['Nonpoint']['Bullet']="bullet_ring .mp3";

$tones['Rage']['Down Rodeo']="down_rodeo_ring.mp3";
$tones['Nate']['nobody']="nobody.mp3";

$tones['Offshoot']['Be There']="be_there.mp3";

$tones['Pantera']['5minutes']="5minutes.mp3";
$tones['KSE']['When Darkness']="whendark.mp3";
$tones['KSE']['Bring Life']="bringlife.mp3";
$tones['Trivium']['duno']="trivium.mp3";
$tones['Young_Bloodz']['Chop Chop']="chopchop.mp3";
$tones['Trapt']['Disconnected']="disconnected.mp3";
$tones['Rev_Theory']['Slow Burn']="slowburn.mp3";
$tones['caedmons']['somewhere']="swnoh.mp3";


$pics['OS']['OS5']="os5.gif";
$pics['OS']['OS4']="os4.jpg";


 ksort($tones);



print "
<wml>
<card id=\"main\" title=\"Stuff\">
<p><b>Get what?</b><br/>
<a href=\"#tones\">Tones</a><br/>
<a href=\"#pics\">Pics</a><br/>
</p>
</card>
";




print "
<card id=\"tones\" title=\"Get Tones\">
	<p><b>Pick an artist:</b><br/>
";
foreach ($tones as $artist => $song){

	print "<a href=\"#".$artist."\">".$artist."</a><br/>\n";
}
print "
<a href=\"#main\">--back to main--</a><br/>
	</p>
</card>
";

print "
<card id=\"pics\" title=\"Get Pics\">
	<p><b>Pick an artist:</b><br/>
";
foreach ($pics as $cat => $pic_name){

	print "<a href=\"#".$cat."\">".$cat."</a><br/>\n";
}

print "
<a href=\"#main\">--back to main--</a><br/>
	</p>
</card>
";






foreach ($tones as $artist=>$song){

	print "
	<card id=\"".$artist."\" title=\"".$artist."\">
		<p><b>".$artist."</b><br/>
	";

		foreach ($tones[$artist] as $song=>$file){
			print "<a href=\"".$file."\">".$song."</a><br/>\n";
		}
		print "<a href=\"#main\">--back to main--</a><br/>
		</p>
	</card>

	";

}

foreach ($pics as $cat=>$pic_name){

	print "
	<card id=\"".$cat."\" title=\"".$cat."\">
		<p><b>".$cat."</b><br/>
	";

		foreach ($pics[$cat] as $pic_name=>$file){
			print "<a href=\"".$file."\">".$pic_name."</a><br/>\n";
		}
		print "<a href=\"#main\">--back to main--</a><br/>
		</p>
	</card>

	";

}


?>
</wml>
