/
home
/
u897542709
/
domains
/
zcardin.com
/
public_html
/
Upload File
HOME
<?php require 'config.php'; $token = $_GET['token'] ?? ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $token = $_POST['token']; $new_pass = password_hash($_POST['password'], PASSWORD_DEFAULT); $stmt = $pdo->prepare("SELECT * FROM AutoUsers WHERE reset_token = ? AND reset_expires > NOW()"); $stmt->execute([$token]); $user = $stmt->fetch(); if ($user) { $stmt = $pdo->prepare("UPDATE AutoUsers SET password = ?, reset_token = NULL, reset_expires = NULL WHERE id = ?"); $stmt->execute([$new_pass, $user['id']]); echo "Password updated successfully. <a href='login.php'>Login</a>"; } else { echo "Invalid or expired token."; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Reset Password - ZCardin</title> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <style> body { font-family: 'Montserrat', sans-serif; background-color: #f0f2f5; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; padding: 10px; } .form-container { background: white; padding: 30px 20px; border-radius: 20px; box-shadow: 0 0 15px rgba(0,0,0,0.1); max-width: 400px; width: 100%; } h2 { text-align: center; color: #5a84a2; margin-bottom: 25px; } input[type="password"] { width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 10px; border: 1px solid #ccc; box-sizing: border-box; font-size: 16px; } button { width: 100%; padding: 12px; background-color: #5a84a2; color: white; font-size: 16px; border: none; border-radius: 10px; cursor: pointer; } button:hover { background-color: #456b89; } .link { text-align: center; margin-top: 20px; } .link a { color: #5a84a2; text-decoration: none; font-size: 14px; } @media (max-width: 480px) { .form-container { padding: 20px 15px; } h2 { font-size: 20px; } } </style> </head> <body> <div class="form-container"> <h2>Reset Password</h2> <form method="post" action=""> <input type="password" name="new_password" placeholder="New Password" required> <input type="password" name="confirm_password" placeholder="Confirm Password" required> <button type="submit">Reset Password</button> </form> <div class="link"> <a href="login.php">Back to Login</a> </div> </div> </body> </html>