<?php
session_start();
require_once __DIR__ . '/../config/config.php';
require_once __DIR__ . '/../config/database.php';

$admin = dbFetch('SELECT * FROM admins LIMIT 1');
if ($admin) {
    $_SESSION['admin_id'] = $admin['id'];
    $_SESSION['admin_role'] = $admin['role'];
    header('Location: withdrawals.php');
} else {
    echo "NO ADMIN FOUND!";
}
