<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
	<meta http-equiv="x-ua-compatible" content="ie=edge" />
	<title><?php echo SITE_NAME?></title>

	<link rel="stylesheet" href="<?php echo APP_URL?>/plugin/fontawesome-free-5.15.4-web/css/all.css" />

	<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" />
	<link href="<?php echo URL?>/plugins/bower_components/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
    <link href="<?=URL?>/plugins/bower_components/custom-select/custom-select.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="css/mdb.min.css" />

    <link rel="stylesheet" href="css/admin.css?v=<?php echo RUNNING_VERSION; ?>" />
	<link href="<?=URL?>/plugins/bower_components/sweetalert/sweetalert.css" rel="stylesheet" type="text/css">

	<script src="<?php echo URL?>/plugins/bower_components/jquery/dist/jquery.min.js"></script>
	<link rel="stylesheet" type="text/css" href="<?php echo APP_URL?>/css/datatables.min.css">
	<script type="text/javascript" src="<?php echo APP_URL?>/js/datatables.min.js"></script>
	<script src="<?php echo URL?>/plugins/bower_components/bootstrap-daterangepicker/moment.min.js"></script>
	<script src="<?php echo URL?>/plugins/bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
    <script src="<?=URL?>/plugins/bower_components/custom-select/custom-select.min.js" type="text/javascript"></script>
    <script src="<?=URL?>/plugins/bower_components/sweetalert/sweetalert.min.js"></script>
    <script src="<?php echo APP_URL;?>/js/custom.js?v=<?php echo RUNNING_VERSION; ?>" type="text/javascript"></script>
    <script src="<?php echo APP_URL;?>/js/admin.js?v=<?php echo RUNNING_VERSION; ?>" type="text/javascript"></script>

	<script type="text/javascript">
    var ajUrl                   = '<?php echo APP_URL; ?>/?ajax=1';
    var AJAX_ERROR_MESSAGE      = 'Some problem there. Please try again later';
    function select2Call(){$("select.select2").select2();}
		$(document).ready(function() {
            select2Call();
			$('.daterangepicker').daterangepicker({
				singleDatePicker: true,
				minDate: '06/01/1950',
				maxDate: '12/12/2050',
				locale: {
					format: 'DD-MM-YYYY'
				},
				showDropdowns: true
				}, function(start, end, label) {
					//console.log(start.toISOString(), end.toISOString(), label);
			});
            $('.daterangepickerMulti').daterangepicker({
                minDate: '06/01/1950',
                autoApply: true,
                separator: " to ",
                maxDate: '12/12/2050',
                locale: {
                    format: 'DD-MM-YYYY',
                    separator: " to "
                },
                ranges: {
                    'Today': [moment(), moment()],
                    'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                    'Last 7 Days': [moment().subtract(6, 'days'), moment()],
                    'Last 30 Days': [moment().subtract(29, 'days'), moment()],
                    'This Month': [moment().startOf('month'), moment().endOf('month')],
                    'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
                    'Last 6 Month': [moment().subtract(6, 'month').startOf('day'), moment().endOf('day')],
                    'Last 2 Year': [moment().subtract(24, 'month').startOf('day'), moment().endOf('day')]
                },
                alwaysShowCalendars: true,
                showDropdowns: true,
                opens: "center"
                }, function(start, end, label) {
                    //console.log(start.toISOString(), end.toISOString(), label);
            });
		});
	</script>
</head>

<body>
<!--Main Navigation-->
<header>
	<?php
		include(__DIR__."/left_menu.php");
	?>
	<nav id="main-navbar" class="navbar navbar-expand-lg navbar-light bg-white fixed-top">

		<div class="container-fluid">
			<button class="navbar-toggler" type="button" data-mdb-toggle="collapse" data-mdb-target="#sidebarMenu"
				aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
				<i class="fas fa-bars"></i>
			</button>
			<a class="navbar-brand" href="#">
				<img src="<?php echo URL;?>/image/logo.png" height="25" alt="" loading="lazy" />
			</a>

			<!-- Right links -->
			<ul class="navbar-nav ms-auto d-flex flex-row">
				<!-- Notification dropdown -->
				<li class="nav-item dropdown">
					<a class="nav-link me-3 me-lg-0 dropdown-toggle hidden-arrow" href="#" id="navbarDropdownMenuLink"
						role="button" data-mdb-toggle="dropdown" aria-expanded="false">
						<i class="fas fa-bell"></i>
						<span class="badge rounded-pill badge-notification bg-danger">1</span>
					</a>
					<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuLink">
						<li><a class="dropdown-item" href="#">Some news</a></li>
						<li><a class="dropdown-item" href="#">Another news</a></li>
						<li>
							<a class="dropdown-item" href="#">Something else</a>
						</li>
					</ul>
				</li>

				<!-- Icon -->
				<li class="nav-item">
					<a class="nav-link me-3 me-lg-0" href="#">
						<i class="fas fa-fill-drip"></i>
					</a>
				</li>
				<!-- Icon -->
				<li class="nav-item me-3 me-lg-0">
					<a class="nav-link" href="#">
						<i class="fab fa-github"></i>
					</a>
				</li>

				<!-- Icon dropdown -->
				<li class="nav-item dropdown">
					<a class="nav-link me-3 me-lg-0 dropdown-toggle hidden-arrow" href="#" id="navbarDropdown" role="button"
						data-mdb-toggle="dropdown" aria-expanded="false">
						<i class="united kingdom flag m-0"></i>
					</a>
					<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
						<li>
							<a class="dropdown-item" href="#"><i class="united kingdom flag"></i>English
								<i class="fa fa-check text-success ms-2"></i></a>
						</li>
						<li>
							<hr class="dropdown-divider" />
						</li>
						<li>
							<a class="dropdown-item" href="#"><i class="poland flag"></i>Polski</a>
						</li>
					</ul>
				</li>

				<!-- Avatar -->
				<li class="nav-item dropdown">
					<a class="nav-link dropdown-toggle hidden-arrow d-flex align-items-center" href="#"
						id="navbarDropdownMenuLink" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
						<img src="https://mdbootstrap.com/img/Photos/Avatars/img (31).jpg" class="rounded-circle" height="22"
							alt="" loading="lazy" />
					</a>
					<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuLink">
						<li><a class="dropdown-item" href="#">My profile</a></li>
						<li><a class="dropdown-item" href="#">Settings</a></li>
						<li><a class="dropdown-item" href="<?php echo APP_URL?>?logout=1">Logout</a></li>
					</ul>
				</li>
			</ul>
		</div>
		<!-- Container wrapper -->
	</nav>
	<!-- Navbar -->
</header>

<main style="margin-top: 58px">
<div class="container pt-4">