<!--#include file="conn.Asp"-->
<!--#include file="function.Asp"-->
<!--#include file="../inc/config_list.Asp"-->
<!--#include file="../inc/md5.asp"-->
<%CheckAdmin3%>
<%
'===========请保留版权信息,如果去除，将不提供相关服务==============
' 888网音乐系统 V8.1 版
' 管方网址：www.888wang.com
' 技术支持: QQ:56566918
' 客服：见www.888wang.com网站的客服QQ
' 电话:15918529718
'==================================================================
%>
<%
musicid=request.QueryString("jim")
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<title>播放器生成主页面</title>
<style>
td{font-size:9pt;line-height:160%} 
body{font-size:9pt;line-height:160%} 

a:link       { color: #0033CC; text-decoration: none }
a:visited    { color: #0033CC; text-decoration: none }
a:active     { color: #FF0000; text-decoration: none }
a:hover      { color: #000000; text-decoration: underline}
</style>
</head>
<body>
<%
'################ 读取主体 开始 ################
	set rs=server.createobject("adodb.recordset")
	sql="SELECT ID,Wma,MusicName,ClassID,SClassID,hits,IsGood,url FROM MusicList where id="&musicid
	'call res(sql)
	rs.open sql,conn,1,1
		if rs.eof then
			errmsg=errmsg+"参数错误，请输入正确的参数"
			call error()
			Response.End 
		else 
			musicname=musicname&""&rs("musicname")&""
			wma=wma&""&rs("wma")&""
			id=id&""&rs("id")&""
			sclassid=sclassid&""&rs("SClassid")&""
			url=rs("url")
			Play_Url="url"&url
			
			
		end if
	rs.close	
	'上一首音乐
	sql="SELECT ID,Wma,MusicName,ClassID,SClassID,hits,IsGood FROM MusicList where id="&(musicid-1)
	'call res(sql)
	rs.open sql,conn,1,1
		if rs.eof then
			musicnameBack="这前面没有音乐了"
			backLink="#"
		else 
			musicnameBack=musicnameBack&""&rs("musicname")&""
			wmaBack=wmaBack&""&rs("wma")&""
			idBack=idBack&""&rs("id")&""
			sclassidBack=sclassidBack&""&rs("sclassid")&""
			backLink=urlPlay(musicid-1)
		end if
	rs.close
	
		'下一首音乐
	set rs=server.createobject("adodb.recordset")
	sql="SELECT ID,Wma,MusicName,ClassID,SClassID,hits,IsGood FROM MusicList where id="&(musicid+1)
	'call res(sql)
	rs.open sql,conn,1,1
		if rs.eof then
			musicnameNext="这后面没有音乐了"
			nextLink="#"
		else 
			musicnameNext=musicnameNext&""&rs("musicname")&""
			wmaNext=wmaNext&""&rs("wma")&""
			idNext=idNext&""&rs("id")&""
			sclassidNext=sclassidNext&""&rs("sclassid")&""
			nextLink=urlPlay(musicid+1)
		end if
	rs.close
	
			'所属大类
	set rs=server.createobject("adodb.recordset")
	sql="select sclass from SClass where SClassid="&sclassid
	'call res(sql)
	rs.open sql,conn,1,1
		
			SClass=SClass&""&rs("SClass")&""
			
		
	rs.close
	'============================相关推荐歌曲========================================

i=0
MaxList=15
set rs3=server.createobject("adodb.recordset")
sql="select top 15 ID,Wma,MusicName,ClassID,SClassID,hits,IsGood from Musiclist where SClassID="+sclassid+" order by hits desc"
rs3.Open sql,conn,1,1
do while not rs3.eof
i=i+1		
			'x=makeLink((rs3("MusicName")),(rs3("ID")))
			'x=""&Trim(SetPY(rs3("MusicName")))&rs3("ID")&""
			'call CheckDir(x)
			'mp3path=y&"/"&x&"/index.htm"
			mp3path=urlPlay(rs3("id"))
          playIsGood=playIsGood&"<li><input type=""checkbox"" value='"&rs3("id")&"' name=""checked""/>"
          playIsGood=playIsGood&"<a href='"&mp3path&"' target='_blank&play'>"&rs3("MusicName")&"</a></li>"
	  
  
if i>=MaxList then exit do
rs3.movenext
loop
rs3.close
set rs3=nothing


gequ_1="<a href='/'>首页</a>,<a href='/index/"&sclassid&"/index.html' target='_blank&index'>"&SClass&"</a>,<a href='"&md5(id&"play")&"_"&id&".html'>"&musicname&"</a>"

%>
<%
'################ 文件释放 开始 ################
Set fso = Server.CreateObject("Scripting.FileSystemObject")

	if instr(SClass,"视频")<1 then
		set type_d = fso.opentextfile(server.mappath("../mb/play_mb.asp"),1,True)
	else
		set type_d = fso.opentextfile(server.mappath("../mb/play_mv_mb.asp"),1,True)
	end if




pencat= type_d.ReadAll


'################ 以下是公共的统计，站点地址，名称，关键词等 ###############


pencat=replace(pencat,"{webname}",webname)
pencat=replace(pencat,"{weburl}",weburl)
pencat=replace(pencat,"{Adminqq}",Adminqq)
pencat=replace(pencat,"{AdminEmail}",AdminEmail)
pencat=replace(pencat,"{keywords}",keywords)
pencat=replace(pencat,"{Descriptions}",Descriptions)
pencat=replace(pencat,"{record}",record)
pencat=replace(pencat,"{Copyright}",Copyright)

pencat=replace(pencat,"{gequ_1}",gequ_1)
pencat=replace(pencat,"{playIsGood}",playIsGood)
pencat=replace(pencat,"Music_Name",musicname)
pencat=replace(pencat,"Music_Wma",wma)
pencat=replace(pencat,"Music_id",id)
pencat=replace(pencat,"Music_sclassid",sclassid)
pencat=replace(pencat,"{Play_Url}",Play_Url)

pencat=replace(pencat,"NameBack",musicnameBack)
pencat=replace(pencat,"WmaBack",wmaBack)
pencat=replace(pencat,"idBack",idBack)
pencat=replace(pencat,"sclassidBack",sclassidBack)
pencat=replace(pencat,"backLink",backLink)

pencat=replace(pencat,"NameNext",musicnameNext)
pencat=replace(pencat,"WmaNext",wmaNext)
pencat=replace(pencat,"idNext",idNext)
pencat=replace(pencat,"sclassidNext",sclassidNext)
pencat=replace(pencat,"nextLink",nextLink)
'################ 以下是歌手分类 #888wang.com音乐网###############
i=0
MaxList=15
	set rs=server.createobject("adodb.recordset")
		sql="SELECT * FROM Sclass"
rs.open sql,conn,1,1
'set rs=conn.execute("SELECT * FROM Sclass order by Sclassid ASC")
do while not rs.eof
i=i+1
fenlei=fenlei&"<LI><A href=/index/"&rs("Sclassid")&"/index.Html target=_self>"&rs("sclass")&"</A></LI>"
if i>=MaxList then exit do
rs.movenext
loop
rs.close
pencat=replace(pencat,"{fenlei}",fenlei)

'=========================取得模板文件 #888网音乐=================================
makeLinkLast=urlPlay(musicid)
Set type_x = fso.CreateTextFile(server.mappath(makeLinkLast))
type_x.WriteLine pencat
set fso = nothing
type_d.close
type_x.close
'************** 生成HTML页 结束 ***************
conn.execute("update MakeConfig set Mp3Make="&musicid)
set rs=nothing
conn.close
set conn=nothing
%>
<font color="#FF0000">·</font><font color="#FF0000">生成<%=musicname%>HTML文件完成 <a href="<%=makeLinkLast%>" target="_blank"><%=makeLinkLast%></a></font>

</body></html>





