<?php
require_once '../../config/database.php';
require_once '../../config/session.php';

if(!isAdmin() && !isManager()) {
    die("Access Denied");
}

$type = $_GET['type'] ?? 'excel';
$report_type = $_GET['report_type'] ?? 'attendance';

// Similar report generation logic as index.php
// Then export based on $type (excel, pdf, csv)

header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=hr_report_" . date('Y_m_d') . ".xls");
echo "This is exported report";
?>