📄 msg_guanli.asp
字号:
<%if session("checked")<>"yes" then
response.Redirect "../login.asp"
else%>
<!--#include file="dataconn2.asp"-->
<% Response.buffer=true %>
<%
set data2=server.createobject("adodb.recordset")
sq_2="select * from msg_book order by id desc"
data2.open sq_2,conn,1,1
%>
<% Select case Request.QueryString("op")
Case "del"
Call del()
Case else
Call disp()
End Select
%>
<%sub disp()%>
<%
dim i,intPage,page,pre,last,filepath
data2.PageSize = 15 '这里设定每页显示的记录数
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= data2.PageCount then
intpage = data2.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not data2.eof then
data2.AbsolutePage = intpage
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
<base target="_self">
<style type="text/css">
<!--
body,td,th {font-family: 宋体, Arial;
font-size: 12px;}
body {margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;}
a {font-size: 12px;}
a:link {
text-decoration: underline;
color: #000000;
}
a:visited {
text-decoration: underline;
color: #000000;
}
a:hover {text-decoration: none;}
a:active {
text-decoration: underline;
color: #000000;
}
-->
</style>
<style fprolloverstyle>A:hover {
color: #000000;
font-family: 宋体;
font-size: 12px;
text-decoration: none;
}
</style>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"">
<table cellpadding="0" width="80%" height="31" style="border-collapse: collapse" border="1" bordercolor="#C0C0C0" align="center">
<tr>
<td height="16" width="63%" bgcolor="#9900FF" align="center">
<b><font color="#FFFFFF">留言标题</font></b></td>
<td height="16" width="20%" bgcolor="#9900FF" align="center"><b>
<font color="#FFFFFF">留言时间</font></b></td>
<td height="16" width="16%" colspan="2" bgcolor="#9900FF" align="center">
<b><font color="#FFFFFF">操作</font></b></td>
</tr>
<tr>
<% for i=1 to data2.PageSize
if data2.EOF or data2.BOF then exit for %>
<td height="16" width="63%"><a href="disp_msg.asp?id=<%=data2("id")%>" target=_blank ><%=left(data2("title"),80)%></a></td>
<td height="16" width="20%"><%=data2("date")%></td>
<td height="16" width="8%">
<p align="center"><a href="disp_msg.asp?id=<%=data2("id")%>" target=_blank >回复</a></td>
<td height="16" width="8%">
<p align="center"><a href="msg_guanli.asp?op=del&id=<%=data2("id")%>" onClick="return confirm('要删除它吗?')">删除</a></td></tr>
<% data2.movenext
next %>
</table>
<table width="80%" align="center">
<tr>
<%if data2.pagecount > 0 then%>
<td width="41%" align="left"><font color="#808080"> 总留言条数:<%=data2.RecordCount%> 当前页<%=intpage%>/<%=data2.PageCount%>
<%else%>
当前页0/0</font></td>
<%end if%>
<td width="52%" align="right"> :<a href="msg_guanli.asp?page=1">首页</a>:
<%if pre then%>:<a href="msg_guanli.asp?page=<%=intpage -1%>">上页</a>: <%end if%>:<a href="msg_guanli.asp?page=<%=intpage +1%>">下页</a>:
:<a href="msg_guanli.asp?page=<%=data2.PageCount%>">尾页</a>: <font color="#808080">转到第
<select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%for i = 1 to data2.PageCount
if i = intpage then%>
<option value="msg_guanli.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="msg_guanli.asp?page=<%=i%>"><%=i%></option>
<%end if
next%>
</select>页</font></font>
</td>
</tr>
</table>
</body>
</html>
<%end sub%>
<%sub del()
del_msg="delete * from msg_book where id="&request("id")
conn.execute del_msg
response.redirect "msg_guanli.asp"
set del_msg=nothing
conn.close
set conn=nothing
end sub%>
<%sub del_s()
response.redirect "msg_guanli.asp"
end sub%>
<% data2.close
set data2=nothing
conn.close
set conn=nothing %>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -