<%@ Language=VBScript %>
<%
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
Set dsreg = Server.CreateObject("ADODB.Recordset")	
if session("agentname")<>"n" then
Sql="Select * from FreeHost.FreeHost_Agent where username='"&session("agentname")&"'"
else
Sql="Select * from FreeHost.FreeHost_Admuser where superuser='freehost'"
'for i=0 to ubound(Application("sitearry"))
'if Application("sitearry")(i)=Request.ServerVariables("SERVER_NAME") then
'ismyhost=true
'exit for
'end if
'next
end if

'if not ismyhost then
'Response.Status=403
'Response.write "<h1>Bad Request (Invalid Hostname)</h1>"
'Response.end
'end if
	dsreg.Open Sql,conn,1,1
if not dsreg.eof then
if dsreg("beianfilelen")>0 then
response.contenttype="application"
Response.BinaryWrite dsreg("beianfile").getChunk(100000)
end if
dsreg.close 
set rec=nothing 
set conn=nothing 
end if
%>