<!--#Include file="Inc/conn.asp"-->
<%response.expires=0
if request.cookies("loginok")="" then
response.redirect "login.asp"
end if
%>
<%
function pagination(pagecount,pagesize,page,resultcount)
Dim query, a, x, temp
pagesize=10
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+this.page.value;return false;"">")
if page<=1 then
Response.Write ("[第一页] [上一页] ")
else
Response.Write("[<a href=" & action & "?" & temp & "Page=1>第一页</a>] ")
Response.Write("[<a href=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</a>] ")
end if
if page>=pagecount then
Response.Write ("[下一页] [尾页]")
else
Response.Write("[<a href=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</a>] ")
Response.Write("[<a href=" & action & "?" & temp & "Page=" & pagecount & ">尾页</a>]")
end if
Response.Write("[页次:<font color=red>" & page & "</font>/" & pageCount)
Response.Write("] [共<font color=red>" & resultcount & "</font>条记录]")' <font color=red>"& pagesize & "</font>条/页]
Response.Write(" 转到" & "<input name=page size=4 value=" & page & ">" & "页<input type=submit value=go>")
End function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="img/makov1.css" type="text/css" rel="stylesheet">
<title>mako测试站点-后台编辑</title>
</head>
<body>
<!--#include file="Inc/top.asp"-->
<table width=768px bgcolor="#FFFFFF" align="center" border="0">
<tr bgcolor="#CCCCCC" height="30"><td valign="middle" align="center" width="100%"><b><a href=ArticleAdd.asp>【添加新文章】</a>&nbsp;&nbsp;<a href=add.asp>【添加文章类别】</a></b></td></tr>
<tr><td valign="top">
<table width=768px height="400" align="center" border="0">
<tr><td width="60%"><b>文章标题</b></td><td width="20%"><b>文章类别</b></td><td width="10%"><b>编辑操作</b></td></tr>
<% set rs=server.createobject("adodb.recordset")
sql="select * from web order by time "
rs.open sql,conn,1,3
do while not (rs.eof or rs.bof)%>
<tr><td><A href=show.asp?id=<%=rs("id")%>&parent=<%=rs("parent")%>><%=rs("title")%></A></td><td><%=rs("parent")%></td><td width="70"><a href=Articlemodify.asp?id=<%=rs("id")%>>修改</a>&nbsp;&nbsp;<a href="Article_del.asp?id=<%=rs("id")%>"
onclick="return confirm('是否确定删除本留言?');">删除</a></td></tr>
<% rs.movenext
loop
%>
</table>
<%call pagination(rs.PageCount,rs.pagesize,page,rs.RecordCount) %>
</td></tr>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>