<?php
$section = 'xray_groups';
require_once __DIR__ . '/db/config.php';
require_once __DIR__ . '/helpers.php';

require_once __DIR__ . '/includes/auth.php';
check_auth();

$db = db();
$lang = $_SESSION['lang'];

require_once __DIR__ . '/includes/actions.php';
require_once __DIR__ . '/includes/common_data.php';

$is_ajax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest');

if (!$is_ajax) {
    require_once __DIR__ . '/includes/layout/header.php';
}

require_once __DIR__ . '/includes/pages/xray_groups.php';

if (!$is_ajax) {
    require_once __DIR__ . '/includes/layout/footer.php';
}
?>