<!--#include file="header.asp"-->
<!--#include file="check.asp"-->
<%
if request.QueryString("action")="save" then 
addres=server.HTMLEncode(trim(request.Form("address")))
tel=server.HTMLEncode(trim(request.Form("tel")))
mobile=server.HTMLEncode(trim(request.Form("mobile")))
set rs=server.CreateObject("adodb.recordset")
sql="select * from member where u_user='"& session("user") &"'"
rs.open sql,conn,1,3
rs("u_addres")=addres
rs("u_tel")=tel
rs("u_mobile")=mobile
rs.update
rs.close
set rs=nothing
response.write "<script>alert('更新成功!');location='center.asp';</Script>"
elseif request.QueryString("action")="change" then 
pwd=server.HTMLEncode(trim(request.Form("pwd")))
name=server.HTMLEncode(trim(request.Form("name")))
repwd=server.HTMLEncode(trim(request.Form("repwd")))
if pwd="" or repwd="" then 
response.write "<script>alert('请填写相关信息!');history.go(-1);</Script>"
elseif pwd<>repwd then
response.write "<script>alert('两次密码不一致!');history.go(-1);</Script>"
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from member where u_user='"& session("user") &"'"
rs.open sql,conn,1,3
rs("u_pwd")=pwd
rs.update
rs.close
set rs=nothing
response.write "<script>alert('更新成功!');location='center.asp';</Script>"
end if
end if
%>
<table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="781" colspan="3"><img src="images/bixin0002.gif" width="778" height="196" /></td>
  </tr>
  <tr>
    <td height="8" colspan="3"></td>
  </tr>
  <tr>
    <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="29%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><img src="images/iceweb.cn_05.gif" width="228" /></td>
              </tr>
              <tr>
                <td><img src="images/iceweb.cn_07.gif" width="228" height="168" /></td>
              </tr>
              <tr>
                <td><img src="images/iceweb.cn_10.gif" width="228" height="11" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="4%"><img src="images/iceweb.cn_11_01.gif" width="28" height="26" /></td>
                    <td width="63%" align="center" valign="middle" background="images/iceweb.cn_11_02.gif" class="title">会员中心</td>
                    <td width="33%"><img src="images/iceweb.cn_11_03.gif" width="139" height="26" /></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td background="images/iceweb.cn_bg.gif"><table width="100%" border="0" cellspacing="10" cellpadding="0">
                  <tr>
                    <td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
					  <tr>
					    <td height="13" align="center" class="twopage"><img src="images/iceweb.cn_icon.gif" width="15" height="14" /></td>
					    <td height="20" class="twopage"><a href="center.asp?id=资料修改">资料修改</a></td>
					    </tr>
					  <tr>
					    <td height="13" align="center" class="twopage"><img src="images/iceweb.cn_icon.gif" width="15" height="14" /></td>
					    <td height="20" class="twopage"><a href="center.asp?id=购买记录">购买记录</a></td>
					    </tr>
					  <tr>
                        <td width="15%" height="13" align="center" class="twopage"><img src="images/iceweb.cn_icon.gif" width="15" height="14" /></td>
                        <td width="85%" height="20" class="twopage"><a href="center.asp?id=密码修改">密码修改</a></td>
                      </tr>
                    </table>
					</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><img src="images/iceweb.cn_13.gif" width="228" height="15" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table></td>
        <td width="1%" valign="top"></td>
        <td width="70%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><img src="images/iceweb.cn_06_01.gif" width="25" height="33" /></td>
                <td width="17%" background="images/iceweb.cn_06_02.gif">会员中心</td>
                <td width="13%"><img src="images/iceweb.cn_06_03.gif" width="69" height="33" /></td>
                <td width="64%" background="images/iceweb.cn_06_04.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="61%">&nbsp;</td>
                    <td width="39%" height="20">首页-会员中心<%if request("t")<>"" then response.Write("-"&request("t")) end if%></td>
                    </tr>
                </table></td>
                <td width="1%"><img src="images/iceweb.cn_06_06.gif" width="15" height="33" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><img src="images/iceweb.cn_08.gif" height="66" /></td>
          </tr>
          <tr>
            <td background="images/iceweb.cn_09_bg.gif" height="300" valign="top">
            <%
			id=request.QueryString("id")
			if id="资料修改" or id="" then 
			%>
            <%set rs=server.CreateObject("adodb.recordset")
			sql="select * from member where u_user='"& session("user") &"'"
			rs.open sql,conn,1,1
			if not rs.eof and not rs.bof then %>
            <form action="?action=save" method="post" name="boon" onSubmit="return checkname();">
              <table width="90%" border="0" align="center" cellpadding="0" cellspacing="3">
              
              <tr>
                <td height="20" colspan="2" align="center">资料修改</td>
                </tr>
              <tr>
                <td width="21%" height="20" align="right">电&nbsp;&nbsp;&nbsp; 话：</td>
                <td width="79%" height="20"><input name="tel" type="text" class="input" id="tel" maxlength="30"  value="<%=rs("u_tel")%>"/></td>
              </tr>
              <tr>
                <td height="20" align="right">手&nbsp;&nbsp;&nbsp; 机：</td>
                <td height="20"><input name="mobile" type="text" class="input" id="mobile" maxlength="10"  value="<%=rs("u_mobile")%>" /></td>
              </tr>
              
              <tr>
                <td height="20" align="right">地&nbsp;&nbsp;&nbsp; 址：</td>
                <td height="20"><label>
                  <input name="address" type="text" class="input" id="address" size="45" maxlength="30"  value="<%=rs("u_addres")%>" />
                </label></td>
              </tr>
              <tr>
                <td height="20">&nbsp;</td>
                <td height="20"><label>
                  <input name="button" type="submit" id="button" value=" 提  交 " />
                </label></td>
              </tr>
            </table>
            </form>
            <%end if%>
            <%elseif id="购买记录" then %>
            <%set rs=server.CreateObject("adodb.recordset")
			sql="select * from cart where c_user='"& session("user") &"'"
			rs.open sql,conn,1,1
			if not rs.eof and not rs.bof then%>
             <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
              
              <tr>
                <td height="20" colspan="4" align="center">购买记录</td>
                </tr>
              <tr>
                <td height="20" align="center">ID</td>
                <td height="20" align="center">时间</td>
                <td align="center">物品ID</td>
                <td align="center">查看</td>
              </tr>
              <%while not rs.eof %>
              <tr>
                <td width="8%" height="20" align="center" style="border-bottom:#cccccc 1px solid;"><%=rs("c_id")%></td>
                <td width="33%" height="20" align="center" style="border-bottom:#cccccc 1px solid;"><%=rs("c_time")%></td>
                <td width="21%" align="center" style="border-bottom:#cccccc 1px solid;"><%=rs("c_name")%></td>
                <td width="38%" align="center" style="border-bottom:#cccccc 1px solid;"><a href="showcp.asp?id=<%=rs("c_name")%>" target="_blank">查看</a></td>
              </tr>
              <%rs.movenext
			  wend%>
            </table>
            <%else response.Write("没有信息") end if%>
            <%else%>
          <form action="?action=change" method="post" name="boon" onSubmit="return checkname();">
              <table width="90%" border="0" align="center" cellpadding="0" cellspacing="3">
              <tr>
                <td height="20" colspan="2" align="center">密码修改</td>
                </tr>
              
              <tr>
                <td width="21%" height="20" align="right">密&nbsp;&nbsp;&nbsp; 码：</td>
                <td width="79%" height="20"><input name="pwd" type="password" class="input" id="pwd" maxlength="30" /></td>
              </tr>
              <tr>
                <td height="20" align="right">确认密码：</td>
                <td height="20"><input name="repwd" type="password" class="input" id="repwd" maxlength="30" /></td>
              </tr>
              
              <tr>
                <td height="20">&nbsp;</td>
                <td height="20"><label>
                  <input name="button" type="submit" id="button" value=" 提  交 " />
                </label></td>
              </tr>
            </table>
            </form>
			<%end if
			%>
            </td>
          </tr>
          <tr>
            <td height="20" background="images/iceweb.cn_09_bg.gif">&nbsp;</td>
          </tr>
          
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="74%"><img src="images/iceweb_r1_c1.gif" width="402" height="41" /></td>
                <td width="9%"><a href="javascript:window.print()"><img src="images/iceweb_r1_c2.gif" width="73" height="41" border="0" /></a></td>
                <td width="17%"><a href="#top"><img src="images/iceweb_r1_c3.gif" width="70" height="41" border="0" /></a></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<!--#include file="footer.asp"-->