halohalo
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
u295559686
/
domains
/
stanjo.in
/
public_html
/
Upload FileeE
HOME
<?php ob_start(); if (session_status() === PHP_SESSION_NONE) { session_start(); } include_once("admin/config.php"); $error = ''; if (isset($_SESSION['customer_id'])) { $redirect = isset($_GET['redirect']) ? $_GET['redirect'] : 'index.php'; header("Location: $redirect"); exit; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { $email = $conn->real_escape_string($_POST['email']); $password = $_POST['password']; $result = $conn->query("SELECT * FROM users WHERE email = '$email'"); if ($result->num_rows > 0) { $user = $result->fetch_assoc(); if (password_verify($password, $user['password'])) { $_SESSION['customer_id'] = $user['id']; $_SESSION['customer_name'] = $user['name']; $redirect = isset($_GET['redirect']) ? $_GET['redirect'] : 'index.php'; header("Location: $redirect"); exit; } else { $error = "Invalid password."; } } else { $error = "No account found with this email."; } } $pageTitle = 'Login'; include 'header.php'; ?> <main class="mt-[80px] min-h-[80vh] flex items-center justify-center py-16 bg-[#0b0b0b]"> <div class="w-full max-w-[480px] px-6 mx-auto"> <div class="text-center mb-10"> <h1 class="text-3xl font-light text-white mb-3 font-heading uppercase tracking-widest">Welcome Back</h1> <p class="text-[#888] text-sm font-light">Sign in to your Stanjo account</p> </div> <div class="bg-[#111] border border-[#222] rounded-[16px] p-10"> <?php if ($error): ?> <div class="bg-red-900/50 border border-red-500 text-red-200 px-4 py-3 rounded mb-6 text-sm"> <?= $error ?> </div> <?php endif; ?> <form class="space-y-8" method="POST"> <div> <label class="block text-xs uppercase tracking-widest text-[#888] mb-3">Email Address</label> <input type="email" name="email" class="w-full bg-transparent border-b border-[#333] text-white py-3 text-[15px] focus:outline-none focus:border-[#00a3ff] transition-colors placeholder-[#555] font-light" placeholder="you@example.com" required> </div> <div> <label class="block text-xs uppercase tracking-widest text-[#888] mb-3">Password</label> <input type="password" name="password" class="w-full bg-transparent border-b border-[#333] text-white py-3 text-[15px] focus:outline-none focus:border-[#00a3ff] transition-colors placeholder-[#555] font-light" placeholder="••••••••" required> </div> <div class="flex items-center justify-between"> <label class="flex items-center gap-2 cursor-pointer"> <input type="checkbox" class="accent-[#00a3ff]"> <span class="text-[#888] text-sm font-light">Remember me</span> </label> <a href="#" class="text-[#00a3ff] text-sm hover:underline font-light">Forgot password?</a> </div> <button type="submit" class="w-full bg-[#00a3ff] hover:bg-[#008be5] text-white font-medium py-4 rounded-full transition-colors text-[15px] uppercase tracking-wide">Sign In</button> </form> <div class="mt-8 pt-8 border-t border-[#222] text-center"> <p class="text-[#888] text-sm font-light">Don't have an account? <a href="register.php<?= isset($_GET['redirect']) ? '?redirect='.urlencode($_GET['redirect']) : '' ?>" class="text-[#00a3ff] hover:underline">Create account</a></p> </div> </div> </div> </main> <?php include 'footer.php'; ?>