<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta http-equiv="Cache-control" content="no-cache">
  <meta http-equiv="Expires" content="-1">
  <!-- Tell the browser to be responsive to screen width -->
  <?php echo $setting['meta_tag'];?>
<?php
    if(!empty($setting['favicon_path'])){
    	$favicon_path = $setting['favicon_path'];
    } else{
    $favicon_path = 'images/favicon/favicon.ico';
	}
        
    if((APP_SERVER_HOST_URL == CLIENT_PORTAL_DOMAIN) || (strpos(CLIENT_PORTAL_DOMAIN, $_SERVER['REDIRECT_REDIRECT_SSL_TLS_SNI']) !== false)){
        $favicon_path = CLIENT_PORTAL_FAVICON;
        $setting['title'] = CLIENT_PORTAL_DEFAULT_HEADER;
    }    
?>
  <title><?php echo $setting['title'];?></title>
  <link rel="icon" href="<?php echo $this->request->webroot.'webroot/'.$favicon_path;?>" type="image/icon">
  <!-- Bootstrap 3.3.6 -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>rtgv3/css/select2.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/bootstrap/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/bootstrap/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/dist/css/skins/_all-skins.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/plugins/iCheck/flat/blue.css">
  <!-- Morris chart -->
  <!--<link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/plugins/morris/morris.css">-->
  <!-- jvectormap -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/plugins/jvectormap/jquery-jvectormap-1.2.2.css">
  <!-- Date Picker -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/plugins/datepicker/datepicker3.css">
  <!-- Daterange picker -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>admin_lte/plugins/daterangepicker/daterangepicker-bs3.css">
  <!-- bootstrap wysihtml5 - text editor -->
  <!--<link rel="stylesheet" href="<?php //echo $this->request->webroot; ?>admin_lte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">-->
  <!--  cms_style.css   custom style -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>css/cms_style.css">
  <!--  custom.css   custom style -->
  <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>css/custom.css">
  <?php //echo $this->CKEditor->loadJs(); ?>
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="<?php echo $this->request->webroot; ?>admin_lte/bootstrap/js/html5shiv.min.js"></script>
  <script src="<?php echo $this->request->webroot; ?>admin_lte/bootstrap/js/respond.min.js"></script>
  <![endif]-->


<!-- Layout ::  new_dashboard  -->
<!-- Font Awesome -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"> -->
<!-- Ionicons -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css"> -->
<link rel="stylesheet" href="<?php echo $this->request->webroot; ?>new_layout/css/_all-skins.min.css">
<link rel="stylesheet" href="<?php echo $this->request->webroot; ?>new_layout/css/style.css">
<!-- Layout ::  new_dashboard  -->


<link rel="stylesheet" href="<?php echo $this->request->webroot; ?>rtgv3/css/conv_core.css">
<link rel="stylesheet" href="<?php echo $this->request->webroot; ?>rtgv3/css/conv_components.min.css">
  
</head>
<body class="hold-transition skin-blue sidebar-mini">
<?php $username = $this->request->session()->read('Auth.User.username'); 
$img_path = $this->request->session()->read('Auth.User.img_path');
$profile_picture = (empty($img_path)) ? $this->request->webroot."media/companies/default.jpg" : $this->request->webroot.$img_path;
 
?>




<style type="text/css">
    .pkgForm{
        border-bottom:1px solid #008de1;

    }
    .pkgFormBtn{
        color: #fff;
        border:none;
        background: none;
        width: 100%;
        text-align: left;
        padding: 3px 20px;
        line-height: 24px;

    }
    .pkgFormBtn:hover{
        background: #008de1 none repeat scroll 0 0;
    }
    @media only screen and (max-width: 641px) {
        .br{
            margin-top: 15px !important;
        }
    }

</style>

<?php
    if(!empty($setting['logo_path'])){
        $logo_path = $setting['logo_path'];
    } else{
    $logo_path = 'images/logo/favicon.ico';
    }
    $client_logo = (empty($client_logo_path)) ? $this->request->webroot.$logo_path : $this->request->webroot.'cmsuser_logo/'.$client_logo_path;
?>
<div class="container-fluid ka-header">
    <div class="col-sm-2">
        <!-- <img src="<?php echo $this->request->webroot; ?>new_layout/img/logo.png"  alt="" class="img-responsive ka-logo center-block"/> -->
        <?php if(APP_SERVER_HOST_URL == CLIENT_PORTAL_DOMAIN){ ?>
        <img class="img-responsive ka-logo center-block" alt="Login Logo" src="<?php echo $this->Url->build(CLIENT_PORTAL_LOGO); ?>" style="max-height:70px;">
        <?php } else { ?>
        <img class="img-responsive ka-logo center-block" alt="Login Logo" src="<?php echo $client_logo; ?>" style="max-height:70px;">
        <?php }  ?>
    </div>
  <div class="col-sm-8 text-right pull-right">
    <ul class="ka-nav br">
        <button type="button" onclick="location.href = 'https://www.m2cacademy.com/optin-21017929';" class="btn btn-success btn-lg">Upgrade/Join The Academy Now</button>
        <?php if (isset($_SESSION["userType"])) { ?>
        <li><a href="<?php echo $this->Url->build(["controller" => "guest","action" => "logout"]);?>">Logout</a></li>
        <?php } else { ?>
        <li><a href="<?php echo $this->Url->build(["controller" => "guest","action" => "login"]);?>">Login</a></li>
        <?php }?>
    </ul>
  </div>

</div>
<div class="container-fluid ka-body">

    <!--Start of Main Navigation--> 
    
    <?= $this->element('dashboard_nav_guest') ?>
    <!--End of Main Navigation-->
   
    <div class="col-sm-9">
        <div class="ka-main-content">
            <?= $this->Flash->render() ?>
            <?= $this->fetch('content') ?>
        </div>
    </div>

</div>
<footer class="">
    <div class="ka-footer"> 
        <?= $this->element('footer') ?>
    </div>
</footer>






<!-- ./wrapper -->
<script src="<?php echo $this->request->webroot; ?>js/jquery-1.11.2.js"></script>
<!-- jQuery 2.2.0 -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/jQuery/jQuery-2.2.0.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/bootstrap/js/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
  $.widget.bridge('uibutton', $.ui.button);
</script>
<!-- Bootstrap 3.3.6 -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/bootstrap/js/bootstrap.min.js"></script>
<script src="<?php echo $this->request->webroot; ?>rtgv3/js/select2.full.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
     <!--<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>--> 
    <!--<script src="http://cdn.oesmith.co.uk/morris-0.4.1.min.js"></script>-->
    <?php echo $this->Html->script('morris/morris.min.js'); ?>
<!--<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/morris/morris.min.js"></script>-->
<!--<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/moment/moment.js"></script>-->

<!--
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>-->



<!-- Sparkline -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/sparkline/jquery.sparkline.min.js"></script>
<!-- jvectormap -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- jQuery Knob Chart -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/knob/jquery.knob.js"></script>
<!-- daterangepicker -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/bootstrap/js/moment.min.js"></script>
<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/daterangepicker/daterangepicker.js"></script>
<!-- datepicker -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/datepicker/bootstrap-datepicker.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<!--<script src="<?php //echo $this->request->webroot; ?>admin_lte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>-->
<!-- Slimscroll -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/dist/js/app.min.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/dist/js/pages/dashboard.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?php echo $this->request->webroot; ?>admin_lte/dist/js/demo.js"></script>

<!-- InnerTablist1 Select Option Value -->
<?php echo $this->Html->script('selectbox1/jcf.js'); ?>
<?php echo $this->Html->script('selectbox1/jcf.select.js'); ?>
<?php echo $this->Html->script('selectbox1/jcf.scrollable.js'); ?>

<!-- SmartMenus jQuery plugin -->
<?php echo $this->Html->script('smartmenus.js'); ?>

<!-- SmartMenus jQuery Bootstrap Addon -->
<?php echo $this->Html->script('jquery.smartmenus.bootstrap.js'); ?>


<!-- bootstrap date picker -->
<?php echo $this->Html->script('bootstrap-datepicker.js'); ?>
<?php echo $this->Html->script('timepick.js') ?>
<?php echo $this->Html->script('jquery.countdown.js') ?>

<!-- important custom js -->
<?php echo $this->Html->script('custom.js'); ?>
<?php echo $this->Html->script('globalsettings.js'); ?>
<?php  echo $this->Html->script('tinymce/tinymce.min.js'); ?>
<script>tinymce.init({ selector:'textarea.editable' });</script>


</body>
</html>