-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsignup.php
153 lines (147 loc) · 6.29 KB
/
signup.php
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no">
<link href="images/favicon.png" rel="icon" />
<title>Tea - Money Transfer and Online Payments HTML Template</title>
<meta name="description" content="This professional design html template is for build a Money Transfer and online payments website.">
<meta name="author" content="harnishdesign.net">
<!-- Web Fonts
============================================= -->
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Rubik:300,300i,400,400i,500,500i,700,700i,900,900i' type='text/css'>
<!-- Stylesheet
============================================= -->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="vendor/font-awesome/css/all.min.css" />
<link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="css/sweetalert.css" />
</head>
<body>
<!-- Preloader -->
<div id="preloader">
<div data-loader="dual-ring"></div>
</div>
<!-- Preloader End -->
<div id="main-wrapper" class="h-100">
<div class="container-fluid px-0 h-100">
<div class="row no-gutters h-100">
<div class="col-md-6">
<!-- Get Verified! Text
============================================= -->
<div class="hero-wrap d-flex align-items-center h-100">
<div class="hero-mask opacity-8 bg-primary"></div>
<div class="hero-bg hero-bg-scroll" style="background-image:url('./images/bg/image-3.jpg');"></div>
<div class="hero-content mx-auto w-100 h-100 d-flex flex-column">
<div class="row no-gutters">
<div class="col-10 col-lg-9 mx-auto">
<div class="logo mt-5 mb-5 mb-md-0"> <a class="d-flex" href="index" title="Tea - HTML Template"><img src="images/logo-light.png" alt="Tea"></a> </div>
</div>
</div>
<div class="row my-auto">
<div class="col-10 col-lg-9 mx-auto">
<h1 class="text-11 text-white mb-4">Get Verified!</h1>
<p class="text-4 text-white line-height-4 mb-5">Every day, Tea makes thousands of customers happy.</p>
</div>
</div>
</div>
</div>
<!-- Get Verified! Text End -->
</div>
<div class="col-md-6 d-flex align-items-center">
<!-- SignUp Form
============================================= -->
<div class="container my-4">
<div class="row">
<div class="col-11 col-lg-9 col-xl-8 mx-auto">
<h3 class="font-weight-400 mb-4">Sign Up</h3>
<!--<form id="loginForm" method="post">-->
<div class="form-group">
<label for="fullName">Username</label>
<input type="text" class="form-control" id="username" required placeholder="Enter Your Userame">
</div>
<div class="form-group">
<label for="email">Email Address</label>
<input type="email" class="form-control" id="email" required placeholder="Enter Your Email">
</div>
<div class="form-group">
<label for="loginPassword">Password</label>
<input type="password" class="form-control" id="password" required placeholder="Enter Password">
</div>
<button id="submit" class="btn btn-primary btn-block my-4" type="submit">Sign Up</button>
<button id="processing" style="display: none" class="btn btn-primary btn-block my-4" type="submit">Processing</button>
<!--</form>-->
<p class="text-3 text-center text-muted">Already have an account? <a class="btn-link" href="login">Log In</a></p>
</div>
</div>
</div>
<!-- SignUp Form End -->
</div>
</div>
</div>
</div>
<!-- Back to Top
============================================= -->
<a id="back-to-top" data-toggle="tooltip" title="Back to Top" href="javascript:void(0)"><i class="fa fa-chevron-up"></i></a>
<!-- Script -->
<script type="text/javascript" src="js/sweetalert.init.js"></script>
<script type="text/javascript" src="js/sweetalert.min.js"></script>
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="js/theme.js"></script>
<script type="text/javascript">
$('#submit').on('click', function(){
var username = $('#username').val();
var email = $('#email').val();
var password = $('#password').val();
if (username == '') {
swal("Oops", "Please fill all fields", "info");
return;
}
else if (email == '') {
swal("Oops", "Please fill all fields", "info");
return;
}
else if (password == '') {
swal("Oops", "Please fill all fields", "info");
return;
}
else{
$('#submit').hide();
$('#processing').show();
$.ajax({
url: 'sign-action',
type: 'POST',
data: {
'auth' : true,
'username' : username,
'email' : email,
'password' : password
},
success: function(data){
if (data=='Done') {
swal("Good job", "Sign up successful", "success");
$('#submit').show();
$('#processing').hide();
setTimeout(function () {
location.replace('dashboard');
}, 2000);
}
else{
swal("Oops", data, "info");
$('#submit').show();
$('#processing').hide();
}
},
error: function (data) {
swal("Oops", "Connection error", "info");
$('#submit').show();
$('#processing').hide();
}
});
}
})
</script>
</body>
</html>