<!--#include file="include/nowshop.asp" -->
<%
call aspsql()
call checklogin()
if request("edit")="ok" then call edit()
%>
<html>
<head>
<title>用户中心-<%=sitename%>-<%=siteurl%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="<%=sitedescription%>">
<meta name="keywords" content="<%=sitekeywords%>">
<LINK href="images/css.css" type=text/css rel=stylesheet>
<LINK href="list/newhead.css" type=text/css rel=stylesheet>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<!--#include file="top.asp"-->
<table width=768 border=0 align=center cellpadding=0 cellspacing=0 bgcolor="#FFFFFF"  class="grayline" >
<tr> 
<td align="center" valign="top" width="185"> 
</td>
<td bgcolor="#CCCCCC" width="1"></td>
<td valign="top" bgcolor="#FfFfFf" width="570"> 

<%
set rs=conn.execute("select * from buser where UserId='"&request.cookies("buyok")("userid")&"'")
%>

	<%if rs("Memo2")<>"" then%>
	 <table width="80%" border="0" cellpadding="4" cellspacing="0" bordercolor="#C0C0C0" align=center bordercolordark="#FFFFFF">
	 <tr><td><marquee scrolldelay="200" id=zimu1 onMouseOver=zimu1.stop() onMouseOut=zimu1.start()><b>管理员：</b><%=rs("Memo2")%></marquee></td></tr>
	</table>
	<%end if%>

<table width="768" border="0" cellspacing="0" cellpadding="0">
  <tr>
        <td width="186" align="center" valign="top" bgcolor="#f4f5fd"><!--#include file="zuo_member.asp"-->&nbsp;
</td>
	
    <td align="center" valign="top">
	<TABLE width=560 border=0 cellPadding=0 cellSpacing=0 bordercolor="#587ad9">
        <TBODY>
          <TR> 
            <TD height=12><table>
                    <tr> 
                      <td align="center" valign="middle"><TABLE cellSpacing=0 cellPadding=0 width=547 border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>
                          <TBODY>
                            <TR> 
                              <TD bgColor=#f4f5fd height=25><font color="#000000">　<B>会员信息更改(带</B></font><B><FONT 
                  color=#ffffff><FONT 
                  color=#ff0000>*</FONT><font color="#000000">项为必填项)</font></FONT></B></TD>
                            </TR>
                          </TBODY>
                        </TABLE></td>
                    </tr>
                    <tr> 
                      <td align="center" valign="middle"> <form name="myinfo" action="my_info.asp" method="post">
                          <TABLE width="547" border="0" cellpadding="0" cellspacing="0" style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid">
                            <TBODY>
                              <TR vAlign=center align=left> 
                                <TD width="52%" height=35>&nbsp; 会员称谓：<font color="#FF0000"><b><%=rs("UserID")%></b></font> </TD>
                                <TD width="48%" height=30>&nbsp;</TD>
                              </TR>
                              <TR vAlign=center align=left> 
                                <TD height=35><FONT color=#ff0000>* </FONT>您的姓名： 
                                  <input name="Username" type="text" class=regtxt id="Username" value="<%=rs("UserName")%>" maxlength="16"> 
                                </TD>
                                <TD height=30><input  name="Sex" type="radio" value="1" <%if rs("Sex")="1" then response.write "checked"%>> 
                                  <img border=0 src=images/small/boy.gif>先生 
                                  <input type="radio" name="Sex" value="0" <%if rs("Sex")="0" then response.write "checked"%>> 
                                  <img border=0 src=images/small/girl.gif>小姐</TD>
                              </TR>
                              <TR vAlign=center align=left> 
                                <TD height=35><FONT color=#ff0000>*</FONT> 省　　份： 
                                  <input name="Province"  type="text" value="<%=rs("Province")%>" size="10"  maxlength="20" class=regtxt> 
                                </TD>
                                <TD height=30><FONT color=#ff0000>*</FONT> 城　　市： 
                                  <input name="City"  type="text" value="<%=rs("City")%>" size="10"  maxlength="20" class=regtxt> 
                                </TD>
                              </TR>
                              <TR vAlign=center alilgn="left"> 
                                <TD colSpan=2 height=35><FONT color=#ff0000>*</FONT> 
                                  地　　址： 
                                  <input name="Address"  type="text" value="<%=rs("Address")%>" size="70" maxlength="70" class=regtxt1> 
                                </TD>
                              </TR>
                              <TR vAlign=center align=left> 
                                <TD height=35><FONT color=#ff0000>* </FONT>邮政编码： 
                                  <input  type="text" name="ZipCode" value="<%=rs("ZipCode")%>"  maxlength="20" class=regtxt> 
                                </TD>
                                <TD height=30>　 </TD>
                              </TR>
                              <TR vAlign=center align=left> 
                                <TD height=35><FONT color=#ff0000>*</FONT> 电　　话： 
                                  <input  type="text" name="HomePhone" value="<%=rs("HomePhone")%>"  maxlength="20" class=regtxt> 
                                </TD>
                                <TD height=30>&nbsp;&nbsp; 移动电话： 
                                  <input  type="text" name="CompPhone" value="<%=rs("CompPhone")%>"  maxlength="20" class=regtxt> 
                                </TD>
                              </TR>
                              <TR vAlign=center align=left> 
                                <TD height=35><FONT color=#ff0000>*</FONT> E-mail　： 
                                  <input  type="text" name="UserMail" value="<%=rs("UserMail")%>" maxlength="100" class=regtxt> 
                                </TD>
                                <TD height=30>&nbsp; </TD>
                              </TR>
                              <TR vAlign=center align=left> 
                                <TD height=35>&nbsp; 腾讯QQ号： 
                                  <input  type="text" name="UserQQ" value="<%=rs("UserQQ")%>"  maxlength="11" class=regtxt> 
                                </TD>
                                <TD height=30>&nbsp;&nbsp; M&nbsp;&nbsp;&nbsp;S&nbsp;&nbsp;&nbsp;N&nbsp;&nbsp;： 
                                  <INPUT 
                  type="text" name="UserMSN" value="<%=rs("UserMSN")%>"  maxlength="100" class=regtxt> 
                                </TD>
                              </TR>
                              <TR align=left> 
                                <TD height=25 colSpan=2>&nbsp; &nbsp; 生　　日： 
                                  <input  type="text" name="Birthday" value="<%=rs("Birthday")%>" maxlength="20" class=regtxt></TD>
                              </TR>
                              <TR align=middle> 
                                <TD colSpan=2 height=40><INPUT class=button type=submit value="更  新" name=submit>
                                  　 
                                  <INPUT name=submit2 type=button class=button id="submit2" value=取　消> 
                                  <input type=hidden name=edit value="ok"> </TD>
                              </TR>
                          </TABLE>
                        </form></td>
                    </tr>
                  </table></TD>
          </TR>
        </TBODY>
      </TABLE>
<%
rs.close
set rs=nothing
%>	  
    </td>
  </tr>
</table>
<!--#include file="down.asp"-->
</center>
</body>
</html>

<%
'修改资料
sub edit()
call buyok_check_path()
Username=trim(request("Username"))
UserQQ=trim(request("UserQQ"))
UserMSN=trim(request("UserMSN"))
UserICQ=trim(request("UserICQ"))
Sex=trim(request("Sex"))
Birthday=trim(request("Birthday"))
HomePhone=trim(request("HomePhone"))
CompPhone=trim(request("CompPhone"))
UserMail=trim(request("UserMail")) 
Country=trim(request("Country")) 
Province=trim(request("Province"))
City=trim(request("City"))
Address=trim(request("Address"))  
ZipCode=trim(request("ZipCode"))
Memo=trim(request("Memo"))

sql = "select * from buser where UserId='"&request.cookies("buyok")("userid")&"'"
set rs=Server.Createobject("ADODB.RecordSet")
rs.Open sql,conn,1,3
rs("Username")=Username
rs("Sex")=Sex
rs("UserQQ")=UserQQ
rs("UserICQ")=UserICQ
rs("UserMSN")=UserMSN
rs("Birthday")=Birthday
rs("HomePhone")=HomePhone
rs("CompPhone")=CompPhone
rs("UserMail")=UserMail
rs("Country")=Country
rs("Province")=Province
rs("City")=City
rs("Address")=Address
rs("ZipCode")=ZipCode
rs("Memo")=Memo
rs.update
set rs = nothing
response.write "<script language='javascript'>"
response.write "alert('操作成功，您修改的个人资料已保存！');"
response.write "location.href='my_info.asp';"
response.write "</script>"
response.end
end sub

conn.close
set conn=nothing
%>
