		</div> 
	</div> 
</div>
		
	<a href="<?php echo base_url() ?>" id="base_url"></a>
	<a href="<?= $this->security->csrf_token();?>" id="csrf_data"></a>
	<a href="<?php echo $this->security->get_csrf_hash(); ?>" id="csrf_value"></a>

 	<!-- ==========
   		 Default Js
    =============== -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->

    <script src="<?= base_url();?>assets/js/popper.min.js"></script>
    <script src="<?= base_url();?>assets/js/bootstrap.min.js" ></script>
    <?php if(direction()=='rtl'): ?>
	    <link rel="stylesheet" href="<?= base_url()?>assets/js/bootstrap-rtl.js">
	    <a href="javascript:;" data-id="rtl" id="rtl"></a>
	  <?php endif ?>
	<!-- ==========
   		End Default Js
    =============== -->

	<!-- css-doodle -->
		<script src="<?= base_url()?>assets/plugins/doodle.js"></script>
	<!-- css-doodle -->


	<!--isotope-->
		<script src="<?= base_url()?>assets/plugins/isotope.pkgd.min.js"></script>
	<!-- isotope -->

	<!--jquery.fancybox.min.js v3.5.7-->
		 <script src="<?= base_url()?>assets/plugins/fancybox/jquery.fancybox.min.js"></script>
	<!-- jquery.fancybox.min.js v3.5.7 -->



	<!--circle progress -->
		<script src="<?= base_url()?>assets/plugins/circle_progress/progresscircle.js"></script>
	<!-- circle progress -->

	<!--Nice Scroll -->
		<script src="<?= base_url()?>assets/plugins/nicescroll/nicescroll.js"></script>
		<script src="<?= base_url()?>assets/plugins/nicescroll/nicescroll-plus.js"></script>
		<script src="<?= base_url()?>assets/plugins/waterfall.js"></script>
	<!-- Nice Scroll -->
	
	
	
    <!-- slick slider js -->
		<script src="<?= base_url();?>assets/plugins/slickSlider/slick.min.js" ></script>
		<script src="<?= base_url();?>assets/plugins/country/intelinput.js" ></script>
	<!-- slick slider js -->

	<!-- datetimepicker -->
		<script src="<?= base_url();?>assets/admin/bower_components/moment/min/moment.min.js" ></script>
		<script type="text/javascript"  src="<?= base_url();?>assets/plugins/datetime_picker/datetime.js" ></script>
	<!-- datetimepicker -->

	<!-- typing -->
		<script src="<?= base_url();?>assets/plugins/typing/typing.js" ></script>
		<script src="<?= base_url();?>assets/plugins/typing/typing_cursor.js" ></script>
	<!-- typing -->

	<!-- typing -->
		<script src="<?= base_url();?>assets/plugins/animation/aos-animation.js" ></script>
	<!-- typing -->

	<!-- particles -->
		<script src="<?= base_url();?>assets/plugins/particles.min.js" ></script>
		<script src="<?= base_url();?>assets/plugins/jstars.js" ></script>
	<!-- particles -->
	

	<!-- wow -->
		<script src="<?= base_url();?>assets/plugins/animate/wow.js" ></script>
	<!-- wow -->

	<!-- appear -->
		<script src="<?= base_url();?>assets/plugins/jquery.appear.js" ></script>
	<!-- appear -->
<?php $settings = get_setting(); ?>
<?php if(isset($page) && $page !='Profile'): ?>


<?php $pwa2 = !empty($settings['pwa_config'])?json_decode($settings['pwa_config']):''; ?>
<?php if(isset($settings['is_pwa']) && $settings['is_pwa']==1 && isset($pwa2->is_pwa_active) && $pwa2->is_pwa_active==1): ?>
	<div class="add-to-2">
		<div class="add-to-area">
			<div class="pt-15">
				<h4><?= $settings['site_name'] ;?></h4>
				<p><?= base_url(); ;?></p>
			</div>
			<button class="add-to-btn-2 btn btn-primary"><?= lang('add_to_home_screen'); ?></button>
		</div>
	</div>
	<script type="text/javascript">
		if ('serviceWorker' in navigator) {
			navigator.serviceWorker.register('/service-worker-2.js?r=', {
				scope: `/`
			}).then(function (registration) {
          // Registration was successful
          console.log('PWA: ServiceWorker registration successful with scope: ', registration.scope);
        }, function (err) {
          // registration failed :(
          console.log('PWA: ServiceWorker registration failed: ', err);
        });
		}

		let deferredPrompt;
		var div = document.querySelector('.add-to-2');
		var button = document.querySelector('.add-to-btn-2');
		div.style.display = 'none';

		window.addEventListener('beforeinstallprompt', (e) => {
      // Prevent Chrome 67 and earlier from automatically showing the prompt
      e.preventDefault();
      // Stash the event so it can be triggered later.
      deferredPrompt = e;
      div.style.display = 'block';

      setTimeout(function(){ div.style.display='none'; }, 7000);

      button.addEventListener('click', (e) => {
      // hide our user interface that shows our A2HS button
      div.style.display = 'none';
      // Show the prompt
      deferredPrompt.prompt();
      // Wait for the user to respond to the prompt
      deferredPrompt.userChoice
      .then((choiceResult) => {
      	if (choiceResult.outcome === 'accepted') {
      		console.log('User accepted the A2HS prompt');
      	} else {
      		console.log('User dismissed the A2HS prompt');
      	}
      	deferredPrompt = null;
      });
    });
    });

  </script>
<?php endif;?>
<?php endif;?>


<?php if(isset($slug) && !isset($vcard_page)): ?>
	<?php if(get_layouts_by_slug($slug)==2 || get_layouts_by_slug($slug)==3 || get_layouts_by_slug($slug)==5 || get_layouts_by_slug($slug)==6 || get_layouts_by_slug($slug)==7): ?>
	<!-- scrollTo -->
		<script src="<?= base_url();?>assets/plugins/jquery.scrollTo.min.js" ></script>
		<div class="scroll-top">
			<a href="javascript:;" class="bounce"><i class="fa fa-chevron-up"></i></a>
		</div>

	<?php endif ?>
	
	<?php if(isset($id)): ?>
		<?php $days = get_days();
				$off_day = [];
		 ?>
		<?php foreach ($days as $key => $day): 
			$my_days =get_single_appoinment($key,$id);
			if(isset($my_days['days']) && html_escape($my_days['days'])==$key){
				
			}else{
				$off_day[] = $key;
			}
		endforeach ?>
		<div class="off_days" data-id="<?=  $id;?>" data-day='<?= json_encode($off_day) ;?>'></div>
	<?php endif;?>


		<!-- footer pwa -->
<?php $pwa = !empty($u_settings['pwa_config'])?json_decode($u_settings['pwa_config']):''; ?>
<?php if(isset($settings['is_pwa']) &&$settings['is_pwa']==1 && (isset($pwa->is_pwa_active) && $pwa->is_pwa_active==1)): ?>
<div class="add-to">
	   <div class="add-to-area">
	    	<div class="pt-15">
	    		<h4><?= $settings['site_name'] ;?></h4>
	    		<p><?= base_url($slug); ;?></p>
	    	</div>
	   	 	<button class="add-to-btn btn btn-primary"><?= lang('add_to_home_screen'); ?></button>
	   </div>
	</div>
	<script type="text/javascript">
	  if ('serviceWorker' in navigator) {
	        navigator.serviceWorker.register('/service-worker.js?r=<?= $slug ;?>', {
	            scope: `/`
	        }).then(function (registration) {
	            // Registration was successful
	            console.log('Codeigniter PWA: ServiceWorker registration successful with scope: ', registration.scope);
	        }, function (err) {
	            // registration failed :(
	            console.log('Codeigniter PWA: ServiceWorker registration failed: ', err);
	        });
	    }

	    let deferredPrompt;
	    var div = document.querySelector('.add-to');
	    var button = document.querySelector('.add-to-btn');
	    div.style.display = 'none';

	    window.addEventListener('beforeinstallprompt', (e) => {
	      // Prevent Chrome 67 and earlier from automatically showing the prompt
	      e.preventDefault();
	      // Stash the event so it can be triggered later.
	      deferredPrompt = e;
	      div.style.display = 'block';

	      setTimeout(function(){ div.style.display='none'; }, 7000);

	      button.addEventListener('click', (e) => {
	      // hide our user interface that shows our A2HS button
	      div.style.display = 'none';
	      // Show the prompt
	      deferredPrompt.prompt();
	      // Wait for the user to respond to the prompt
	      deferredPrompt.userChoice
	        .then((choiceResult) => {
	          if (choiceResult.outcome === 'accepted') {
	            console.log('User accepted the A2HS prompt');
	          } else {
	            console.log('User dismissed the A2HS prompt');
	          }
	          deferredPrompt = null;
	        });
	    });
	    });

	</script>
<?php endif;?>
	<!-- footer pwa -->
<?php endif ?>



	<!-- main js -->
		<script src="<?= base_url();?>assets/js/main.js?v=<?= get_setting()['version'];?>&t=<?= time() ;?>" ></script>
	<!-- main js -->
		<!--payment Modal -->
  
		<script src="<?= base_url();?>assets/js/service.js?v=<?= get_setting()['version'];?>&t=<?= time() ;?>" ></script>

    </body>
</html>



<?php if(isset($page) && $page=="Profile"): ?>
	
	<?php $u_info = get_user_info_by_slug($slug); ?>
	<?php if(isset($u_info)): ?>
		<?php if($u_info['is_active']==0 || $u_info['is_verify']==0 || $u_info['is_expired']==1 || $u_info['is_payment']==0 || $u_info['is_deactived']==1): ?>
			<?php include'popupModal.php'; ?>
			<script>
				$(document).ready(function(){
					$('#popupModal').modal('show');
				});
				$('#popupModal').modal({
				  keyboard: false,
				  backdrop:'static'
				});
			</script>
		<?php endif ?>
		<?php $ref_info = get_user_info_by_id($u_info['ref_id']); ?>
		<?php if(isset($ref_info['is_active']) && ($ref_info['is_active']==0 || $ref_info['is_verify']==0 || $ref_info['is_expired']==1 || $ref_info['is_payment']==0 || $ref_info['is_deactived']==1)): ?>
			<?php include'popupModal.php'; ?>
			<script>
				$(document).ready(function(){
					$('#popupModal').modal('show');
				});
				$('#popupModal').modal({
				  keyboard: false,
				  backdrop:'static'
				});
			</script>
		<?php endif ?>
	<?php endif;?>

	<?php $u_settings = single_select_by_user($id,'user_settings') ?>
	<?php if(isset($is_vcard) && $is_vcard!=1): ?>

		<?php if(isset($u_settings['is_share']) && $u_settings['is_share']==1): ?>
			<div class="custom_share_button shareLg">
				<!-- ShareThis BEGIN --><div class="sharethis-inline-share-buttons"></div><!-- ShareThis END -->
			</div>
		<?php endif;?>	

	<?php endif;?>


	<?php if(isset($u_settings['animation']) && $u_settings['animation']==1): ?>
		<script type="text/javascript">
		    $(document).ready(function() {
		         new WOW().init();
		    });
		</script>
	<?php endif ?>

	<?php if(isset($u_settings['preloader']) && $u_settings['preloader']!=0): ?>
		<script type="text/javascript">
		    jQuery(document).ready(function() {
		    	setTimeout(function(){ jQuery("#preloader").fadeOut('slow'); }, 200);
		     });
		</script>
	<?php endif ?>
<?php else: ?>
	<script type="text/javascript">
	    $(document).ready(function() {
	         new WOW().init();

	    });
	</script>

	<script type="text/javascript">
		window.addEventListener('DOMContentLoaded', (event) => {
			setTimeout(function(){ jQuery("#preloader").fadeOut('slow'); }, 1000);
        });
	</script>


<?php endif ?>

<?php if(isset($slug)): ?>
	<?php if(get_layouts_by_slug($slug)=="2" || get_layouts_by_slug($slug)==3 || get_layouts_by_slug($slug)==5 || get_layouts_by_slug($slug)==6 || get_layouts_by_slug($slug)==7): ?> 
		<script>
			/* Activate scrollspy menu */
		     $('body').scrollspy({target: '#nav', offset: 100});
		        
		        /* Smooth scrolling */
		      $('a.scrollto').on('click', function(e){
		            //store hash
		            var target = this.hash;    
		            e.preventDefault();
		        $('body').scrollTo(target, 800, {offset: 0, 'axis':'y'});
		        
		      });
		</script>
		
	<?php endif ?>
	
		<?php include APPPATH.'views/layouts/about/qr_modal.php'; ?>
		<?php if(is_demo()==1): ?>
			<?php include 'float_settings.php'; ?>
		<?php endif; ?>

	
<?php endif ?>

<!-- home -->
<?php  if(isset($home_page) && $home_page=="Home"):?>
	<script src="<?= base_url();?>assets/plugins/jquery.scrollTo.min.js" ></script>
	<div class="scroll-top">
		<a href="javascript:;" class="bounce"><i class="fa fa-chevron-up"></i></a>
	</div>
		<script>
			/* Activate scrollspy menu */
		     $('body').scrollspy({target: '#nav', offset: 100});
		        
		        /* Smooth scrolling */
		      $('a.scrollto').on('click', function(e){
		            //store hash
		            var target = this.hash;    
		            e.preventDefault();
		        $('body').scrollTo(target, 800, {offset: 0, 'axis':'y'});
		        
		      });
		</script>
<?php endif;?>


<div id="paymentModal" class="modal fade" role="dialog" data-backdrop="static" data-keyboard="false" >
    <div class="modal-dialog modal-dialog-centered" >
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-body">
            <div class="load_view"></div>
        </div>
      </div>

    </div>
  </div>

<script>
	$(window).on('load', function(){
		setTimeout(function(){
			amarLeazyLoad();
			amarbgLoad();
		},500);

	});

	var amarbgLoad = function(){
		$('.bg_loader').each(function() {

			var lazy = $(this);
			var src = lazy.data('src');
			lazy.css("background-image", "url(" + src + ")");
			$('.bg_loader').removeClass('bg_loader');
		});
	}

	var amarLeazyLoad = function(){
		$('.img_loader').each(function() {
			var lazy = $(this);
			var src = lazy.data('src');
			lazy.attr('src', src);
			$('.img_loader').removeClass('.bg_loader');

		});
	}
</script>

<?php if(isset($settings)): ?>
 <?php $country = get_currency('dial_code'); ?>
  <script>
  	var input = $("#reg_phone");
  var code = `<?= !empty($country)?$country:"+880";?>`; // Assigning value from model.
  input.val(code);
  input.intlTelInput({
  	autoHideDialCode: true,
  	autoPlaceholder: "ON",
  	dropdownContainer: document.body,
  	formatOnDisplay: true,
  	hiddenInput: "full_number",
  	initialCountry: "auto",
  	nationalMode: true,
  	placeholderNumberType: "MOBILE",
  	preferredCountries: ['US'],
  	separateDialCode: true
  });

  $(document).on('countrychange','#reg_phone',function(){
  	$('.reg_country_code').val(input.intlTelInput("getSelectedCountryData").iso2);
  	$('.reg_dial_code').val(input.intlTelInput("getSelectedCountryData").dialCode);
  });
</script>
<?php endif;?>


<?php if(isset($settings) && !empty($settings['custom_js'])): ?>
<script>
	<?= $settings['custom_js'];?>
</script>
<?php endif ?>