<?php  
include_once "includes/init.php";
// Cek Active Link
function ActiveClass($requestUri)
{
    $current_file_name = basename($_SERVER['REQUEST_URI'], ".php");

    if ($current_file_name == $requestUri)
        echo 'class="active"';
}
        
        //check already index
        if (!isset($_SESSION['student_email_id'])) {
            header ('Location:index.php');
            exit;
        }

        // Logout
        if (isset($_GET['action'])) {
            $action = $_GET['action'];
            if ($action == 'logout') {
                session_destroy();
                header('Location:login.php');
            }
        }

     if (isset($_GET['page']) && $_GET['page'] == 'dashboard') {
            $page = 'dashboard';
        } else if (isset($_GET['page']) && $_GET['page'] == 'dashboard-roll') {
            $page = "dashboard-roll"; 
        }else if (isset($_GET['page']) && $_GET['page'] == 'chapter1') {
            $page = "chapter1"; 
        }else if (isset($_GET['page']) && $_GET['page'] == 'index') {
            $page = "index";
        }else if (isset($_GET['page']) && $_GET['page'] == 'booking') {
            $page = "booking";
        } 
        else if (isset($_GET['page']) && $_GET['page'] == 'fgtt5678532srr5567yfsszadt578jjhggfr443w2') {
            $page = "fgtt5678532srr5567yfsszadt578jjhggfr443w2";
        }
        else if (isset($_GET['page']) && $_GET['page'] == 'fgtt5678532srr5568exMadt578jjhggfr448w2') {
            $page = "fgtt5678532srr5568exMadt578jjhggfr448w2";
        }else if (isset($_GET['page']) && $_GET['page'] == 'edr6728sr624gtt5678532srr5568exRestt578jjhggfr448w2') {
            $page = "edr6728sr624gtt5678532srr5568exRestt578jjhggfr448w2";
        }
        else if (isset($_GET['page']) && $_GET['page'] == 'setting') {
            $page = "setting";
        }else if (isset($_GET['page']) && $_GET['page'] == 'payment_code') {
            $page = "payment_code";
        }else if (isset($_GET['page']) && $_GET['page'] == 'payment_success') {
            $page = "payment_success";
        }else if (isset($_GET['page']) && $_GET['page'] == 'quiz') {
            $page = "quiz";
        }else if (isset($_GET['page']) && $_GET['page'] == 'webhook') {
            $page = "webhook";
        }else if (isset($_GET['page']) && $_GET['page'] == 'orbital') {
            $page = "orbital";
        }else {
            $page = 'dashboard';
        }
 
include('includes/head.php');  
//set global message notification
$msgBox ="";

if (file_exists('orbital/'.$page.'.php')) {
            // Load the Page
            include('orbital/'.$page.'.php');
        } else {
            // Else Display an Error
          
            echo '
                    <div class="wrapper">
                        <h3>Err</h3>
                        <div class="alertMsg default">
                            <i class="icon-warning-sign"></i> The page "'.$page.'" could not be found.
                        </div>
                    </div>
                ';
        }
    ?>
 
  <?php include('includes/footer.php');?>
  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
</div>
 