<!doctype html>
<html lang="en">
    <head>        
        <meta charset="utf-8" />
        <title><?php echo $title;?></title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
        <meta content="Themesbrand" name="author" />
        <!-- App favicon -->
        <link rel="shortcut icon" href="<?php echo base_url();?>assets/img/ic_launcher_round.png">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
        <!-- Lightbox css -->
        <link href="<?php echo base_url();?>assets/libs/magnific-popup/magnific-popup.css" rel="stylesheet" type="text/css" />
        <!-- Bootstrap Css -->
        <link href="<?php echo base_url();?>assets/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url();?>assets/libs/bootstrap-touchspin/jquery.bootstrap-touchspin.min.css" rel="stylesheet" />
        <!-- DataTables -->
        <link href="<?php echo base_url();?>assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url();?>assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url();?>assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet">
        <!-- Responsive datatable examples -->
        <link href="<?php echo base_url();?>assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />     
        <!-- Icons Css -->
        <link href="<?php echo base_url();?>assets/css/icons.min.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url();?>assets/css/gallery/gallery.css" rel="stylesheet">
        <link href="<?php echo base_url();?>assets/css/style.css" rel="stylesheet">
        <link href="<?php echo base_url();?>assets/libs/dropzone/min/dropzone.min.css" rel="stylesheet">
        <!-- App Css-->
        <link href="<?php echo base_url();?>assets/css/app.min.css" id="app-style" rel="stylesheet" type="text/css" />
        <style>
            body{
                background-color: #fff;
            }
            
            h3{
                font-size: 1.42188rem;
                margin-bottom: .5rem;
                font-weight: 500;
                line-height: 1.2;
            }
        </style>
    </head>

    <body data-sidebar="dark" data-sidebar-size="small">

        <!-- Begin page -->
        <div id="layout-wrapper">

            <header id="page-topbar">
                <div class="navbar-header">
                    <div class="d-flex">
                        <!-- LOGO -->
                        <div class="navbar-brand-box">
                            <?php 
                                if($is_single_gallery == 1){
                            ?>
                                <a href="<?php echo base_url('sgallery');?>" class="logo logo-light" style="text-align: center;">
                            <?php
                                }else{
                            ?>
                                <a href="<?php echo base_url('mgallery');?>" class="logo logo-light" style="text-align: center;">
                            <?php
                                }
                            ?>
                                <span class="logo-sm">
                                    <img src="<?php echo base_url();?>assets/images/favicon.png" alt="" height="22">
                                </span>
                                <span class="logo-lg">
                                    <img src="<?php echo $site_logo;?>" alt="" style="width: 70%; height: 30%;">
                                </span>
                            </a>
                        </div>

                        <button type="button" class="btn btn-sm px-3 font-size-16 header-item waves-effect" id="vertical-menu-btn">
                            <i class="fa fa-fw fa-bars"></i>
                        </button>
                    </div>

                    <div class="d-flex" style="padding-right: 15px;">
                        <div class="dropdown d-inline-block">
                            <div class="btn header-item waves-effect" onclick="qrdetail('<?php echo $guest_detail['qr_url']?>')">
                                <?php 
                                    if($guest_detail['photo_url'] == "" && $guest_detail['qr_url'] != ""){
                                ?>
                                    <img class="rounded-circle header-profile-user" src="<?php echo $guest_detail['qr_url'];?>" alt="<?php echo $guest_detail['email'];?>" style="border: solid 1px #40dcfd;">
                                <?php
                                    }else if($guest_detail['photo_url'] != "" && $guest_detail['qr_url'] == ""){
                                ?>
                                    <img class="rounded-circle header-profile-user"   src="http://d1z6a3vjnfowyr.cloudfront.net/<?php echo $guest_detail['photo_url'];?>" alt="<?php echo $guest_detail['email'];?>" style="border: solid 1px #40dcfd;">
                                <?php
                                    }else{
                                ?>
                                    <img class="rounded-circle header-profile-user"  src="http://d1z6a3vjnfowyr.cloudfront.net/<?php echo $guest_detail['photo_url'];?>" alt="<?php echo $guest_detail['email'];?>" style="border: solid 1px #40dcfd;">
                                <?php
                                    }
                                ?>
                                <span class="d-none d-xl-inline-block ml-1"><?php echo $guest_detail['email'];?></span>
                            </div>
                        </div>
                        
                        <div class="dropdown d-inline-block">
                            <button style="width:100px;" type="button" class="btn header-item noti-icon waves-effect" id="page-header-notifications-dropdown"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <i class="bx bx-bell bx-tada"></i>
                                <span class="badge badge-danger badge-pill"><?php echo $new_notification_count;?></span>
                            </button>
                            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right p-0"
                                aria-labelledby="page-header-notifications-dropdown">
                                <div class="p-3">
                                    <div class="row align-items-center">
                                        <div class="col">
                                            <h6 class="m-0"> Notifications </h6>
                                        </div>
                                    </div>
                                </div>
                                <div data-simplebar style="max-height: 230px;">
                                    <?php 
                                        if(count($notification_list) > 0){
                                            foreach ($notification_list as $key => $val) {
                                                if($val['isShow'] == 0){
                                    ?>
                                                    <a href="<?php echo base_url();?>notification" class="text-reset notification-item">
                                                        <div class="media">
                                                            <div class="avatar-xs mr-3">
                                                                <span class="avatar-title bg-info rounded-circle font-size-16">
                                                                    <i class="<?php echo $val['class_info'];?>"></i>
                                                                </span>
                                                            </div>
                                                            <div class="media-body">
                                                                <h6 class="mt-0 mb-1"><?php echo $val['notification'];?></h6>
                                                                <div class="font-size-12 text-muted">                                                    
                                                                    <p class="mb-0"><i class="mdi mdi-clock-outline"></i> <?php echo $val['created_at'];?></p>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </a>
                                    <?php
                                                }else{
                                    ?>
                                    
                                    <?php
                                                }
                                            }
                                        }
                                    ?>
                                </div>
                                <div class="p-2 border-top">
                                    <a class="btn btn-sm btn-link font-size-14 btn-block text-center" href="<?php echo base_url();?>notification" style="color: #40dcfd;">
                                        <i class="mdi mdi-arrow-right-circle mr-1"></i> View All
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                   
                </div>
            </header>
            <script>
                function qrdetail(url){
                    $(".qrviewModals").css("display","block");
                    $("#qrImgs").attr('src',url);
                    $(".qrviewModals").modal('show');
                }
                function closeqr()
                {
                    $(".qrviewModals").css("display","none");
                  
                }
            </script>
               <div class="qrviewModals" role="dialog" aria-labelledby="exampleModalLabel" style="position:absolute; z-index:100000000;display:none;" >
                  <div class="modal-dialog modal-dialog-centered" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title" id="exampleModalLabel">Details</h5>
                                <button type="button" class="close" data-dismiss="modal" onclick="closeqr()" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                            </div>
                            <div class="modal-body">
                                <img src="" id="qrImgs" style="width: 100%;">
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-secondary" onclick="closeqr()"  data-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </div>
                </div>
              <style>
        .qrviewModals{
            left:40%;
        }
        
        @media only screen and (max-width: 600px) {
            .qrviewModals{
            left:10%;
          }
        }
    </style>