<?php
header("Content-type:   text/xml;   charset=utf-8");
header("Cache-Control:   no-cache,   must-revalidate"); 
include "../Include/config.php";
include "../Include/db.php";
$type=$db->fhtml($_GET['type']);
switch($type){
	case 'chatlist':
	$sql="select * from chat_music order by rand()";
	$re=$db->query($sql);
	while($row=$db->fetch($re))
	{
		$row['singer']=iconv("GBK","UTF-8",$row['singer']);
		$row['title']=iconv("GBK","UTF-8",$row['title']);
		$row['url']=iconv("GBK","UTF-8",$row['url']);
		$list.="
		<track>
			<title>$row[singer]</title>
			<creator>$row[title]</creator>
			<image>MusicPlayer/demo.swf</image>
			<location>$row[url]</location>
		</track>
		";
	}
	break;
	case '8boxlist':
	include "8boxhot.list.php";
	break;
}
echo "
<?xml version='1.0' encoding='utf-8'?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
	<trackList>
	$list
	</trackList>
</playlist>
	";
?>
