gusucode.com > 爱美尔女性商城源码 1.0源码程序 > wen/admin/product_html.asp

    <!--#include file="../Inc/conn.asp"-->
<!--#include file="admin_check.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>admin</title>
<link href="Images/admin_css.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="<%=SitePath%>images/myfav.ico" type="image/x-icon" />
</head>
<body>
<p align="left" style="line-height:25px; font-size:14px;">
<font color="#000000"><b>注意:只有当您开启本站静态时,这里生成才有效果</b></font><br />
<font color="#0000FF"><b>点击生成网站商城栏目静态列表:</b></font><br />
<a href="product1_html.asp?Sub=classhtml&pid=0"><b>生成所有产品分页</b></a>,
<%
sql="select * from Yao_leixing order by ID desc" 
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,3,3
do while not rs.eof
%>
<a href="product_html.asp?Sub=classhtml&id=<%=rs("ID")%>&pid=0"><%=rs("Title")%></a>,
<%
rs.movenext
loop
rs.close
%>
</p>


<%
Select Case Request("Sub")
Case "classhtml"
	
	'得到分页数
	sqlconfig="select * from Yao_Config where ID=30" 
	Set rsconfig= Server.CreateObject("ADODB.Recordset")
	rsconfig.open sqlconfig,conn,3,3
	fenyeshu=rsconfig("Value")
	
	'得到域名
	sqldomain="select * from Yao_Config where ID=3" 
	Set rsdomain= Server.CreateObject("ADODB.Recordset")
	rsdomain.open sqldomain,conn,3,3
	yuming=rsdomain("Value")
	
	'统计总数
	Set rstt= Server.CreateObject("ADODB.Recordset")
	sqltt=conn.execute("select count(*) from Yao_shop where ClassID="&request("id")&"")
	'response.write sqltt(0)
	
	
	'判断PID
	if request("pid")=0 then
	n=1
	else
	n=request("pid")+1
	end if
	
	
	'循环开始
	if n<= (sqltt(0)/rsconfig("Value"))+2 then
	
	dim http,reurl
	set http=Server.createobject("Microsoft."&chr(120)&"MLHTTP") 
	Http.open "GET","http://"&yuming&"/Product.asp?ID="&request("id")&"&page="&n&"",false 
	Http.send() 
	set objStream = Server.CreateObject("ADODB.Stream") 
	objStream.type = 1 
	objStream.open 
	objstream.write http.responseBody
	
	if request("pid")=0 then
	objstream.saveToFile server.mappath("../product/Product_"&request("id")&"_1.html"),2
	else
	objstream.saveToFile server.mappath("../product/Product_"&request("id")&"_"&n&".html"),2
	end if

	response.Write "成功生成Product_"&request("id")&"_"&n&".html<br>"
	response.write"<Script Language=Javascript>location.href='Product_html.asp?Sub=classhtml&id="&request("id")&"&pid="&n&"';</Script>"
	
	
	else
	response.Write "此类列表页全部生成成功!<br>"
	end if
	
	
	
	
End Select
%>
</body>
</html>