-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathuser_add.html
125 lines (123 loc) · 5.48 KB
/
user_add.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
<!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_add_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="V2EX" 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="{#WWW}user{#EXP}add" class="top">注册</a>
<a href="{#WWW}user{#EXP}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_5}
<tr>
<td width="120" align="right" valign="top"><div class="sep5"></div>用户名</td>
<td width="auto" align="left"><input type="text" class="sl" name="user" value=""/><div class="sep5"></div><span class="fade">请使用半角的 a-z 或数字 0-9</span></td>
</tr>
<tr>
<td width="120" align="right">密码</td>
<td width="auto" align="left"><input type="password" class="sl" name="pass1" value=""/></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"><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"></td>
<td width="auto" align="left">{hook t_user_login_2}</td>
</tr>
<tr>
<td width="120" align="right"></td>
<td width="auto" align="left"><input id="login" type="submit" class="super normal button" value="注册" /></td>
</tr>
</table>
</form>
</div>
</div>
<script>
$(function(){
$('#form').submit(function() {return false;});
$("#login").click(function(){
var postdata = $('#form').serialize();
<!--{hook t_user_add_js_1}-->
$.post("{php HYBBS_URL('user','add')}", postdata, function(e){
<!--{hook t_user_add_js_2}-->
if(e.error){
if(e.url !='' && e.url != 'NULL' && e.url != 'null')
window.location.href=e.url;
else
window.location.href="{#WWW}";
}else{
swal(e.error ? "注册成功" : "注册失败", e.info, e.error ? "success" : "error");
}
<!--{hook t_user_add_js_3}-->
},'json');
<!--{hook t_user_add_js_4}-->
})
});
</script>
</div>
</div>
{include f}