-
Notifications
You must be signed in to change notification settings - Fork 1
/
forgot access granted.php
336 lines (298 loc) · 15.8 KB
/
forgot access granted.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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
<?php
session_start();
if (!isset(($_SESSION['count']))) {
?>
<script>
location.replace("login.php");
</script>
<?php
}
// echo $_SESSION['count'];
// echo $_SESSION['email_for_forget'];
// echo $_SESSION['Confidential_Code'];
?>
<!doctype html>
<html lang="zxx">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>gaming</title>
<link rel="icon" href="img/Gaming Ninja Logo.png">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- animate CSS -->
<link rel="stylesheet" href="css/animate.css">
<!-- owl carousel CSS -->
<link rel="stylesheet" href="css/owl.carousel.min.css">
<!-- font awesome CSS -->
<link rel="stylesheet" href="css/all.css">
<!-- flaticon CSS -->
<link rel="stylesheet" href="css/flaticon.css">
<link rel="stylesheet" href="css/themify-icons.css">
<!-- font awesome CSS -->
<link rel="stylesheet" href="css/magnific-popup.css">
<!-- swiper CSS -->
<link rel="stylesheet" href="css/slick.css">
<!-- style CSS -->
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
</head>
<body>
<?php
include 'dbcon.php';
if (isset($_POST['submit'])) {
$email = $_SESSION['email_for_forget'];
$Confidential_Code = strval($_SESSION['Confidential_Code']);
$verify = mysqli_real_escape_string($con, $_POST['verify']);
$password = mysqli_real_escape_string($con, $_POST['password']);
$cpassword = mysqli_real_escape_string($con, $_POST['cpassword']);
$pass = password_hash($password, PASSWORD_BCRYPT);
$cpass = password_hash($cpassword, PASSWORD_BCRYPT);
if (($verify == $_SESSION['Confidential_Code']) && ($password == $cpassword)) {
$updatequery = "UPDATE registration SET password = '$pass', cpassword= '$cpass' WHERE email = '$email';";
$iquery = mysqli_query($con, $updatequery);
if ($iquery) {
echo "Password Updated Succesfull";
// header('location:home.php')
?>
<script>
location.replace("login.php");
</script>
<?php
} else {
?>
<script>
alert("Password was not Updated");
</script>
<?php
}
} else {
?>
<script>
alert("Wrong Code or Password is not matching. Please enter right code or Match the password you entered");
</script>
<?php
}
}
?>
<div class="body_bg">
<!--::header part start::-->
<header class="main_menu single_page_menu">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-12">
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" href="index.php"> <img src="img\Gaming Ninja Logo.png" alt="logo">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="menu_icon"><i class="fas fa-bars"></i></span>
</button>
<div class="collapse navbar-collapse main-menu-item" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="index.php">Home</a>
</li>
<!-- check wheter its previously login or not -->
<?php
if (!isset($_SESSION['username'])) {
?>
<li class="nav-item">
<a class="nav-link" href="login.php">Login</a>
</li>
<?php
} else {
?>
<li class="nav-item">
<a id="LOGIN_ID_MAIN" onclick="CheckStatus()" class="nav-link" href="logout.php">Logout</a>
</li>
<?php
}
?>
<li class="nav-item">
<a class="nav-link" href="team.php">team</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="blog.php" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Blog
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="blog.php"> blog</a>
<a class="dropdown-item" href="single-blog.php">Latest blog</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.php">Contact</a>
</li>
</ul>
</div>
<a href="#" class="btn_1 d-none d-sm-block">Install Now</a>
</nav>
</div>
</div>
</div>
</header>
<!-- Header part end-->
<!-- ================ contact section start ================= -->
<section class="contact-section section_padding">
<div class="container">
<div class="row credientials pt-5">
<div class="col-lg-5">
<h2 class="contact-title">Update your Credientials</h2>
</div>
<div class="col-lg-7">
<div class="col-lg-12">
<form class="form-contact contact_form" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post" id="contactForm" novalidate="novalidate">
<div class="row credientials">
<div class="col-lg-4 googleButton" onclick="location.replace('Sign In With Google/index.php')">
<div class="google-btn form-group">
<div class="google-icon-wrapper">
<img class="google-icon" src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" />
</div>
<p class="btn-text"><b>Sign in with Google</b></p>
</div>
</div>
<div class="col-lg-4 googleButton">
<div class="google-btn form-group">
<div class="google-icon-wrapper">
<img class="google-icon" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Microsoft_logo.svg/1200px-Microsoft_logo.svg.png" />
</div>
<p class="btn-text"><b>Sign in with Microsoft</b></p>
</div>
</div>
<div class="col-lg-8">
<div class="form-group">
<input required class="form-control" name="verify" id="verify" type="text" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Enter your Code'" placeholder='Enter your Code'>
</div>
</div>
<div class="col-lg-8">
<div class="form-group">
<input required class="form-control" name="password" id="password" type="password" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Enter Password'" placeholder='Enter Password'>
</div>
</div>
<div class="col-lg-8">
<div class="form-group">
<input required class="form-control" name="cpassword" id="cpassword" type="password" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Confirm Password'" placeholder='Confirm Password'>
</div>
</div>
<div class="col-lg-8">
<button name="submit" type="submit" class="button-contactForm btn_1">Submit </button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- ================ contact section end ================= -->
<!--::footer_part start::-->
<footer class="footer_part">
<div class="footer_top">
<div class="container">
<div class="row">
<div class="col-sm-6 col-lg-3">
<div class="single_footer_part">
<a href="index.php" class="footer_logo_iner"> <img src="img/Gaming Ninja Logo.png" alt="#"> </a>
<p>Connect with US
</p>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="single_footer_part">
<h4>Contact Info</h4>
<p>Address : Mumbai, India</p>
<p>Phone : +91 9699685491</p>
<p>Email : anandjaiswar02@gmail.com</p>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="single_footer_part">
<h4>Important Link</h4>
<ul class="list-unstyled">
<li><a href="">WHMCS-bridge</a></li>
<li><a href="">Search Domain</a></li>
<li><a href="">My Account</a></li>
<li><a href="">Shopping Cart</a></li>
<li><a href="">Our Shop</a></li>
</ul>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="single_footer_part">
<h4>Newsletter</h4>
<p>Know about the latest Game updates now.
</p>
<div id="mc_embed_signup">
<form target="_blank" action="https://spondonit.us12.list-manage.com/subscribe/post?u=1462626880ade1ac87bd9c93a&id=92a4423d01" method="get" class="subscribe_form relative mail_part">
<input required type="email" name="email" id="newsletter-form-email" placeholder="Email Address" class="placeholder hide-on-focus" onfocus="this.placeholder = ''" onblur="this.placeholder = ' Email Address '">
<button type="submit" name="submit" id="newsletter-submit" class="email_icon newsletter-submit button-contactForm"><i class="far fa-paper-plane"></i></button>
<div class="mt-10 info"></div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="copygight_text">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-8">
<div class="copyright_text">
<P>
Copyright ©
<script>
document.write(new Date().getFullYear());
</script> All rights reserved by
Gaming Ninja| Made with
<i class="ti-heart" aria-hidden="true"></i> by <a href="https://anand-3399.github.io/Portfolio/" target="_blank">Anand Arvind
Jaiswar</a>
</P>
</div>
</div>
<div class="col-lg-4">
<div class="footer_icon social_icon">
<ul class="list-unstyled">
<li><a href="#" class="single_social_icon"><i class="fab fa-facebook-f"></i></a>
</li>
<li><a href="#" class="single_social_icon"><i class="fab fa-twitter"></i></a></li>
<li><a href="#" class="single_social_icon"><i class="fas fa-globe"></i></a></li>
<li><a href="#" class="single_social_icon"><i class="fab fa-behance"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</footer>
<!--::footer_part end::-->
</div>
<!-- jquery plugins here-->
<script src="js/jquery-1.12.1.min.js"></script>
<!-- popper js -->
<script src="js/popper.min.js"></script>
<!-- bootstrap js -->
<script src="js/bootstrap.min.js"></script>
<!-- easing js -->
<script src="js/jquery.magnific-popup.js"></script>
<!-- swiper js -->
<script src="js/swiper.min.js"></script>
<!-- swiper js -->
<script src="js/masonry.pkgd.js"></script>
<!-- particles js -->
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.nice-select.min.js"></script>
<!-- slick js -->
<script src="js/slick.min.js"></script>
<script src="js/jquery.counterup.min.js"></script>
<script src="js/waypoints.min.js"></script>
<script src="js/contact.js"></script>
<script src="js/jquery.ajaxchimp.min.js"></script>
<script src="js/jquery.form.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/mail-script.js"></script>
<!-- custom js -->
<script src="js/custom.js"></script>
</body>
</html>