admin_oa_list_1.asp
来自「一个比较完整的企业erp系统」· ASP 代码 · 共 91 行
ASP
91 行
<!--#include file="../inc/conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>公文列表</title>
</head>
<body>
<%
Dim ipagecount
Dim ipagecurrent
Dim strorderBy
Dim irecordsshown
Dim account
if request.querystring("page")="" then
ipagecurrent=1
else
ipagecurrent=replacebadchar(request.querystring("page"))
end if
dim sql,rs,aa
aa="丙州小学"
sql="Select oa_id,oa_title,oa_content,oa_author,uploadfiles,filename,filecount,filesize,fileext,oa_updatetime,oa_fruit from [oa_data] where oa_fruit like '%"& aa &"%' order by oa_updatetime desc"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.pagesize = 10
rs.cachesize = 10
rs.open sql,conn,1,1
ipagecount = rs.pagecount
If ipagecurrent > ipagecount Then ipagecurrent = ipagecount
If ipagecurrent < 1 Then ipagecurrent = 1
if ipagecount=0 then
response.write "<tr><td align='center'><font color='#FF3300'>暂未公文文件!</font> </tr></td>"
else
rs.absolutepage = ipagecurrent
irecordsshown = 0
do while irecordsshown<10 and NOT rs.EOF
%>
<table width="720" height="26" border="0" align="center" cellpadding="3" cellspacing="3">
<tr>
<td width="65"> </td>
<td width="254"><a href="oa_info.asp?oa_id=<%=rs("oa_id")%>" target="_blank"><%=rs("oa_title")%></a></td>
<td width="93"><%=rs("oa_author")%></td>
<td width="107"><%=rs("oa_updatetime")%></td>
<td width="47"><a href="admin_oa_modi.asp?oa_id=<%=rs("oa_id")%>">修改</a></td>
<td width="97"><a href="admin_oa_del.asp?oa_id=<%=rs("oa_id")%>">删除</a></td>
</tr>
</table>
<%
rs.movenext
loop
end if
rs.Close
set rs=nothing
%>
<table border='0' align="center" cellpadding='5' cellspacing='0' class='s'>
<tr>
<td width="580" height='20'> 共<%=ipagecount%>页 <strong><font color="#FF6600">当前页:</font></strong><%=ipagecurrent%>
<%if ipagecurrent=1 then
Response.Write"首页 | "
else
Response.Write"<a href='oa_list.asp?page=1'>首页</a> | "
end if
if ipagecurrent=1 then
Response.Write"第一页 | "
else
Response.Write"<a href='oa_list.asp?page="&ipagecurrent-1&"'>上一页</a> | "
end if
if ipagecount>ipagecurrent then
Response.Write"<a href='oa_list.asp?page="&ipagecurrent+1&"'>下一页</a> "
else
Response.Write"下一页"
end if
if ipagecount>ipagecurrent then
Response.Write"| <a href='oa_list.asp?page="&ipagecount&"'>末页</a> "
else
Response.Write"| 末页 "
end if%>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?