|
Server IP : 2a02:4780:2b:1556:0:9c6:43c4:d / Your IP : 216.73.216.229 Web Server : LiteSpeed System : Linux us-bos-web1456.main-hosting.eu 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64 User : u163988420 ( 163988420) PHP Version : 8.5.4 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, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u163988420/domains/../domains/acmajmer.in/public_html/AACSITE/../AACSITE/admin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
session_start();
include("../includes/db.php");
if (isset($_SESSION['admin'])) {
header("Location: dashboard.php");
exit;
}
if (isset($_POST['login'])) {
$username = mysqli_real_escape_string($conn, $_POST['username']);
$password = $_POST['password'];
$sql = "SELECT * FROM admins WHERE username='$username'";
$res = mysqli_query($conn, $sql);
if (mysqli_num_rows($res) == 1) {
$row = mysqli_fetch_assoc($res);
if (password_verify($password, $row['password'])) {
$_SESSION['admin_id'] = $row['id'];
$_SESSION['admin'] = $row['username'];
$_SESSION['admin_name'] = $row['fullname'];
$_SESSION['admin_role'] = $row['role'];
header("Location: dashboard.php");
exit;
}
}
$error = "Invalid Username or Password";
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin Login</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet">
<style>
body {
min-height: 100vh;
background: linear-gradient(135deg, #0f172a, #1e293b, #2563eb);
display: flex;
justify-content: center;
align-items: center;
font-family: 'Segoe UI', sans-serif;
}
.login-card {
width: 100%;
min-width: 420px;
border: none;
border-radius: 20px;
background: rgba(255, 255, 255, 0.12);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
overflow: hidden;
}
.login-header {
text-align: center;
padding: 30px 20px 15px;
color: #fff;
}
.login-header i {
font-size: 65px;
color: #60a5fa;
}
.login-header h3 {
margin-top: 10px;
font-weight: 700;
}
.card-body {
padding: 30px;
}
.form-label {
color: #fff;
font-weight: 500;
}
.form-control {
border-radius: 12px;
height: 48px;
border: none;
}
.form-control:focus {
box-shadow: 0 0 0 4px rgba(96, 165, 250, .25);
}
.btn-login {
background: #2563eb;
border: none;
height: 48px;
border-radius: 12px;
font-weight: 600;
transition: .3s;
}
.btn-login:hover {
background: #1d4ed8;
transform: translateY(-2px);
}
.alert {
border-radius: 12px;
}
.copyright {
text-align: center;
color: rgba(255, 255, 255, .7);
margin-top: 15px;
font-size: 14px;
}
</style>
</head>
<body>
<div>
<div class="card login-card">
<div class="login-header">
<i class="bi bi-shield-lock-fill"></i>
<h3>Admin Login</h3>
<p class="mb-0">Sign in to continue</p>
</div>
<div class="card-body">
<?php if (isset($error)) { ?>
<div class="alert alert-danger">
<?php echo $error; ?>
</div>
<?php } ?>
<form method="POST">
<div class="mb-3">
<label class="form-label">
<i class="bi bi-person-fill"></i>
Username
</label>
<input type="text"
name="username"
class="form-control"
placeholder="Enter username"
required>
</div>
<div class="mb-4">
<label class="form-label">
<i class="bi bi-lock-fill"></i>
Password
</label>
<input type="password"
name="password"
class="form-control"
placeholder="Enter password"
required>
</div>
<button type="submit"
name="login"
class="btn btn-primary btn-login w-100">
<i class="bi bi-box-arrow-in-right"></i>
Login
</button>
</form>
</div>
</div>
<div class="copyright">
© <?php echo date('Y'); ?> Admin Panel
</div>
</div>
</body>
</html>