<!--#include file="conn.asp"-->
<%call insertdate()	'插入注册信息%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>查看注册信息</title>
<link href="css/comm.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/comm.js"></script>
</head>

<body>
<%
If instr(Request.Form("email"),".")=0 or instr(Request.Form("email"),"@")=0 or instr(Request.Form("email"),"@")=1 or instr(Request.Form("email"),"@")=len(email) then 
Response.Write "<script language=javascript>alert('电子信箱格式填写不正确！');javascript:history.back();</script>" 
Response.End 
End If
%>

<div class="bodyDiv">
	<!--#include file="model_top.asp"-->
	
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="86" height="36" align="center" bgcolor="FF8601"><img src="images/2car_40.jpg" width="78" height="28" alt=""></td>
        <td width="162" bgcolor="FF8601" style="font-size:14px; color: #FFFFFF;	font-weight: bold;">登录莆田二手车网</td>
        <td width="43"><img src="images/2car_36.jpg" width="43" height="36" alt=""></td>
        <td valign="bottom" background="images/2car_38.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="4%" height="15"><img src="images/site.gif" width="14" height="13" /></td>
            <td width="96%" valign="bottom">当前位置：会员注册 / 第三步：注册成功</td>
          </tr>
          <tr>
            <td height=8 colspan="2"></td>
          </tr>
        </table></td>
      </tr>
	<tr>
    <td height="4" colspan="4" bgcolor="F0F0F0"></td>
  </tr>
</table>
	
  <table width="100%" height="190" border="0" cellpadding="0" cellspacing="0" style="background-image:url(images/chemo.jpg); background-repeat:no-repeat;background-position:top;">
      <tr>
        <td width="61%" valign="top">
		<table width="483" height="412" border="0" align="right" cellpadding="0" cellspacing="0">
		
          <tr>
            <td height="77" valign="bottom"><img src="images/reglast.jpg" width="416" height="37" /></td>
          </tr>
          <tr>
            <td height="23"><img src="images/Snap45.jpg" width="468" height="6" /></td>
          </tr>
          <tr>
            <td valign="top">
			
			<form name="form22" id="form22" method="post" action="login.asp">
			<table width="100%" border="0" cellspacing="0" cellpadding="3">
              <tr>
                <td width="21%" align="right"><font color="#FF0000">*</font>用&nbsp;户&nbsp;名：</td>
                <td width="79%"><%=trim(Request.form("memberID"))%><input name="memberid" type="hidden" id="memberid" value="<%=trim(Request.form("memberID"))%>" /></td>
              </tr>
              <tr>
                <td align="right"><font color="#FF0000">*</font>您的姓名：</td>
                <td><%=trim(Request.form("name"))%></td>
              </tr>
              <tr>
                <td align="right"><font color="#FF0000">*</font>您的性别：</td>
                <td><%=trim(Request.form("sex"))%></td>
              </tr>
              <tr>
                <td align="right"><font color="#FF0000">*</font>密码：</td>
                <td><%=trim(Request.form("password1"))%><input name="password" type="hidden" id="password" value="<%=trim(Request.form("password1"))%>" /></td>
              </tr>
              <tr>
                <td align="right">密码提示问题：</td>
                <td><%=trim(Request.form("question"))%></td>
              </tr>
              <tr>
                <td align="right">密码提示答案：</td>
                <td><%=trim(Request.form("answer"))%></td>
              </tr>
              <tr>
                <td align="right"><font color="#FF0000">*</font>电子邮件：</td>
                <td><%=trim(Request.form("email"))%></td>
              </tr>
              <tr>
                <td align="right"><font color="#FF0000">*</font>联系电话：</td>
                <td><%=trim(Request.form("usephone"))%></td>
              </tr>
              <tr>
                <td align="right">联系地址：</td>
                <td><%=trim(Request.form("address"))%></td>
              </tr>
              <tr>
                <td align="right">邮政编码：</td>
                <td><%=trim(Request.form("code"))%></td>
              </tr>
			  <tr>
                <td height="32" colspan="2" align="center">请记住您的帐号和密码，您现在可以登录发布信息或者订购汽车！</td>
                </tr>
              <tr>
                <td align="right">　</td>
                <td><input type="image" name="Submit2" value="提交" src="images/200801071114.jpg" style="cursor:pointer;" /></td>
              </tr>
              
            </table>
			</form>
			
			</td>
          </tr>
          <tr>
            <td height="47">　</td>
            </tr>
        </table></td>
        <td width="39%" valign="top">
          <div align="left" style="height:180px;"></div>
		  <div style="border-left:solid 1px #A6BCC9; margin-left:10px;">
		    <table width="100%" border="0" cellspacing="0" cellpadding="5">
              <tr>
                <td colspan="3" style="font-size:14px; font-weight:bold;">在这里您可以知道：</td>
              </tr>
              <tr>
                <td width="22%" align="right"><img src="images/Snap47.gif" width="12" height="12" /></td>
                <td colspan="2" style="font-size:14px;"><a href="login_2.asp">如何买？</a></td>
              </tr>
              <tr>
                <td align="right"><img src="images/Snap47.gif" width="12" height="12" /></td>
                <td colspan="2" style="font-size:14px;"> <a href="login_2.asp">如何卖？</a></td>
              </tr>
              <tr>
                <td align="right"><img src="images/Snap47.gif" width="12" height="12" /></td>
                <td colspan="2" style="font-size:14px;"><a href="#">交易必读</a></td>
              </tr>
              <tr>
                <td>　</td>
                <td width="45%">　</td>
                <td width="33%">　</td>
              </tr>
            </table>
		    <table width="100%" height="98" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center"><img src="images/Snap48.jpg" width="163" height="79" border="0" alt="登录管理" usemap="#Map" /></td>
              </tr>
            </table>
		  </div></td>
      </tr>
    </table>
<!--#include file="model_bottom.asp"-->
</div>

<map name="Map" id="Map"><area shape="rect" coords="4,39,159,75" href="login_2.asp" /></map></body>
</html>
<%
'=====================================
'功能：将2页面注册的信息插入数据库
function insertdate()
	set InsertCursor = server.CreateObject("adodb.recordset")
	InsertCursor.open "SELECT top 1 * FROM member where memberID='"& trim(Request.form("memberID")) &"' order by id desc",conn,1,3
	
	If Not InsertCursor.eof Or Not InsertCursor.bof Then
		Call Wrong("操作未完成，已经存在此用户名，请另选注册用户名。")
	End If
	
	InsertCursor.addnew 
       InsertCursor("memberID") = trim(Request.form("memberID"))
       InsertCursor("name") = trim(Request.form("name"))
       InsertCursor("sex") = trim(Request.form("sex"))
       InsertCursor("password") = trim(Request.form("password1"))
       InsertCursor("question") = trim(Request.form("question"))
       InsertCursor("answer") = trim(Request.form("answer"))
       InsertCursor("email") = trim(Request.form("email"))
       InsertCursor("phone") = trim(Request.form("usephone"))
       InsertCursor("address") = trim(Request.form("address"))
       InsertCursor("code") = trim(Request.form("code"))
     InsertCursor.Update
     InsertCursor.close
	 
	 
	 '注册成功则赠送十枚易卡贝贝和十分信誉分
	 InsertCursor.open "select top 1 * from member order by id desc",conn,1,1
	 
	 if not InsertCursor.eof then
	 	userId = InsertCursor("id")
	else
		userId = 0
	 end if
	 
	 InsertCursor.close
	 conn.execute("insert into userJiFen([userId],[yikabeibei],[yikaxinyu]) values("& userId &",10,10)")
	 set InsertCursor=nothing
end function
%>