<!--#include file="Inc/Syscode.asp" -->
<!--#include file="head.asp" -->
<table width="860" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="204" align="center" valign="top" bgcolor="#F7F7F7"><table width="194" border="0" cellspacing="0" cellpadding="0" style="margin-top:7px">
      <tr>
        <td><img src="images/hyzx.gif" width="194" height="47" alt="" /></td>
      </tr>
      <tr>
        <td background="images/vicn_39.jpg"><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TR>
            <TD height="5"></TD>
          </TR>
          <TR>
            <TD vAlign=top><TABLE width="85%" border=0 align="center" cellPadding=0 cellSpacing=0>
              <TR vAlign=center>
                <TD height=2 colSpan=2><IMG height=2 src="img/1x1_pix.gif" width=10></TD>
              </TR>
              <TR vAlign=center>
                <TD width="22" height=22 align="center"
><img src="images/vicn_42.jpg" width="9" height="9" alt="" /></TD>
                <TD height=22
><a href="Manage.asp" class="top_m_txt01">修改会员资料</a></TD>
              </TR>
              <TR>
                <TD height=1 colspan="2" background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif" width=10></TD>
              </TR>
              <TR vAlign=center>
                <TD height=22 align="center"
><img src="images/vicn_42.jpg" width="9" height="9" alt="" /></TD>
                <TD height=22
><a href="ManagePwd.asp" class="top_m_txt01">修改会员密码</a></TD>
              </TR>
              <TR>
                <TD height=1 colspan="2" background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif" width=10></TD>
              </TR>
              <TR vAlign=center>
                <TD height=22 align="center"
><img src="images/vicn_42.jpg" width="9" height="9" alt="" /></TD>
                <TD height=22
><a href="E_shop.asp" class="top_m_txt01">购物订单查询</a></TD>
              </TR>
              <TR>
                <TD height=1 colspan="2" background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif" width=10></TD>
              </TR>
              <TR vAlign=center>
                <TD height=22 align="center"
><img src="images/vicn_42.jpg" width="9" height="9" alt="" /></TD>
                <TD height=22
><a href="NetBook.asp" class="top_m_txt01">站内留言中心</a></TD>
              </TR>
              <TR>
              <TR>
                <TD height=1 colspan="2" background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif" width=10></TD>
              </TR>
              <TR vAlign=center>
                <TD height=22 align="center"
><img src="images/vicn_42.jpg" width="9" height="9" alt="" /></TD>
                <TD height=22
><a href="UserLogout.asp" class="top_m_txt01">退出会员中心</a></TD>
              </TR>
              <TR>
                <TD height=1 colspan="2" background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif" width=10></TD>
              </TR>
              <TR vAlign=center>
                <TD height=6 colSpan=2 bgcolor="#FFFFFF"></TD>
              </TR>
            </TABLE></TD>
          </TR>
        </TABLE></td>
      </tr>
      <tr>
        <td><img src="images/vicn_57.jpg" width="194" height="3" alt="" /></td>
      </tr>
    </table>
        <table width="194" border="0" cellspacing="0" cellpadding="0" style="margin-top:7px">
          <tr>
            <td><img src="images/diaocha.gif" width="194" height="47" alt="" /></td>
          </tr>
          <tr>
            <td align="center" background="images/vicn_39.jpg"><object type="text/x-scriptlet" width="180" height="178" data="ttpp/vote.asp?id=32">
            </object></td>
          </tr>
          <tr>
            <td><img src="images/vicn_57.jpg" width="194" height="3" alt="" /></td>
          </tr>
        </table>
      <table width="194" border="0" cellspacing="0" cellpadding="4" style="margin-top:4px">
          <tr>
            <td><a href="book.asp"><img src="images/vicn_77.jpg" alt="" width="169" height="64" border="0" /></a></td>
          </tr>
          <tr>
            <td><a href="Contact.asp"><img src="images/vicn_80.jpg" alt="" width="169" height="64" border="0" /></a></td>
          </tr>
      </table></td>
    <td width="1" bgcolor="#D8D8D8"></td>
    <td valign="top" bgcolor="#FFFFFF"><table width="632" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10px">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="30"><img src="images/vicn_icon01.gif" width="30" height="26" alt="" /></td>
            <td background="images/vicn_67.jpg"><span style="font-size: 14px; color: #FFFFFF; font-weight: bold">会员中心</span></td>
            <td width="46"><img src="images/vicn_70.jpg" width="46" height="26" alt="" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td background="images/vicn_37.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="6"></td>
          </tr>
        </table>
              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="179" valign="top"><table Class=border width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="206" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td><%
dim rsUser,sqlUser
Action=trim(request("Action"))
UserName=trim(request("UserName"))
if UserName="" then
	UserName=session("UserName")
end if
if  UserName="" then
	if Action="" then
		response.redirect "Server.asp"
	else
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>参数不足！</li>"
	end if
end if
if FoundErr=true then
	call WriteErrMsg()
else
	Set rsUser=Server.CreateObject("Adodb.RecordSet")
	sqlUser="select * from [User] where UserName='" & UserName & "'"
	rsUser.Open sqlUser,conn,1,3
	if rsUser.bof and rsUser.eof then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的用户！</li>"
		call writeErrMsg()
	else
		if Action="Modify" then
			dim Sex,Email,Homepage,QQ,MSN
			Sex=trim(Request("Sex"))
			Email=trim(request("Email"))
			Homepage=trim(request("Homepage"))
			Comane=trim(request("Comane"))
			Add=trim(request("Add"))
			Somane=trim(request("Somane"))
			Zip=trim(request("Zip"))
			Phone=trim(request("Phone"))
			Fox=trim(request("Fox"))
			if Sex="" then
				founderr=true
				errmsg=errmsg & "<br><li>性别不能为空</li>"
			else
				sex=cint(sex)
				if Sex<>0 and Sex<>1 then
					Sex=1
				end if
			end if
			if Email="" then
				founderr=true
				errmsg=errmsg & "<br><li>Email不能为空</li>"
			else
				if IsValidEmail(Email)=false then
					errmsg=errmsg & "<br><li>您的Email有错误</li>"
			   		founderr=true
				end if
			end if
			if Comane="" then
				founderr=true
				errmsg=errmsg & "<br><li>公司名称不能为空</li>"
			end if
			if Add="" then
				founderr=true
				errmsg=errmsg & "<br><li>收货地址不能为空</li>"
			end if
			if Somane="" then
				founderr=true
				errmsg=errmsg & "<br><li>收货人不能为空</li>"
			end if
			if Phone="" then
				founderr=true
				errmsg=errmsg & "<br><li>联系电话不能为空</li>"
			end if
			if FoundErr<>true then
				rsUser("Sex")=Sex
				rsUser("Email")=Email
				rsUser("HomePage")=HomePage
				rsUser("Comane")=Comane
				rsUser("Add")=Add
				rsUser("Somane")=Somane
				rsUser("Zip")=Zip
				rsUser("Phone")=Phone
				rsUser("Fox")=Fox
				rsUser.update
				response.write"<SCRIPT language=JavaScript>alert('会员资料修改成功！');"
                response.write"javascript:history.go(-1)</SCRIPT>"				
			else
				call WriteErrMsg()
			end if
		else

%>
                                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td height="179" valign="top"><table Class=border width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td height="206" valign="top"><FORM name="Form1" action="Manage.asp" method="post">
                                              <table width=100% border=0 align="center" cellpadding=2 cellspacing=2 class='border'>
                                                <TR align=center class='title'>
                                                  <TD height=20 colSpan=2><font color="#FF6600" class=font14><b>修改注册用户信息</b></font></TD>
                                                </TR>
                                                <TR>
                                                  <TD width="120" align="right" class="top_m_txt01"><b>用 户 名：</b></TD>
                                                  <TD><INPUT name=UserName class="INPUT" value="<%=rsUser("UserName")%>" size=30   maxLength=14></TD>
                                                </TR>
                                                <TR>
                                                  <TD width="120" align="right" class="top_m_txt01"><strong>性别：</strong></TD>
                                                  <TD class="top_m_txt01"><INPUT type=radio value="1" name=sex <%if rsUser("Sex")=1 then response.write "CHECKED"%>>
                                                    男 &nbsp;&nbsp;
                                                    <INPUT type=radio value="0" name=sex <%if rsUser("Sex")=0 then response.write "CHECKED"%>>
                                                    女</TD>
                                                </TR>
                                                <TR>
                                                  <TD width="120" align="right" class="top_m_txt01"><strong>Email地址：</strong></TD>
                                                  <TD><INPUT name=Email class="INPUT" value="<%=rsUser("Email")%>" size=30   maxLength=50>
                                                  </TD>
                                                </TR>
                                                <TR>
                                                  <TD width="120" align="right" class="top_m_txt01"><strong>主页：</strong></TD>
                                                  <TD><INPUT name=homepage class="INPUT" value="<%=rsUser("HomePage")%>" size=30   maxLength=100></TD>
                                                </TR>
                                                <TR>
                                                  <TD width="120" align="right" class="top_m_txt01"><strong>公司名称：</strong></TD>
                                                  <TD><INPUT name=Comane class="INPUT" value="<%=rsUser("Comane")%>" size=30 maxLength=20></TD>
                                                </TR>
                                                <TR>
                                                  <TD width="120" align="right" class="top_m_txt01"><strong>收货地址：</strong></TD>
                                                  <TD><INPUT name=Add class="INPUT" value="<%=rsUser("Add")%>" size=30 maxLength=50></TD>
                                                </TR>
                                                <TR>
                                                  <TD align="right" class="top_m_txt01"><strong>收货人：</strong></TD>
                                                  <TD><INPUT name=Somane class="INPUT" value="<%=rsUser("Somane")%>" size=30 maxLength=50></TD>
                                                </TR>
                                                <TR>
                                                  <TD align="right" class="top_m_txt01"><strong>邮政编码：</strong></TD>
                                                  <TD><INPUT name=Zip class="INPUT" value="<%=rsUser("Zip")%>" size=30 maxLength=50></TD>
                                                </TR>
                                                <TR>
                                                  <TD align="right" class="top_m_txt01"><strong>联系电话：</strong><br></TD>
                                                  <TD><INPUT name=Phone class="INPUT" value="<%=rsUser("Phone")%>" size=30 maxLength=50></TD>
                                                </TR>
                                                <TR>
                                                  <TD align="right" class="top_m_txt01"><strong>传 真：</strong></TD>
                                                  <TD><INPUT name=Fox class="INPUT" value="<%=rsUser("Fox")%>" size=30 maxLength=50></TD>
                                                </TR>
                                                <TR align="center" >
                                                  <TD height="40" colspan="2"><input name="Action" type="hidden" id="Action" value="Modify">
                                                      <input name=Submit2   type=submit class="INPUT01" id="Submit" value="保存修改结果">
                                                                    </TR>
                                              </TABLE>
                                          </form></td>
                                        </tr>
                                    </table></td>
                                  </tr>
                                </table>
                              <%
		end if
	end if
	rsUser.close
	set rsUser=nothing
end if
call CloseConn()
%></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table></td>
                </tr>
            </table></td>
      </tr>
      <tr>
        <td><table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="5"><img src="images/vicn_45.jpg" width="5" height="5" alt="" /></td>
            <td width="622" background="images/vicn_46.jpg"></td>
            <td width="5"><img src="images/vicn_48.jpg" width="5" height="5" alt="" /></td>
          </tr>
        </table></td>
      </tr>
    </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>&nbsp;</td>
          </tr>
      </table></td>
  </tr>
</table>
<!--#include file="Inc/foot.asp"-->