<!--#include virtual="/show/adminhead.asp"-->
<!--#include file="adminleft.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />



<title><%=webname%>-最高权限-发信查看</title>
<%
call logquanxian("g1",1)
%>

<DIV>


<%

act=SafeRequest("act")
page=SafeRequest("page")
shouji=SafeRequest("shouji")
email=SafeRequest("email")
weixin=SafeRequest("weixin")
ddh=SafeRequest("ddh")

link="adminmail.asp?act="&act&"&shouji="&shouji&"&email="&email&"&weixin="&weixin&"&ddh="&ddh

if act="bufa" then

rs.open "select * from mailto where mid='"&SafeRequest("id")&"'",conn,1,3
if not(rs.eof) then
rs("mzt")=0
rs("mzt2")=3
rs.update
end if
response.Redirect "adminmail.asp"
end if

if act="jihuo" then
%>
<script language=javascript>  
alert("通知成功");
this.window.opener = null;  
window.close();  
</script>
<%response.End()
end if

if act="del" then
call lognamecode()
'conn.execute("delete from mailto where mzt=1")
conn.execute("delete from mailto")
response.Redirect "adminmail.asp?page="&page
end if

%>
<DIV id=main1200> 
<%call webleft()%>

<DIV id=main_right>
<DIV id=main_right_content>
<STYLE>.apply_style {
	POSITION: absolute
}
.right_title A {
	LINE-HEIGHT: 27px; WIDTH: 126px; DISPLAY: inline-block; BACKGROUND: url(<%=ossurl%>images/bg22.gif) no-repeat; HEIGHT: 27px
}
.right_title A.current {
	BACKGROUND: url(<%=ossurl%>images/main_right_title_bg.gif) no-repeat; COLOR: #fff; FONT-WEIGHT: bold
}
.table_style_1 TD {
	HEIGHT: 38px
}
.table_style_home_info TD {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; HEIGHT: 30px; PADDING-TOP: 0px
}
</STYLE>

<DIV class=right_titleadmin>&nbsp;&nbsp;发信查看 <a style="color:#009900" href="?act=jihuo" target="_blank">[手动激活发送状态]</a> <a style="color:#009900" href="/inc/mailaoto.asp" target="_blank">[开启发信程序]</a></DIV>
<DIV class=main><br>
<form action="?act=cha&page=<%=page%>" method="get" name="form1" id="form1"> 
手机号<input name="shouji" type="text" id="shouji" value="<%if request("shouji")<>"" then response.Write request("shouji")%>" size="25">
邮箱<input name="email" type="text" id="email" value="<%if request("email")<>"" then response.Write request("email")%>" size="25">
微信<input name="weixin" type="text" id="weixin" value="<%if request("weixin")<>"" then response.Write request("weixin")%>" size="25">
订单号<input name="ddh" type="text" id="ddh" value="<%if request("ddh")<>"" then response.Write request("ddh")%>" size="25">
<input type="submit" name="Submit" value="查询"> 
</form><br>

  <table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">
     <form action="?act=alldel&page=<%=page%>" method="post" name="myform" id="myform"> 
       <tr>
        <th align="center" class="border_right border_bottom" >类别
		<th align="center" class="border_right border_bottom" >发送状态        
		<th align="center" class="border_right border_bottom" >返回状态        
		<th align="center" class="border_right border_bottom">收信方
        <th align="center" class="border_right border_bottom">
        标题        
        <th align="center" class="border_right border_bottom">订单        
        <th align="center" class="border_right border_bottom">返回        
        <th align="center" class="border_bottom border_right">时间        </tr>
<%
if shouji<>"" then
rs.open "select * from mailto where mfs=1 and mto='"&shouji&"' order by mid desc",conn,1,1
elseif email<>"" then
rs.open "select * from mailto where mfs=0 and mto='"&email&"' order by mid desc",conn,1,1
elseif weixin<>"" then
rs.open "select * from mailto where mfs=2 and mto='"&weixin&"' order by mid desc",conn,1,1
elseif ddh<>"" then
rs.open "select * from mailto where mdd='"&ddh&"' order by mid desc",conn,1,1
else
rs.open "select top 300 * from mailto order by mid desc",conn,1,1
end if

rs.pagesize=50
pagecount=rs.pagecount 
if request("page")="" then 
page=1
else
page=int(request("page")) 
end if
if page<=0 then page=1 
if request("page")="" then page=1
if not(rs.bof and rs.eof) then
rs.absolutepage=page
do while not rs.eof%>

	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
        <td align="center" class="border_right border_bottom">
		<%
		if cint(rs("mlei"))=2 then
		response.Write "<span style=color:#FF00CC>加急</span>"
		elseif cint(rs("mlei"))=1 then
		response.Write "<span style=color:#339900>普通</span>"
		elseif cint(rs("mlei"))=0 then
		response.Write "群发"
		end if
		%>		</td>
        <td align="center" class="border_right border_bottom">
		<%
		if cint(rs("mzt"))=0 then
		response.Write "待发送"
		else
		response.Write "<span style=color:#339900>已发送</span>"
		end if
		%></td>
        <td align="center" class="border_right border_bottom">
		<%
		if cint(rs("mzt2"))=0 then
		response.Write "<span style=color:#339900>发送成功</span>"
		elseif cint(rs("mzt2"))=1 then
		response.Write "<span style=color:#FF0000>发送失败</span>[<a href=?act=bufa&id="&rs("mid")&">补发</a>]"
		elseif cint(rs("mzt2"))=2 then
		response.Write "<span style=color:#FF0000>黑名单</span>"
		elseif cint(rs("mzt2"))=3 then
		response.Write "待发送"
		end if
		%></td>
        <td align="center" class="border_right border_bottom">
		<%
		if cint(rs("mfs"))=0 then
		response.Write "<span style=color:#339900>"&trim(rs("mto"))&"</span>"
		elseif cint(rs("mfs"))=1 then
		response.Write "<span style=color:#FF6600>"&trim(rs("mto"))&"</span>"
		elseif cint(rs("mfs"))=2 then
		response.Write "<span style=color:#FF6600>"&trim(rs("mto"))&" ["&rs("qtgzh")&"]</span>"
		end if
		%>	</td>
        <td align="center" class="border_right border_bottom">
		<%
		if cint(rs("mfs"))=1 then '手机
		
			if trim(rs("mbid"))<>"" then
			if trim(rs("mbid"))="SMS_68830047" then response.Write "验证码 "
			
			if trim(rs("mbid"))="SMS_74600050" then response.Write "商家-新投诉 "
			if trim(rs("mbid"))="SMS_65965091" then response.Write "商家-投诉进展 "
			if trim(rs("mbid"))="SMS_66090090" then response.Write "商家-投诉再次警告 "
			if trim(rs("mbid"))="SMS_69915046" then response.Write "商家-卡密不足 "
			if trim(rs("mbid"))="SMS_68655087" then response.Write "商家-卖出通知 "
			if trim(rs("mbid"))="SMS_68560117" then response.Write "商家-库存不足 "
			if trim(rs("mbid"))="SMS_69005002" then response.Write "商家-密码重置 "
			if trim(rs("mbid"))="SMS_65975107" then response.Write "商家-找回密码 "
			if trim(rs("mbid"))="SMS_65975107" then response.Write "商家-找回密码 "
			
			
			if trim(rs("mbid"))="SMS_172888959" then response.Write "买家-新投诉查询密码 "
			if trim(rs("mbid"))="SMS_172220668" then response.Write "买家-新投诉查询密码 "
			if trim(rs("mbid"))="SMS_68970054" then response.Write "买家-手机提卡 "
			if trim(rs("mbid"))="SMS_66120069" then response.Write "买家-投诉进展 "
			if trim(rs("mbid"))="SMS_65920181" then response.Write "买家-投诉受理通知 "
			if trim(rs("mbid"))="SMS_68625075" then response.Write "买家-投诉进展 "
			if trim(rs("mbid"))="SMS_68630029" then response.Write "买家-手机提卡 "
			if trim(rs("mbid"))="SMS_142146294" or trim(rs("mbid"))="SMS_142146292" then response.Write "买家-通知撤销投诉 "
			
			
			response.Write trim(rs("mbid"))&"-"&trim(rs("code1"))&"-"&trim(rs("code2"))&"-"&trim(rs("code3"))
			
			else
			response.Write trim(rs("mcon"))
			end if
		
		elseif cint(rs("mfs"))=0 then '邮箱
		response.Write trim(rs("mti"))
		elseif cint(rs("mfs"))=2 then '微信
		
			if cint(rs("wxlei"))=0 then response.Write "商品卖出通知"
			if cint(rs("wxlei"))=1 then response.Write "商品库存不足通知"
			if cint(rs("wxlei"))=2 then response.Write "买家购买成功通知"
			if cint(rs("wxlei"))=3 then response.Write "投诉通知"
		end if

		%></td>
        <td align="center" class="border_right border_bottom"><%=rs("mdd")%></td>
        <td align="center" class="border_right border_bottom">
		<%
		if trim(rs("fanhui"))<>"" then response.Write server.HTMLEncode(rs("fanhui"))
		%>
        </td>
        <td align="center" class="border_bottom border_right"><%=rs("mdate")%></td>
	    </tr>
<%
n=n+1
rs.movenext  '指针向下移动
if n>=rs.pagesize then exit do  
loop
end if
zongshu=rs.RecordCount
rs.close%>
	  

      <tr>
        <td colspan="8">&nbsp;
        

<%if pagecount=0 then   
response.write("首页 ")
elseif page=1 then       
response.write("首页 ")
else%>                   
<a href="<%=link%>&page=1">首页</a>
<%end if

if pagecount=0 then   
response.write("上页&nbsp;")
elseif page=1 then       
response.write("上页&nbsp;")
else%>                   
<a href="<%=link%>&page=<%=page-1%>">上页</a>&nbsp;
<%end if

if pagecount>20 then
if page<=10 then 
aa=1
bb=20
aabu=""
bbbu=" … "
elseif page>=11 then 
aa=page-9
bb=page+10
aabu=" …"
bbbu=" … "
	if bb>=pagecount then 
	aa=pagecount-20
	bb=pagecount
	aabu=" … "
	bbbu=""
	end if
end if
response.Write aabu
for aa=aa to bb
if page=aa then
response.Write("<a href="&link&"&page="&aa&"><strong>"&aa&"</strong></a>&nbsp;")
else
response.Write("<a href="&link&"&page="&aa&">"&aa&"</a>&nbsp;")
end if
next
response.Write bbbu

else

for i=1 to pagecount
if page=i then
response.Write("<a href="&link&"&page="&i&"><strong>"&i&"</a></strong>&nbsp;")
else
response.Write("<a href="&link&"&page="&i&">"&i&"</a>&nbsp;")
end if
next

end if

if pagecount=0 then 
response.write("下页&nbsp;")
elseif page=pagecount then 
response.write("下页&nbsp;")
else%>                    
<a href="<%=link%>&page=<%=page+1%>">下页</a>
<%end if%>
<%if pagecount=0 then  '总页数为0 显示空
response.write("尾页 ") 
elseif page=pagecount then 
response.write("尾页 ")
else%>                    
<a href="<%=link%>&page=<%=pagecount %>">尾页</a>
<%end if

if pagecount<>0 then 
response.Write page&"/"&pagecount
end if
response.Write "&nbsp;共"&zongshu&"条"
%>	<a href="?act=del">删除全部</a> </td>
      </tr></form>
    </table>
</DIV>


</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>



<!--#include virtual="/show/footadmin.asp"-->

