📄 documentlist.asp
字号:
<%
'功能:公文列表
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%
'------------------------------------------------设置参数
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
maxmessage=15 '每页显示记录数
currentpage=request("page") '当前页码
Search=request("Search") '上次查询条件
'------------------------------------------------
'------------------------------------------------取记录
'分页取记录 (返回rs对象)
'rs.recordcount 为记录总数
'rs.PageSize 为本页记录数
'
table="tbioaOffice_Document" '表名
'接受查询参数
'查寻条件
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 DocumentID desc"
'response.write sql
rs.open sql,oConn,1,1
Showpage=SearchPaging(rs,maxmessage,currentpage,Search)
%>
<html>
<head>
<title>iWebOffice2003测试</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel='stylesheet' type='text/css' href='../css/main.css'>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body bgcolor="#ffffff">
<span class="style1">安装iWebOffice2003插件,请你在打开本页面的弹出窗口时,选择[是]按钮,才能正常运行。</span><br>
<hr size=1>
<OBJECT id="WebOffice" width="100%" height="24" classid="clsid:23739A7E-5741-4D1C-88D5-D50B18F7C347" codebase="iWebOffice2003.ocx#version=6,4,0,4" >
</OBJECT>
<hr size=1>
<%=Showpage%>
<br>
<%
if rs.RecordCount=0 then
response.write "<BR><BR>暂时为空!"
else
%>
<table border=0 cellspacing='1' cellpadding='2' width=100% align=center class=tab>
<tr class="tdTop">
<td align=center nowrap class="td1">编号</td>
<td align=center nowrap class="td1">主题</td>
<td align=center nowrap class="td1">作者</td>
<td align=center nowrap class="td1">类型</td>
<td align=center nowrap class="td1">日期</td>
<td colspan="4" align=center nowrap class="td1">操作</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%>"><%=rs("DocumentID")%> </td>
<td class="<%=td_class%>"><%=rs("Subject")%> </td>
<td class="<%=td_class%>"><%=rs("Author")%> </td>
<td class="<%=td_class%>"><%=rs("FileType")%> </td>
<td class="<%=td_class%>"><%=CDate(rs("FileDate"))%> </td>
<td width="20" nowrap class="<%=td_class%>">
<input type=button onclick="javascript:location.href='DocumentEdit.asp?RecordID=<%=rs("RecordID")%>&EditType=0';" value="查看" class="button0" onmouseout=className="button0" onmouseover=className="button1">
</td>
<td width="20" nowrap class="<%=td_class%>"><input name="button3" type=button onClick="javascript:location.href='DocumentEdit.asp?RecordID=<%=rs("RecordID")%>&EditType=2';" value="批改" <% if rs("Status")="EDIT" then Response.write "disabled" %> class="button0" onmouseout=className="button0" onmouseover=className="button1"></td>
<td width="20" nowrap class="<%=td_class%>"><input name="button2" type=button onClick="javascript:location.href='DocumentEdit.asp?RecordID=<%=rs("RecordID")%>&EditType=3';" value="审核" <% if rs("Status")="EDIT" then Response.write "disabled" %> class="button0" onmouseout=className="button0" onmouseover=className="button1"></td>
<td width="20" nowrap class="<%=td_class%>"><input name="button" type=button onClick="javascript:window.open('<%=rs("HTMLPath")%>');" value="HTML" <% if isNull(rs("HTMLPath")) or rs("HTMLPath")="" then Response.write "disabled" %> class="button0" onmouseout=className="button0" onmouseover=className="button1"></td>
</tr>
<%
rs.MoveNext
next
%>
</table>
<%
end if
rs.close
%>
</body>
</html>
<%'释放对象变量
oConn.close
set oConn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -