<!--#include file="../Inc/conn.asp"-->
<!--#include file="admin_check.asp"-->
<%
id=LaoYRequest(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&"_css] Where ID="&ID&" order by ID desc",conn,3,2
Else
trs.open "select * From ["&tbname&"_css] 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="../images/Css"&trs("id")&".css" 
   
	Http.open "GET","http://"&request.ServerVariables("Server_NAME")&""&SitePath&"images/css.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
	if err then 
	err.Clear 
	response.Write("error") 
else
	Call Info("¸üÐÂ³É¹¦!")
End if 
End Sub 

Call CreateDefaulthtml()
%>