<!--#include file="Const.Asp"-->
<!--#include file="error.ini"-->
<link href="Images/Admin_Style.Css" rel="stylesheet" type="text/css">
<%pagename="make_musiclist"%>
<%
id=request.QueryString("263")
shengchengid="263"&id&"play"
shengchengid=md5(shengchengid)
set rs=server.createobject("adodb.recordset")
set rs=conn.execute("SELECT * FROM Musiclist where ID="&ID)
NClassID=rs("NClassID")
  Dim objFSO    '声明一个名称为 objFSO 的变量以存放对象实例
  Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    If objFSO.FolderExists(Server.MapPath("../Musicplay/"&NClassID&"")) Then
    Response.Write Server.MapPath("../Musicplay/"&NClassID&"")&"文件夹是存在的，不需要新建！"
  Else
   objFSO.CreateFolder(Server.MapPath("../Musicplay/"&NClassID&""))
   Response.Write "新建文件夹的位置为"&Server.MapPath("../musicplay/"&NClassID&"")
  End If
  Set objFSO = Nothing      '释放 FileSystemObject 对象实例内存空间

FILENAME="../Musicplay/"&NClassID&"/"&ID&".html"
rs.close
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>生成播放文件</title>
<style>
body{font-size:9pt;line-height:140%} 
</style>
</head>
<body>
<%
rs.open ("select play from mb"),conn,1,1
pencat=rs("play")
rs.close
'################ 读标题开始 ################
  set rs=conn.execute("SELECT * FROM Musiclist where ID="&ID)
   if rs.eof and rs.bof then 
	errmsg=errmsg+"参数错误，请输入正确的参数"
	call error()
        Response.End 
        else  
Singer=rs("Singer")
MusicName=rs("MusicName")
play_3="<html><head>"
play_3=play_3&"<meta name='keywords' content='"&homes&",在线听歌,音乐网，音乐无线，音乐试听，在线音乐，音乐频道，mp3免费下载，免费音乐下载'>"
play_3=play_3&"<meta name='description' content='"&homes&",在线听歌,音乐网，音乐无线，音乐试听，在线音乐，音乐频道，mp3免费下载，免费音乐下载'>"
play_3=play_3&"<title>"&MusicName&" - "&Singer&" --- 最新流行歌曲在线试听 免费听歌 免费在线听歌 mp3免费下载 环球音乐无线 让您的心重新获得释放</title>"
'################ 读横栏 开始 ################    
end if
rs.close
pencat=replace(pencat,"play_3",play_3)
'################ 读主题 开始 ################
sql="select * from MusicList where id="&cstr(id)
rs.open sql,conn,1,1
Singer=rs("Singer")
MusicName=rs("MusicName")
Wma_List=rs("Wma")
Specialid=rs("Specialid")
pencat= Replace(pencat, "{Id}", id)
pencat= Replace(pencat, "{Musicname}", MusicName)
pencat= Replace(pencat, "{Singer}", Singer)
pencat= Replace(pencat, "{Wma_list}", Wma_List)
pencat= Replace(pencat, "{Sms}", Sms)
pencat= Replace(pencat, "{Weburl}", Weburl)
pencat= Replace(pencat, "{Specialid}", Specialid)
rs.close
set rs=nothing
conn.close
set conn=nothing
pencat=replace(pencat,"play_2",play_2)
'################ 读结束 ################
Specialid=request.QueryString("ID")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(FILENAME))
fout.Write pencat
fout.close
'************** 生成HTML页 结束 ***************
%>
<font color="#FF0000">·</font><font color="#FF0000">生成 <%=Singer%> 歌曲 <%=musicname%> HTML文件完成</font><br>
<font color="#FF0000">·</font><a target="_blank" href="<%=FILENAME%>">点此浏览<%=FILENAME%></a>

</body></html>