<?php
$system = $this->Xin_model->read_setting_info(1);
$cookie_name = $this->Xin_model->get_cookie_name();
$session = $this->session->userdata($cookie_name);
$user_info = $this->Xin_model->read_user_info($session['user_id']);
$domain_url = $this->Xin_model->domain_url();
if($user_info[0]->profile_picture!='' && $user_info[0]->profile_picture!='no file') {
    
    $profile_picture =$domain_url.'uploads/profile/'.$user_info[0]->profile_picture;
}
else {
    
    $profile_picture =$domain_url.'uploads/profile/default_male.jpg';
}

$system_profile = $this->Xin_model->read_company_setting_info(1);

if($system_profile[0]->logo!='' && $system_profile[0]->logo!='no file') {
    
    $logo =$domain_url.'uploads/system/'.$system_profile[0]->logo;
}
else {
    
    $logo =$domain_url.'skin/img/default_logo.png';
}

if($system_profile[0]->favicon!='' && $system_profile[0]->favicon!='no file') {
    
    $favicon =$domain_url.'uploads/system/'.$system_profile[0]->favicon;
}
else {
    
    $favicon =$domain_url.'uploads/system/default_favicon.png';
}


if($system_profile[0]->small_logo!='' && $system_profile[0]->small_logo!='no file') {
    
    $small_logo =$domain_url.'uploads/system/'.$system_profile[0]->small_logo;
}
else {
    
    $small_logo =$domain_url.'uploads/system/default_favicon.png';
}

$data = array(
    'profile_picture' => $profile_picture,
    'user_name' => $user_info[0]->name,
    'user_email' => $user_info[0]->email,
    'application_name' => $system[0]->application_name,
    'logo' => $logo,
    'favicon' => $favicon,
    'small_logo' => $small_logo,
    );
?>
<?php $this->load->view('components/htmlheader',$data);?>
<body>

    <!-- page-wrapper Start-->
    <div class="page-wrapper">
    
        <?php $this->load->view('components/header',$data);?>
    
        <!-- Page Body Start-->
        <div class="page-body-wrapper">
    
            <?php $this->load->view('components/left_menu',$data);?>
    
            <div class="page-body">
                
                <!-- Container-fluid starts-->
                <div class="container-fluid">
                    <div class="page-header">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="page-header-left">
                                    <h3><?php echo $breadcrumbs;?><small><?php echo $system[0]->application_name?> Admin panel</small></h3>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <ol class="breadcrumb pull-right">
                                    <li class="breadcrumb-item"><a href="<?php echo site_url('dashboard')?>"><i data-feather="home"></i>Home</a></li>
                                    <li class="breadcrumb-item active"><?php echo $breadcrumbs;?></li>
                                </ol>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Container-fluid Ends-->
    
                <!-- Container-fluid starts-->
                <div class="container-fluid">
                    <?php echo $subview;?>
                </div>
                <!-- Container-fluid Ends-->
    
            </div>
            <!-- End of Main Content -->
    
              <!-- Footer -->
              <?php $this->load->view('components/footer',$data);?>
              <!-- End of Footer -->
        </div>
        
    </div>
      
    <?php $this->load->view('components/htmlfooter');?>