www.gusucode.com > 流光音乐建站系统 1.1码程序 > admin/Make_musicplay.asp

    <!--#include file="const.asp"-->
<!--#include file="../User/Path.Asp"-->
<!--#include file="../inc/base64.Asp"-->
<link href="Images/Admin_Style.Css" rel="stylesheet" type="text/css">
<%CheckAdmin3%>
<%pagename="make_musicplay"%>
<%
'===========================版权信息===============================
' 流光音乐系统 1.0
' Homepage  : http://www.ad968.cn
' E-Mail : 77280511@qq.com
' QQ : 77280511 
'请保留版权信息,以便我们更好的为您服务
'==================================================================
id=request.QueryString("263")
shengchengid=""&Front&""&id&"play"
md5id=md5(shengchengid)
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&"/"&Front&""&md5id&"_"&id&".html"
dim copyurl
copyurl="Musicplay/"&NClassID&"/"&Front&""&md5id&"_"&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>
<%
SQL = "Select top 1 play From Mb"
Set Rs = Conn.Execute(SQL)
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")
MusicId=rs("id")
MusicList=rs("Wma")
dim copytext,copytext2
copytext=""&weburl&""&copyurl&"?"
copytext2=MusicName&"-"&Singer&"-"&webname&""
play_3="<head>"&vbcrlf
play_3=play_3&"<title>"&MusicName&" - "&Singer&" - "&webname&" - "&weburl&"</title>"&vbcrlf
play_3=play_3&"<meta name='keywords' content='"&Singer&"的"&MusicName&"免费试听/MP3下载/歌词/Lrc歌词/"&webname&"免费在线试听'>"&vbcrlf
play_3=play_3&"<meta name='description' content='"&webname&"为您提供 "&Singer&"的"&MusicName&"免费试听/MP3下载/歌词/Lrc歌词'>"&vbcrlf
play_3=play_3&"<SCRIPT>function CText(){ urlinfo=document.getElementById('copyurl').value; tt=urlinfo; clipboardData.setData('text',tt); alert('复制成功,粘贴发给你好友一起听,谢谢!');}</SCRIPT>"&vbcrlf
'################ 读横栏 开始 ################ 

end if
rs.close
pencat=replace(pencat,"play_3",play_3)
'################ 以下是分类 流光网音乐网###############
i=0
MaxList=7
set rs=conn.execute("SELECT * FROM Sclass order by Sclassid ASC")
do while not rs.eof
i=i+1
fenlei=fenlei&"&nbsp;&nbsp;&nbsp;&nbsp;<a href=../../music/"&rs("Sclassid")&".Html target=_blank>"&rs("Sclass")&"</a>"
if i>=MaxList then exit do
rs.movenext
loop
rs.close
pencat=replace(pencat,"{fenlei}",fenlei)
'################ 读主题 开始 ################
set rs=server.createobject("adodb.recordset")
	if Nclassid<>"" then
		sql="SELECT * FROM MusicList where Nclassid="+cstr(Nclassid)+" order by id desc"
	else
	sql="SELECT * FROM MusicList order by id desc"
	end if

rs.open sql,conn,1,1
if rs.eof and rs.bof then 
	errmsg=errmsg+"参数错误,请输入正确的参数"
	call error()
        Response.End 
        else 
 
i=0
MaxList=18
do while not rs.eof
	i=i+1
play_4=play_4&"&nbsp;<li><input type=checkbox value="&rs("id")&" name=checked><a href=../../MusicPlay/"&NClassID&"/"&Front&""&md5(""&Front&""&rs("id")&"play")&"_"&rs("id")&".html >"&rs("MusicName")&"</a></li>"
if i>=MaxList then exit do
rs.movenext
loop
end if

pencat=replace(pencat,"play_4",play_4)

'################ 读主题 开始 ################
sql="select * from MusicList where id="&cstr(id)
Set Rs = Conn.Execute(SQL)
Singer=left(rs("Singer"),10)
MusicName=left(rs("MusicName"),20)
Wma_List=rs("Wma")
Specialid=rs("Specialid")
NClassid=rs("NClassid")
songpath=rs("song_path")
If songpath="" or IsNull(songpath) Then
	songpath=1
End If
Select Case songpath
	Case 1
		song_path=song_path1
	Case 2
		song_path=song_path2
	Case 3
		song_path=song_path3
	Case 4
		song_path=song_path4
	Case 5
		song_path=song_path5
	Case else
		song_path=song_path1
End Select
song_path=song_path&rs("Wma")


'pencat= Replace(pencat, "{song_path}", enCode_base64(song_path))
pencat= Replace(pencat, "{song_path}", song_path)
pencat= Replace(pencat, "{id}", id)
pencat= Replace(pencat, "{copytext}", copytext)
pencat= Replace(pencat, "{copytext2}", copytext2)
pencat= Replace(pencat, "{musicname}", MusicName)
pencat= Replace(pencat, "{singer}", Singer)
pencat= Replace(pencat, "{wma_list}", Wma_List)
pencat= Replace(pencat, "{nclassid}", NClassid)
pencat= Replace(pencat, "{specialid}", Specialid)
rs.close
set rs=nothing
pencat=replace(pencat,"play_2",play_2)
'################ 读结束 ################
set rs=conn.execute("SELECT * FROM Const order by id desc")
if rs.EOF then
	errmsg= "<li>服务器出错!请联系管理员</li>"
	call error()
	Response.End 
else
        tongji=rs("Count")
		weburl=rs("weburl")
        webname=rs("webname")
        keywords=rs("keywords")
		keywords=rs("front")
		AdminEmail=rs("AdminEmail")
end if 
        rs.close
	set rs = nothing 
    conn.close
    set conn=Nothing
pencat=replace(pencat,"{tongji}",tongji)
pencat=replace(pencat,"{weburl}",weburl)
pencat=replace(pencat,"{webname}",webname)
pencat=replace(pencat,"{keywords}",keywords)
pencat=replace(pencat,"{front}",front)
pencat=replace(pencat,"{AdminEmail}",AdminEmail)
'################ 读统计 #流光音乐网###############  
Specialid=request.QueryString("ID")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(FILENAME))
fout.Write pencat
fout.close
'************** 生成HTML页 结束 ***************
%>
<div id="mkput">
<font color="#FF0000">·</font><font color="#FF0000">生成 <%=Singer%> 歌曲 <%=musicname%> HTML文件完成</font><br>
<font color="#FF0000">·</font><a target="_blank" href="<%=FILENAME%>">点此浏览<%=FILENAME%></a>

</div>
<script language="javascript">
if(parent.showImport)
{
parent.showImport.innerHTML=mkput.outerHTML;
}
</script>
</body></html>