-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsignup.php
229 lines (202 loc) · 11.4 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
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
219
220
221
222
223
224
225
226
227
228
229
<?php
include 'connection.php';
if(isset($_SESSION['id'])) {
header ('location: index.php');
}
else {
if(isset($_POST['submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$city = $_POST['city'];
$phone = $_POST['phone'];
$query = mysqli_query($conn, "SELECT * FROM account WHERE username = '$name' or useremail = '$email'");
if(mysqli_num_rows($query) > 0) {
// echo "<div style='background-color:red; height: 30px; width: 100%; z-index: 5;'>username or email has already been taken<center></center></div>";
echo "<script>alert('username or email has already been taken');</script>";
}
else {
if(!empty($email) && !empty($password) && !empty($name) && !empty($password2)) {
if($password == $password2) {
mysqli_query($conn, "INSERT INTO account VALUES('', '$name', '$email', '$password', '$phone', '$city')");
$_SESSION['login'] = true;
$temp = mysqli_query($conn, "SELECT * FROM account ORDER BY userid DESC LIMIT 1");
$t = mysqli_fetch_array($temp);
$_SESSION['userid'] = $t['id'];
$email = $_POST['email'];
if (isset($_SERVER['HTTP_REFERER'])) {
// Store Referral URL in a variable
$refURL = $_SERVER['HTTP_REFERER'];
}
header('Location: ' . $refURL);
}
else {
echo "<script>alert('your passwords do not match');</script>";
// echo "<div style='background-color:red; height: 30px; width: 100%; z-index: 5;'>your passwords do not match<center></center></div>";
}
}
}
}}
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js"> <![endif]-->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>
Wattscope - Signup
</title>
<link rel="shortcut icon" href="./image/png/favicon.png" type="image/x-icon">
<!-- Bootstrap , fonts & icons -->
<link rel="stylesheet" href="./css/bootstrap.css">
<link rel="stylesheet" href="./fonts/icon-font/css/style.css">
<link rel="stylesheet" href="./fonts/typography-font/typo.css">
<link rel="stylesheet" href="./fonts/fontawesome-5/css/all.css">
<!-- Plugin'stylesheets -->
<link rel="stylesheet" href="./plugins/aos/aos.min.css">
<link rel="stylesheet" href="./plugins/fancybox/jquery.fancybox.min.css">
<link rel="stylesheet" href="./plugins/nice-select/nice-select.min.css">
<link rel="stylesheet" href="./plugins/slick/slick.min.css">
<!-- Vendor stylesheets -->
<link rel="stylesheet" href="./plugins/theme-mode-switcher/switcher-panel.css">
<link rel="stylesheet" href="./css/main.css">
<!-- Custom stylesheet -->
</head>
<body>
<body data-theme-mode-panel-active data-theme="light">
<div class="site-wrapper overflow-hidden ">
<!-- Header Area -->
<header class="site-header site-header--menu-center dark-mode-texts dynamic-sticky-bg mt-3 mt-lg-0 site-header--absolute site-header--sticky" style="background-color:black; height:75px; width:100%;">
<div class="container">
<nav class="navbar site-navbar">
<!-- Brand Logo-->
<div class="brand-logo">
<a href="/home-marketing.html">
</a>
</div>
<div class="menu-block-wrapper ms-4 dark-mode-texts">
<div class="menu-overlay"></div>
<nav class="menu-block" id="append-menu-header">
<div class="mobile-menu-head">
<div class="go-back">
<i class="fa fa-angle-left"></i>
</div>
<div class="current-menu-title"></div>
<div class="mobile-menu-close">×</div>
</div>
<ul class="site-menu-main">
<li class="nav-item nav-item-has-children">
<a href="./index.php" class="nav-link-item">Home</a>
</li>
<li class="nav-item nav-item-has-children">
<a href="./scan.php" class="nav-link-item">Scan A Utility</a>
</li>
</li>
<li class="nav-item nav-item-has-children">
<a href="./about.php" class="nav-link-item">About</a>
</li>
</ul>
</nav>
</div>
<div class="header-btn ">
<?php
if(empty($_SESSION['id'])) {
echo ' <a href="./signup.php" class="btn btn btn-electric-violet-2 text-white rounded-50 ms-lg-2 shadow--electric-violet-2-4 ms-auto d-none d-sm-flex" style="background-color: #ff1e38; border: #ff1e38;">
Sign In
</a>';
}
else {
echo ' <a href="./account.php" class="btn btn btn-electric-violet-2 text-white rounded-50 ms-lg-2 shadow--electric-violet-2-4 ms-auto d-none d-sm-flex" style="background-color: #ff1e38; border: #ff1e38;">
Account
</a>';
}
?>
</div>
<!-- mobile menu trigger -->
<div class="mobile-menu-trigger">
<span></span>
</div>
<!--/.Mobile Menu Hamburger Ends-->
</nav>
</div>
</header>
<body data-theme-mode-panel-active="" data-theme="light" data-aos-easing="ease" data-aos-duration="400" data-aos-delay="0" data-new-gr-c-s-check-loaded="14.1121.0" data-gr-ext-installed="">
<div class="site-wrapper overflow-hidden ">
<!-- Clean The Code And Hop in -->
<div class="form-block form-block--sign-up bg-default-3 vh-100 position-relative">
<div class="container position-static vh-100">
<div class="row align-items-center justify-content-center position-static vh-100">
<div class="col-xl-6 col-lg-5 position-static vh-100 d-none d-lg-block">
<div class="form-img position-absolute bg-image" style="background-image: url(../images/account/signupbg.jpg)">
</div>
</div>
<div class="col-xxl-5 col-xl-6 col-lg-7 col-md-8 col-xs-10">
<div class="section-title section-title--l5 pb-6" style="padding-top: 75px;">
<h2 class="section-title__heading aos-init aos-animate" data-aos="fade-up" data-aos-duration="500" data-aos-once="true">Sign Up to Paradigm</h2>
<p class="section-title__description aos-init aos-animate" data-aos="fade-up" data-aos-duration="500" data-aos-delay="300" data-aos-once="true"></p>
</div>
<div class="form-box form-box--sign-up aos-init aos-animate" data-aos="fade-up" data-aos-duration="500" data-aos-delay="500" data-aos-once="true">
<div class="contact-form aos-init aos-animate" data-aos="fade-up" data-aos-duration="500" data-aos-delay="300" data-aos-once="true">
<form method="post">
<div class="form-floating">
<input class="form-control" type="text" placeholder="Your Name" id="name" name="name">
<label for="name">Your Name</label>
</div>
<div class="form-floating">
<input class="form-control" type="email" placeholder="Your Email" id="email" name="email">
<label for="email">Your Email</label>
</div>
<div class="form-floating">
<input class="form-control" type="text" placeholder="Your Phone" id="phone" name="phone">
<label for="phone">Your Phone Number -- (+91 9831 1232 14)</label>
</div>
<div class="form-floating">
<input class="form-control" type="text" placeholder="Your City" id="city" name="city">
<label for="city">Your City</label>
</div>
<div class="form-floating">
<input class="form-control" type="password" placeholder="Your Password" id="password" name="password">
<label for="password">Your Password</label>
</div>
<div class="form-floating">
<input class="form-control" type="password" placeholder="Confirm Your Password" id="password2" name="password2">
<label for="password2">Confirm Your Password</label>
</div>
<button class="btn btn-primary shadow--primary-5 btn--lg-2 rounded-55 text-white mt-2" id="submit" name="submit">Sign Up</button>
</form>
</div>
<div class="buttons mt-6 aos-init aos-animate" data-aos="fade-up" data-aos-duration="500" data-aos-delay="700" data-aos-once="true">
<p class="ms-2">Already a member?<a class="btn-link--2 text-electric-violet-2 ms-2" href="./signin.php">Sign In</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--/ .Services Area -->
<!-- Plugin's Scripts -->
<script src="../templatefiles/plugins/jquery/jquery.min.js"></script>
<script src="../templatefiles/plugins/jquery/jquery-migrate.min.js"></script>
<script src="../templatefiles/js/bootstrap.bundle.js"></script>
<script src="../templatefiles/plugins/fancybox/jquery.fancybox.min.js"></script>
<script src="../templatefiles/plugins/nice-select/jquery.nice-select.min.js"></script>
<script src="../templatefiles/plugins/aos/aos.min.js"></script>
<script src="../templatefiles/plugins/counter-up/jquery.counterup.min.js"></script>
<script src="../templatefiles/plugins/counter-up/waypoints.min.js"></script>
<script src="../templatefiles/plugins/slick/slick.min.js"></script>
<script src="../templatefiles/plugins/skill-bar/skill.bars.jquery.js"></script>
<script src="../templatefiles/plugins/isotope/isotope.pkgd.min.js"></script>
<!--<script src="./templatefiles/plugins/theme-mode-switcher/gr-theme-mode-switcher.js"></script>-->
<!-- Activation Script -->
<script src="../templatefiles/js/menu.js"></script>
<script src="../templatefiles/js/custom.js"></script>
</body>
</html>