BLACKSITE
:
216.73.216.62
:
147.93.18.13 / vinyasaweddings.com
:
Linux srv667811 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
:
/
var
/
www
/
vkraft
/
views
/
admin
/
Upload File:
files >> /var/www/vkraft/views/admin/login.php
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { require_once __DIR__ . '/../../db.php'; // or your correct path to DB connection $username = $_POST['username'] ?? ''; $password = $_POST['password'] ?? ''; $stmt = $db->prepare("SELECT * FROM admin WHERE username = ? LIMIT 1"); $stmt->execute([$username]); $admin = $stmt->fetch(PDO::FETCH_ASSOC); if ($admin && $password === $admin['password']) { $_SESSION['admin_logged_in'] = true; $_SESSION['admin_username'] = $admin['username']; header('Location: dashboard'); // go to dashboard exit; } else { $error = "Invalid username or password."; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Admin Login - Vkraft</title> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet"> <link rel="stylesheet" href="<?= BASE_URL ?>/public/admin/style.css"> </head> <body> <div class="login-container"> <div class="login-header"> <div class="logo-container"> <i class="fas fa-shield-alt logo-icon"></i> </div> <h2>Admin Portal</h2> <p>Secure access to your dashboard</p> </div> <div class="login-body"> <?php if (isset($error)): ?> <div class="error-message"> <i class="fas fa-exclamation-circle"></i> <?php echo htmlspecialchars($error); ?> </div> <?php endif; ?> <form action="#" method="POST"> <div class="form-group"> <label for="username" class="form-label">Username</label> <div class="input-with-icon"> <i class="fas fa-user input-icon"></i> <input type="text" id="username" name="username" class="form-control" placeholder="Enter your username" required /> </div> </div> <div class="form-group"> <label for="password" class="form-label">Password</label> <div class="input-with-icon"> <i class="fas fa-lock input-icon"></i> <input type="password" id="password" name="password" class="form-control" placeholder="Enter your password" required /> </div> </div> <div class="form-footer"> <!-- <div class="remember-me"> <input type="checkbox" id="remember" name="remember"> <label for="remember">Remember me</label> </div> --> <button type="button" class="btn-text" id="forgotPasswordBtn">Forgot password?</button> </div> <button type="submit" class="btn btn-primary btn-block"> <i class="fas fa-sign-in-alt" style="margin-right: 8px;"></i> Login </button> </form> </div> </div> <!-- Forgot Password Modal --> <div class="modal" id="forgotPasswordModal"> <div class="modal-content"> <span class="close-modal">×</span> <h3 class="modal-title">Reset Your Password</h3> <p class="modal-text">Enter your email address and we'll send you a link to reset your password.</p> <form id="forgotPasswordForm"> <div class="form-group"> <label for="email" class="form-label">Email Address</label> <div class="input-with-icon"> <i class="fas fa-envelope input-icon"></i> <input type="email" id="email" name="email" class="form-control" placeholder="Your registered email" required /> </div> </div> <button type="submit" class="btn btn-primary btn-block"> <i class="fas fa-paper-plane" style="margin-right: 8px;"></i> Send Reset Link </button> </form> </div> </div> <script> // Forgot Password Modal Handling const modal = document.getElementById('forgotPasswordModal'); const btn = document.getElementById('forgotPasswordBtn'); const closeBtn = document.querySelector('.close-modal'); btn.onclick = function() { modal.style.display = 'flex'; document.body.style.overflow = 'hidden'; } closeBtn.onclick = function() { modal.style.display = 'none'; document.body.style.overflow = 'auto'; } window.onclick = function(event) { if (event.target == modal) { modal.style.display = 'none'; document.body.style.overflow = 'auto'; } } // Form submission handling (you would add AJAX here in a real implementation) document.getElementById('forgotPasswordForm').onsubmit = function(e) { e.preventDefault(); // Here you would typically make an AJAX request to your server alert('Password reset link sent! (This is a demo)'); modal.style.display = 'none'; document.body.style.overflow = 'auto'; }; </script> </body> </html>