<!--#include file="inc/Conn.asp"-->
<!--#include file="inc/Function_PC.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="loginisok.asp"-->
<%
unav=1
bclassname="会员中心"
action=request("action")
if action="ok" then
	P_PassWord=request.Form("P_PassWord")
	P_PassWord2=request.Form("P_PassWord2")
	P_Fullname=request.Form("P_Fullname")
	P_Phone=request.Form("P_Phone")
	P_QQ=request.Form("P_QQ")
	P_Sex=request.Form("P_Sex")
	P_Tjr=request.Form("P_Tjr")
	Set rs=Server.CreateObject("Adodb.RecordSet")
	rs.open "Select * From Dream_User where Dream_UserName='"&session("Dream_UserName")&"'",conn,1,3
	rs("Dream_Fullname")=P_Fullname
	rs("Dream_Phone")=P_Phone
	rs("Dream_QQ")=P_QQ
	rs("Dream_Sex")=P_Sex
	rs("Dream_Tjr")=P_Tjr	
	if P_PassWord<>"" then
	rs("Dream_PassWord")=md5(P_PassWord)
	end if
	rs.update	 
	rs.close
	set rs=nothing
	Response.Redirect "user.asp"
end if
%>
<!doctype html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>资料修改-<%=Dream_SiteName%></title>
<meta name="description" content="<%=Dream_SiteDescription%>">
<meta name="keywords" content="<%=Dream_SiteKeywords%>">
<!--#include file="jscss.asp"-->
<!--#include file="inc/zdsbphone.asp"-->
</head>
<body>
<!--#include file="nheader.asp"-->	
<div class="conment">
	<div class="local">当前位置：<a href="index.asp">首页</a> > <a href="user.asp">会员中心</a> > 资料修改</div>
	<div class="about_nav">
		<h3>会员中心</h3>
		<ul>		
		<!--#include file="usernav.asp"-->
		</ul>		
	</div>
	<div class="about_right">
		<div class="about_right_title"><h3>资料修改</h3><span>注：不修改密码时，请把密码和确认密码留空。</span></div>
		<div class="about_right_con">
			<div class="edituser">
		<form action="user.asp?action=ok" method="post">
		<ul>
			<li><h3>用户名：</h3><span><%=Dream_UserName%></span></li>
			<li><h3>最近一次登录IP：</h3><span><%=Dream_LastLoginIP%></span></li>
			<li><h3>最近一次登录时间：</h3><span><%=Dream_LastLoginTime%></span></li>
			<li><h3>登录次数：</h3><span><%=Dream_LoginTimes%></span></li>
			<li><h3>新密码：</h3><span><input name="P_PassWord" id="P_PassWord" type="password" class="input_1" value=""></span></li>
			<li><h3>确认密码：</h3><span><input name="P_PassWord2" id="P_PassWord2" type="password" class="input_1" value=""></span></li>
			<li><h3>真实姓名：</h3><span><input name="P_Fullname" type="text" class="input_1" value="<%=Dream_Fullname%>"></span></li>
			<li><h3>电话：</h3><span><input name="P_Phone" type="text" class="input_1" value="<%=Dream_UserPhone%>"></span></li>
			<li><h3>QQ：</h3><span><input name="P_QQ" type="text" class="input_1" value="<%=Dream_UserQQ%>"></span></li>
			<li><h3>性别：</h3><span><input name="P_Sex" type="radio" value="男" class="input_sex" <%if Dream_Sex<>"女" then %>checked<%end if%>>男&nbsp;&nbsp;<input name="P_Sex" type="radio" class="input_sex" value="女" <%if Dream_Sex="女" then %>checked<%end if%>>女</span></li>	
			<li><h3>公司/单位名称：</h3><span><input name="P_Tjr" type="text" class="input_1" value="<%=Dream_Tjr%>"></span></li>		
			<li class="an"><input name="" type="submit" id="button" value=" 修改 "></li>
		</ul>
		</form>
		</div>
		</div>
	</div>
</div>
<!--#include file="footer.asp"-->
<script src="js/jquery.js"></script>
<script>
  $('#button').click(function () {
            var P_PassWord = $('#P_PassWord').val();
            var P_PassWord2 = $('#P_PassWord2').val();					
            if (P_PassWord.length != 0 && P_PassWord.length != P_PassWord2.length) {
                alert("请输入新密码以及确认密码，并保证两次输入一至");
                return false;
            } else {
			alert('修改成功!');
                return true;
				
            }
        });	
</script>
</body>
</html>