?? mail_list_del.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 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: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 + -