oBlog--更新系统数据

- 更新系统数据

<% dim rs,sql,trs action=request("action") if action="DoUpdate" then Set rs=Server.CreateObject("Adodb.RecordSet") sql="select * from oblog_setup" rs.Open sql,Conn,1,3 set trs=oblog.execute("select count(logID) from [oblog_log]") if isNull(trs(0)) then rs("log_count")=0 else rs("log_count")=trs(0) end if set trs=oblog.execute("select count(commentID) from oblog_comment") if isNull(trs(0)) then rs("comment_count")=0 else rs("comment_count")=trs(0) end if set trs=oblog.execute("select count(messageID) from oblog_message") if isNull(trs(0)) then rs("message_count")=0 else rs("message_count")=trs(0) end if set trs=oblog.execute("select count(userID) from [oblog_user]") if isNull(trs(0)) then rs("user_count")=0 else rs("user_count")=trs(0) end if rs.update rs.close set rs=nothing set trs=nothing oblog.reloadsetup() Application.Lock Application(oblog.cache_name&"index_update")=true application(oblog.cache_name&"list_update")=true application(oblog.cache_name&"class_update")=true Application.unLock response.Write("
") response.Write("已经成功将系统数据进行了更新！") response.Write("
返回上一页") response.Write("
") response.Write("

") response.Write("

") response.Write("
") response.Write(" ") response.Write(" ") response.Write("

") response.Write("
") response.Write("
") response.Write("

") response.Write("") else %>

说明：
1、本操作将重新计算系统的日志，评论，留言数及更新缓存和首页。
2、本操作可能消耗服务器资源，请仔细确认每一步操作后执行。

<% end if %>