-
Notifications
You must be signed in to change notification settings - Fork 476
/
index.html
151 lines (127 loc) · 3.79 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title> PUSHIN CAT | LOGIN</title>
<link rel="stylesheet" href="//bootswatch.com/cyborg/bootstrap.min.css">
<style>
body{background: #eee url(http://subtlepatterns.com/patterns/sativa.png);}
html,body{
position: relative;
height: 100%;
}
#output{
position: absolute;
width: 300px;
top: -75px;
left: 0;
color: #fff;
}
.login-container{
position: relative;
width: 300px;
margin: 80px auto;
padding: 20px 40px 40px;
text-align: center;
background: #fff;
border: 1px solid #ccc;
}
.login-container::before,.login-container::after{
content: "";
position: absolute;
width: 100%;height: 100%;
top: 3.5px;left: 0;
background: #fff;
z-index: -1;
-webkit-transform: rotateZ(4deg);
-moz-transform: rotateZ(4deg);
-ms-transform: rotateZ(4deg);
border: 1px solid #ccc;
}
.login-container::after{
top: 5px;
z-index: -2;
-webkit-transform: rotateZ(-2deg);
-moz-transform: rotateZ(-2deg);
-ms-transform: rotateZ(-2deg);
}
.avatar{
width: 150px;height: 150px;
margin: 10px auto 30px;
border-radius: 100%;
border: 2px solid #aaa;
background-size: cover;
background-image: url(http://data.pusheen.com/aboutpusheen.gif);
background-position: 36%;
}
.form-box input{
width: 100%;
padding: 10px;
text-align: center;
height:40px;
border: 1px solid #ccc;;
background: #fafafa;
transition:0.2s ease-in-out;
}
.form-box input:focus{
outline: 0;
background: #eee;
}
.form-box input[type="text"]{
border-radius: 5px 5px 0 0;
text-transform: lowercase;
}
.form-box input[type="password"]{
border-radius: 0 0 5px 5px;
border-top: 0;
}
.form-box button.login{
margin-top:15px;
padding: 10px 20px;
}
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script TYPE="text/javascript">
function register(username, password){
$.post( './do.php',
{'username': username, 'password': password, 'action': 'register'},
function(data){
$("#output").removeClass(' alert alert-success');
$("#output").addClass("alert alert-danger animated fadeInUp")
$("#output").html(data);
if (data == "register ok"){
window.location.href = './index.html';
}
} );
}
function send(username, password){
$.post( './do.php',
{'username': username, 'password': password, 'action': 'login'},
function(data){
$("#output").removeClass(' alert alert-success');
$("#output").addClass("alert alert-danger animated fadeInUp")
$("#output").html(data);
if (data == "login ok"){
window.location.href = './flag.html';
}
} );
}
</script>
</head>
<body>
<div class="container">
<div class="login-container">
<div id='output'></div>
<div class="avatar"></div>
<div class="form-box">
<form method='POST' onsubmit='send(this.username.value, this.password.value);return false;'>
<input name="username" type="text" placeholder="username" autofocus="autofocus" >
<input type="password" name="password" placeholder="password">
<button class="btn btn-info btn-block login" type="submit"> Login </button>
<button class="btn btn-info btn-block login" type="button" onclick='register(this.form.username.value, this.form.password.value);'> Register </button>
</form>
</div>
</div>
</div>
</body>
</html>