<!--#include file="../inc/Conn.asp"-->
<!--#include file="../inc/base64.asp"-->
<!--#include file="../inc/Function.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="loginisok.asp"-->
<%
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=Keywords content="<%=DreamKeys%>">
<meta name=Description content="<%=DreamDes%>">
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="full-screen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="address=no">
<link rel="stylesheet" href="../css/style_guolv.css" />
<script type="text/javascript" src="../js/zepto.min.js"></script>
</head>
<body>
<section>
<header id="hd" bk="tuan_m_detail_top">
    <!-- 文本title -->
    <h1 class="txt-title">会员中心</h1>
    <div class="left_an"><a href="#" class="btn1 ret-btn" bk="tuan_m_detail_back">返回</a> <a href="index.asp" class="btn2">首页</a></div><div class="right_an"><%if session("Dream_UserName")<>"" then%><a href="user.asp" class="btn3">会员中心</a><%else%><a href="reg.asp" class="btn1">注册</a> <a href="login.asp" class="btn2">登录</a><%end if%></div></header>
  <script type="text/javascript">
    
    // History, by lww, 2013/09/02
    ;(function($){
        if(!$) { return; }
        if( history.length > 1){
            $("#hd .ret-btn").show();
        }
        else {
            $("#hd .ret-btn").hide();
        }

        $("#hd .ret-btn").click(function(e){
            e.preventDefault();
            if( history.length > 1 ) {
                history.back();
            }
        });
    })(Zepto);
    
</script>
<div id="content">
	<div class="visa_t"><h3>会员资料修改</h3><span>注意：如无需要修改密码，请不要填写新密码；</span></div>	
	<div class="edituser">
		<ul>
			<form action="edituser.asp?action=ok" method="post">
			<li><h3>用户名：</h3><span><%=rs("Dream_UserName")%></span></li>
			<li><h3>最近一次登录IP：</h3><span><%=rs("Dream_LastLoginIP")%></span></li>
			<li><h3>最近一次登录时间：</h3><span><%=rs("Dream_LastLoginTime")%></span></li>
			<li><h3>登录次数：</h3><span><%=rs("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="<%=rs("Dream_Fullname")%>"></span></li>
			<li><h3>电话：</h3><span><input name="P_Phone" type="text" class="input_1" value="<%=rs("Dream_Phone")%>"></span></li>
			<li><h3>QQ：</h3><span><input name="P_QQ" type="text" class="input_1" value="<%=rs("Dream_QQ")%>"></span></li>
			<li><h3>性别：</h3><span><input name="P_Sex" type="radio" value="男" class="input_sex" <%if rs("Dream_Sex")<>"女" then %>checked<%end if%>>男&nbsp;&nbsp;<input name="P_Sex" type="radio" class="input_sex" value="女" <%if rs("Dream_Sex")="女" then %>checked<%end if%>>女</span></li>	
			<li><h3>公司/单位名称：</h3><span><input name="P_Tjr" type="text" class="input_1" value="<%=rs("Dream_Tjr")%>"></span></li>		
			<li class="an"><input name="" type="submit" id="button" value=" 修改 "></li>
			</form>
		</ul>
	</div>
	<div class="jg"></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>
<!--#include file="navb.asp"--> 
</section>
</body>
</html>