<?php
# Name: PHP版程氏音乐CMS管理系统 v3.0
# Author: 程氏<web@chshcms.com> [QQ:848769359]
# Homepage:http://www.chshcms.cn/
include_once("../../lib/cs_label.php");
include_once("../loginstate.php");
SystemPer('0_1');
$ac=CS_Request("ac");
$id=CS_Request("id");
	$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=getcsdj($str[1],substr($str[2],0,-4));
             }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();
             }else{
                   $Playurl=$server['CS_Playip'].$row['CS_PlayUrl'];
             }
        }else{
	     echo 'document.writeln("没有找到该歌曲！");';
             exit();
        }
if(substr($Playurl,-3)=="mp4"){
?>
<SCRIPT LANGUAGE="JavaScript">
	document.writeln("<object id=\"cmp_BSTbSL\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"500\" height=\"64\">");
	document.writeln("<param name=\"movie\" value=\"<?php echo CS_WebPath?>public/player/cmp.swf?lists=cmpurl.php?id=<?php echo $id?>&amp;bgcolor=ffffff&amp;context_menu=0&amp;skin_id=1&amp;skins=cscms.jpg&amp;auto_play=1&amp;play_mode=1&amp;play_id=1\" />");
	document.writeln("<param name=\"allowScriptAccess\" value=\"always\" />");
	document.writeln("<param name=\"allowFullScreen\" value=\"true\" />");
	document.writeln("<\/object>");
</SCRIPT>
<?php }else{ ?>
<SCRIPT LANGUAGE="JavaScript">	  
document.writeln("<object id=\"Ylmv_Player\" name=\"Ylmv_Player\" style=\"width:500px;height:64px;border:0px;\" classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" codebase=\"http://activex.microsoft.com/activex/controls/player/en/nsmp2inf.cab#Version=6,4,7,1112\">");
document.writeln("<param name=\"AutoStart\" value=\"1\"/>");
document.writeln("<param name=\"Balance\" value=\"0\"/>");
document.writeln("<param name=\"enabled\" value=\"-1\"/>");
document.writeln("<param name=\"url\" value=\"<?php echo $Playurl?>\"/>");
document.writeln("<param name=\"EnableContextMenu\" value=\"0\"/>");
document.writeln("<param name=\"PlayCount\" value=\"100\"/>");
document.writeln("<param name=\"volume\" value=\"100\"/>");
document.writeln("<param name=\"mute\" value=\"0\"/>");
document.writeln("<param name=\"uiMode\" value=\"Full\"/>");
document.writeln("<param name=\"enableErrorDialogs\" value=\"0\"/>");
document.writeln("<embed align=\"baseline\" border=\"0\" width=\"500px\" height=\"64px\" type=\"application/x-mplayer2\" name=\"MediaPlayer\" />");
document.writeln("</object>");
</SCRIPT>
<?php } ?>
