<?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");
$id=CS_Request('id');
$xlink="";
	$row=$db->getRow("select * from ".Getdbname('dance')." where CS_ID=".$id." and cs_yid=0");
	if($row){
            $server=$db->getrow("select * from ".Getdbname('fwqip')." where CS_ID=".$row['CS_FID']."");
               $Playurl=$server['CS_Playip'].$row['CS_PlayUrl'];
               $spurl=$row['CS_PlayUrl'];
               $pid=$row['CS_PID'];
        }else{
	     echo 'document.writeln("没有找到该歌曲！");';
             exit();
        }
        if($pid==1){
		$rowd=$db->getrow("Select CS_ID,CS_Name,CS_CID from ".Getdbname('dance')." where CS_ID>$id and CS_YID=0 order by CS_ID asc");
		if($rowd){
		       $xlink=LinkUrl('play','dance','id',$rowd['CS_CID'],$rowd['CS_ID']);
		}else{
		       $xlink='#';
		}
        }
?>
SetCookie("open_player", "Y", null, "/", DomainUrl,false);
var CS_path = "<?php echo CS_WebPath?>";var CS_pid = "<?php echo $pid?>";var CS_Url = "<?php echo $Playurl?>";var CS_Width = "<?php echo CS_Play_w?>";var CS_Height = "<?php echo CS_Play_h?>";var CS_sWidth = "<?php echo CS_Play_sw?>";var CS_sHeight = "<?php echo CS_Play_sh?>";

var navigatorName = "Microsoft Internet Explorer";  
   var isIE = false;   
   if( navigator.appName == navigatorName ){   
    isIE = true; 
   }
CS_player();
function CS_player(){
  if((isIE == false) && CS_pid!=2 && CS_pid!=3 && CS_pid!=4 && CS_pid!=5 && CS_pid!=6){
        document.writeln("<embed src=\""+CS_path+"public/player/csdjplay.swf?ds="+CS_path+"public/geturl.php?id=<?php echo $id?>\" width=\""+CS_Width+"\" height=\""+CS_Height+"\" quality=\"high\" wmode=\"transparent\">");
  }else{
     if(CS_pid=='0'){      //------------------------------------WMA,mp3播放---------------------------------------------//

	document.writeln("<object id=\"RAOCXa\" name=\"RAOCXa\" width="+CS_Width+" height="+CS_Height+"");
	document.writeln(" classid=\"CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\" type=application\/x-oleobject standby=\"Loading Windows Media Player ");
	document.writeln("");
	document.writeln("components...\">");
	document.writeln("<param name=\"URL\" value='"+CS_path+"public/purl.php?id=<?php echo $id?>'>");
	document.writeln("              <param name=\"rate\" value=\"1\">");
	document.writeln("              <param name=\"balance\" value=\"0\">");
	document.writeln("              <param name=\"currentPosition\" value=\"0\">");
	document.writeln("              <param name=\"defaultFrame\" value=\"\">");
	document.writeln("              <param name=\"playCount\" value=\"10\">");
	document.writeln("              <param name=\"autoStart\" value=\"-1\">");
	document.writeln("              <param name=\"currentMarker\" value=\"0\">");
	document.writeln("              <param name=\"invokeURLs\" value=\"-1\">");
	document.writeln("              <param name=\"baseURL\" value=\"\">");
	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=\"stretchToFit\" value=\"0\">");
	document.writeln("              <param name=\"windowlessVideo\" value=\"0\">");
	document.writeln("              <param name=\"enabled\" value=\"-1\">");
	document.writeln("              <param name=\"enableContextMenu\" value=\"0\">");
	document.writeln("              <param name=\"fullScreen\" value=\"0\">");
	document.writeln("              <param name=\"SAMIStyle\" value=\"\">");
	document.writeln("              <param name=\"SAMILang\" value=\"\">");
	document.writeln("              <param name=\"SAMIFilename\" value=\"\">");
	document.writeln("              <param name=\"captioningID\" value=\"\">");
	document.writeln("              <param name=\"BufferingTime\" value=\"5\">");
	document.writeln("              <embed type=\"audio/x-oleobject\" flename=\"mp\" style=\"width: "+CS_Width+"px; height: "+CS_Height+"px\" codebase=\"/activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" playcount=\"100\" src='"+CS_Url+"' enablecontextmenu=\"0\"></embed>");
	document.writeln("    <\/object>");

     } else if(CS_pid=='1'){      //------------------------------------CMP播放---------------------------------------------//

	document.writeln("<object id=\"cmp_BSTbSL\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+CS_Width+"\" height=\""+CS_Height+"\">");
	document.writeln("<param name=\"movie\" value=\""+CS_path+"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&amp;link=<?php echo $xlink?>\" />");
	document.writeln("<param name=\"allowScriptAccess\" value=\"always\" />");
	document.writeln("<param name=\"allowFullScreen\" value=\"true\" />");
	document.writeln("<embed name=\"cmp_gz4V55\" type=\"application/x-shockwave-flash\" width=\""+CS_Width+"\" height=\""+CS_Height+"\" src=\""+CS_path+"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;link=<?php echo $xlink?>\" allowScriptAccess=\"always\" allowfullscreen=\"true\"></embed>");
	document.writeln("<\/object>");

     } else if(CS_pid=='2'){      //------------------------------------flv播放---------------------------------------------//

	document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+CS_sWidth+"\" height=\""+CS_sHeight+"\">");
	document.writeln("<param name=\"movie\" value=\"<?php echo CS_WebPath?>public/player/flv.swf\">");
	document.writeln("<param name=\"quality\" value=\"high\">");
	document.writeln("<param name=\"allowFullScreen\" value=\"true\" />");
	document.writeln("<param name=\"FlashVars\" value=\"vcastr_file=<?php echo $Playurl?>&IsAutoPlay=1&IsContinue=1\" />");
	document.writeln("<\/object>");


     } else if(CS_pid=='3'){      //------------------------------------优库播放---------------------------------------------//

	document.writeln("<object id=\"youklPlayerID\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\""+CS_sWidth+"\" height=\""+CS_sHeight+"\"  align=\"middle\" onError=\"changeErr();\">");
	document.writeln("<param name=\"allowScriptAccess\" value=\"always\">");
	document.writeln("<param name=\"allowFullScreen\" value=\"true\">");
	document.writeln("<param name=\"movie\" value=\"http://static.youku.com/v1.0.0254/v/swf/qplayer.swf?winType=adshow&isAutoPlay=true&isShowRelatedVideo=false&VideoIDS=false&showAd=0&VideoIDS=<?php echo $Playurl?>\">");
	document.writeln("<embed pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" allowScriptAccess=\"always\"  allowFullScreen=\"true\" src=\"http://static.youku.com/v1.0.0125/v/swf/qplayer_taobao.swf?isAutoPlay=true&Version=/v1.0.0433&winType=interior&isShowRelatedVideo=false&VideoIDS=<?php echo $Playurl?>\"></embed>");
	document.writeln("<\/object>");

     } else if(CS_pid=='4'){      //------------------------------------土豆播放---------------------------------------------//

	document.writeln("<object id=\"cmp_BSTbSL\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+CS_sWidth+"\" height=\""+CS_sHeight+"\">");
	document.writeln("<param name=\"movie\" value=\""+CS_path+"public/player/cmp.swf?lists=cmpurl.php?id=<?php echo $id?>&amp;bgcolor=ffffff&amp;context_menu=0&amp;skin_id=1&amp;skins=tudou.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("<embed name=\"cmp_gz4V55\" type=\"application/x-shockwave-flash\" width=\""+CS_sWidth+"\" height=\""+CS_sHeight+"\" src=\""+CS_path+"public/player/cmp.swf?lists=cmpurl.php?id=<?php echo $id?>&amp;bgcolor=ffffff&amp;context_menu=0&amp;skin_id=1&amp;skins=tudou.jpg&amp;auto_play=1&amp;play_mode=1\" allowScriptAccess=\"always\" allowfullscreen=\"true\"></embed>");
	document.writeln("<\/object>");

     } else if(CS_pid=='5'){      //------------------------------------SWF播放---------------------------------------------//

        document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+CS_sWidth+"\" height=\""+CS_sHeight+"\"><param name=\"quality\" value=\"high\" /><param name=\"SCALE\" value=\"exactfit\" /><param name=\"SRC\" value=\""+CS_Url+"\" /><\/object>");

     } else if(CS_pid=='6'){      //------------------------------------音乐台播放---------------------------------------------//

        document.writeln("<embed src=\"http://www.yinyuetai.com/video/player/<?php echo $spurl?>/a_0.swf\" quality=\"high\" width=\""+CS_sWidth+"\" height=\""+CS_sHeight+"\" align=\"middle\"  allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\"></embed>");

     } else if(CS_pid=='7'){      //------------------------------------MP4、MP3播放---------------------------------------------//
        document.writeln("<embed src=\""+CS_path+"public/player/csdjplay.swf?ds="+CS_path+"public/geturl.php?id=<?php echo $id?>\" width=\""+CS_Width+"\" height=\""+CS_Height+"\" quality=\"high\" wmode=\"transparent\">");
     }
  }
}