<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%server.ScriptTimeout =2400
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("cansuperuser")="" Then
	ef=True
	ec="您没有此操作的权限。"
end if

if not ef then
response.write "<br>下面如果有错误，请忽略...<br>"
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
Sql="delete FreeHost.FreeHost_Loginlog where logintime<'"&dateadd("d",-30,now)&"'"
    conn.Execute Sql
Sql="delete FreeHost.FreeHost_oplog where logintime<'"&dateadd("d",-90,now)&"'"
    conn.Execute Sql
Sql="USE freehost BACKUP LOG freehost with NO_LOG;DBCC SHRINKDATABASE (freehost)"
    conn.Execute Sql
Sql="update FreeHost.FreeHost_USER set usernotice=null where lastnotice<'"&dateadd("d",-15,now)&"'"
    conn.Execute Sql
Sql="delete FreeHost.FreeHost_Netpay where paytime<'"&dateadd("d",-3,now)&"'"
    conn.Execute Sql
Sql="delete FreeHost.FreeHost_online_aws where posttime<'"&dateadd("d",-90,now)&"'"
    conn.Execute Sql

if Application("openispsystem")=true Then
Sql="delete FreeHost.FreeHost_Beian_oplog where optime<'"&dateadd("d",-10,now)&"'"
    conn.Execute Sql
End if
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
 　删除登陆日志,收缩数据库,清空15天前的用户提示信息,及备案系统10天前日志,及90天前的客服问答
 <%=htmlwrite("html9")%>
<br><br>操作成功
<%=htmlwrite("html10")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
