<?php
# Name: PHP版程氏音乐CMS管理系统 v3.0
# Author: 程氏<web@chshcms.com> [QQ:848769359]
# Homepage:http://www.chshcms.cn/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
header("Cache-Control: no-cache, must-revalidate"); 
header("Pragma: no-cache");
if(!eregi($_SERVER['SERVER_NAME'],$_SERVER['HTTP_REFERER'])){exit('QQ:848769359');}
include_once("../../lib/cs_conn.php");
include_once("../../lib/cs_common.php");
global $db;

$id=CS_Request('id');
$ids=explode("/",$id);

if(count($ids)>2){
    echo '<list>';
    for($j=0;$j<count($ids);$j++){
	$row=$db->getRow("select * from ".Getdbname('dance')." where CS_ID=".$ids[$j]."");
             $server=$db->getrow("select * from ".Getdbname('fwqip')." where CS_ID=".$row['CS_FID']."");
             if(substr($row['CS_PlayUrl'],0,5)=="csdj_"){
                   $str=explode("_",$row['CS_PlayUrl']);
                   $Playurl="../purl.php?id=".$id."&.wma";
             }elseif(substr($row['CS_PlayUrl'],0,3)=="wk_"){
                   $str=explode("_",$row['CS_PlayUrl']);
                   $Playurl=getvdisk(substr($str[1],0,-4));
             }elseif(substr($row['CS_PlayUrl'],0,22)=="http://www.rayfile.com"){
                   $Playurl=getrayfile();
             }elseif($row['CS_PID']==4){
                   $Playurl="http://www.520tingshu.com/ting/get.php?id=".$row['CS_PlayUrl'];
             }else{
                   $Playurl=$server['CS_Playip'].$row['CS_PlayUrl'];
             }
	     echo '<m type="" src="'.$Playurl.'" lrc="" label="'.$row['CS_Name'].'" opened="1">
	     </m>';
    }
    echo '</list>';
}else{
	$row=$db->getRow("select * from ".Getdbname('dance')." where CS_ID=".$id."");
	if($row){
             $server=$db->getrow("select * from ".Getdbname('fwqip')." where CS_ID=".$row['CS_FID']."");
             if(substr($row['CS_PlayUrl'],0,5)=="csdj_"){
                   $str=explode("_",$row['CS_PlayUrl']);
                   $Playurl="../purl.php?id=".$id."&.wma";
             }elseif(substr($row['CS_PlayUrl'],0,3)=="wk_"){
                   $str=explode("_",$row['CS_PlayUrl']);
                   $Playurl=getvdisk(substr($str[1],0,-4));
             }elseif(substr($row['CS_PlayUrl'],0,22)=="http://www.rayfile.com"){
                   $Playurl=getrayfile();
             }elseif($row['CS_PID']==4){
                   $Playurl="http://www.520tingshu.com/ting/get.php?id=".$row['CS_PlayUrl'];
             }else{
                   $Playurl=$server['CS_Playip'].$row['CS_PlayUrl'];
             }
	     echo '<list>
	     <m type="" src="'.$Playurl.'" lrc="" label="'.$row['CS_Name'].'" opened="1">
	     </m>
	     </list>';
        }else{
             echo '没有找到相关数据!';
        }
}
?>
