
<!--#include virtual="/inc/conn.asp"-->
<!--#include virtual="/inc/sitecon.asp"-->
<!--#include virtual="/inc/chkuser.asp"-->

<%
Const stringmodarr = "0123456789abcdefghijklmnopqrstuvwxyz"
strlength = Len(stringmodarr)
Randomize timer
For i = 1 To 25 
randarr2 = randarr2&Mid(stringmodarr,Int(Rnd * strlength + 1),1)  
Next 

if SafeRequest("act")="alipay" then
aynameid=SafeRequest("aynameid")
aymail=SafeRequest("aymail")
if aynameid="" then call PopErr("获取参数错误")
sql="select * from ayname where aynameid="&clng(aynameid)&"" 
rs.open sql,conn,1,1
if rs.bof and rs.eof then
call PopErr("未找到此会员")
else
aytrueuser=trim(rs("aytrueuser"))
end if
rs.close

title="来自 "&webname&"-添加付款好友,提高结算效率" 
body="亲爱的"&aytrueuser&"你好：<br><br>请添加xx支付宝好友！会更加便利的提供结算业务！<br><br>爱卡付款支付宝：xx@qq.com <br><br>"&weburl&""

conn.Execute("Insert Into mailto(mto,mti,mcon) values('"&trim(aymail)&"','"&trim(title)&"','"&trim(body)&"')")
%>
<script language=javascript>  
alert("通知成功");
this.window.opener = null;  
window.close();  
</script>
<%response.End()
end if
 

if SafeRequest("act")="renzheng" then
aynameid=SafeRequest("aynameid")
aymail=SafeRequest("aymail")
if aynameid="" then call PopErr("获取参数错误")
sql="select * from ayname where aynameid="&clng(aynameid)&"" 
rs.open sql,conn,1,1
if rs.bof and rs.eof then
call PopErr("未找到此会员")
else
aytrueuser=trim(rs("aytrueuser"))
end if
rs.close

title="来自 "&webname&"-尽快认证通知" 
body="亲爱的"&aytrueuser&"你好：<br><br>为保障买家权益 2016年5月15日起 未认证商户暂停结算！<br><br>请没认证的商户尽快认证 我们不会透露商户联系方式<br><br>只是为了在紧急情况下 与商户取得联系<br><br>商户预留联系方式有误的 联系客服人员做修改<br><br>"&weburl&""

conn.Execute("Insert Into mailto(mto,mti,mcon) values('"&trim(aymail)&"','"&trim(title)&"','"&trim(body)&"')")
%>
<script language=javascript>  
alert("通知成功");
this.window.opener = null;  
window.close();  
</script>
<%response.End()
end if



if SafeRequest("act")="shenhe" then
call logquanxian("c2",1)
suid=SafeRequest("suid")
sname=SafeRequest("sname")
aytel=SafeRequest("aytel")
aymail=SafeRequest("aymail")
page=SafeRequest("page")
id=SafeRequest("id")
ccat=SafeRequest("ccat")
if ccat="yes" then
if id="" then call PopErr("获取参数错误")
sql="select * from ayname where aynameid="&clng(id)&"" 
rs.open sql,conn,1,3
if rs.bof and rs.eof then
call PopErr("未找到此会员")
else
	if cint(rs("ayshenhe"))=0 then 
	rs("ayshenhe")=1
	elseif cint(rs("ayshenhe"))=1 then
	rs("ayshenhe")=0
	end if
rs.update
rs.close
end if
end if
'title="来自 "&webname&"-审核通过通知" 
'body="尊敬的"&sname&"："&webname&"提醒您：您的用户名：["&suid&"],已经审核通过！"
'telbody="尊敬的"&sname&"：您的用户名：["&suid&"],已经审核通过！"
'conn.Execute("Insert Into mailto(mto,mti,mcon) values('"&trim(aymail)&"','"&trim(title)&"','"&trim(body)&"')")
'conn.Execute("Insert Into mailto(mfs,mto,mcon) values('1','"&trim(aytel)&"','"&telbody&"')")
			
if ccat="yes" then
'call PopErr2("审核并通知成功","ik_adminuser.asp?page="&page&"")
%>
<script language=javascript>  
alert("审核成功");
this.window.opener = null;  
window.close();  
</script>
<%
else
response.Write "邮件，短信通知成功"
end if
response.End()
end if

if SafeRequest("act")="zizhu0" then  '自助修改商户信息
call lognamecode()
call logquanxian("b2",1)
uid=SafeRequest("uid")
suid=SafeRequest("suid")
sname=SafeRequest("sname")
aymail=SafeRequest("aymail")
sum=randarr2
sql="select * from ayzizhu where ayzizhusum='"&trim(sum)&"'" 
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
response.Write "验证码重复，请重新发起！"
response.End()
else
rs.addnew
rs("ayzizhusum")=trim(randarr2)
rs("ayzizhuuid")=trim(uid)
rs("ayzizhulb")=0
rs.update
end if
rs.close
title="来自 "&webname&"-商户信息自助修改通知" 
body="尊敬的"&sname&"：<br><br>您提交了商家信息自助修改申请，请在三天内点击下面的链接进行相关操作！<br><br><a href="&weburl&"aotoedit?u="&sum&" target=_blank>"&weburl&"aotoedit?u="&sum&"</a>"
conn.Execute("Insert Into mailto(mlei,mto,mti,mcon) values('2','"&trim(aymail)&"','"&trim(title)&"','"&trim(body)&"')")

response.Write "通知成功"
response.End()
end if


if SafeRequest("act")="zizhu1" then  '自助修改结算信息
call lognamecode()
call logquanxian("b2",1)
uid=SafeRequest("uid")
suid=SafeRequest("suid")
sname=SafeRequest("sname")
aymail=SafeRequest("aymail")
sum=randarr2
sql="select * from ayzizhu where ayzizhusum='"&trim(sum)&"'" 
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
response.Write "验证码重复，请重新发起！"
response.End()
else
rs.addnew
rs("ayzizhusum")=trim(randarr2)
rs("ayzizhuuid")=trim(uid)
rs("ayzizhulb")=1 
rs.update
end if
rs.close
title="来自 "&webname&"-商户结算信息自助修改通知" 
body="尊敬的"&sname&"：<br><br>您提交了商家结算信息自助修改申请，请在三天内点击下面的链接进行相关操作！<br><br><a href="&weburl&"aotoedit?u="&sum&" target=_blank>"&weburl&"aotoedit?u="&sum&"</a>"
conn.Execute("Insert Into mailto(mlei,mto,mti,mcon) values('2','"&trim(aymail)&"','"&trim(title)&"','"&trim(body)&"')")

response.Write "通知成功"
response.End()
end if







call logquanxian("c2",1)
sname=SafeRequest("sname")
aytel=SafeRequest("aytel")
aymail=SafeRequest("aymail")
kucun=SafeRequest("kucun")
title="来自 "&webname&"-卡密库存不足通知" 
body="尊敬的用户："&webname&"提醒您：您的商品["&sname&"],卡密库存仅剩"&kucun&"张,请及时添加卡密！"
telbody="您的商品："&sname&",卡密库存仅剩"&kucun&"张,请及时添加卡密"
			
conn.Execute("Insert Into mailto(mto,mti,mcon) values('"&trim(aymail)&"','"&trim(title)&"','"&trim(body)&"')")
conn.Execute("Insert Into mailto(mfs,mto,mcon) values('1','"&trim(aytel)&"','"&telbody&"')")

%>
<br><br><br>
<div align="center">通知成功！</div>
