📄 agentsite_list.asp
字号:
<%
'OA 表单生成器1.0
'功能:事务提醒列表
'参数:request("page")=int #当前页码; request.form("Search")=chr #上次查询条件
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
maxmessage=15 '每页显示记录数
currentpage=request("page") '当前页码
Search=request("Search") '上次查询条件
'------------------------------------------------
'------------------------------------------------取记录
'分页取记录 (返回rs对象)
'rs.recordcount 为记录总数
'rs.PageSize 为本页记录数
'
table="tbioaAgentSite" '表名
'接受查询参数
'查寻条件
if Search="" then
Search="WHERE "
Search=Search & "1=1"'可查看所有人录入的记录
'Search=Search & "userid="&LoginID'只能查看自己录入的记录
END if
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from " & table & " " & Search & " order by ID asc"
rs.open sql,oConn,1,1
'------------------------------------------------
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="AgentSite_menu.html"-->
<hr width="100%" size=1 color="#000000">
<br><br>
<%
if rs.RecordCount=0 then
response.write "<BR><BR>暂时为空!"
else
%>
<table width="100%" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td class="tdTop">内容提示</td>
<td class="tdTop">SQL语句</td>
<td class="tdTop" width="80">实时提醒</td>
<td class="tdTop" colspan="3" width="100">相关操作</td>
</tr>
<%for i = 0 to rs.PageSize-1
If rs.EOF Then Exit For
if i mod 2 = 0 then td_class="td1" else td_class="td2"
%>
<tr>
<td class="<%=td_class%>" nowrap><%=HtmlOut(rs("body"))%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("sqlstr"))%></td>
<td class="<%=td_class%>" width="80"><%=HtmlOut(rs("alertmod"))%></td>
<td class="<%=td_class%>" width="50">
<img border="0" src="../images/icon_edit.gif" align="left">
<a href="AgentSite_edit.asp?id=<%=rs("ID")%>">编辑</a>
</td>
<td class="<%=td_class%>" width="50">
<img border="0" src="../images/icon_dele.gif" align="left">
<a href="AgentSite_dele.asp?id=<%=rs("ID")%>" onClick="return confirm('确定要删除该条记录吗?\n该操作不可恢复!')">删除</a>
</td>
</tr>
<%
rs.MoveNext
next
%>
</table>
<%
end if
rs.close
%>
</body>
</html>
<%'释放对象变量
oConn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -