<!--#include file="htm_top.asp"-->
<%
Sclassid=request.QueryString("0hao_cn")
filename="../sclass/"&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 class from mb"),conn,1,1
pencat=rs("class")
rs.close
'################ 读标题 开始 ################
set rs=conn.execute("SELECT * FROM sclass where sclassid="&sclassid)
 if rs.eof and rs.bof then 
	errmsg=errmsg+"参数错误，请输入正确的参数"
	call error()
        Response.End 
        else  
        sclass=rs("sclass")
Geshou_Top="<html><head>"&vbCrLf
Geshou_Top=Geshou_Top&"<TITLE>"&sclass&"|"&SiteName&"-"&Siteurl&"|最新最热的mp3音乐视听</TITLE>"&vbCrLf
Geshou_Top=Geshou_Top&"<meta name='keywords' content='mp3免费下载,mp3在线音乐,最新"&sclass&"歌手mp3,福建音乐视听网|www.0hao.cn'>"&vbCrLf
Geshou_Top=Geshou_Top&"<meta name='description' content='mp3免费下载,mp3在线音乐,最新"&sclass&"歌手mp3,福建音乐视听网|www.0hao.cn'>"
end if
rs.close
pencat=replace(pencat,"Geshou_Top",Geshou_Top)
pencat=replace(pencat,"{sclass}",sclass)
'################ 读主体 开始 ################
   if Sclassid<>"" then
	set rs=conn.execute("SELECT * FROM Nclass where Sclassid="&Sclassid&" order by Abcd")
		if not rs.eof then
		i=0
		do while not rs.eof
		i=i+1
		if thischar<>rs("Abcd") then
		thischar=rs("Abcd")
		i = 1
		Geshou_Center=Geshou_Center&"<tr><td width=615 height=25 colspan=4 align=center bgcolor=#F7F7F7><FONT color=green size=3><b>"&thischar&"</b></font></td><td height=25 width=150 align=center bgcolor=#F7F7F7><a name="&thischar&" href=#top>TOP↑</a></td></tr><tr>" 
end if
Geshou_Center=Geshou_Center&"<td width=20% height=22>&nbsp;·<a href=""../singer/"&rs("NClassid")&".htm"">"
if rs("isgood")=true then
Geshou_Center=Geshou_Center&"<font color=red><b>"&(rs("NClass"))&"</b></font>"
else
Geshou_Center=Geshou_Center&(rs("NClass"))
end if
Geshou_Center=Geshou_Center&"</a></td>"
if (i mod 5)=0 and i>=5 then
Geshou_Center=Geshou_Center&"</tr>"
end if
	     rs.movenext
             loop
	     else
	     end if
             end if 
	 set rs = nothing 
	 set conn = nothing

pencat=replace(pencat,"Geshou_Center",Geshou_Center)
'################ 读结束 ################
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">生成 <%=sclass%> 歌手列表HTML文件完成</font><br>
<font color="#FF0000">·</font><a target="_blank" href="<%=filename%>">点此浏览<%=filename%></a>


</body></html>