Viewing File: D:\INETPUB\VHOSTS\officespacebangalore.com\httpdocs\admin-1\login.php

<?php require_once __DIR__.'/../config.php'; if(admin_ok())go('admin/index.php'); $error=''; if($_SERVER['REQUEST_METHOD']==='POST'){check_csrf();$user=trim((string)$_POST['username']);$pass=(string)$_POST['password'];$st=db()->prepare('SELECT * FROM admin WHERE auser=:u OR aemail=:u LIMIT 1');$st->execute(['u'=>$user]);$a=$st->fetch();if($a && hash_equals((string)$a['apass'],$pass)){session_regenerate_id(true);$_SESSION['admin_id']=$a['aid'];$_SESSION['admin_user']=$a['auser'];go('admin/index.php');}$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"><title>Admin Login · Office Space Bangalore</title><link rel="stylesheet" href="<?=url('assets/css/admin.css')?>"></head><body class="login-page"><div class="login-card"><div class="admin-brand"><span>P</span><strong>Office Space Bangalore</strong></div><div class="eyebrow">SECURE ADMIN BOARD</div><h1>Welcome back.</h1><p>Manage your live property inventory, enquiries and website content.</p><?php if($error):?><div class="admin-flash error"><?=e($error)?></div><?php endif;?><form method="post"><input type="hidden" name="csrf" value="<?=csrf()?>"><label>Username or email<input name="username" required autofocus></label><label>Password<input type="password" name="password" required></label><button class="admin-btn" type="submit">Sign in →</button></form><a class="login-back" href="<?=url()?>">← Back to website</a></div></body></html>
Back to Directory File Manager