⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list.asp

📁 三鸟个人网站源码。
💻 ASP
字号:
<!--#include file="users.asp" -->
<%
if session("user")="" then
	Response.redirect "index.asp"
	response.end
else
	Set admin = Server.CreateObject("ADODB.Recordset")
	asql="SELECT * FROM admin where admin='"&session("user")&"'"
	admin.OPEN asql, Conn,1,1
	if admin.eof and admin.bof then
		Response.redirect "index.asp"
		response.end
	else
		if session("pas")<>admin("pws") then
			Response.redirect "index.asp"
			response.end
		end if
	end if
	admin.close
	set admin=nothing
end if
if request("act")="logout" then
	session("user")=""
	session("pas")=""
	Response.redirect "index.asp"
end if
search=request.form("search")
tpe=request("type")
searchtype=request("searchtype")
if search<>"" then
	if searchtype="0" then
		response.write "请选择搜索范围"
		response.end
	end if
end if
If request.querystring("page")="" Then
	absPageNum = 1
else
	absPageNum=cint(request.querystring("page"))
end if
RecordPerPage = 8
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorType = adOpenStatic
rs.CacheSize = RecordPerPage
if tpe<>"" and search="" then
	sql="SELECT * FROM download where sortcount="&tpe&" order by time desc"
elseif search<>"" and searchtype<>"0" then
	sql="select * from download where "&searchtype&" like '%"&search&"%' order by time desc"
else
	sql="SELECT * FROM download order by time desc"
end if
rs.OPEN sql, Conn,1,1
rs.PageSize = RecordPerPage
Tol = rs.PageCount
		If Not(rs.EOF) Then
			rs.AbsolutePage = absPageNum
		End If
%>
<!--#include file="code.asp" -->
<!--#include file="first.asp" -->
<table border=0 cellspacing=0 style='border-collapse:collapse' width=735 height=233 cellpadding=3>
<tr>
<td width=185 valign=top>
<!--#include file="inc.asp" -->
</td>
<td width=550 height=233 valign=top>
<table border=1 cellpadding=3 cellspacing=0 style='border-collapse:collapse' bordercolor=#C0C0C0 width=100%>
<tr>
<td width=100% align=right class=shadow2>
<%
for ppages=1 to rs.pagecount
if ppages=cint(absPageNum) then
%>
<b><font color=#000000>[<%=ppages%>]</font></b>
<%
else
	if tpe="" then
%>
<a href='list.asp?page=<%=ppages%>'>[<%=ppages%>]</a>
<%	elseif tpe<>"" then%>
<a href='list.asp?type=<%=tpe%>&page=<%=ppages%>'>[<%=ppages%>]</a>
<%
	end if
end if
next
abcd=absPageNum+1
if abcd>=rs.pagecount then
	abcd=rs.pagecount
end if
%>
<%if tpe="" then%>
<a title='下一页' href='list.asp?page=<%=abcd%>'>[>]</a>
<%elseif tpe<>"" then%>
<a title='下一页' href='list.asp?type=<%=tpe%>&page=<%=abcd%>'>[>]</a>
<%
end if
%>
</td>
</tr>
</table>
<br>
<%
if rs.eof and rs.bof then
	response.write "<p align='center'>无内容</p>"
else
For absRecordNum = 1 to rs.PageSize%>
<table bgcolor=#bcbcbc border=1 cellpadding=3 cellspacing=0 style='border-collapse:collapse' bordercolor=#111111 width=100%>
<tr>
<td width=50% colspan=2 class=shadow1><b>
<a class=shadow1 href='../show.asp?id=<%=rs("id")%>' target=_blank><%=rs("name")%></a>
</b></td>
<td width=50% colspan=2 align=right class=shadow2>
<a class=shadow2 href='edit.asp?id=<%=rs("id")%>'>编辑</a> ¦ 
<a class=shadow2 href='edit.asp?delete=<%=rs("id")%>'>删除</a>
</td>
</tr>
<tr>
<td width=15% bgcolor=#efefef align=center>更新日期</td> 
<td width=35% bgcolor=white><%=rs("time")%></td> 
<td width=15% bgcolor=#efefef align=center>程序类别</td>
<td width=35% bgcolor=white><%=rs("big")%>┃<%=rs("sort")%>
</td> 
</tr> 
<tr> 
<td width=100% colspan=4 bgcolor=white style='table-layout: fixed; word-break: break-all; text-indent: 40; line-height: 130%'>
<%
kao=rs("show")
if len(kao)>20 then
	kao=left(kao,20) & "..."
	response.write kao
else
	response.write kao
end if
%>
</td> 
</tr> 
</table>
<br>
<%
rs.movenext
    If rs.EOF Then
		Exit For
	End If
Next
end if
%>
<table border=1 cellpadding=3 cellspacing=0 style='border-collapse:collapse' bordercolor=#C0C0C0 width=100%> 
<tr> 
<td width=100% align=right class=shadow2> 
<%
for ppages=1 to rs.pagecount
if ppages=cint(absPageNum) then
%>
<b><font color=#000000>[<%=ppages%>]</font></b>
<%
else
	if tpe="" then
%>
<a href='list.asp?page=<%=ppages%>'>[<%=ppages%>]</a>
<%	elseif tpe<>"" then%>
<a href='list.asp?type=<%=tpe%>&page=<%=ppages%>'>[<%=ppages%>]</a>
<%
	end if
end if
next
%>
<%if tpe="" then%>
<a title='下一页' href='list.asp?page=<%=abcd%>'>[>]</a>
<%elseif tpe<>"" then%>
<a title='下一页' href='list.asp?type=<%=tpe%>&page=<%=abcd%>'>[>]</a>
<%
end if
%>
</td>
</tr>
</table>
<br>
</td>
</tr>
</table>

</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -