<!--#include file="conn.asp"-->
<!--#include file="Star.INC"-->
<%

Sclassid=request.QueryString("id")
filename="html/"&sclassid&".htm"
set rs=server.createobject("adodb.recordset")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>生成歌手列表HTML文件</title>
<style>
body{font-size:9pt;line-height:140%} 
</style>
</head>
<body>
<%
rs.open ("select playmb from mb"),conn,1,1
pencat=rs("playmb")
rs.close
'################ 读标题 开始 ################
set rs=server.createobject("adodb.recordset")
sql="select * from flash where id="&Sclassid
rs.open sql,conn,1,3

flash_id=""&Sclassid&""
flash_id1=""&Sclassid-1&""
flash_id2=""&Sclassid+1&""
flash_flashname=""&rs("flashname")&""
flash_smallclassid=""&rs("smallclassid")&""
'flash_smallclassname=""&rs("smallclassname")&""
flash_username=""&rs("username")&""
flash_dateandtime=""&formatdatetime(rs("dateandtime"),1)&""
flash_votenum=""&rs("votenum")&""
flash_url=""&rs("url")&""
flash_fsize=""&rs("fsize")&""
flash_hits=""&rs("hits")&""
flash_downnum=""&rs("downnum")&""
	  remark=rs("remark")
	  remark=replace(remark,chr(13),"<br>")
	  remark=replace(remark," ","&nbsp;")
flash_remark=""&remark&""
flash_commentnum=""&rs("commentnum")&""

rs.close
rs.open ("select smallclassname from smallclass where smallclassid="&flash_smallclassid&""),conn,1,1
flash_smallclassname=""&rs("smallclassname")&""
rs.close
rs.open ("select flashname from flash where id="&flash_id1&""),conn,1,1
if rs.eof then
flash_before=" "
else
flash_before=""&rs("flashname")&""
end if
rs.close

rs.open ("select flashname from flash where id="&flash_id2&""),conn,1,1
if rs.eof then
flash_next=" "
else
flash_next=""&rs("flashname")&""
end if
rs.close

pencat=replace(pencat,"flash_id",flash_id)
pencat=replace(pencat,"flash_1id",flash_id1)
pencat=replace(pencat,"flash_2id",flash_id2)
pencat=replace(pencat,"flash_flashname",flash_flashname)
pencat=replace(pencat,"flash_username",flash_username)
pencat=replace(pencat,"flash_smallclassid",flash_smallclassid)
pencat=replace(pencat,"flash_smallclassname",flash_smallclassname)
pencat=replace(pencat,"flash_dateandtime",flash_dateandtime)
pencat=replace(pencat,"flash_votenum",flash_votenum)
pencat=replace(pencat,"flash_url",flash_url)
pencat=replace(pencat,"flash_fsize",flash_fsize)
pencat=replace(pencat,"flash_hits",flash_hits)
pencat=replace(pencat,"flash_downnum",flash_downnum)
pencat=replace(pencat,"flash_remark",flash_remark)
pencat=replace(pencat,"flash_commentnum",flash_commentnum)
pencat=replace(pencat,"flash_before",flash_before)
pencat=replace(pencat,"flash_next",flash_next)

'################ 读结束 ################
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">生成 第<%=sclassid%> 个FLASH成功</font><br>
<font color="#FF0000">·</font><a target="_blank" href="<%=filename%>">点此浏览<%=filename%></a>

</body></html>







