<!-- #include virtual = "/include/myopen.asp" -->
<%
	set RS = Server.CreateObject("ADODB.RecordSet")
	set RS1 = Server.CreateObject("ADODB.RecordSet")
%>
<%
IF Request.Form ("REGISTER") <> "" THEN
		
		'产生密码
					RASTR= "1234567890"
					FOR I = 0 TO 3
					Randomize
					PASSW1= INT(( 10 * RND  ) + 1)
					PASSWORD = PASSWORD & MID(RASTR,PASSW1,1)
					NEXT
	'进行注册
	SQL = "SELECT USER_NAME FROM MEMBER WHERE USER_NAME = '" & REQUEST("USER_NAME") & "'"
	RS.Open SQL,CONN,adOpenKeyset ,adLockReadOnly
	IF RS.RecordCount >0 THEN
	
	'用户已经注册，视为修改
	SQL = "UPDATE MEMBER SET TRUE_NAME = '" & REQUEST("TRUE_NAME") & "',USER_PASS = '" & request("PASS1") & "',PAPER ='" & REQUEST("PAPER") & "',"
	SQL = SQL & "PAPER_CODE = '" & REQUEST("PAPER_CODE") & "',SEX = '" & REQUEST("SEX") & "',"
	SQL = SQL & "STATE_CITY = '" & REQUEST("STATE_CITY") & "',ADDRESS = '" & REQUEST("ADDRESS") & "',POST_CODE = '" & REQUEST("POST_CODE") & "',"
	SQL = SQL & "TELEPHONE = '" & REQUEST("TELEPHONE") & "',FAX = '" & REQUEST("FAX") & "',EMAIL = '" & REQUEST("EMAIL") & "'"
	SQL = SQL & " WHERE USER_NAME = '" & REQUEST("USER_NAME") & "'"
	CONN.Execute (SQL)
	ELSE
	'增加记录
	SQL = "INSERT INTO MEMBER (USER_NAME,USER_PASS,TRUE_NAME,PAPER,PAPER_CODE,SEX,STATE_CITY,ADDRESS,POST_CODE,TELEPHONE,FAX,EMAIL,RE_DATE)"
	SQL = SQL & " VALUES('" & REQUEST("USER_NAME") & "','" & request("PASS1") & "',"
	SQL = SQL & "'" & REQUEST("TRUE_NAME") & "','" & Request("PAPER") & "','" & Request("PAPER_CODE") & "',"
	SQL = SQL & "'" & Request("SEX") & "','" & Request("STATE_CITY") & "',"
	SQL = SQL & "'" & Request("ADDRESS") & "','" & Request("POST_CODE") & "','" & Request("TELEPHONE") & "',"
	SQL = SQL & "'" & Request("FAX") & "','" & Request("EMAIL") & "',#" & DATE() & "#)" 
'发邮件给客户
	Set myMail = Server.CreateObject("CDONTS.NewMail")
	myMail.From = "webmaster@mensun.com"
	myMail.To = REQUEST("EMAIL")
	myMail.Subject = "恭喜您注册成功！美慎成人用品购物中心"
	Abody="尊敬的" & REQUEST("TRUE_NAME") & "(先生/小姐)您好 ： " & chr(13)
	Abody=Abody & "恭喜您，您已成功加入了美慎成人用品（上海）购物中心。以下是您的登陆信息" & chr(13)
	Abody=Abody & "会员名称：" & request("USER——NAME") & chr(13)
	Abody=Abody & "登录密码：" & Request("pass1") & CHR(13)
	Abody=Abody & "您可以随时通过http://www.mensun.com/member/login.asp登陆您的帐户，修改您的注册信息和查询您的订单情况" & CHR(13) 
	Abody=Abody & "如果您还有其他问题或要求，欢迎随时跟我们联系" & chr(13)
	Abody=Abody & "美慎成人用品购物中心 销售部信箱：sales@mensun.com" & chr(13)
	Abody=Abody & "电话：021-63024815" &chr(13)
	Abody=Abody & " 祝您有一个愉快的购物旅程" &chr(13)
	Abody=Abody & " 美慎成人用品购物中心" &chr(13)
	Abody=Abody & CHR(13)
	Abody=Abody & "www.mensun.com  - 促销狂潮，最低2折！！！ " & CHR(13)
		myMail.Body = ABody
		myMail.Send
	CONN.Execute (SQL)
	END IF

%> 
<html>
<head>
<title>会员注册成功</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../news%5B1%5D.css">
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<span class="border"></span> 
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td width="160"><img src="../images/logo.gif" width="160" height="40"> </td>
    <td valign="middle" width="503"> 
      <div align="center"> 
        <div align="center"><!--webbot bot="HTMLMarkup" startspan --><iframe src="../banner.htm" width="468" height="40" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="NO"></iframe><!--webbot 
bot="HTMLMarkup" endspan --> </div>
      </div>
    </td>
    <td width="115"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="20" width="29%"> 
            <div align="center"><img src="../images/ver.gif" width="16" height="16"></div>
          </td>
          <td height="20" width="71%" valign="bottom"><font color="#FFFFFF"><a href="../sales/order_bqz.asp" target="_blank">购物车/结帐</a></font></td>
        </tr>
        <tr> 
          <td height="20" width="29%"> 
            <div align="center"><img src="../images/shouquan.gif" width="16" height="16"></div>
          </td>
          <td height="20" width="71%" valign="bottom"><font color="#FFFFFF"><a href="../member/login.asp" target="_blank">订单查询</a></font> 
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td><img src="../images/guide.gif" width="778" height="53" usemap="#Map2Map" border="0"><map name="Map2Map"><area shape="rect" coords="486,31,551,54" href="../member/member_register.asp" target="_blank"><area shape="rect" coords="551,31,619,57" href="../member/login.asp" target="_blank"><area shape="rect" coords="618,31,685,58" href="../buyway.htm" target="_blank"><area shape="rect" coords="684,31,757,57" href="../liansuo.htm"><area shape="rect" coords="16,7,68,40" href="../default.htm"><area shape="rect" coords="80,7,144,40" href="../search/sub_default.asp?myplate=sex_baojian&amp;Class=%D0%D4%B1%A3%BD%A1%C6%B7&amp;Zlb=%D0%D4%B1%A3%BD%A1%C6%B7"><area shape="rect" coords="156,8,221,40" href="../search/sub_default.asp?myplate=sex_qiju&amp;Class=%D0%D4%B0%AE%C6%F7%BE%DF&amp;Zlb=%D0%D4%B0%AE%C6%F7%BE%DF"><area shape="rect" coords="232,7,296,40" href="../search/sub_default.asp?myplate=sex_vcd&amp;Class=%D3%B0%B5%FA&amp;Zlb=%D3%B0%B5%FA"><area shape="rect" coords="306,8,371,40" href="../search/sub_default.asp?myplate=sex_zbyx&amp;Class=%D5%ED%B1%DF%D3%CE%CF%B7&amp;Zlb=%D5%ED%B1%DF%D3%CE%CF%B7"><area shape="rect" coords="383,7,449,41" href="../search/sub_default.asp?myplate=sex_sjzm&amp;Class=%C9%CC%BC%D2%D7%A8%C2%F4&amp;Zlb=%C9%CC%BC%D2%D7%A8%C2%F4"></map></td>
  </tr>
</table>
<br>
<table width="400" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#6666FF">
  <tr bgcolor="#FFFFFF"> 
    <td height="252"> 
      <div align="center">
        <p><font color="#0000FF">会 员 注 册 成 功 !</font></p>
        <p>您可以用注册的用户名和密码进行订单提交了！</p>
        </div>
    </td>
  </tr>
</table>

  

<br>
  
<div align="center"> 
  <table width="778" border="0" cellspacing="0" cellpadding="0" height="20">
    <tr> 
      <td width="160" bgcolor="#9966FF"> 
        <div align="center"><font color="#FFFFFF">欢迎光临美慎成人用品商城</font></div>
      </td>
      <td bgcolor="#66CCFF"> 
        <div align="center"><a href="/default.asp">首 页</a> | <a href="/about.htm">关于我们</a> 
          | <a href="/ad.htm">广告业务</a> | <a href="../contact.htm">联系我们</a> | <a href="../buyway.htm" target="_blank">购物指南</a> 
          | <a href="/liansuo.htm" target="_blank">加盟连锁店</a><span class=channel style="FONT-SIZE: 9pt"> 
          |</span><a href="mailto:sales@mensun.com"> 批发合作</a></div>
      </td>
    </tr>
  </table>
  <table width="778" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td colspan="2" height="45" > 
        <p align="center">Copyright 2000 - 2001 MENSUN.com, All Rights Reserved 
          <br>
          本站由 上海美慎科技发展有限公司 制作</p>
      </td>
    </tr>
  </table>
</div>
</body>
</html>

<%
END IF
IF REQUEST("REGIMIDI") <> "" THEN '用户修改其注册信息
	SQL = "UPDATE MEMBER SET USER_PASS = '" & request("PASSWD") & "',PAPER ='" & REQUEST("PAPER") & "',"
	SQL = SQL & "PAPER_CODE = '" & REQUEST("PAPER_CODE") & "',SEX = '" & REQUEST("SEX") & "',"
	SQL = SQL & "STATE_CITY = '" & REQUEST("STATE_CITY") & "',ADDRESS = '" & REQUEST("ADDRESS") & "',POST_CODE = '" & REQUEST("POST_CODE") & "',"
	SQL = SQL & "TELEPHONE = '" & REQUEST("TELEPHONE") & "',FAX = '" & REQUEST("FAX") & "'"
	SQL = SQL & " WHERE USER_NAME = '" & Request.Cookies ("USER_NAME") & "'"
	CONN.Execute (SQL)
	

%>
<html>
<head>
<title>会员注册成功</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.height {  line-height: 0.5pt}
td {  }
.word {  font-size: 9pt; color: #FFFFFF}
a:hover {  color: #CCFFCC; text-decoration: underline}
a {  color: #FFFFFF; text-decoration: none}
.border {  border-color: black #FF3300 black black; border-style: solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 0px}
-->
</style>
</head>

<body bgcolor="#FFFFFF">
<p><span class="border"></span> <!-- #include virtual = "/plate/top.htm" --> <br>
</p><p>&nbsp;</p><table width="300" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#FF0033">
  <tr bgcolor="#FFCCCC"> 
    <td height="50"> 
      <div align="center">会 员 注 册 信 息 修 改 成 功</div>
    </td>
  </tr>
</table>
<br>
<div align="center"> 
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</div>
<!-- #include virtual = "/plate/button.htm" --> 
</body>
</html>

<%
END IF
%>

<%
IF REQUEST("dele") <> "" THEN '用户删除其注册信息
	SQL = "DELETE * FROM MEMBER WHERE USER_NAME = '" & Request.Cookies ("USER_NAME") & "' AND USER_PASS = '" & Request.Cookies ("PASS") & "'"
	CONN.Execute (SQL)
	Response.Cookies ("USERID") = ""
	Response.Cookies ("PASSWORD") = ""
	Response.Redirect ("/")
%>
<%
END IF
%>
