<!--#include file="pysjzx_conn.asp"-->
<!--#include file="../webconfig.asp"-->
<!--#include file=cookies.asp-->
<%
action=request("action")
if action="modify" then
Public Function FilterHtml(Str)
    If Trim(Str) = "" Or IsNull(Str) Then
        FilterHtml=""
    Else
    Str = Replace(Str, ">", "&gt;")
    Str = Replace(Str, "<", "&lt;")
    Str = Replace(Str, Chr(32), "&nbsp;")
    Str = Replace(Str ,Chr(9), "&nbsp;")
    Str = Replace(Str, Chr(34), "&quot;")
    Str = Replace(Str, Chr(39), "&#39;")
    Str = Replace(Str, Chr(13), "")
    Str = Replace(Str, Chr(10) & Chr(10), "</p><p>")
    Str = Replace(Str, Chr(10), "<br> ")
    FilterHtml = Str
    End If
End Function
				set rs=server.CreateObject ("adodb.recordset")
sql="select * from pysjzx_user where username ='"&replace(request.cookies("pysjzx")("username"),"'","")&"'"
rs.open sql,conn,1,3
if  rs.eof then
response.write"<SCRIPT language=JavaScript>alert('修改会员资料失败！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
else
rs("linkname")=FilterHtml(trim(request.form("linkname")))'真实姓名
rs("email")=FilterHtml(trim(request.form("email")))'电子邮箱
rs("sex")=int(request.form("sex"))'性别
rs("address")=FilterHtml(trim(request.form("address")))'公司地址
rs.update
rs.close
set rs=noting 
  response.write"<SCRIPT language=JavaScript>alert('恭喜您，您的资料修改成功！');"
   response.write"this.location.href='modify.asp';</SCRIPT>" 
   response.end 
   end if
   end if
%>
<!--#include file=webhead.asp-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%>-会员管理中心</title>
<meta content="<%=keyword%>" name="keywords">
<meta content="<%=description%>" name="description">
<link href="../css/style.css" rel="stylesheet" type="text/css">
</head>
<div align="center">
<%
set rs7=server.CreateObject ("adodb.recordset")
sql="select * from pysjzx_user where username='"&replace(request.cookies("pysjzx")("username"),"'","")&"'"
rs7.open sql,conn,1,1
%>
	<table border="0" width="780"  cellpadding="0" cellspacing="0">
		<tr>
			<td width="200" valign="top" style="border: 1px solid #C0C0C0"><!--#include file="memu.asp"--></td>			
			<td  valign="top">
		<div align="right">
		<table cellSpacing="1" cellPadding="3" width="99%" border="1" id="table9" style="border-collapse: collapse" bordercolor="#c0c0c0">
						<form method="POST" action="modify.asp?action=modify" name="form1"><tr>
							<td colspan="2" bgcolor="#E8F1FF">  
					<p align="center">修改资料

							</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
							<p align="right">用<font color="#000000"> 户 名：</font></td>
							<td bgcolor="#F7F7F7"><%=trim(rs7("username"))%><input type=hidden name=user value=<%=rs7("username")%>></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
							<p align="right">电子邮箱：</td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang" maxLength="40" size="30" name="email" value="<%=rs7("email")%>"></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">　</td>
							<td bgcolor="#F7F7F7">
							　</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
							<p align="right">真实<font color="#000000">姓名：</font></td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang" maxLength="10" size="30" value="<%=rs7("linkname")%>" name="linkname"></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
							<p align="right">性&nbsp;&nbsp;&nbsp; 别<font color="#000000">：</font></td>
							<td bgcolor="#F7F7F7">
							<font face="宋体">
								<select  name="sex">
								<option value="1" <%if rs7("sex")=1 then%> selected <%end if%>>男</option>
								<option value="2" <%if rs7("sex")=2 then%> selected <%end if%>>女</option>
								<option value="3" <%if rs7("sex")=3 then%> selected <%end if%>>保密</option>
								</select></font></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
							<p align="right">联系地址<font color="#000000">：</font></td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang" maxLength="10" size="30" value="<%=rs7("address")%>" name="address"></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
		<p align="right">会员类型：</td>
							<td bgcolor="#F7F7F7">
		个人</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
		<p align="right">会员级别：</td><td bgcolor="#F7F7F7"><%if rs7("reglx")=1 then 
		response.write "普通会员"%> <a href="../about.asp?action=upgrade" target=_blank>升级为<font color="#FF0000">高级会员</font></a><%end if%><%if rs7("reglx")=2 then response.write "<font color=#FF0000>高级会员</font>"end if%></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
		<p align="right">登录次数<font color="#000000">：</font></td>
							<td bgcolor="#F7F7F7"><%=rs7("logins")%>次</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
		<p align="right">最后登录IP<font color="#000000">：</font></td>
							<td bgcolor="#F7F7F7"><%=rs7("userlastip")%></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7">
		<p align="left">　</td>
							<td bgcolor="#F7F7F7">
		　</td>
						</tr>
						<tr>
							<td align="middle" colSpan="2" height="20" bgcolor="#F7F7F7">
							<input class="go-wenbenkuang" type="submit" value=" 修改 " name="button">
							<input class="go-wenbenkuang" type="reset" value=" 重填 " name="Reset"></td>
						</tr>
					</table>					

			</div>

			</td>
		</tr>
	</table>
</div>
<%rs7.close
set rs7=nothing%><!--#include file=webfoot.asp-->