Repository navigation
Expand file tree
/
Copy pathsign.php
More file actions
202 lines (172 loc) · 7.87 KB
/
Copy pathsign.php
File metadata and controls
202 lines (172 loc) · 7.87 KB
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sign-404 Not Found</title>
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
<!--<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap-theme.min.css">-->
<link rel="stylesheet" href="style.css">
<!-- Custom styles for this template -->
<script src="//cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="dist/js/formValidation.min.js"></script>
<script src="dist/fr/bootstrap.min.js"></script>
<script>
//function loginfun(){
//$.post("email.php",$("#loginForm").serialize());
//}
</script>
</head>
<body>
<div class="container">
<div class="header">
<nav>
<ul class="nav nav-pills pull-right">
<li role="presentation"><a href="index.html">首页</a></li>
<li role="presentation"><a href="about.html">关于</a></li>
<li role="presentation"><a href="login.php">登录</a></li>
</ul>
</nav>
<h3 class="text-muted">404 Not Found</h3>
</div>
<div class="row marketing">
<form action="ajax/sign.php" class="form-horizontal" role="form" id="signForm" method="post">
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-6">
<span class="label label-danger text-center" style="margin:o auto;font-size:12px"></span>
<span class="label label-success text-center" style="margin:o auto;font-size:12px"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">邮箱</label>
<div class="col-sm-6">
<input type="text" class="form-control" name="email" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">密码</label>
<div class="col-sm-6">
<input type="password" class="form-control" name="password" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认密码</label>
<div class="col-sm-6">
<input type="password" class="form-control" name="confirmPassword" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">注册码</label>
<div class="col-sm-6">
<input type="text" class="form-control" name="signcode" value="<?php echo isset($_GET['signcode'])?$_GET['signcode']:null; ?>" />
</div>
</div>
<div class="form-group">
<div class="col-sm-9 col-sm-offset-3">
<button type="submit" class="btn btn-primary" name="signup" value="submit">注册</button>
</div>
</div>
</form>
<p class="text-center">需要购买注册码请发邮件至</p>
<p class="text-center">support#404notfound.cc</p>
<p class="text-center">(请把#替换成@)</p>
</div>
<footer class="footer">
<p style="font-size:.9em">© <a href="//404notfound.cc" target="_blank" >404NOTFOUND</a> 2015 <span style="float:right;font-size:.8em">by <a href="//someant.com" target="_blank">Someant</a></span></p>
</footer>
</div> <!-- /container -->
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="./js/ie10-viewport-bug-workaround.js"></script>
<script src="./js/site.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#signForm')
.formValidation({
message: 'This value is not valid',
icon: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
email: {
validators: {
notEmpty: {
message: '邮箱不能为空!'
},
emailAddress: {
message: '请输入正确的邮箱地址!'
},
remote: {
type: 'POST',
url: 'ajax/sign.php',
message: '邮箱已被注册',
delay: 500
}
}
},
password: {
validators: {
notEmpty: {
message:'密码不能为空'
},
stringLength: {
min: 6,
max: 28,
message:'密码长度不小于6位'
},
}
},
confirmPassword: {
validators: {
notEmpty: {
message:'密码不能为空'
},
identical: {
field: 'password',
message: '两次密码输入不一致!'
}
}
},
signcode: {
validators: {
notEmpty: {
message: '注册码不能为空'
},
stringLength: {
min: 6,
max: 12,
message:'注册码长度为6-12位'
},
remote: {
type: 'POST',
url: 'ajax/sign.php',
message: '注册码不存在或已被使用',
delay: 500
}
}
}
}
}).on('success.form.fv', function(e) {
// Prevent form submission
e.preventDefault();
// Get the form instance
var $form = $(e.target);
// Get the FormValidation instance
var bv = $form.data('formValidation');
// Use Ajax to submit form data
$.post($form.attr('action'), $form.serialize(), function(result) {
//console.log(result);
if(result.message=='success')
{
$('.label-success').text('注册成功!3S后将跳转到登录界面');
setTimeout("window.location.href='login.php'",3000);
}
}, 'json');
});
});
</script>
</body>
</html>