📄 mail_list_send.asp
字号:
<%
'OA 表单生成器1.0
'功能:寄件夹列表
'参数:request("page")=int #当前页码; request.form("Search")=chr #上次查询条件
%>
<!--#include file="../inc/NoCatch.asp"-->
<!--#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="tbioamail" '表名
'接受查询参数
'查寻条件
if Search="" then
Search="WHERE "
Search=Search & "folder='寄件夹' and "
Search=Search & "userid="&LoginID'只能查看自己录入的记录
END if
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select id,sdate,fjr,subject,read_mod from " & table & " " & Search & " order by ID desc"
rs.open sql,oConn,1,1
Showpage=SearchPaging(rs,maxmessage,currentpage,Search)
'------------------------------------------------
%>
<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>
<Script language=vbscript>
Sub selectall()
dim C
for each C in eventfrm.elements
if Ucase(C.type) = "CHECKBOX" then
C.checked = all.checked
end if
next
end sub
function delthis()
dim i,j
j=0
for i=0 to ((eventfrm.elements.length)-1)
if (eventfrm.elements(i).checked) then j=1
next
if j=0 then
alert("请选择所要删除的邮件")
exit function
elseif j=1 then
if msgbox("确定要彻底删除这些邮件吗?",vbYesNo+vbQuestion,"询问") = vbYes then
eventfrm.mod.value="0"
eventfrm.submit
else
exit function
end if
end if
end function
function delthis1()
dim i,j
j=0
for i=0 to ((eventfrm.elements.length)-1)
if (eventfrm.elements(i).checked) then j=1
next
if j=0 then
alert("请选择所要删除的邮件")
exit function
elseif j=1 then
eventfrm.mod.value="1"
eventfrm.submit
end if
end function
function move()
dim i,j
j=0
for i=0 to ((eventfrm.elements.length)-1)
if (eventfrm.elements(i).checked) then j=1
next
if j=0 then
alert("请选择所要移动的邮件")
exit function
elseif j=1 then
if folder.value="" then
alert("请选择文件夹")
exit function
end if
eventfrm.action="mail_move.asp"
eventfrm.folder.value=folder.value
eventfrm.submit
end if
end function
</Script>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="mail_menu.html"-->
<hr width="100%" size=1 color="#000000">
<table border=0 cellspacing="0" cellpadding="0">
<tr>
<td nowrap>内部信箱->寄件夹</td>
<td align="right" width=100%>
共有 <%=GetTableNum("tbioamail","where userid="&LoginID&" and folder='寄件夹'")%> 封邮件 | <%=GetTableNum("tbioamail","where userid="&LoginID&" and folder='寄件夹' and read_mod=0")%> 封未看
</td>
</tr>
</table>
<hr width="100%" size=1 color="#000000">
<%=Showpage%>
<%
if rs.RecordCount=0 then
response.write "<BR><BR>暂时为空!"
else
%>
<table width="100%" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td class="tdTop" width="20"></td>
<td class="tdTop">主题</td>
<td class="tdTop" width="130">寄件部门</td>
<td class="tdTop" width="100">寄件人</td>
<td class="tdTop" width="120">时间</td>
</tr>
<form name="eventfrm" method="POST" action="mail_dele.asp">
<input type=hidden name="mod" value="0">
<input type=hidden name="folder" value="0">
<%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%>"><input type="checkbox" value="<%=rs("id")%>" name="del_check"></td>
<td class="<%=td_class%>"><a href="mail_show.asp?id=<%=rs("id")%>" target="_black"><%if rs("read_mod")=0 then response.write"<b>"%><%=HtmlOut(rs("subject"))%></a></td>
<td class="<%=td_class%>"><%=HtmlOut(GetTableValue("tbioaDepartment","name","id",GetTableValue("tbioaUser","department","id",rs("fjr"))))%></td>
<td class="<%=td_class%>"><%=HtmlOut(getusername(rs("fjr")))%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("sdate"))%></td>
</tr>
<%
rs.MoveNext
next
%>
</form>
<tr>
<td class="tdbottom" colSpan="5" align="right">
<input name="all" onclick="selectall()" type="checkbox" value="1">
全选 | <a href="vbscript:delthis()">永久删除</a> | <a href="vbscript:delthis1()">删除到垃圾桶</a> | <a href="vbscript:move()">移动到</a>
<select id="folder">
<option value="" selected>选择文件夹</option>
<option value="收件夹">收件夹</option>
<option value="寄件夹">寄件夹</option>
<option value="草稿夹">草稿夹</option>
<option value="垃圾桶">垃圾桶</option>
</select>
</td>
</tr>
</table>
<%
end if
rs.close
%>
</body>
</html>
<%'释放对象变量
oConn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -