<?php
$section = 'visits';
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($_GET['ajax_search']) || isset($_POST['ajax_search']);

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

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

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