📄 show.asp
字号:
<%
action=request("action")
%>
<%
if action="del" and request("id")<>"" then
dim strsql
strsql="delete from design where id="&request("id")
conn.execute strsql
end if
%>
<%
if session("login")<>1 then
response.redirect("index.asp")
end if
%>
<!--#include file="adovbs.inc"-->
<!--#include file="conn.asp"-->
<%
dim rs
dim sql
pmcount=5
set rs=server.createobject("adodb.recordset")
sql="select typeid,id,filename from design order byid desc"
rs.pagesize=pmcount
rs.opensql,conn,1,1
if not(rs.eof and rs.bof)then
totalrec=rs.recordcount
mpage=rs.recordcount
currentpage=requset("page")
if currentpage<>"" then
currentpage=cint(currentpage)
if currentpage<1 then
currentpage=1
end if
else
currentpage=1
endif
if currentpage*pmcount>totalrec and not((currentpage-1)*pmcount<totalrec) then
currentpage=1
end if
rs.absolutepage=currentpage
rowcount=rs.pagesize
%>
<table width="80%" border="0" cellpadding="5" cellspacing="1" bgcolor="#cccccc">
<tr bgcolor="#ffffff">
<td align="center">类型编号</td>
<td align="center">客户名称</td>
<td colspan="2" align="center">管理</td>
</tr>
<%
do while not rs.eof and rowcount>0
%>
<tr bgcolor="#ffffff">
<td align="center"><%=rs(typeid)%></td>
<td align="center"><%=rs(filename)%></td>
<td align="center"><a href="edit.asp?action=modify&id=<%=rs(id)%>"
style="text-decoration:none">修改</a></td>
<td align="center"><a href="show.asp?action=del&id=<%=rs(id)%>"
style="text-decoration:none">删除</a></td>
</tr>
<%
rowcount=rowcount-1
rs.movenext
loop
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
</table>
<%
sub listpage()
if mpage<=1 then exit sub
%>
<table border="0">
<tr>
<td>
<%if currentpage=1 then%>
<font color=darkgray>首页</font>
<%else%>
<a href="<%=request.servervariables("script_name")%>?page=1">首页</a>
<a href="<%=request.servervariables("script_name")%>?page=<%=currentpage-1%>">首页</a><%end if%>
<%if currentpage=mpage then%>
<font color=darkgray face="arial">后页</font>
<%else%>
<a href="<%=request.servervariables("script_name")%>?page=<%=currentpage+1%>">下页</a>
<a href="<%=request.servervariables("script_name")%>?page=<%=mpage%>">末页</a>
<%else%>
总:<%currentpage%>/<%=mpage%>页 <%=pmcount%>设计作品/页 共:<%totalrec%>设计作品
</td>
</tr>
</table>
<%end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -