<% @language="vbscript" %><!--#include file="conn.asp"-->
<!--#include file=fuction.asp -->
<%
response.buffer=true
Response.Expires=0
radiobutton=nosql(Request("radiobutton"))
mail=nosql(Request("mail"))
'submit=requst("submit")
If mail="" Then
response.write "SORRY <br>"
response.write "你的信箱没有填写"
response.end
end if
if Instr(mail,"@")=0 Then
 response.write "SORRY <br>"
 response.write "你的箱地址难道是这个？<br>一看就是假的！"
 response.end
end if
if Instr(mail,".")=0 Then
 response.write "SORRY <br>"
 response.write "你地址难道是这个？<br>一看就是假的！"
 response.end
end if

if radiobutton="ding" then
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from mail"
rs.open sql,conn,1,3
rs.addnew
rs("mail")=mail
rs("date")=now()
rs("ip")=Request.ServerVariables("REMOTE_HOST")
if session("username")<>"" Then
rs("username")=session("username")
end if
rs.update
rs.close
response.write "谢谢您的订阅 <br>"
%>
<%=mail%>
<%
response.write "<script language=javascript>alert('您的邮箱地址已经成功加入我们的邮件列表中，感谢您的支持！');history.go(-1);</script>"
 'response.write " 您的邮箱地址已经成功加入我们的邮件列表中，感谢您的支持<br>"
 'response.write "<a href=javascript:window.close()>关闭本窗口 </a>"
 else
Set rs = Server.CreateObject("ADODB.Recordset")
 sql="delete from mail where mail='"&mail&"' "
  conn.Execute sql
  conn.Close
  set conn=Nothing      
%><%=mail%><%
response.write "<script language=javascript>alert('已经删除，谢谢您的退订阅！');history.go(-1);</script>"
response.End
end if
%>