This repository has been archived by the owner on Jan 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
/
register.php
218 lines (203 loc) · 7.56 KB
/
register.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
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<?php
session_start();
if(isset($_SESSION['admin_sid']) || isset($_SESSION['customer_sid']))
{
header("location:index.php");
}
else{
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="msapplication-tap-highlight" content="no">
<title>Register</title>
<!-- Favicons-->
<link rel="icon" href="images/favicon/favicon-32x32.png" sizes="32x32">
<!-- Favicons-->
<link rel="apple-touch-icon-precomposed" href="images/favicon/apple-touch-icon-152x152.png">
<!-- For iPhone -->
<meta name="msapplication-TileColor" content="#00bcd4">
<meta name="msapplication-TileImage" content="images/favicon/mstile-144x144.png">
<!-- For Windows Phone -->
<!-- CORE CSS-->
<link href="css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection">
<link href="css/style.min.css" type="text/css" rel="stylesheet" media="screen,projection">
<!-- Custome CSS-->
<link href="css/custom/custom.min.css" type="text/css" rel="stylesheet" media="screen,projection">
<link href="css/layouts/page-center.css" type="text/css" rel="stylesheet" media="screen,projection">
<link href="js/plugins/perfect-scrollbar/perfect-scrollbar.css" type="text/css" rel="stylesheet" media="screen,projection">
<style type="text/css">
.input-field div.error{
position: relative;
top: -1rem;
left: 0rem;
font-size: 0.8rem;
color:#FF4081;
-webkit-transform: translateY(0%);
-ms-transform: translateY(0%);
-o-transform: translateY(0%);
transform: translateY(0%);
}
.input-field label.active{
width:100%;
}
.left-alert input[type=text] + label:after,
.left-alert input[type=password] + label:after,
.left-alert input[type=email] + label:after,
.left-alert input[type=url] + label:after,
.left-alert input[type=time] + label:after,
.left-alert input[type=date] + label:after,
.left-alert input[type=datetime-local] + label:after,
.left-alert input[type=tel] + label:after,
.left-alert input[type=number] + label:after,
.left-alert input[type=search] + label:after,
.left-alert textarea.materialize-textarea + label:after{
left:0px;
}
.right-alert input[type=text] + label:after,
.right-alert input[type=password] + label:after,
.right-alert input[type=email] + label:after,
.right-alert input[type=url] + label:after,
.right-alert input[type=time] + label:after,
.right-alert input[type=date] + label:after,
.right-alert input[type=datetime-local] + label:after,
.right-alert input[type=tel] + label:after,
.right-alert input[type=number] + label:after,
.right-alert input[type=search] + label:after,
.right-alert textarea.materialize-textarea + label:after{
right:70px;
}
</style>
</head>
<body class="cyan">
<!-- Start Page Loading -->
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
</div>
<!-- End Page Loading -->
<div id="login-page" class="row">
<div class="col s12 z-depth-4 card-panel">
<form class="formValidate" id="formValidate" method="post" action="routers/register-router.php" novalidate="novalidate" class="col s12">
<div class="row">
<div class="input-field col s12 center">
<h4>Register</h4>
<p class="center">Join us now!</p>
</div>
</div>
<div class="row margin">
<div class="input-field col s12">
<i class="mdi-social-person-outline prefix"></i>
<input name="username" id="username" type="text" data-error=".errorTxt1">
<label for="username" class="center-align">Username</label>
<div class="errorTxt1"></div>
</div>
</div>
<div class="row margin">
<div class="input-field col s12">
<i class="mdi-social-person prefix"></i>
<input name="name" id="name" type="text" data-error=".errorTxt2">
<label for="name" class="center-align">Name</label>
<div class="errorTxt2"></div>
</div>
</div>
<div class="row margin">
<div class="input-field col s12">
<i class="mdi-action-lock-outline prefix"></i>
<input name="password" id="password" type="password" data-error=".errorTxt3">
<label for="password">Password</label>
<div class="errorTxt3"></div>
</div>
</div>
<div class="row margin">
<div class="input-field col s12">
<i class="mdi-communication-phone prefix"></i>
<input name="phone" id="phone" type="number" data-error=".errorTxt4">
<label for="phone">Phone</label>
<div class="errorTxt4"></div>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<a href="javascript:void(0);" onclick="document.getElementById('formValidate').submit();" class="btn waves-effect waves-light col s12">Login</a>
</div>
<div class="input-field col s12">
<p class="margin center medium-small sign-up">Already have an account? <a href="login.php">Login</a></p>
</div>
</div>
</form>
</div>
</div>
<!-- ================================================
Scripts
================================================ -->
<!-- jQuery Library -->
<script type="text/javascript" src="js/plugins/jquery-1.11.2.min.js"></script>
<!--materialize js-->
<script type="text/javascript" src="js/materialize.min.js"></script>
<!--scrollbar-->
<script type="text/javascript" src="js/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery-validation/jquery.validate.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery-validation/additional-methods.min.js"></script>
<!--plugins.js - Some Specific JS codes for Plugin Settings-->
<script type="text/javascript" src="js/plugins.min.js"></script>
<!--custom-script.js - Add your own theme custom JS-->
<script type="text/javascript" src="js/custom-script.js"></script>
<script type="text/javascript">
$("#formValidate").validate({
rules: {
username: {
required: true,
minlength: 5
},
name: {
required: true,
minlength: 5
},
password: {
required: true,
minlength: 5
},
phone: {
required: true,
minlength: 4
},
},
messages: {
username: {
required: "Enter username",
minlength: "Minimum 5 characters are required."
},
name: {
required: "Enter name",
minlength: "Minimum 5 characters are required."
},
password: {
required: "Enter password",
minlength: "Minimum 5 characters are required."
},
phone:{
required: "Specify contact number.",
minlength: "Minimum 4 characters are required."
},
},
errorElement : 'div',
errorPlacement: function(error, element) {
var placement = $(element).data('error');
if (placement) {
$(placement).append(error)
} else {
error.insertAfter(element);
}
}
});
</script>
</body>
</html>
<?php
}
?>