<!--#include file="../siteconfig/conn.asp"-->
<!--#include file="LabelHtml.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录，或者超时了！请重新登录');this.location.href='login.asp';</script>")
Response.End
End if
set rs=server.createobject("adodb.recordset")
set rss=server.createobject("adodb.recordset")
%>
<HTML>
<HEAD>
<TITLE>分类管理</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<LINK REL="stylesheet" HREF="css.css" TYPE="text/css">
</HEAD>
<script language="JavaScript" type="text/javascript" src="js.js"></script>
<BODY>
<%dim Url_Top,Url_Bottom,strOut
Dim fso,f
Url_Top=Request("Url_Top")
Url_Bottom=Request("Url_Bottom")
Menu=Request("Menu")
rss.open"select Skin_Skin,Skin_Html,Skin_Name from Skin where Skin_Id=36",conn,1,3
   if not rs.eof then
      Skin_Html=rss("Skin_Skin")
   else
      Response.Write("<script language=javascript>alert('没有找到模板');DivOpenClose('',2,0,0);</script>")
      Response.End()
   end if
   rss.close
if Menu="Idto" then
rs.open"select Url_Url,Url_Name,Url_Id from Url where Url_Id>"&Url_Top,conn,1,3
do while not rs.eof
   if rs("Url_Id")>int(Url_Bottom) then
    exit do
   end if
   strOut=Skin_Html
   strOut=Replace(strOut,"$Url_Name$",rs("Url_Name"))
   strOut=Replace(strOut,"$Url_Url$",rs("Url_Url"))


   Call SiteLable()
    Set fso=Server.CreateObject("Scripting.FileSystemObject") 
	

   Set f=fso.CreateTextFile(Server.MapPath(Site_Div&"html/"&rs("Url_Id")&".html"),true)
   f.WriteLine strOut
   f.close
   Set f=Nothing
   Set fso=Nothing
rs.movenext
loop
rs.close
   Response.Write("<script language=javascript>alert('生成成功');DivOpenClose('',2,0,0);</script>")
else
rs.open"select Url_Url,Url_Name,Url_Id from Url",conn,1,3
while not rs.eof
   strOut=Skin_Html
   strOut=Replace(strOut,"$Url_Name$",rs("Url_Name"))
   strOut=Replace(strOut,"$Url_Url$",rs("Url_Url"))


   Call SiteLable()
    Set fso=Server.CreateObject("Scripting.FileSystemObject") 
	

   Set f=fso.CreateTextFile(Server.MapPath(Site_Div&"html/"&rs("Url_Id")&".html"),true)
   f.WriteLine strOut
   f.close
   Set f=Nothing
   Set fso=Nothing
rs.movenext
wend
rs.close
   Response.Write("<script language=javascript>alert('生成成功');</script>")
end if
%>
</BODY>
</HTML>

