📄 view.asp
字号:
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,"view.asp"
showContent
showpage totalput,MaxPerPage,"view.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"view.asp"
showContent
showpage totalput,MaxPerPage,"view.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"view.asp"
showContent
showpage totalput,MaxPerPage,"view.asp"
end if
end if
Session("currentPage")=currentPage
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
%> <% if searchname<>null or searchname<>"" then
Response.write("搜索关键字<font color=red>" & searchname & "</font>的结果如下:")
end if
%> <span style="font-size: 9pt"></span>
<div align="center">
<table border="1" cellspacing="0" width="756" cellpadding="0" bgcolor="#808080" height="82" bordercolorlight="#808080" bordercolordark="#808080" style="border-collapse: collapse" bordercolor="#111111">
<tr bgcolor="#FFB895">
<td width="35" align="center" height="20" bgcolor="#D9D9D9">
<span style="font-size: 9pt">编号</span></td>
<td width="304" align="center" height="20" bgcolor="#D9D9D9">
<p>
<span style="font-size: 9pt"> 订单名称(<span lang="zh-cn">客户姓名</span>)</span><font color=#FF8001><span style="font-size: 9pt"> [点击主题查看详细信息]</span></font></td>
<td width="216" align="center" height="20" bgcolor="#D9D9D9">
<span lang="zh-cn">客户联系电话:</span></td>
<td width="190" align="center" height="20" bgcolor="#D9D9D9"><span style="font-size: 9pt">登记日期</td>
</tr>
<% do while not rs.eof %>
<tr bgcolor="#FFE1D2">
<td height="33" width="35" bgcolor="#D9D9D9">
<p align="center"><span style="font-size: 9pt"><%=rs("ID")%>
</td>
<td width="304" bgcolor="#D9D9D9" height="33">
<p align="left">
<span style="font-size: 9pt"> <a href="#" onclick="javascript:window.open('viewdetail.asp?info_id=<% =rs("ID") %>','InfoDetail','toolbar=no,scrollbars=yes,resizable=yes,top=0,left=0,width=525 height=510'); ">
<b>宾客:</b><%=rs("title")%><%=rs("area")%>的订单数据!</a>
</td>
<td width="216" align=center height="33" bgcolor="#D9D9D9"><span style="font-size: 9pt"> <%=rs("phone")%> </td>
<td width="190" height="33" bgcolor="#D9D9D9">
<p align="center"><span style="font-size: 9pt"><%=rs("mess_date")%>  <%=rs("mess_time")%>
</td>
</tr>
<tr>
<td width="35" bgcolor="ffffff" height="36"> </td>
<td colspan=3 bgcolor="ffffff" height="36" width="714">
<p align=right>
<form action="view.asp" method="post">
<span style="font-size: 9pt">
<input name="keys" type="hidden" value="DeleteID">
<input name="UserID" type="hidden" value="<%=rs("ID")%>">
</span>
<input type="submit" style="background-color: rgb(255,100,10);border:1px double rgb(255,128,1);font:9pt" value="=删 除=" name="B3"></form>
</td>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%> </span>
</table>
</div>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Get action="&filename&"><table align=center width=100% height=18 border=0 bgcolor=rgb(236,236,255) style=""border:1px double rgb(180,180,255)"">"
response.write "<tr><td width=10 align=center></td><td><font color='#000080'></font>"
if CurrentPage<2 then
response.write "<font color='#000080'style=font-size:9pt>首页 上页</font> "
else
response.write "<a href="&filename&"?page=1&>首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&">上页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)
response.write ">下页</a> <a href="&filename&"?page="&n&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>条信息</font></span><td> "
response.write "<td><font color='#000080'>转到:</font><input type='text' name='page' size=2 maxlength=10 style=""background-color: rgb(255,255,255);border:1px double rgb(180,180,255);"" value="¤tpage&">"
response.write "<font color='#000080'> 搜索:</font><input type='text' name='searchname' size=8 maxlength=10 style=""background-color: rgb(255,255,255);border:1px double rgb(180,180,255);""> <input type=""submit"" value=""立刻搜索"" style=""border:1px double rgb(255,128,1);font:9pt"">"
response.write "</td></tr></table></form>"
end function
%><span style="font-size: 9pt"> </span> </td>
</tr>
</table>
<div align="center">
<center>
<table width="759" border="0" cellspacing="0" cellpadding="0" style="border-right: 1px solid #808080; border-bottom: 1px solid #808080; ; border-collapse:collapse; border-left-style:solid; border-left-width:1; border-top-width:1" bordercolorlight="#808080" bordercolordark="#E3E3E3" bordercolor="#111111">
<tr>
<td bgcolor="#000000" width="757"></td>
</tr>
<tr>
<td class="p9" bgcolor="#D9D9D9" height="20" width="757">
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -