-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathuser_repass.html
154 lines (151 loc) · 6.39 KB
/
user_repass.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>找回密码 {$conf.title2}</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<meta name="Keywords" content="{$conf.keywords}">
<meta name="Description" content="{$conf.description}">
<link rel="stylesheet" type="text/css" media="screen" href="{#WWW}View/v2ex/css/style.css" />
<link href="{#WWW}public/css/alert.css" rel="stylesheet">
<!--[if (gte IE 9)|!(IE)]><!-->
<script src="{#WWW}public/js/jquery.min.js"></script>
<!--<![endif]-->
<!--[if lte IE 8 ]>
<script src="{#WWW}public/js/jquery1.11.3.min.js"></script>
<![endif]-->
<script src="{#WWW}public/js/sweet-alert.min.js"></script>
{hook t_user_repass_header}
</head>
<body>
<div id="Top">
<div class="content">
<div style="padding-top: 6px;">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="110" align="left">
<a href="{#WWW}" name="top" title="{$conf.title}">
<img src="{#WWW}View/v2ex/images/[email protected]" border="0" align="default" alt="{$conf.logo}" width="94" height="30" /></a>
</td>
<td width="auto" align="left">
<div id="Search"><form action="{php HYBBS_URL('search')}"><div style="width: 276px; height: 28px; background-size: 276px 28px; background-image: url('{#WWW}View/v2ex/images/[email protected]'); background-repeat: no-repeat; display: inline-block;"><input type="hidden" name="s" value="search"><input type="text" maxlength="40" name="key" id="q" value=""></div></form></div>
</td>
<td width="570" align="right" style="padding-top: 2px;">
<a href="" class="top">首页</a>
<a href="{php HYBBS_URL('user','add')}" class="top">注册</a>
<a href="{php HYBBS_URL('user','login')}" class="top">登录</a>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="Wrapper">
<div class="content">
<div id="Leftbar"></div>
<div id="Rightbar">
<div class="sep20"></div>
<div class="box">
<div class="cell">
<strong>{php echo view_form('v2ex','title')}</strong>
<div class="sep5"></div>
<span class="fade">{php echo view_form('v2ex','info')}</span></div>
<div class="inner">
<div class="sep5"></div>
<div align="center">
<a href="{php HYBBS_URL('user','add')}" class="super normal button">现在注册</a>
<div class="sep5"></div>
<div class="sep10"></div>已注册用户请
<a href="{php HYBBS_URL('user','login')}">登录</a></div>
</div>
</div>
</div>
<div id="Main">
<div class="sep20"></div>
<div class="box">
<div class="header"><a href="/">首页</a> <span class="chevron"> › </span>找回密码</div>
<div class="inner">
<form id="form">
<table cellpadding="5" cellspacing="0" border="0" width="100%">
{hook t_user_login_8}
<tr>
<td width="120" align="right" valign="top"><div class="sep5"></div>邮箱地址</td>
<td width="auto" align="left"><input type="text" class="sl" name="email" value=""/><div class="sep5"></div><span class="fade">你注册账号所填的邮箱</span></td>
</tr>
<tr>
<td width="120" align="right" valign="top"><div class="sep5"></div>邮箱验证码</td>
<td width="auto" align="left"><input type="text" class="sl" name="code" value=""/><div class="sep5"></div><small><a onclick="send_code(this)" href="javascript:void(0)" style="color: #46699E;">点击获取验证码</a></small></td>
</tr>
<tr>
<td width="120" align="right" valign="top">更改密码</td>
<td width="auto" align="left"><input type="password" class="sl" name="pass2" value=""/><div class="sep5"></div><span class="fade">请输入新密码</span></td>
</tr>
<tr>
<td width="120" align="right" valign="top">确认密码</td>
<td width="auto" align="left"><input type="password" class="sl" name="pass2" value=""/><div class="sep5"></div><span class="fade">请再次输入新密码</span></td>
</tr>
<tr>
<td width="120" align="right"></td>
<td width="auto" align="left">{hook t_user_login_9}</td>
</tr>
<tr>
<td width="120" align="right"></td>
<td width="auto" align="left"><input id="repass" type="submit" class="super normal button" value="修改" /></td>
</tr>
{hook t_user_login_10}
</table>
</form>
</div>
</div>
<script>
var send_b = false;
function send_code(obj){
// if(send_b)
// return ;
var _this = $(obj);
// send_b=true;
_this.attr("disabled","disabled").css("color","#757575").text('正在发送中...');
$.ajax({
url: '{php HYBBS_URL('user','recode')}',
type:'POST',
cache: false,
data:{
email:$('#email').val(),
<!--{hook t_user_repass_js_1}-->
},
dataType: 'json'
}).then(function(e) {
<!--{hook t_user_repass_js_2}-->
_this.removeAttr("disabled","disabled").css("color","#46699E").text('点击获取验证码');
if(e.error){
swal("发送成功","请到你的"+$("#email").val()+"查看验证码,可能垃圾邮件",'success');
}else{
swal('发送失败',e.info,'error');
}
<!--{hook t_user_repass_js_3}-->
}, function() {
_this.removeAttr("disabled","disabled").css("color","#46699E").text('点击获取验证码');
swal("发送失败",'服务器繁忙');
});
}
$(function(){
$('#form').submit(function() {return false;});
$("#repass").click(function(){
var postdata = $('#form').serialize();
<!--{hook t_user_repass_js_4}-->
$.post("{php HYBBS_URL('user','recode2')}", postdata, function(e){
<!--{hook t_user_repass_js_5}-->
if(e.error){
swal("修改成功","密码修改成功",'success');
}else{
swal("修改失败", e.info, "error");
}
<!--{hook t_user_repass_js_6}-->
},'json');
<!--{hook t_user_repass_js_7}-->
})
});
</script>
</div>
</div>
{include f}