<?php
$_page_title = "package_details";
$_main_root = '../';
require_once $_main_root . 'db/model.php';

$db = new Model();
if (isset($_POST['type'])) {
    if ($_POST['type'] == "list") {
        $list = $db->GetPackageDetails(0,false,false);
        header('Content-Type: application/json');
        echo json_encode($list);
        exit;
    }
}

include($_main_root . 'content/shared/header.php');
if (!Permission(2)) {
    return;
}
?>

<!-- modal -->
<div id="modalDiv"></div>

<div class="container container-fluid">
    <div class="my-4 d-flex justify-content-between align-items-center">
        <h2 style="color:var(--s-text-color);">PACKAGE DETAILS</h2>
        <div>
            <a href="package.php" class="btn btn-sm btn-outline-info ms-3"><i class="bi bi-list me-2"></i> PACKAGE</a>
            <button class="btn btn-sm btn-outline-info" onclick="DetailPackageDetails(0)">
                <i class="bi bi-plus-circle me-2"></i> NEW PACKAGE DETAILS
            </button>
        </div>
    </div>

    <div class="row my-4">
        <div class="table-responsive-lg">
            <table id="dataTable" class="table table-sm table-dark table-hover table-bordered" style="width: 100%;">

                <thead style="color:var(--s-text-color);" class="mt-3">
                    <th class="">Package Name</th>
                    <th style="">Title</th>
                    <th style="">Details</th>
                    <th style="width: 50px;">Order</th>
                    <th style="width: 80px;">Status</th>
                    <th style="width: 50px;">Action</th>
                </thead>
                <tbody>
                </tbody>
            </table>

        </div>
    </div>
</div>

<?php $s_scripts = ['package_details']; ?>
<?php include($_main_root . 'content/shared/footer.php'); ?>