<%
'ON ERROR RESUME NEXT
%>
<!--#include file = admin_chk.asp -->
<!--#include file = admin_conn.asp -->
<!--#include file = titleb.asp -->

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<STYLE type="text/css">
<!--
a:link {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited {text-decoration: none; color: #000000 }
A:hover {COLOR: green; FONT-FAMILY: "Verdana,宋体,MingLiU"; TEXT-DECORATION: underline}
body {font-size: 9pt; font-family: Verdana,宋体,MingLiU, Arial;color: #000000}
TD {FONT-SIZE: 9pt; FONT-FAMILY: "Verdana,宋体,MingLiU, Arial";color: #000000;line-height: 120%;table-layout:fixed;word-break:break-all}
p {FONT-SIZE: 9pt; FONT-FAMILY: "Verdana,宋体,MingLiU, Arial";color: #000000}
input {FONT-SIZE: 9pt; FONT-FAMILY: "Verdana,宋体,MingLiU, Arial";color: #000000}
body {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select {FONT-SIZE: 9PT;font-family: Verdana,宋体}
option {FONT-SIZE: 9pt;font-family: Verdana,宋体}
textarea {FONT-SIZE: 9pt;font-family: Verdana,宋体}
-->
</STYLE>
</head>


<div align="center">
	<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table1">
		<tr>
			<td>　</td>
		</tr>
		<tr>
			<td>
			<p align="center"><a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="?delid=all">清除全部日志</a></td>
		</tr>
		<tr>
			<td>　</td>
		</tr>
	</table>
</div>
<div align="center">
	<table border="1" cellpadding="2" width="750" id="table2" style="border-collapse: collapse" bordercolor="#C0C0C0">
		<tr>
			<td background="images/bg1.gif" height="25" width="163" align="center">
			<font color="#FFFFFF">时间</font></td>
			<td background="images/bg1.gif" height="25" width="576" align="center">
			<font color="#FFFFFF">事件</font></td>
		</tr>
<%

delid=trim(Request("delid"))

if delid="all" then
	addtime=date()
	conn.Execute "delete from [blog] "
end if

conn.Execute "delete from [blog] where datediff('d',addtime,now())>30 "
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [blog] order by id desc",conn,1,1
if rs.recordcount<>0 then

page=int(request("page"))
rs.PageSize=20
pagecount=rs.pagesize
if page<=0 then page=1
if request("page")="" then page=1
rs.AbsolutePage=page

for i=0 to pagecount
%>
		<tr>
			<td width="163" align=center><%=rs("addtime")%></td>
			<td width="576"><%=rs("content")%></td>
		</tr>
<%
rs.movenext
if rs.eof then exit for
next
end if

%>
	</table>
</div>
<BR>
<center>
<%if rs.recordcount<>0 then
if page>1 then
response.write "<a href="&request.servervariables("URL")&"?page=1&id="&id&"&word="&word&"&lm="&lm&">首页</a>　"
response.write "<a href="&request.servervariables("URL")&"?page="&page-1&"&id="&id&"&word="&word&"&lm="&lm&">上一页</a>　"
end if
if page<rs.pagecount then
response.write "<a href="&request.servervariables("URL")&"?page="&page+1&"&id="&id&"&word="&word&"&lm="&lm&">下一页</a>　"
response.write "<a href="&request.servervariables("URL")&"?page="&rs.pagecount&"&id="&id&"&word="&word&"&lm="&lm&">尾页</a>　"
end if
response.write "共"&rs.recordcount&"条　每页显示"&pagecount&"条　共"&rs.pagecount&"页　"
%>
<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>
<select size="1" onchange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
<%for i=1 to rs.pagecount%>
<option value="<%=request.servervariables("URL")%>?page=<%=i%>&id=<%=id%>&word=<%=word%>&lm=<%=lm%>" <%if page=i then response.write "selected"%> style="font-size: 9pt">第<%=i%>页</option>
<%next%>
</select>
<%end if%>
</center>
<%
conn.close:set conn=nothing
%>