<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Dd_psw_ret.aspx.cs" Inherits="HteamDd.Web.Web.Dd_password.Dd_psw_ret" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>密码修改|海客轻微博</title>
    <meta content="IE=EmulateIE8" httpequiv="X-UA-Compatible" />
    <meta http-equiv="Content-Type" content="text/html;charset=gb2312"/>
    <link href="/css/Dd_psw-4694.css" rel="stylesheet" type="text/css" />
    <link href="/css/Dd_psw_ret.css" rel="stylesheet" type="text/css" />
    <script src="/jscript/jquery-1.4.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        var jq = jQuery.noConflict();
        jq(document).ready(function () {
            if ('<%=is_setuse %>' == "1") {
                jq("#content").html("您已使用过该链接或激活链接已过期！");
            }
            else {
                jq("#password-reset-submit").click(function () {
                    if (jq("#new_pass").val() != "") {
                        if (jq("#rep_new_pass").val() != "") {
                            if (jq("#new_pass").val() == jq("#rep_new_pass").val()) {
                                jq.ajax({
                                    type: "post",
                                    url: '/ashx/Dd_psw_ret.ashx',
                                    data: { userid: '<%=use_id %>', user_psw: jq("#new_pass").val() },
                                    success: function (data) {
                                        if (data == "11") {
                                            jq("#content").html("新密码保存成功，请重新登录海客网。<a href='/Dd_login.aspx'>点此登录</a>");
                                        }
                                        else {
                                            jq("#content").html("操作失败，请稍后重试。。。");
                                        }
                                    },
                                    error: function () {
                                        jq("#content").html("操作失败，请稍后重试。。。");
                                    }
                                });
                            }
                            else {
                                jq("#form-tip-error").html("两次输入的密码不一致，请重新输入");
                                jq("#new_pass").val("");
                                jq("#rep_new_pass").val("");
                            }
                        }
                        else {
                            jq("#form-tip-error").html("请填写确认密码...");
                            jq("#new_pass").val("");
                            jq("#rep_new_pass").val("");
                        }
                    }
                    else {
                        jq("#form-tip-error").html("填个密码呗");
                    }
                });

            }
        });
    </script>
</head>
<body>
    <div id="wrap">
        <div id="header">
            <div id="logo-holder">
                <h1 id="logo">
                    <a href="/Dd_login.aspx"></a>
                </h1>
            </div>
        </div>
        <div id="content">
            <h3 class="info-title">
                设置一个新密码</h3>
            <div class="reg-content reg-reset-pwd">
                <div class="reg-form" name="resetPwdForm">
                <div class="form-item clearfix">
                    <label>
                        密码</label>
                    <input class="input-text" type="password" name="password" id="new_pass"/>
                </div>
                <div class="form-item clearfix">
                    <label>
                        确认密码</label>
                    <input class="input-text" type="password" name="repassword" id="rep_new_pass"/>
                </div>
                <div class="form-tip">
                    <p  id="form-tip-error" style=" width:500px;  margin-left:100px; color:Red; margin-bottom:20px; font-size:18px;"></p>
                </div>   
                <div class="form-action">
                    <input id="password-reset-submit" class="password-reset-submit" type="submit" value="提交"/>
                </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
