forked from gigabytedevelopers/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpasswordrecover.php
198 lines (94 loc) · 4.3 KB
/
passwordrecover.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
<?php
include 'core/init.php';
// CHECK
logged_in();
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lt8"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7 lt8"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8 lt8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="UTF-8" />
<!-- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> -->
<title>Gigabyte Developers Incorporated | Password Recovery</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Official Password Recovery Page of Gigabyte Developers Incorporated" />
<meta name="keywords" content="php, ajax, javascript, jquery, aspx, python, html5, css3, form, switch, animation, :target, pseudo-class" />
<meta name="author" content="Gigabyte Developers Incorporated" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/style3.css" />
<link rel="stylesheet" type="text/css" href="css/animate-custom.css" />
<link rel="shortcut icon" href="images/gigaicon.ico">
</head>
<body>
<div class="container">
<!-- Codrops top bar -->
<!-- <div class="codrops-top">
<a href="">
<strong>« Previous Demo: </strong>Responsive Content Navigator
</a>
<span class="right">
<a href=" http://tympanus.net/codrops/2012/03/27/login-and-registration-form-with-html5-and-css3/">
<strong>Back to the Codrops Article</strong>
</a>
</span>
<div class="clr"></div>
</div> --><!--/ Codrops top bar -->
<header>
<a href="index"><h1>Gigabyte Developers Incorporated <span>Account Recovery Assistant</h1></a>
<!-- <nav class="codrops-demos">
<span>Click <strong>"Join us"</strong> to see the form switch</span>
<a href="index.html">Demo 1</a>
<a href="index2.html">Demo 2</a>
<a href="index3.html" class="current-demo">Demo 3</a>
</nav> -->
</header>
<section>
<div id="container_demo" >
<!-- hidden anchor to stop jump http://www.css3create.com/Astuce-Empecher-le-scroll-avec-l-utilisation-de-target#wrap4 -->
<a class="hiddenanchor" id="toregister"></a>
<a class="hiddenanchor" id="tologin"></a>
<div id="wrapper">
<div id="login" class="animate form">
<?php
?>
<h1>Password Recovery</h1>
<?php
if (isset($_GET['success']) === true && empty($_GET['success']) === true) {
?>
<p class="textmode">Thank's we've emailed you a new password.</p>
<p class="textmode">Use the password to <a href="loginform">login</a> next time. Remember, you will be forced to change the password to a password of your choice whice you can easily remember!</p>
<?php
} else {
$mode_allowed = array('password');
if (isset($_GET['mode']) === true && in_array($_GET['mode'], $mode_allowed) === true) {
if (isset($_POST['email']) === true && empty($_POST['email']) === false) {
if (email_exists($_POST['email']) === true) {
recover($_GET['mode'], $_POST['email']);
header('Location: passwordrecover?success');
exit();
} else {
echo '<p>Oops, we could\'t find that email address</p>';
}
}
?>
<form action="" method="post">
<p>
<label for="email" class="email" data-icon="e" > Please enter your registered email address </label>
<input id="email" name="email" required="required" type="text" placeholder="Email Address"/>
</p>
<p class="recover buttons">
<input type="submit" value="Recover" />
</p>
</form>
<?php
} else {
header('Location: index');
exit();
}
}
?>
<?php include 'includes/overall/overallfooter.php'; ?>