<?php include("cn.php");?>
<?php $title = "Dashboard";?>
<!DOCTYPE html>
<html lang="en">
<?php include("head-tag.php");?>
<?php 
   $sql_1 = mysqli_query($connect,"select * from users where
    Id = '".$_SESSION["userid"]."' ");
    $data_1 = mysqli_fetch_assoc($sql_1);
?>

<body>

<div class="inner-wrapper">
<?php include("pre-loader.php");?>
<?php include("header.php");?>

<div class="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-xl-3 col-lg-4 col-md-12 theiaStickySidebar">
    <aside class="sidebar sidebar-user">
        <div class="card ctm-border-radius shadow-sm">
            <div class="card-body py-4">
                <div class="row">
                    <div class="col-md-12 mr-auto text-left">
                        <div class="custom-search input-group">
                            <div class="custom-breadcrumb">
                                <ol class="breadcrumb no-bg-color d-inline-block p-0 m-0 mb-2">
                                    <li class="breadcrumb-item d-inline-block"><a href="index.php" class="text-dark">Home</a></li>
                                    <li class="breadcrumb-item d-inline-block active"><?php echo $title?></li>
                                </ol>
                                <h4 class="text-dark">Your Bookings</h4>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <div class="user-card card shadow-sm bg-white text-center ctm-border-radius">
        <div class="user-info card-body">
            <div class="user-avatar mb-4">
                <img src="<?php echo $data_1["Image"];?>" alt="User Avatar" class="img-fluid rounded-circle" width="100">
            </div>
            <div class="user-details">
                <h4><b>Welcome <?php echo $data_1["FullName"];?></b></h4>
            </div>
        </div>
    </div>
</aside>
</div>
<div class="col-xl-9 col-lg-8 col-md-12">

<div class="col-xl-12 col-lg-12  col-md-12">
<div class="card ctm-border-radius shadow-sm">
<div class="card-body">
<div id="calendar1"> </div>
</div>
</div>
</div>

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

</div>

<div class="sidebar-overlay" id="sidebar_overlay"></div>

<?php include("scripts.php");?>

<script>

$(document).ready(function() {

   var calendar = $('#calendar1').fullCalendar({

    header:{
     left:'prev,next today',
     center:'title',
     right:'month,agendaWeek,agendaDay'
    },
    events: 'events.php',
    
    eventClick:function(event)
    {
       window.location = "booking-detail.php?id="+event.Id;
    },
    
    eventRender: function(event, element) {
        // element.qtip({
        //     content: {
        //         text: event.description,
        //         title: event.title,
        //         button: 'Close'
        //     }
        // });
    }

   });
  });

</script>

</body>

</html>