<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include('inc/session_conection.php');
date_default_timezone_set("Asia/Calcutta");
$fromdate = date('Y-m-d H:i:s');
$month = date('n');
$year = date('Y');
if ($month < 4) {
$financial_year = ($year - 1) . '-' . substr($year, -2);
} else {
$financial_year = $year . '-' . substr($year + 1, -2);
}
?>
<!DOCTYPE html>
<html lang="en" class="light-style layout-menu-fixed layout-compact" dir="ltr" data-theme="theme-default" data-assets-path="assets/" data-template="horizontal-menu-template">
<head>
	<meta charset="utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>

	<?php include('inc/meta-tag.php');?>

	<meta name="description" content=""/>
	<link rel="apple-touch-icon" sizes="180x180" href="assets/img/favicon/apple-touch-icon.png">
	<link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicon/favicon-32x32.png">
	<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon/favicon-16x16.png">
	<!-- Icons -->
	<link rel="stylesheet" href="assets/vendor/fonts/fontawesome.css"/>
	<link rel="stylesheet" href="assets/vendor/fonts/tabler-icons.css"/>
	<link rel="stylesheet" href="assets/vendor/fonts/flag-icons.css"/>

	<!-- Core CSS -->
	<link rel="stylesheet" href="assets/vendor/css/rtl/core.css"/>
	<link rel="stylesheet" href="assets/vendor/css/rtl/theme-default.css"/>


	<!-- Vendors CSS -->
	<link rel="stylesheet" href="assets/vendor/libs/node-waves/node-waves.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/typeahead-js/typeahead.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/bootstrap-select/bootstrap-select.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/select2/select2.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/flatpickr/flatpickr.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/typeahead-js/typeahead.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/tagify/tagify.css"/>

	<link rel="stylesheet" href="assets/vendor/libs/datatables-bs5/datatables.bootstrap5.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/datatables-buttons-bs5/buttons.bootstrap5.css"/>
	<link rel="stylesheet" href="assets/vendor/libs/flatpickr/flatpickr.css"/>
	
	<!-- Helpers -->
	<script src="assets/vendor/js/helpers.js"></script>

	<script src="assets/js/config.js"></script>
     <script src="assets/js/jquery.min.js"></script>
<link rel="stylesheet" href="assets/toastr.min.css">
<link rel="stylesheet" href="assets/sweetalert2.min.css">
<script src="assets/toastr.min.js"></script>
<script src="assets/sweetalert2.all.min.js"></script>


</head>

<body>
    <?php 
// Display the message as a toaster notification if it exists
if (isset($_SESSION['message'])) {
    $message = $_SESSION['message'];
    $type = htmlspecialchars($message['type'], ENT_QUOTES, 'UTF-8'); // sanitize type
    $text = htmlspecialchars($message['text'], ENT_QUOTES, 'UTF-8'); // sanitize message text

    echo "<script>
        $(document).ready(function() {
            toastr['$type'](`$text`);
        });
    </script>";

    unset($_SESSION['message']); // Clear the message after displaying
}
?>

	<!-- Layout wrapper -->
	<div class="layout-wrapper layout-navbar-full layout-horizontal layout-without-menu">
		<div class="layout-container">
			<!-- Navbar -->

			<nav class="layout-navbar navbar navbar-expand-xl align-items-center bg-navbar-theme" id="layout-navbar">
				<div class="container-xxl">
					<div class="navbar-brand app-brand demo d-none d-xl-flex py-0 me-4"> <a href="dashboard.php" class="app-brand-link gap-2"> <img src="assets/img/logo.png" width="200" alt="My Treasure Trip">
            </a>
						<a href="javascript:void(0);" class="layout-menu-toggle menu-link text-large ms-auto d-xl-none"> <i class="ti ti-x ti-sm align-middle"></i> </a> </div>
					<div class="layout-menu-toggle navbar-nav align-items-xl-center me-3 me-xl-0 d-xl-none"> <a class="nav-item nav-link px-0 me-xl-4" href="javascript:void(0)"> <i class="ti ti-menu-2 ti-sm"></i> </a> </div>
					<div class="navbar-nav-right d-flex align-items-center" id="navbar-collapse">
						<ul class="navbar-nav flex-row align-items-center ms-auto">



							<!-- User -->
							<li class="nav-item navbar-dropdown dropdown-user dropdown">
								<a class="nav-link dropdown-toggle hide-arrow" href="javascript:void(0);" data-bs-toggle="dropdown">
									<div class="avatar avatar-online">
										<span class="btn rounded-pill btn-icon btn-primary waves-effect waves-light" style="font-size: 18px">
											<?php echo strtoupper(substr($adminName, 0, 1)); 
 ?>
										</span>
									</div>
								</a>
								<ul class="dropdown-menu dropdown-menu-end">
									<li>
										<a class="dropdown-item" href="#">
											<div class="d-flex">
												<div class="flex-shrink-0 me-3">
													<div class="avatar avatar-online">
														<span class="btn rounded-pill btn-icon btn-primary waves-effect waves-light">
															<?php echo substr($adminName, 0, 1); ?>
														</span>
													</div>
												</div>
												<div class="flex-grow-1">
													<span class="fw-medium d-block">
														<?php echo substr($adminName, 0, 15);
 ?>
													</span>
													<small class="text-muted">
														<?php echo $adminRole; ?>
													</small>
												</div>
											</div>
										</a>
									</li>
									<li>
										<div class="dropdown-divider"></div>
									</li>
									<li> <a class="dropdown-item" href="change_password.php"> <i class="ti ti-password me-2 ti-sm"></i> <span class="align-middle">Change Password</span> </a> </li>
									<li> <a class="dropdown-item" href="logout.php"> <i class="ti ti-logout me-2 ti-sm"></i> <span class="align-middle">logout</span> </a> </li>

								</ul>
							</li>
							<!--/ User -->
						</ul>
					</div>

				</div>
			</nav>

			<!-- Layout container -->
			<div class="layout-page">
				<!-- Content wrapper -->
				<div class="content-wrapper">
					<!-- Menu -->
					<?php include('inc/header_menu.php');?>
					<?php //main(); ?>
					
				