<!--#include file="../Inc/conn.asp"-->
<!--#include file="admin_check.asp"-->
<%
Call chkAdmin(19)
id=Angel_aspRequest(Trim(request("id")))
Sub CreateDefaulthtml()
	Dim tRs,tSql
	Dim Url,Html
	Dim ClassID
	dim filename,MDBpath,fso,fout
	Server.ScriptTimeout=1000
	
	Set fso = Server.CreateObject("Scripting.FileSystemObject")
	Set tRs=server.CreateObject("adodb.recordset")
	If ID<>"" then
	trs.open "select * From ["&tbname&"_Class] Where link=0 and ID="&ID&" order by ID desc",conn,3,2
	Else
	trs.open "select * From ["&tbname&"_Class] Where link=0 order by ID desc",conn,3,2
	End if
	
	dim http,reurl
	set http=Server.createobject("Microsoft."&chr(120)&"MLHTTP")
	While Not tRs.eof
	filename="../rss/Rss"&trs("id")&".xml"

	Http.open "GET","http://"&request.ServerVariables("Server_NAME")&""&SitePath&"rss/rss.asp?id="&trs("id")&"",false
	Http.send()
	set objStream = Server.CreateObject("ADODB.Stream")
	objStream.type = 1
	objStream.open
	objstream.write http.responseBody
	objstream.saveToFile server.mappath(filename),2
	
	tRs.movenext
	Wend
	tRs.close
	
	Http.open "GET","http://"&request.ServerVariables("Server_NAME")&""&SitePath&"rss/rss.asp?id=88999",false
	on error resume next
	Http.send()
	set objStream = Server.CreateObject("ADODB.Stream")
	objStream.type = 1
	objStream.open
	objstream.write http.responseBody
	objstream.saveToFile server.mappath("../rss/Rss.xml"),2
	
	if err then
	err.Clear
	response.Write("error")
	

		else
	Call Info("¸üÐÂ³É¹¦!")
	end if
End Sub

Call CreateDefaulthtml()
%>