<?php
session_start();

	include("connect.php");
	
	if(!isset($_SESSION['linkarisecrm']))
	{
		header('Location: index.php');
		return;
	}
				
	
		$_SESSION['frompage']="dashboard";
$brmid=$_SESSION['linkarisebranchid'];
	$cmpmid=$_SESSION['linkarisecmpmid'];
	date_default_timezone_set("Asia/Singapore");
	$mdate= date('Y/m/d');
	$mdate2= date('Y-m-d');
	$mdate1= date('Y-m-d H:i:sa');
		    
	
	$lower = date('Y-m-d', strtotime($mdate));
	$upper = date('Y-m-d', strtotime($mdate)+2);
	
	
	//--Today Date
	$mdate2= date('Y-m-d');
	//--Yesterday Date
	$mdate3= date('Y-m-d',strtotime("-1 days"));
	//--Last 7 Days Date
	$mdate4= date('Y-m-d',strtotime("-7 days"));
	//--This Month Date
	$startdate = date('Y-m-01',strtotime(date('Y-m-d')));
	$enddate =  date('Y-m-t',strtotime(date('Y-m-d')));
	//--Last Month Date
	$prevstartdate = date('Y-m-01', (strtotime(date('Y-m-d')) - 2400000));
	$prevenddate = date('Y-m-t', (strtotime(date('Y-m-d')) - 2400000));
	
	
				date_default_timezone_set("Asia/Singapore");
				$mdate1= date('Y-m-d H:i:s');
				
				$par1 = $_SESSION['linkariseumobile'];
				$ipaddress = "";
	
				if (getenv('HTTP_CLIENT_IP'))
					$ipaddress = getenv('HTTP_CLIENT_IP');
				else if(getenv('HTTP_X_FORWARDED_FOR'))
					$ipaddress = getenv('HTTP_X_FORWARDED_FOR');
				else if(getenv('HTTP_X_FORWARDED'))
					$ipaddress = getenv('HTTP_X_FORWARDED');
				else if(getenv('HTTP_FORWARDED_FOR'))
					$ipaddress = getenv('HTTP_FORWARDED_FOR');
				else if(getenv('HTTP_FORWARDED'))
					$ipaddress = getenv('HTTP_FORWARDED');
				else if(getenv('REMOTE_ADDR'))
					$ipaddress = getenv('REMOTE_ADDR');
				else
					$ipaddress = 'UNKNOWN';
				
				$userserver=$_SERVER['HTTP_USER_AGENT'];
				
	

	
	$currentDate = date("Y-m-d");

// Set the end date as one year from the current date
$endDate = date("Y-m-d", strtotime("+365 days", strtotime($currentDate)));

// Iterate over the date range and insert data for each date
$currentDate = date("Y-m-d", strtotime($currentDate));
while ($currentDate <= $endDate) {
    $everate12 = "SELECT spotmid, slotmid FROM res_spot_detail WHERE cmpmid = '$cmpmid'";
    $rerate12 = mysqli_query($conn, $everate12);

    while ($rtmaxq12 = mysqli_fetch_assoc($rerate12)) {
        $spotmid = $rtmaxq12['spotmid'];
        $slotmid = $rtmaxq12['slotmid'];

        // Check if the combination already exists in the res_availibility_detail table
        $query = "SELECT COUNT(*) FROM res_availibility_detail WHERE spotmid = $spotmid AND slotmid = $slotmid AND availabledate = '$currentDate' AND cmpmid = $cmpmid";
        $result = mysqli_query($conn, $query);
        $row = mysqli_fetch_row($result);
        $dataExists = $row[0] > 0;

        if (!$dataExists) {
            // The combination does not exist in res_availibility_detail, so insert the data
            $everate1 = "SELECT * FROM res_slots_master WHERE cmpmid = '$cmpmid' AND slotmid = $slotmid";
            $rerate1 = mysqli_query($conn, $everate1);

            while ($rtmaxq1 = mysqli_fetch_assoc($rerate1)) {
                $slotmid = $rtmaxq1['slotmid'];
                $slotstarttime = $rtmaxq1['slotstarttime'];
                $slotendtime = $rtmaxq1['slotendtime'];

                // Insert your data into the table
                $insertQuery = "INSERT INTO res_availibility_detail (spotmid, slotmid, availabledate, starttime, endtime, availablestatus, cmpmid) VALUES ('$spotmid', '$slotmid', '$currentDate', '$slotstarttime', '$slotendtime', 'Available', $cmpmid)";
                mysqli_query($conn, $insertQuery);
            }
        }
    }

    // Move to the next date
    $currentDateTime = new DateTime($currentDate);
    $currentDateTime->modify('+1 day');
    $currentDate = $currentDateTime->format('Y-m-d');
}


	
	
?>
<!DOCTYPE html>
<!--
Author: Keenthemes
Product Name: Metronic - Bootstrap 5 HTML, VueJS, React, Angular. Laravel, Asp.Net Core, Ruby on Rails, Spring Boot, Blazor, Django, Express Node.js & Flask Admin Dashboard Theme
Purchase: https://1.envato.market/EA4JP
Website: http://www.keenthemes.com
Contact: support@keenthemes.com
Follow: www.twitter.com/keenthemes
Dribbble: www.dribbble.com/keenthemes
Like: www.facebook.com/keenthemes
License: For each use you must have a valid license purchased only from above link in order to legally use the theme for your project.
-->
<html lang="en">
<head>
    <title>Dashboard</title>
    <meta charset="utf-8"/>
    <link rel="shortcut icon" href="assets/media/logos/favicon.ico"/>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700"/>
    <link href="assets/plugins/custom/fullcalendar/fullcalendar.bundle.css" rel="stylesheet" type="text/css"/>
    <link href="assets/plugins/custom/datatables/datatables.bundle.css" rel="stylesheet" type="text/css"/>
    <link href="assets/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css"/>
    <link href="assets/css/style.bundle.css" rel="stylesheet" type="text/css"/>
	


</head>
<body id="kt_app_body" data-kt-app-layout="dark-sidebar" data-kt-app-header-fixed="true"
      data-kt-app-sidebar-enabled="true" data-kt-app-sidebar-fixed="true" data-kt-app-sidebar-hoverable="true"
      data-kt-app-sidebar-push-header="true" data-kt-app-sidebar-push-toolbar="true"
      data-kt-app-sidebar-push-footer="true" data-kt-app-toolbar-enabled="true" class="app-default">
<script>var defaultThemeMode = "light";
    var themeMode;
    if (document.documentElement) {
        if (document.documentElement.hasAttribute("data-bs-theme-mode")) {
            themeMode = document.documentElement.getAttribute("data-bs-theme-mode");
        } else {
            if (localStorage.getItem("data-bs-theme") !== null) {
                themeMode = localStorage.getItem("data-bs-theme");
            } else {
                themeMode = defaultThemeMode;
            }
        }
        if (themeMode === "system") {
            themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
        }
        document.documentElement.setAttribute("data-bs-theme", themeMode);
    }</script>
	
	 <script type="text/javascript">
    // Generated dynamic JavaScript code for events
    var events = [
      <?php
     
      $sql = "SELECT * FROM res_booking_master where cmpmid=$cmpmid";
$result = $conn->query($sql);

$eventsData = array();
if ($result->num_rows > 0) {
    while ($row = $result->fetch_assoc()) {
        $eventsData[] = array(
            'id' => $row['bookingmid'],
            'title' => $row['functiontype'],
            'start' => $row['functionstartdate'],
            'end' => $row['functionenddate'],
            'description' => $row['spotmid'],
            'className' => 'fc-event-danger fc-event-solid-warning', // You can customize the className as per your requirements
            'location' => $row['cmpmid'],
            // Add other event data if needed...
        );
    }
}

        // Close the database connection
        $conn->close();
      ?>
    ];

    // Your other JavaScript code here
    // ...

    // Example: Initializing the FullCalendar
    document.addEventListener('DOMContentLoaded', function() {
      var calendarEl = document.getElementById('calendar');
      var calendar = new FullCalendar.Calendar(calendarEl, {
        headerToolbar: {
          left: 'prev,next today',
          center: 'title',
          right: 'dayGridMonth,timeGridWeek,timeGridDay'
        },
        initialDate: '<?php echo date("Y-m-d"); ?>', // Set initial date to today
        navLinks: true,
        selectable: true,
        selectMirror: true,
        select: function(info) {
          // Handle the select event here (e.g., show a modal to add a new event)
          // info.start and info.end will contain the selected date range
        },
        eventClick: function(info) {
          // Handle the eventClick event here (e.g., show a modal to view event details)
          // info.event will contain the event data
        },
        editable: true,
        dayMaxEvents: true,
        events: events
      });

      calendar.render();
    });
  </script>
<div class="d-flex flex-column flex-root app-root" id="kt_app_root">
    <div class="app-page flex-column flex-column-fluid" id="kt_app_page">
        <?php include('header.php'); ?>
        <div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">
            <?php include('sidebar.php'); ?>
            <div class="app-main flex-column flex-row-fluid" id="kt_app_main">
                <div class="d-flex flex-column flex-column-fluid">
                    <div id="kt_app_toolbar" class="app-toolbar py-3 py-lg-6">
                    </div>
                    <div id="kt_app_content" class="app-content flex-column-fluid">
                        <div id="kt_app_content_container" class="app-container container-fluid">
                            <div class="row g-5 g-xl-10 mb-5 mb-xl-10">
                                <!--begin::Col-->
                                <div class="col-xl-12 mb-xl-10">
                                    <!--begin::Lists Widget 19-->
                                    <div class="card card-flush h-xl-100">
                                        <!--begin::Heading-->
                                        <div class="card-header rounded bgi-no-repeat bgi-size-cover bgi-position-y-top bgi-position-x-center align-items-start h-250px"
                                             style="background-image:url('assets/media/svg/shapes/top-green.png"
                                             data-theme="light">
                                            <!--begin::Title-->
                                            <h3 class="card-title align-items-start flex-column text-white pt-15">
                                                <span class="fw-bold fs-2x mb-3">Banquet Hall Management</span>
                                                <div class="fs-4 text-white">

                                                </div>
                                            </h3>
                                            <!--end::Title-->
                                        </div>
                                        <!--end::Heading-->
                                        <!--begin::Body-->
                                        <div class="card-body mt-n20">
                                            <!--begin::Stats-->
                                            <div class="mt-n20 position-relative">
                                                <!--begin::Row-->
                                                <div class="row g-3 g-lg-6">
                                                    <!--begin::Col-->
                                                    <div class="col-6">
                                                        <!--begin::Items-->
                                                        <div class="bg-gray-100 bg-opacity-70 rounded-2 px-6 py-5">
                                                            <!--begin::Symbol-->
                                                            <div class="symbol symbol-30px me-5 mb-8">
																<span class="symbol-label">
																	<!--begin::Svg Icon | path: icons/duotune/medicine/med005.svg-->
																	<span class="svg-icon svg-icon-1 svg-icon-primary">
																		<svg width="24" height="24" viewBox="0 0 24 24"
                                                                             fill="none"
                                                                             xmlns="http://www.w3.org/2000/svg">
																			<path opacity="0.3"
                                                                                  d="M17.9061 13H11.2061C11.2061 12.4 10.8061 12 10.2061 12C9.60605 12 9.20605 12.4 9.20605 13H6.50606L9.20605 8.40002V4C8.60605 4 8.20605 3.6 8.20605 3C8.20605 2.4 8.60605 2 9.20605 2H15.2061C15.8061 2 16.2061 2.4 16.2061 3C16.2061 3.6 15.8061 4 15.2061 4V8.40002L17.9061 13ZM13.2061 9C12.6061 9 12.2061 9.4 12.2061 10C12.2061 10.6 12.6061 11 13.2061 11C13.8061 11 14.2061 10.6 14.2061 10C14.2061 9.4 13.8061 9 13.2061 9Z"
                                                                                  fill="currentColor"/>
																			<path d="M18.9061 22H5.40605C3.60605 22 2.40606 20 3.30606 18.4L6.40605 13H9.10605C9.10605 13.6 9.50605 14 10.106 14C10.706 14 11.106 13.6 11.106 13H17.8061L20.9061 18.4C21.9061 20 20.8061 22 18.9061 22ZM14.2061 15C13.1061 15 12.2061 15.9 12.2061 17C12.2061 18.1 13.1061 19 14.2061 19C15.3061 19 16.2061 18.1 16.2061 17C16.2061 15.9 15.3061 15 14.2061 15Z"
                                                                                  fill="currentColor"/>
																		</svg>
																	</span>
                                                                    <!--end::Svg Icon-->
																</span>
                                                            </div>
                                                            <!--end::Symbol-->
                                                            <!--begin::Stats-->
                                                            <div class="m-0">
                                                                <!--begin::Number-->
                                                               
                                                                <span class="text-gray-700 fw-bolder d-block fs-2qx lh-1 ls-n1 mb-1"><?php echo "100"; ?></span>
                                                                <!--end::Number-->
                                                                <!--begin::Desc-->
                                                                <span class="text-gray-500 fw-semibold fs-6">Lead</span>
                                                                <!--end::Desc-->
                                                            </div>
                                                            <!--end::Stats-->
                                                        </div>
                                                        <!--end::Items-->
                                                    </div>
                                                    <!--end::Col-->
                                                    <!--begin::Col-->
                                                    <div class="col-6">
                                                        <!--begin::Items-->
                                                        <div class="bg-gray-100 bg-opacity-70 rounded-2 px-6 py-5">
                                                            <!--begin::Symbol-->
                                                            <div class="symbol symbol-30px me-5 mb-8">
																<span class="symbol-label">
																	<!--begin::Svg Icon | path: icons/duotune/finance/fin001.svg-->
																	<span class="svg-icon svg-icon-1 svg-icon-primary">
																		<svg width="24" height="24" viewBox="0 0 24 24"
                                                                             fill="none"
                                                                             xmlns="http://www.w3.org/2000/svg">
																			<path d="M20 19.725V18.725C20 18.125 19.6 17.725 19 17.725H5C4.4 17.725 4 18.125 4 18.725V19.725H3C2.4 19.725 2 20.125 2 20.725V21.725H22V20.725C22 20.125 21.6 19.725 21 19.725H20Z"
                                                                                  fill="currentColor"/>
																			<path opacity="0.3"
                                                                                  d="M22 6.725V7.725C22 8.325 21.6 8.725 21 8.725H18C18.6 8.725 19 9.125 19 9.725C19 10.325 18.6 10.725 18 10.725V15.725C18.6 15.725 19 16.125 19 16.725V17.725H15V16.725C15 16.125 15.4 15.725 16 15.725V10.725C15.4 10.725 15 10.325 15 9.725C15 9.125 15.4 8.725 16 8.725H13C13.6 8.725 14 9.125 14 9.725C14 10.325 13.6 10.725 13 10.725V15.725C13.6 15.725 14 16.125 14 16.725V17.725H10V16.725C10 16.125 10.4 15.725 11 15.725V10.725C10.4 10.725 10 10.325 10 9.725C10 9.125 10.4 8.725 11 8.725H8C8.6 8.725 9 9.125 9 9.725C9 10.325 8.6 10.725 8 10.725V15.725C8.6 15.725 9 16.125 9 16.725V17.725H5V16.725C5 16.125 5.4 15.725 6 15.725V10.725C5.4 10.725 5 10.325 5 9.725C5 9.125 5.4 8.725 6 8.725H3C2.4 8.725 2 8.325 2 7.725V6.725L11 2.225C11.6 1.925 12.4 1.925 13.1 2.225L22 6.725ZM12 3.725C11.2 3.725 10.5 4.425 10.5 5.225C10.5 6.025 11.2 6.725 12 6.725C12.8 6.725 13.5 6.025 13.5 5.225C13.5 4.425 12.8 3.725 12 3.725Z"
                                                                                  fill="currentColor"/>
																		</svg>
																	</span>
                                                                    <!--end::Svg Icon-->
																</span>
                                                            </div>
                                                            <!--end::Symbol-->
                                                            <!--begin::Stats-->
                                                            <div class="m-0">
                                                                <!--begin::Number-->
                                                                
                                                                <span class="text-gray-700 fw-bolder d-block fs-2qx lh-1 ls-n1 mb-1"><?php echo "100"; ?></span>
                                                                <!--end::Number-->
                                                                <!--begin::Desc-->
                                                                <span class="text-gray-500 fw-semibold fs-6">Courses</span>
                                                                <!--end::Desc-->
                                                            </div>
                                                            <!--end::Stats-->
                                                        </div>
                                                        <!--end::Items-->
                                                    </div>
                                                    <!--end::Col-->
                                                    <!--begin::Col-->
                                                    <div class="col-6">
                                                        <!--begin::Items-->
                                                        <div class="bg-gray-100 bg-opacity-70 rounded-2 px-6 py-5">
                                                            <!--begin::Symbol-->
                                                            <div class="symbol symbol-30px me-5 mb-8">
																<span class="symbol-label">
																	<!--begin::Svg Icon | path: icons/duotune/general/gen020.svg-->
																	<span class="svg-icon svg-icon-1 svg-icon-primary">
																		<svg width="24" height="24" viewBox="0 0 24 24"
                                                                             fill="none"
                                                                             xmlns="http://www.w3.org/2000/svg">
																			<path d="M14 18V16H10V18L9 20H15L14 18Z"
                                                                                  fill="currentColor"/>
																			<path opacity="0.3"
                                                                                  d="M20 4H17V3C17 2.4 16.6 2 16 2H8C7.4 2 7 2.4 7 3V4H4C3.4 4 3 4.4 3 5V9C3 11.2 4.8 13 7 13C8.2 14.2 8.8 14.8 10 16H14C15.2 14.8 15.8 14.2 17 13C19.2 13 21 11.2 21 9V5C21 4.4 20.6 4 20 4ZM5 9V6H7V11C5.9 11 5 10.1 5 9ZM19 9C19 10.1 18.1 11 17 11V6H19V9ZM17 21V22H7V21C7 20.4 7.4 20 8 20H16C16.6 20 17 20.4 17 21ZM10 9C9.4 9 9 8.6 9 8V5C9 4.4 9.4 4 10 4C10.6 4 11 4.4 11 5V8C11 8.6 10.6 9 10 9ZM10 13C9.4 13 9 12.6 9 12V11C9 10.4 9.4 10 10 10C10.6 10 11 10.4 11 11V12C11 12.6 10.6 13 10 13Z"
                                                                                  fill="currentColor"/>
																		</svg>
																	</span>
                                                                    <!--end::Svg Icon-->
																</span>
                                                            </div>
                                                            <!--end::Symbol-->
                                                            <!--begin::Stats-->
                                                            <div class="m-0">
                                                                <!--begin::Number-->
                                                                
                                                                <span class="text-gray-700 fw-bolder d-block fs-2qx lh-1 ls-n1 mb-1"><?php echo "100"; ?></span>
                                                                <!--end::Number-->
                                                                <!--begin::Desc-->
                                                                <span class="text-gray-500 fw-semibold fs-6">College</span>
                                                                <!--end::Desc-->
                                                            </div>
                                                            <!--end::Stats-->
                                                        </div>
                                                        <!--end::Items-->
                                                    </div>
                                                    <!--end::Col-->
                                                    <!--begin::Col-->
                                                    <div class="col-6">
                                                        <!--begin::Items-->
                                                        <div class="bg-gray-100 bg-opacity-70 rounded-2 px-6 py-5">
                                                            <!--begin::Symbol-->
                                                            <div class="symbol symbol-30px me-5 mb-8">
																<span class="symbol-label">
																	<!--begin::Svg Icon | path: icons/duotune/general/gen013.svg-->
																	<span class="svg-icon svg-icon-1 svg-icon-primary">
																		<svg width="24" height="24" viewBox="0 0 24 24"
                                                                             fill="none"
                                                                             xmlns="http://www.w3.org/2000/svg">
																			<path opacity="0.3"
                                                                                  d="M20.9 12.9C20.3 12.9 19.9 12.5 19.9 11.9C19.9 11.3 20.3 10.9 20.9 10.9H21.8C21.3 6.2 17.6 2.4 12.9 2V2.9C12.9 3.5 12.5 3.9 11.9 3.9C11.3 3.9 10.9 3.5 10.9 2.9V2C6.19999 2.5 2.4 6.2 2 10.9H2.89999C3.49999 10.9 3.89999 11.3 3.89999 11.9C3.89999 12.5 3.49999 12.9 2.89999 12.9H2C2.5 17.6 6.19999 21.4 10.9 21.8V20.9C10.9 20.3 11.3 19.9 11.9 19.9C12.5 19.9 12.9 20.3 12.9 20.9V21.8C17.6 21.3 21.4 17.6 21.8 12.9H20.9Z"
                                                                                  fill="currentColor"/>
																			<path d="M16.9 10.9H13.6C13.4 10.6 13.2 10.4 12.9 10.2V5.90002C12.9 5.30002 12.5 4.90002 11.9 4.90002C11.3 4.90002 10.9 5.30002 10.9 5.90002V10.2C10.6 10.4 10.4 10.6 10.2 10.9H9.89999C9.29999 10.9 8.89999 11.3 8.89999 11.9C8.89999 12.5 9.29999 12.9 9.89999 12.9H10.2C10.4 13.2 10.6 13.4 10.9 13.6V13.9C10.9 14.5 11.3 14.9 11.9 14.9C12.5 14.9 12.9 14.5 12.9 13.9V13.6C13.2 13.4 13.4 13.2 13.6 12.9H16.9C17.5 12.9 17.9 12.5 17.9 11.9C17.9 11.3 17.5 10.9 16.9 10.9Z"
                                                                                  fill="currentColor"/>
																		</svg>
																	</span>
                                                                    <!--end::Svg Icon-->
																</span>
                                                            </div>
                                                            <!--end::Symbol-->
                                                            <!--begin::Stats-->
                                                            <div class="m-0">
                                                                <!--begin::Number-->
                                                              
                                                                <span class="text-gray-700 fw-bolder d-block fs-2qx lh-1 ls-n1 mb-1"><?php echo "100"; ?></span>
                                                                <!--end::Number-->
                                                                <!--begin::Desc-->
                                                                <span class="text-gray-500 fw-semibold fs-6">Agents</span>
                                                                <!--end::Desc-->
                                                            </div>
                                                            <!--end::Stats-->
                                                        </div>
                                                        <!--end::Items-->
                                                    </div>
                                                    <!--end::Col-->
                                                </div>
                                                <!--end::Row-->
                                            </div>
                                            <!--end::Stats-->
                                        </div>
                                        <!--end::Body-->
                                    </div>
                                    <!--end::Lists Widget 19-->
                                </div>
                                <!--end::Col-->
                            </div>
                            <!--end::Row-->
                           
                                <!--begin::Order history-->
                                <div class="card card-flush py-4 flex-row-fluid">
                                  
                                 	<!--begin::Content-->
					<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
						<!--begin::Container-->
						<div class="container-xxl" id="kt_content_container">
							<!--begin::Card-->
							<div class="card">
								<!--begin::Card header-->
								<div class="card-header">
									<h2 class="card-title fw-bold">Calendar</h2>
								
								</div>
								<!--end::Card header-->
								<!--begin::Card body-->
								<div class="card-body">
									<!--begin::Calendar-->
									<div id="kt_calendar_app"></div>
									
									<!--end::Calendar-->
								</div>
								<!--end::Card body-->
							</div>
							<!--end::Card-->
							<!--begin::Modals-->
							<!--begin::Modal - New Product-->
							<div class="modal fade" id="kt_modal_add_event" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-650px">
									<!--begin::Modal content-->
									<div class="modal-content">
										
										
										<div id="kt_modal_add_event_form"></div>
									
									
										
									</div>
								</div>
							</div>
							<!--end::Modal - New Product-->
							<!--begin::Modal - New Product-->
							<div class="modal fade" id="kt_modal_view_event" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-650px">
									<!--begin::Modal content-->
									<div class="modal-content">
										<!--begin::Modal header-->
										<div class="modal-header border-0 justify-content-end">
										
										
											<!--begin::Close-->
											<div class="btn btn-icon btn-sm btn-color-gray-500 btn-active-icon-primary" data-bs-toggle="tooltip" title="Hide Event" data-bs-dismiss="modal">
												<!--begin::Svg Icon | path: icons/duotune/arrows/arr061.svg-->
												<span class="svg-icon svg-icon-1">
													<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
														<rect opacity="0.5" x="6" y="17.3137" width="16" height="2" rx="1" transform="rotate(-45 6 17.3137)" fill="currentColor" />
														<rect x="7.41422" y="6" width="16" height="2" rx="1" transform="rotate(45 7.41422 6)" fill="currentColor" />
													</svg>
												</span>
												<!--end::Svg Icon-->
											</div>
											<!--end::Close-->
										</div>
										<!--end::Modal header-->
										<!--begin::Modal body-->
										 <?php foreach ($eventsData as $event) { ?>	
										<div class="modal-body pt-0 pb-20 px-lg-17">
											<!--begin::Row-->
											<div class="d-flex">
												<!--begin::Icon-->
												<!--begin::Svg Icon | path: icons/duotune/general/gen014.svg-->
												<span class="svg-icon svg-icon-1 svg-icon-muted me-5">
													<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
														<path opacity="0.3" d="M21 22H3C2.4 22 2 21.6 2 21V5C2 4.4 2.4 4 3 4H21C21.6 4 22 4.4 22 5V21C22 21.6 21.6 22 21 22Z" fill="currentColor" />
														<path d="M6 6C5.4 6 5 5.6 5 5V3C5 2.4 5.4 2 6 2C6.6 2 7 2.4 7 3V5C7 5.6 6.6 6 6 6ZM11 5V3C11 2.4 10.6 2 10 2C9.4 2 9 2.4 9 3V5C9 5.6 9.4 6 10 6C10.6 6 11 5.6 11 5ZM15 5V3C15 2.4 14.6 2 14 2C13.4 2 13 2.4 13 3V5C13 5.6 13.4 6 14 6C14.6 6 15 5.6 15 5ZM19 5V3C19 2.4 18.6 2 18 2C17.4 2 17 2.4 17 3V5C17 5.6 17.4 6 18 6C18.6 6 19 5.6 19 5Z" fill="currentColor" />
														<path d="M8.8 13.1C9.2 13.1 9.5 13 9.7 12.8C9.9 12.6 10.1 12.3 10.1 11.9C10.1 11.6 10 11.3 9.8 11.1C9.6 10.9 9.3 10.8 9 10.8C8.8 10.8 8.59999 10.8 8.39999 10.9C8.19999 11 8.1 11.1 8 11.2C7.9 11.3 7.8 11.4 7.7 11.6C7.6 11.8 7.5 11.9 7.5 12.1C7.5 12.2 7.4 12.2 7.3 12.3C7.2 12.4 7.09999 12.4 6.89999 12.4C6.69999 12.4 6.6 12.3 6.5 12.2C6.4 12.1 6.3 11.9 6.3 11.7C6.3 11.5 6.4 11.3 6.5 11.1C6.6 10.9 6.8 10.7 7 10.5C7.2 10.3 7.49999 10.1 7.89999 10C8.29999 9.90003 8.60001 9.80003 9.10001 9.80003C9.50001 9.80003 9.80001 9.90003 10.1 10C10.4 10.1 10.7 10.3 10.9 10.4C11.1 10.5 11.3 10.8 11.4 11.1C11.5 11.4 11.6 11.6 11.6 11.9C11.6 12.3 11.5 12.6 11.3 12.9C11.1 13.2 10.9 13.5 10.6 13.7C10.9 13.9 11.2 14.1 11.4 14.3C11.6 14.5 11.8 14.7 11.9 15C12 15.3 12.1 15.5 12.1 15.8C12.1 16.2 12 16.5 11.9 16.8C11.8 17.1 11.5 17.4 11.3 17.7C11.1 18 10.7 18.2 10.3 18.3C9.9 18.4 9.5 18.5 9 18.5C8.5 18.5 8.1 18.4 7.7 18.2C7.3 18 7 17.8 6.8 17.6C6.6 17.4 6.4 17.1 6.3 16.8C6.2 16.5 6.10001 16.3 6.10001 16.1C6.10001 15.9 6.2 15.7 6.3 15.6C6.4 15.5 6.6 15.4 6.8 15.4C6.9 15.4 7.00001 15.4 7.10001 15.5C7.20001 15.6 7.3 15.6 7.3 15.7C7.5 16.2 7.7 16.6 8 16.9C8.3 17.2 8.6 17.3 9 17.3C9.2 17.3 9.5 17.2 9.7 17.1C9.9 17 10.1 16.8 10.3 16.6C10.5 16.4 10.5 16.1 10.5 15.8C10.5 15.3 10.4 15 10.1 14.7C9.80001 14.4 9.50001 14.3 9.10001 14.3C9.00001 14.3 8.9 14.3 8.7 14.3C8.5 14.3 8.39999 14.3 8.39999 14.3C8.19999 14.3 7.99999 14.2 7.89999 14.1C7.79999 14 7.7 13.8 7.7 13.7C7.7 13.5 7.79999 13.4 7.89999 13.2C7.99999 13 8.2 13 8.5 13H8.8V13.1ZM15.3 17.5V12.2C14.3 13 13.6 13.3 13.3 13.3C13.1 13.3 13 13.2 12.9 13.1C12.8 13 12.7 12.8 12.7 12.6C12.7 12.4 12.8 12.3 12.9 12.2C13 12.1 13.2 12 13.6 11.8C14.1 11.6 14.5 11.3 14.7 11.1C14.9 10.9 15.2 10.6 15.5 10.3C15.8 10 15.9 9.80003 15.9 9.70003C15.9 9.60003 16.1 9.60004 16.3 9.60004C16.5 9.60004 16.7 9.70003 16.8 9.80003C16.9 9.90003 17 10.2 17 10.5V17.2C17 18 16.7 18.4 16.2 18.4C16 18.4 15.8 18.3 15.6 18.2C15.4 18.1 15.3 17.8 15.3 17.5Z" fill="currentColor" />
													</svg>
												</span>
												<!--end::Svg Icon-->
												<!--end::Icon-->
												
												<div class="mb-9">
													<!--begin::Event name-->
													<div class="d-flex align-items-center mb-2">
													<span class="fs-3 fw-bold me-3" ><?php echo $event['title']; ?></span>
														 
													</div>
													<!--end::Event name-->
													<!--begin::Event description-->
													<div class="fs-6" ><?php echo $event['description']; ?></div>
													<!--end::Event description-->
												</div>
											</div>
											<!--end::Row-->
											<!--begin::Row-->
											<div class="d-flex align-items-center mb-2">
												<!--begin::Icon-->
												<!--begin::Svg Icon | path: icons/duotune/abstract/abs050.svg-->
												<span class="svg-icon svg-icon-1 svg-icon-success me-5">
													<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
														<circle fill="currentColor" cx="12" cy="12" r="8" />
													</svg>
												</span>
												<!--end::Svg Icon-->
												<!--end::Icon-->
												<!--begin::Event start date/time-->
												<div class="fs-6">
													<span class="fw-bold">Starts</span>
													  <span><?php echo $event['start']; ?></span>
												</div>
												<!--end::Event start date/time-->
											</div>
											<!--end::Row-->
											<!--begin::Row-->
											<div class="d-flex align-items-center mb-9">
												<!--begin::Icon-->
												<!--begin::Svg Icon | path: icons/duotune/abstract/abs050.svg-->
												<span class="svg-icon svg-icon-1 svg-icon-danger me-5">
													<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
														<circle fill="currentColor" cx="12" cy="12" r="8" />
													</svg>
												</span>
												<!--end::Svg Icon-->
												<!--end::Icon-->
												<!--begin::Event end date/time-->
												<div class="fs-6">
													<span class="fw-bold">Ends</span>
													  <span><?php echo $event['end']; ?></span>
												</div>
												<!--end::Event end date/time-->
											</div>
											<!--end::Row-->
											<!--begin::Row-->
											<div class="d-flex align-items-center">
												<!--begin::Icon-->
												<!--begin::Svg Icon | path: icons/duotune/general/gen018.svg-->
												<span class="svg-icon svg-icon-1 svg-icon-muted me-5">
													<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
														<path opacity="0.3" d="M18.0624 15.3453L13.1624 20.7453C12.5624 21.4453 11.5624 21.4453 10.9624 20.7453L6.06242 15.3453C4.56242 13.6453 3.76242 11.4453 4.06242 8.94534C4.56242 5.34534 7.46242 2.44534 11.0624 2.04534C15.8624 1.54534 19.9624 5.24534 19.9624 9.94534C20.0624 12.0453 19.2624 13.9453 18.0624 15.3453Z" fill="currentColor" />
														<path d="M12.0624 13.0453C13.7193 13.0453 15.0624 11.7022 15.0624 10.0453C15.0624 8.38849 13.7193 7.04535 12.0624 7.04535C10.4056 7.04535 9.06241 8.38849 9.06241 10.0453C9.06241 11.7022 10.4056 13.0453 12.0624 13.0453Z" fill="currentColor" />
													</svg>
												</span>
												<!--end::Svg Icon-->
												<!--end::Icon-->
												<!--begin::Event location-->
												<div class="fs-6" ><?php echo $event['location']; ?></div>
												<!--end::Event location-->
											</div>
											<!--end::Row-->
											
										</div>
										 <?php } ?>
										<!--end::Modal body-->
									</div>
								</div>
							</div>
							<!--end::Modal - New Product-->
							<!--end::Modals-->
						</div>
						<!--end::Container-->
					</div>
					<!--end::Content-->
								  
                           
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php include('footer.php'); ?>
    </div>
</div>

<script>var hostUrl = "assets/";</script>
<script src="assets/plugins/global/plugins.bundle.js"></script>
<script src="assets/js/scripts.bundle.js"></script>
<script src="assets/plugins/custom/fullcalendar/fullcalendar.bundle.js"></script>
<script src="https://cdn.amcharts.com/lib/5/index.js"></script>
<script src="https://cdn.amcharts.com/lib/5/xy.js"></script>
<script src="https://cdn.amcharts.com/lib/5/percent.js"></script>
<script src="https://cdn.amcharts.com/lib/5/radar.js"></script>
<script src="https://cdn.amcharts.com/lib/5/themes/Animated.js"></script>
<script src="https://cdn.amcharts.com/lib/5/map.js"></script>
<script src="https://cdn.amcharts.com/lib/5/geodata/worldLow.js"></script>
<script src="https://cdn.amcharts.com/lib/5/geodata/continentsLow.js"></script>
<script src="https://cdn.amcharts.com/lib/5/geodata/usaLow.js"></script>
<script src="https://cdn.amcharts.com/lib/5/geodata/worldTimeZonesLow.js"></script>
<script src="https://cdn.amcharts.com/lib/5/geodata/worldTimeZoneAreasLow.js"></script>
<script src="assets/plugins/custom/datatables/datatables.bundle.js"></script>
<script src="assets/js/widgets.bundle.js"></script>
<script src="assets/js/custom/widgets.js"></script>
<script src="assets/js/custom/apps/chat/chat.js"></script>
<script src="assets/js/custom/utilities/modals/upgrade-plan.js"></script>
<script src="assets/js/custom/utilities/modals/create-app.js"></script>
<script src="assets/js/custom/utilities/modals/new-target.js"></script>
<script src="assets/js/custom/utilities/modals/users-search.js"></script>

<script src="assets/js/custom/apps/calendar/calendar.js"></script>

</body>
</html>