📄 book.asp
字号:
<%dbdns="../"%>
<!--#include file="../inc/conn.asp"-->
<!--#include file="cook.asp"-->
<%if fla9<>1 then
response.write "<script>alert('操作权限出错,您没有权限操作些功能');history.go(-1);</Script>"
Response.End
end if
sortid=request("sortid")
page=request("page")
if page="" then page=1
if request("action")="del" then
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("delete from SMT_leaveword where SMT_book_id=" & id(i))
next
Response.Redirect "book.asp?sortid="&sortid&"&page="&page
end if
%>
<%=citycss%>
<script>
function CheckAll(form) {
for (var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked;
}
}
</script>
<body style="margin:10">
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF">
<tr align=center bgcolor=#efefef><td height=25 align=center>
<a href=book.asp>全部</a>
<a href=book.asp?sortid=1>系统留言</a>
<a href=book.asp?sortid=2>企业留言</a>
<a href=book.asp?sortid=3>商机留言</a>
<a href=book.asp?sortid=4>产品留言</a>
<a href=book.asp?sortid=5>展会留言</a>
<a href=book.asp?sortid=6>行业新闻留言</a>
<a href=book.asp?sortid=7>企业新闻留言</a>
</td></tr>
</table>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF">
<form name="from1" method="post" action="book.asp?action=del&sortid=<%=sortid%>&page=<%=page%>">
<tr align=center bgcolor=#efefef>
<%if sortid<>"" then
sql="select * from SMT_leaveword where SMT_book_sort="&sortid&" order by SMT_book_id desc"
else
sql="select * from SMT_leaveword order by SMT_book_id desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "暂无内容"
else
'分页的实现
listnum=25
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if%>
<td width="4%" height=20>编号</td>
<td width=10%>反馈人</td>
<td width=*>内容</td>
<td width="14%">时间</td>
<td width="4%">删除</td>
</tr>
<%do while not rs.eof and i<listnum
n=n+1%>
<tr align=center height=20 title="<%=rs("SMT_book_contact")%>">
<td><%=n%></td>
<td><%=rs("SMT_book_user")%></td>
<td><%=rs("SMT_book_content")%></td>
<td><%=rs("SMT_book_date")%></td>
<td><input type="checkbox" name="ID" value="<%=rs("SMT_book_id")%>" style="border:0"></td>
</tr>
<%rs.movenext
i=i+1
j=j-1
loop%>
<tr>
<%filename="book.asp?sortid="&sortid&""%>
<td colspan=9 align=right bgcolor=#cccccc><%=Rs.recordcount%> 条信息 <%=listnum%> 条信息/页 共 <%=Rs.pagecount%> 页
<% if page=1 then %>
<%else%>
<a href=<%=filename%>><strong>|<<</strong></a>
<a href=<%=filename%>&page=<%=page-1%>><strong><<</strong></a>
<a href=<%=filename%>&page=<%=page-1%>><b>[<%=page-1%>]</b></a>
<%end if%>
<% if Rs.pagecount=1 then %>
<%else%>
<b>[<%=page%>]</b>
<%end if%>
<% if Rs.pagecount-page <> 0 then %>
<a href=<%=filename%>&page=<%=page+1%>><b>[<%=page+1%>]</b></a>
<a href=<%=filename%>&page=<%=page+1%>><strong>>></strong></a>
<a href=<%=filename%>&page=<%=Rs.pagecount%>><strong>>>|</strong></a>
<%end if%>
<input name="chkall" type="checkbox" id="chkall" value="select" onclick="CheckAll(this.form)" style="border:0">全选 <input type="submit" name="Submit" value="删 除"> </td>
<%end if%></tr>
</form>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -