📄 admlist.asp
字号:
<!--#include file="admcheck.asp"-->
<!--#include file="dbpath.asp"-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css"><!--
td {font-size: 9pt;line-height: 13pt}
a:link {color:#0000FF ;text-decoration:none}
a:visited{color:#0000FF ;text-decoration:none}
a:hover {color: #FF0000;text-decoration:underline}
--></style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table border="0" width="100%" cellspacing="0" cellpadding="3">
<form method="POST" action="admlist.asp">
<tr>
<td width="100%"><p align="center">程序名称、程序介绍:<input name="k" size="30"><input type="submit" value="搜索"></td></tr>
</form>
</table>
<div align="center">
<center>
<table border="0" width="600" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<p align="center"><b>| <a href="admlist.asp">全部程序</a>| <a href="admtype.asp">类别管理</a>
| <a href="admupfile.htm">上传程序</a>
| <a href="admadd.asp">增加程序</a>
| <a href="admpwd.asp">修改密码</a> |
<a href="login.asp">退出登陆</a> |<br>
</b>
<%
sql_type="select * from type"
Set rs_type= Server.CreateObject("ADODB.Recordset")
rs_type.open sql_type,conn,1,1
if not rs_type.eof then
do while not rs_type.eof
k=k+1
if k=8 then%>
|<br>
<%
k=0
end if%>
| <a href="admlist.asp?type=<%=rs_type("type")%>"><%=rs_type("type")%></a>
<%
rs_type.movenext
loop
end if%>|</p>
</td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</center>
</div>
<%
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
MaxPerPage=10 '###每页显示条数
if request("pl")<>"" then
pl=""&request("pl")&""
else
pl="id"
end if
Set rs= Server.CreateObject("ADODB.Recordset")
if request("k")<>"" then
sql="select * from down where name like '%"&request("k")&"%' or note like '%"&request("k")&"%' order by "&pl&" desc"
else
if request("type")<>"" then
sql="select * from down where type='"&request("type")&"' order by "&pl&" desc"
else
sql="select * from down order by "&pl&" desc"
end if
end if
rs.open sql,conn,1,1
if not rs.eof then
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
end if
if rs.eof and rs.bof then
response.write "<p align=center>还 没 有 任 何 程 序</p>"
else
do while not rs.eof%>
<div align="center">
<center>
<table border="1" width="600" bordercolorlight="#000000" cellspacing="0" bordercolordark="#FFFFFF">
<tr>
<td width="100%" bgcolor="#EFEFEF">
<table border="0" width="594" cellspacing="0" cellpadding="0">
<tr>
<td width="450"><font color="#0297df">■</font> <a href="<%=rs("file")%>" title="点击下载"><%=rs("name")%></a></td>
<td width="100">
<p align="center">| <a href="admadd.asp?d=edit&id=<%=rs("id")%>"><font color="#008000">修改</font></a>
| <a href="admsave.asp?d=del&id=<%=rs("id")%>&type=<%=request("type")%>"><font color="#008000">删除</font></a>
|</td>
<td width="49">
<p align="center"><%if rs("ys")<>"" then%><a href="<%=rs("ys")%>" target="_blank"><%else%><font color="#808080"><%end if%>演示</font></a></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
<%i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<div align="center">
<center>
<table border="0" width="600" cellspacing="0" cellpadding="0">
<tr>
<td width="179" nowrap><%if request("k")<>"" then%>搜索结果<%elseif request("type")<>"" then%><%=request("type")%><%else%>全部程序<%end if%>:共找到<font color="#FF0000"><%=rs.recordcount%></font>个程序<%
pageno=request("page")
if MaxPerPage="" or isempty(MaxPerPage) or MaxPerPage<1 then
MaxPerPage=8
end if
rs.pagesize=MaxPerPage '得到每页数
mpage=rs.pagecount '得到总页数
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
%></td>
<td width="421">
<p align="center">[ <%if cint(pageno)>1 then%><a href=admlist.asp?k=<%=request("k")%>&type=<%=request("type")%>><%end if%><<</a> <%if cint(pageno)>1 then%><a href=admlist.asp?page=<%=pageno-1%>&k=<%=request("k")%>&type=<%=request("type")%>><%end if%><</a>
<%
pp=cint(pageno)-4
if pp<1 then
pp=1
end if
for pno=pp to mpage
p=p+1
if pno=cint(pageno) then%> <font color="#FF0000"><%=pno%></font><%else%> <a href=admlist.asp?page=<%=pno%>&k=<%=request("k")%>&type=<%=request("type")%>><%=pno%></a><%end if%>
<%
if p>=9 then exit for
next%> <%if cint(pageno)< mpage then%><a href=admlist.asp?page=<%=pageno+1%>&k=<%=request("k")%>&type=<%=request("type")%>><%end if%>></a> <%if cint(pageno)< mpage then%><a href=admlist.asp?page=<%=mpage%>&k=<%=request("k")%>&type=<%=request("type")%>><%end if%>>></a> ]</td>
</tr>
</table>
</center>
</div>
<%
end if
rs_type.close
set rs_type=nothing
conn.close
set conn=nothing%>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -