halohalo
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
u295559686
/
domains
/
stanjo.in
/
public_html
/
admin
/
Upload FileeE
HOME
<?php session_start(); include 'config.php'; // Include MySQLi connection // Handle login request if (isset($_POST['login'])) { $email = trim($_POST['email']); $password = trim($_POST['password']); // Fetch user by email $stmt = $conn->prepare("SELECT * FROM admins WHERE email = ?"); $stmt->bind_param("s", $email); $stmt->execute(); $result = $stmt->get_result(); $user = $result->fetch_assoc(); if ($user) { // Check if password is hashed or plain text if (password_verify($password, $user['password']) || $password === $user['password']) { // Login success $_SESSION['user_id'] = $user['id']; $_SESSION['user_email'] = $user['email']; header("Location: dashboard.php"); exit(); } else { $error = "Invalid password!"; } } else { $error = "No account found with this email!"; } } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Login | Stanjo</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta content="Premium Login Page" name="description" /> <meta content="Themesdesign" name="author" /> <link rel="shortcut icon" href="https://via.placeholder.com/150/000000/FFFFFF?text=UP" type="image/x-icon"> <!-- Google Fonts: Inter --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- Font Awesome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> * { font-family: 'Inter', sans-serif; } body.auth-body-bg { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); height: 100vh; display: flex; align-items: center; justify-content: center; color: #D1D5DB; } h2, h3, h5 { color: white !important; font-weight: bold; } .card { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: none; border-radius: 10px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); color: white; } .form-control { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: white; border-radius: 5px; padding: 10px 15px; } .form-control::placeholder { color: rgba(255, 255, 255, 0.6); } .btn-primary { background: #ffffff; color: #667eea; border: none; font-weight: bold; padding: 10px; border-radius: 5px; } .text-color { color: rgba(255, 255, 255, 0.8); } h2 { color: white; font-weight: bold; margin-bottom: 20px; } /* Fixed logo size rules */ .logo-img { max-height: 50px; width: auto; object-fit: contain; } </style> </head> <body class="auth-body-bg"> <div class="wrapper-page"> <div class="card" style="width: 400px;"> <div class="card-body p-4"> <h3 class="text-center mt-0 mb-3"> <img src="/assets/logo.png" class="logo-img" alt="Stanjo Logo" onerror="this.src=''"> </h3> <h5 class="text-center mt-0 text-color"><b>Sign In</b></h5> <!-- Show error if exists --> <?php if (!empty($error)): ?> <div class="alert alert-danger text-center"><?= $error; ?></div> <?php endif; ?> <form class="form-horizontal mt-4" method="POST" action=""> <div class="form-group mb-3"> <div class="col-12"> <input class="form-control" type="email" name="email" required placeholder="Email"> </div> </div> <div class="form-group mb-3"> <div class="col-12"> <input class="form-control" type="password" name="password" required placeholder="Password"> </div> </div> <div class="form-group mb-3"> <div class="col-12"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-signup" name="remember_me"> <label class="form-check-label text-color" for="checkbox-signup"> Remember me </label> </div> </div> </div> <div class="form-group text-center mt-4"> <div class="col-12"> <button class="btn btn-primary btn-block w-100" type="submit" name="login"> Log In </button> </div> </div> </form> </div> </div> </div> <!-- jQuery --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- Bootstrap JS --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> </body> </html>