<!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
//    echo "<pre>";print_r($_SERVER);
//    echo "<pre>";print_r(APP_SERVER_HOST_URL);
//    echo "<pre>";print_r(CLIENT_PORTAL_DOMAIN);
//    exit;
    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/dataTables.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">
        <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>rtgv3/css/sertg.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; ?>rtgv3/css/conv_core.css">
        <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>rtgv3/css/conv_components.min.css">
        <link rel="stylesheet" href="<?php echo $this->request->webroot; ?>new_layout/css/style.css">
        <style>
            .swal2-content,
            .swal2-actions {
                font-size: 15px !important;
            }

            .swal2-icon .swal2-icon-content {
                font-size: 3.75em !important;
            }

            .swal2-popup .swal2-content {
                font-size: 16px !important;
            }

            .swal2-popup .swal2-styled {
                margin-top: 0 !important;
            }

        </style>
    
    </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;
            }
            .dropdown-content-body{
                max-height: 340px;
                overflow-y: auto;
            }
            .dropdown-content-footer{
                display: block;
                padding: 7px;
                text-align: center;
                color: #333333;
            }
            #media-heading-new{
                padding-left: 0;
                color: #009cf9;
                font-weight: bold;
            }
            .width-350.dropdown-menu{
                min-width: 350px;
            }
            .yellow-alert .alert{
                padding-right: 35px !important;
                margin-top: 10px;
                margin-bottom: 0;
                background:#ffb347 !important;
                border-color: #faebcc !important;
                color: white !important;
            }
            .yellow-alert .close{
                font-size: 21px !important;
                font-weight: 700 !important;
                line-height: 1 !important;
                color: #000 !important;
                text-shadow: 0 1px 0 #fff !important;
            }
            .ka-main-content{
                overflow: auto;
            }

        </style>

<?php
    $logo_path = 'images/logo/favicon.ico';
    if(!empty($member_logo_path)){
        $logo_path = $member_logo_path;
    }
    
    if(APP_SERVER_HOST_URL == CLIENT_PORTAL_DOMAIN){
        $logo_path = CLIENT_PORTAL_LOGO;
        if(!empty($member_logo_path)){
            $logo_path = $member_logo_path;
        }
    }

    if(isset($members_info['logo']) && !empty($members_info['logo'])){
        $logo_path = $members_info['logo'];
    }
?>
        <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"/> -->
                <img class="img-responsive ka-logo center-block" alt="Login Logo" src="<?php echo $this->request->webroot.$logo_path; ?>" style="max-height:70px;">
            </div>
            <div class="col-sm-8 text-right">

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

            <!--Start of Main Navigation--> 

            <!--End of Main Navigation-->

            <div class="col-sm-10 col-md-offset-1">
                <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="<?php echo $this->request->webroot; ?>js/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') ?>

        <!-- Datatable -->
        <script src="<?php echo $this->request->webroot; ?>rtgv3/js/dataTables.js"></script>
       
        <!-- 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'); ?>
</body>
</html>