-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.html
131 lines (115 loc) · 5.72 KB
/
register.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width,user-scalable=no" name="viewport">
<title>Regist</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700">
<link rel="stylesheet" href="./argon.min.css" type="text/css">
</head>
<body onload="thetime=0;">
<div class="main-content" id="panel">
<div class="header bg-pink pb-6">
<div class="container-fluid">
<div class="header-body">
<div class="row align-items-center py-4">
<div class="col-lg-6 col-7">
<h6 class="h2 text-white d-inline-block mb-0">Regist</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid mt--7">
<div class="row">
<div class="col-xl-8 center">
<div class="card">
</div>
<!-- 此处编写注册和协议逻辑 为什么要在这编写呢?我偏不! -->
<div class="card">
<div class="card-header" style="text-align:center">
<h2 class="mb-0">注册账号</h2>
</div>
<div class="card-body" style="text-align:center">
<form>
<h5><input id="mail" type="text" autofocus required placeholder="请输入邮箱"></h5>
<input type="button" onclick="a()" value="获取验证码" class="col-auto btn btn-sm btn-success">
<h5><br><input id="surecode" type="text" required placeholder="请输入验证码"></h5>
<h5><input id="username" type="text" autofocus required placeholder="请输入用户名"></h5>
<h5><input id="password" type="password" required placeholder="请设置密码"></h5>
<h5><input id="surePassword" type="password" required placeholder="请再输入一次密码"></h5>
<input type="checkbox" name="tos">已阅读并同意<a href="TOS.html"> 用户协议</a>
</br>
<input type="button" name="submit" value="注册" class="col-auto btn btn-sm btn-success"
onclick="
for (i = 0; i < form.length; i++) {
if (form.elements[i].value == '') {
alert('请填写完整');
return false;
}}
var scode = document.getElementById('surecode').value;
//document.cookie='scode='+scode;
document.cookie='code='+scode;
document.cookie='username='+document.getElementById('username').value;
document.cookie='password='+document.getElementById('password').value;
document.cookie='mail='+document.getElementById('mail').value;
location.href='register.php';
/*$.ajax({
url:'register.php',
type:'post',
data:{username:document.getElementById('username').value,password:document.getElementById('password').value,mail:document.getElementById('mail').value,code:document.getElementById('code').value},
success:function(result){
eval(result);
},
dataType :'text',
});*/
"><br>
<br>
<a href="index.html">已有账号?点击登录!</a>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="./jquery.min.js"></script>
<script>
function a() {
//alert("hh");
var b = document.getElementById("mail").value;
if (b == "") {
alert("请输入邮箱");
} else {
if (Number(new Date()) - thetime >= 60000) {
thetime = Number(new Date());
//code = Math.round(Math.random() * (999999 - 100000) + 100000);
$.ajax({
url: "mail.php",
type: "post",
data: { email: document.getElementById("mail").value, },
success: function (result) {
eval(result);
},
dataType: "text",
});
} else {
alert("请在" + Math.round((60000 - Number(new Date()) + thetime) / 1000) + "秒后获取");
}
}
}
</script>
</body>
<footer>
<div class="card">
<div class="card-header" style="text-align:center">
联系我们:[email protected]
<br> 官方鹅群:542645899
<br>本游戏策划团队版权所有,遵循AGPL开源协议。游戏所有源码将于结束后开源,可关注B站@Seimo 或加入官方鹅群获取详情
</div>
</div>
</footer>
</html>