One Hat Cyber Team
Your IP :
216.73.216.36
Server IP :
162.240.179.46
Server :
Linux vps-14493116.nutrivittasaude.com.br 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
Server Software :
Apache
PHP Version :
8.2.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
lifeprimeti
/
meta.lifeprimeti.com.br
/
Edit File:
redefinir.php
<?php require_once __DIR__ . '/config/database.php'; if (isAuthenticated()) { redirect(URL_BASE . 'public/dashboard.php'); } $msg = ''; $erro = ''; $tokenValido = false; $usuarioId = null; if (isset($_GET['token'])) { $token = $_GET['token']; $stmt = $pdo->prepare("SELECT * FROM password_reset_tokens WHERE token = ? AND usado = 0 AND expires_at > NOW() LIMIT 1"); $stmt->execute([$token]); $row = $stmt->fetch(); if ($row) { $tokenValido = true; $usuarioId = $row['usuario_id']; } else { $erro = 'Token invalido ou expirado. Solicite uma nova recuperacao.'; } } if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['token'])) { $token = $_POST['token']; $senha = $_POST['senha'] ?? ''; $confirmar = $_POST['confirmar'] ?? ''; $stmt = $pdo->prepare("SELECT * FROM password_reset_tokens WHERE token = ? AND usado = 0 AND expires_at > NOW() LIMIT 1"); $stmt->execute([$token]); $row = $stmt->fetch(); if (!$row) { $erro = 'Token invalido ou expirado.'; } elseif (strlen($senha) < 6) { $erro = 'A senha deve ter pelo menos 6 caracteres.'; } elseif ($senha !== $confirmar) { $erro = 'As senhas nao conferem.'; } else { $hash = password_hash($senha, PASSWORD_DEFAULT); $pdo->prepare("UPDATE usuarios SET senha = ? WHERE id = ?")->execute([$hash, $row['usuario_id']]); $pdo->prepare("UPDATE password_reset_tokens SET usado = 1 WHERE id = ?")->execute([$row['id']]); if (session_status() === PHP_SESSION_NONE) { session_start(); } $_SESSION['success_msg'] = 'Senha redefinida com sucesso! Faca login.'; redirect(URL_BASE . 'login.php'); } } ?> <!DOCTYPE html> <html lang="pt-BR" data-bs-theme="dark"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Redefinir Senha — <?= APP_NAME ?></title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@4.1.1/animate.min.css"> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet"> <style> * { font-family: 'Inter', sans-serif; margin: 0; padding: 0; box-sizing: border-box; } body { background: #0b0b1a; min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; } body::before { content: ''; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.12) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(118, 75, 162, 0.12) 0%, transparent 50%), radial-gradient(ellipse at 50% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 50%); animation: bgFloat 20s ease-in-out infinite; z-index: 0; } @keyframes bgFloat { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3%, -2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, 2%); } } .container-inner { width: 460px; position: relative; z-index: 1; animation: fadeInUp 0.8s ease; } @keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } } .card { background: rgba(18, 18, 42, 0.6); backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(102, 126, 234, 0.08); padding: 2.5rem; } .logo { text-align: center; margin-bottom: 2rem; } .logo .icon { width: 64px; height: 64px; background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2)); border-radius: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 2rem; color: #00d4ff; filter: drop-shadow(0 0 15px rgba(0,212,255,0.3)); } .logo h1 { font-weight: 800; font-size: 1.5rem; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .form-control { background: rgba(255,255,255,0.04) !important; border: 1px solid rgba(255,255,255,0.1) !important; color: #fff !important; border-radius: 12px !important; padding: 0.85rem 1.15rem !important; } .form-control:focus { border-color: #667eea !important; box-shadow: 0 0 0 3px rgba(102,126,234,0.15) !important; } .btn-grad { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; border-radius: 12px; padding: 0.85rem; font-weight: 600; width: 100%; color: #fff; box-shadow: 0 4px 20px rgba(102,126,234,0.4); transition: all 0.3s ease; } .btn-grad:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(102,126,234,0.5); } .alert-err { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 1.5rem; font-size: 0.9rem; } .text-muted { color: rgba(255,255,255,0.3) !important; } .orb { position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; animation: orbPulse 6s ease-in-out infinite; } @keyframes orbPulse { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.1); } } </style> </head> <body> <div class="orb" style="width:400px;height:400px;background:rgba(102,126,234,0.12);top:-10%;right:-10%"></div> <div class="orb" style="width:300px;height:300px;background:rgba(118,75,162,0.12);bottom:-5%;left:-5%;animation-delay:-2s"></div> <div class="container-inner"> <div class="card"> <div class="logo"> <div class="icon"><i class="bi bi-lock"></i></div> <h1>Redefinir Senha</h1> </div> <?php if ($erro): ?><div class="alert-err"><i class="bi bi-exclamation-triangle me-2"></i><?= sanitize($erro) ?></div><?php endif; ?> <?php if (!$tokenValido && !$erro): ?> <p class="text-muted text-center">Link invalido ou expirado.</p> <div class="text-center mt-3"> <a href="<?= URL_BASE ?>recuperar.php" class="text-muted" style="text-decoration:none;font-size:0.9rem"> <i class="bi bi-key me-1"></i>Solicitar nova recuperacao </a> </div> <?php elseif ($tokenValido): ?> <form method="POST"> <input type="hidden" name="token" value="<?= sanitize($_GET['token']) ?>"> <div class="mb-3"> <label class="form-label text-muted">Nova senha</label> <input type="password" name="senha" class="form-control" placeholder="Minimo 6 caracteres" required minlength="6"> </div> <div class="mb-4"> <label class="form-label text-muted">Confirmar senha</label> <input type="password" name="confirmar" class="form-control" placeholder="Repita a senha" required minlength="6"> </div> <button type="submit" class="btn-grad"><i class="bi bi-check-circle me-2"></i>Redefinir</button> </form> <?php endif; ?> <div class="text-center mt-4"> <a href="<?= URL_BASE ?>login.php" class="text-muted" style="text-decoration:none;font-size:0.9rem"> <i class="bi bi-arrow-left me-1"></i>Voltar ao login </a> </div> </div> </div> </body> </html>
Simpan