<?php
session_start();
if (!isset($_SESSION['uid'])) {
    header("Location: index.php");
} else {
   ?>

    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width,initial-scale=1.0">
        </head>

        <body>

            <script src="assets/js/jquery-3.6.3.min.js"></script>
            <script>
                window.onbeforeunload = function () {
                    insertSample();
                };
                function insertSample() {
                    $.ajax({
                        type: 'GET',
                        async: true,
                        url: 'modules/track_content.php?mode=sample&oid=1'
                    });
                }
            </script>
        </body>
    </html>
    <?php
}

