<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<%'/adm/getmainlog.asp?serverid=1&iisid=777&day=0'得到主控网站的日志
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("cansetserver")="" Then
	ef=True
	ec="您没有此操作的权限。"
ElseIf not IsNumeric(Request("iisid")) Then
	ef=True
	ec="IIS标识编号必须是数字"
ElseIf not IsNumeric(Request("day")) Then
	ef=True
	ec="天数必须是数字"
ElseIf not IsNumeric(Request("serverid")) Then
	ef=True
	ec="天数必须是数字"
end If

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serverlist where id='"&Request("serverid")&"'"
	dsserver.Open Sql,conn,1,1
if dsserver.Eof then
	ef=True
	ec="服务器不存在！"
end if
end if

if not ef Then
FreeHostsharekey=dsserver("FreeHostsharekey")
URL=dsserver("site")
Response.Write MakeLOG(URL,FreeHostsharekey,iisid,"-"&Request.Form ("day"))
end If

if ef then
Response.Redirect "e.asp?e="&ec
end if%>