<!--#include file="sd_mdb.asp"-->
<%
if session("User")="" then
	response.write"<SCRIPT language=JavaScript>alert('您尚未登录！');"
	response.write"location.href=""sd_admin_login.asp"";</SCRIPT>"
end if
%>
<%
id=request("id")
%>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>文件生成</title>
</head>
<body style="font-size:12px;">
<%
Sub TimeDelaySeconds(DelaySeconds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub

TimeDelaySeconds(2)

sql3="select * from sd_web where sd_id="&id&"" 
Set rs3= Server.CreateObject("ADODB.Recordset") 
rs3.open sql3,conn,1,1 
sd_WEBUrl=rs3("sd_WEBUrl")
rs3.close
set rs3=Nothing

	dim http,reurl
	set http=Server.createobject("Microsoft.xMLHTTP") 
	Http.open "GET","http://"&sd_siteurl&"/sd_show.asp?id="&id&"",false 
	Http.send() 
	set objStream = Server.CreateObject("ADODB.Stream") 
	objStream.type = 1 
	objStream.open 
	objstream.write http.responseBody
	objstream.saveToFile server.mappath("../links/"&sd_WEBUrl&".html"),2
%>
<script>alert("页面生成成功！");history.go(-1);</script>
</body>
</html>