<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Admin Dashboard </title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
        <meta content="Coderthemes" name="author" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />


        <!-- App favicon -->
        <link rel="shortcut icon" href="<?= base_url()."/public"; ?>/assets/images/favicon.ico">

		<!-- App css -->
		<link href="<?= base_url()."/public"; ?>/assets/css/bootstrap-material.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
		<link href="<?= base_url()."/public"; ?>/assets/css/app-material.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />

		<link href="<?= base_url()."/public"; ?>/assets/css/bootstrap-material-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
		<link href="<?= base_url()."/public"; ?>/assets/css/app-material-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />

		<!-- icons -->
		<link href="<?= base_url()."/public"; ?>/assets/css/icons.min.css" rel="stylesheet" type="text/css" />

         <!-- third party css -->
         <link href="<?= base_url()."/public"; ?>/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
        <link href="<?= base_url()."/public"; ?>/assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
        <link href="<?= base_url()."/public"; ?>/assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
        <link href="<?= base_url()."/public"; ?>/assets/libs/datatables.net-select-bs4/css//select.bootstrap4.min.css" rel="stylesheet" type="text/css" />
        <!-- third party css end -->
        <link href="<?= base_url()."/public"; ?>/assets/css/style.css" rel="stylesheet" type="text/css" />

        <!-- Summernote css -->
        <link href="<?= base_url()."/public"; ?>/assets/libs/summernote/summernote-bs4.min.css" rel="stylesheet" type="text/css" />
        <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

        <!-- Plugin css -->
        <link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/core/main.min.css" rel="stylesheet" type="text/css" />
        <link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/daygrid/main.min.css" rel="stylesheet" type="text/css" />
        <link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/bootstrap/main.min.css" rel="stylesheet" type="text/css" />
        <link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/timegrid/main.min.css" rel="stylesheet" type="text/css" />
        <link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/list/main.min.css" rel="stylesheet" type="text/css" />

        <script src="<?= base_url()."/public"; ?>/assets/member_js/ajax.js"></script>
        <input id="url" value="<?= base_url() ?>" type="hidden">
        <?php
        header('Cache-Control: no-cache, no-store, must-revalidate');
        header('Pragma: no-cache');
        header('Expires: 0');
        ?>
<script>
 


 
//fetch state and sity values
 $('.country').change(function(){
  var country_id = $('.country').val();
  
  if(country_id != '')
  {
	 
   $.ajax({
    url:"<?= base_url(); ?>/fetch_state",
    method:"POST",
    data:{country_id:country_id},
    success:function(data)
    {
     $('.state').html(data);
    }
   });
  }
  else
  {
   $('.state').html('<option value="">Select State</option>');
  }
 });

 $('.state').change(function(){
  var state_id = $('.state').val();
  if(state_id != '')
  {
   $.ajax({
    url:"<?=  base_url(); ?>/fetch_city",
    method:"POST",
    data:{state_id:state_id},
    success:function(data)
    {
     $('.city').html(data);
    }
   });
  }
  else
  {
   $('.city').html('<option value="">Select City</option>');
  }
 });
</script>

    </head>

    <body class="loading">

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

            <!-- ========== Left Sidebar Start ========== -->
            <div class="left-side-menu">

                <!-- LOGO -->
                <div class="logo-box">
                    <a class="logo logo-dark text-center">
                        <span class="logo-sm">
                            <img src="<?= base_url()."/public"; ?>/assets/images/logo-sm-dark.png" alt="" height="24">
                            <!-- <span class="logo-lg-text-light">Minton</span> -->
                        </span>
                        <span class="logo-lg">
                            <img src="<?= base_url()."/public"; ?>/assets/images/logo-dark.png" alt="" height="20">
                            <!-- <span class="logo-lg-text-light">M</span> -->
                        </span>
                    </a>

                    <a class="logo logo-light text-center">
                        <span class="logo-sm">
                            <img src="<?= base_url()."/public"; ?>/assets/images/company-logo/golf_logo_2.png" alt="" height="30">
                        </span>
                        <span class="logo-lg">
                            <img src="<?= base_url()."/public"; ?>/assets/images/company-logo/GolfEvolution_White.png" alt="" height="65">
                        </span>
                    </a>
                </div>

                <div class="h-100" data-simplebar>

                    <!--- Sidemenu -->
                    <div id="sidebar-menu">

                        <ul id="side-menu">

                            <!-- <li class="menu-title">Navigation</li> -->
                            <li>
                                <a href="<?= base_url()."admin_home"; ?>">
                                    <i class="mdi mdi-view-dashboard"></i>
                                    <span> Dashboards </span>
                                </a>
                            </li>
                            
<?php if($userdata->role == 'Admin' ) { ?>
    
                            <li>
                                <a href="<?= base_url()."members_list"; ?>">
                                    <i class="mdi mdi-account-group"></i>
                                    <span> Members </span>
                                </a>
                            </li>
                            <li>
                                <a href="<?= base_url()."users_list"; ?>">
                                    <i class="mdi mdi-account-multiple"></i>
                                    <span> Users </span>
                                </a>
                            </li>
                            <li>
                                <a href="<?= base_url()."credits_pack_list"; ?>">
                                    <i class="mdi mdi-package-variant"></i>
                                    <span> Credit Packs </span>
                                </a>
                            </li>
                            <!-- <li>
                                <a href="<?= base_url()."product_list"; ?>">
                                    <i class="mdi mdi-currency-usd"></i>
                                    <span> Product </span>
                                </a>
                            </li> -->
                            <li>
                                <a href="<?= base_url()."transactions_list"; ?>">
                                    <i class="mdi mdi-currency-usd"></i>
                                    <span> Transactions </span>
                                </a>
                            </li>

                            <li>
                            <a href="#sidebarTables" data-toggle="collapse">
                                     <i class="ri-settings-3-line"></i>
                                     <span> General Settings </span>
                                     <span class="menu-arrow"></span>
                                 </a>
                                 <div class="collapse" id="sidebarTables">
                                     <ul class="nav-second-level">
                                         <li>
                                             <a href="<?= base_url()."template_list"; ?>"><i class="mdi mdi-email-edit-outline"></i> Mail Content Manager</a>
                                         </li>
                                    

                                     <li>
                                         <a href="<?= base_url()."rule"; ?>">
                                             <i class="mdi mdi-alpha-r-circle-outline"></i>
                                             <span> Configuration </span>
                                         </a>
                                     </li>

                                     </ul>
                                 </div>
                             </li>

<?php } elseif($userdata->role == 'Coach' ) { ?>         

                            <li>
                                <a href="<?= base_url()."booked_slot"; ?>">
                                    <i class="mdi mdi-clipboard-list-outline"></i>
                                    <span> Booked Slot </span>
                                </a>
                            </li>
                            <li>
                                <a href="<?= base_url()."manage_availability"; ?>">
                                    <i class="mdi mdi-account-check"></i>
                                    <span> Manage Availability </span>
                                </a>
                            </li>
<?php } elseif($userdata->role == 'Fronddesk' ) { ?>         

                            <li>
                                <a href="<?= base_url()."members_list"; ?>">
                                    <i class="mdi mdi-account-group"></i>
                                    <span> Members </span>
                                </a>
                            </li>
                            <li>
                                <a href="<?= base_url()."transactions_list"; ?>">
                                    <i class="mdi mdi-currency-usd"></i>
                                    <span> Transactions </span>
                                </a>
                            </li>
<!-- <li>
     <a href="#sidebarTables" data-toggle="collapse">
         <i class="mdi mdi-account-multiple"></i>
         <span> Users </span>
         <span class="menu-arrow"></span>
     </a>
     <div class="collapse" id="sidebarTables">
         <ul class="nav-second-level">
             <li>
                 <a href="<?= base_url()."users_list"; ?>">Users List</a>
             </li>
             <li>
                 <a href="<?= base_url() ?>user_add">Create User</a>
             </li>
         </ul>
     </div>
 </li> -->
<?php }  ?>

                                  
                                    </ul>
                                </div>
                            </li>
                        </ul>

                    </div>
                    <!-- End Sidebar -->

                    <div class="clearfix"></div>

                </div>
                <!-- Sidebar -left -->
            </div>
            <!-- Left Sidebar End -->















            
            <!-- ============================================================== -->
            <!-- Start Page Content here -->
            <!-- ============================================================== -->

            <div class="content-page">
                <div class="content">

                    <!-- Topbar Start -->
                    <div class="navbar-custom">
                        <div class="container-fluid">
    
                            <ul class="list-unstyled topnav-menu float-right mb-0">

    
                               
    
                                <li class="dropdown d-none d-lg-inline-block">
                                    <a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="fullscreen" href="#">
                                        <i class="fe-maximize noti-icon"></i>
                                    </a>
                                </li>
    
                            
    
                             
    
                                <li class="dropdown notification-list topbar-dropdown">
                                    <a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">

                                    <?php if ($userdata->profile) { ?>
                                        <img src='<?php echo base_url()."/public/assets/images/users/"?><?= $userdata->profile; ?>' class="rounded-circle" alt="profile-image">
                                    <?php } 
                                    else { ?>
                                        <img id="" src='<?php echo base_url()."/public/assets/images/users/avatar-1.jpg" ?>' class="rounded-circle" alt="profile-image">
                                    <?php } ?>
                                        <span class="pro-user-name ml-1">
                                           <?= $userdata->name; ?> <i class="mdi mdi-chevron-down"></i> 
                                        </span>
                                    </a>
                                    <div class="dropdown-menu dropdown-menu-right profile-dropdown ">
                                        <!-- item-->
                                        <!-- <div class="dropdown-header noti-title">
                                            <h6 class="text-overflow m-0">Welcome !</h6>
                                        </div> -->
    
                                        <!-- item-->
                                        <a href="<?= base_url()."admin_profile/". md5($userdata->id); ?>" class="dropdown-item notify-item">
                                            <i class="ri-account-circle-line"></i>
                                            <span>My Account</span>
                                        </a>

                                         <!-- item-->
                                         <a href="<?= base_url()."user_password_change/" ?>" class="dropdown-item notify-item">
                                            <i class="mdi mdi-lock-outline"></i>
                                            <span>Change Password</span>
                                        </a>

                                        <!-- item-->
                                        <!-- <a href="javascript:void(0);" class="dropdown-item notify-item">
                                            <i class="ri-settings-3-line"></i>
                                            <span>Settings</span>
                                        </a> -->

                                        <!-- item-->
                                        <!-- <a href="<?= base_url()."template_list"; ?>" class="dropdown-item notify-item">
                                            <i class="mdi mdi-email-edit-outline"></i>
                                            <span>Email Template </span>
                                        </a> -->

                                        <!-- item-->
                                        <!-- <a href="javascript:void(0);" class="dropdown-item notify-item">
                                            <i class="ri-wallet-line"></i>
                                            <span>My Wallet <span class="badge badge-success float-right">3</span> </span>
                                        </a> -->

                                       

                                        <div class="dropdown-divider"></div>

                                        <!-- item-->
                                        <a href="<?= base_url()."admin_logout"; ?>" class="dropdown-item notify-item">
                                            <i class="ri-logout-box-line"></i>
                                            <span>Logout</span>
                                        </a>
    
                                    </div>
                                </li>
    
                                <!-- <li class="dropdown notification-list">
                                    <a href="javascript:void(0);" class="nav-link right-bar-toggle waves-effect waves-light">
                                        <i class="fe-settings noti-icon"></i>
                                    </a>
                                </li> -->
    
                            </ul>

                            <!-- LOGO -->
                         
                            <ul class="list-unstyled topnav-menu topnav-menu-left m-0">
                                <li>
                                    <button class="button-menu-mobile waves-effect waves-light">
                                        <i class="fe-menu"></i>
                                    </button>
                                </li>

                                <li>
                                    <!-- Mobile menu toggle (Horizontal Layout)-->
                                    <a class="navbar-toggle nav-link" data-toggle="collapse" data-target="#topnav-menu-content">
                                        <div class="lines">
                                            <span></span>
                                            <span></span>
                                            <span></span>
                                        </div>
                                    </a>
                                    <!-- End mobile menu toggle-->
                                </li>   
                            </ul>
                         
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <!-- end Topbar -->

                    <!-- body Content start-->
                    <div class="container-fluid">
  



                    