<?php include 'include/header.php';?>

    <body class="fixed-left">
        
        <!-- Begin page -->
        <div id="wrapper">
        
        <?php include 'include/side_menu.php';


 $roll = $admin->type;
              $roll_id = $admin->id;
              
              


// total_users


  $total_users = $this->db->query("SELECT COUNT(id) AS total_users FROM users WHERE (type = 'USER')")->result_array();
 if($total_users){
  $total_users = $total_users[0]['total_users'];


}else{
  $total_users ='0';
    
}


// total_users


  $total_sub_admin = $this->db->query("SELECT COUNT(id) AS total_users FROM users WHERE (type = 'SUBADMIN')")->result_array();
 if($total_sub_admin){
  $total_sub_admin = $total_sub_admin[0]['total_users'];


}else{
  $total_sub_admin ='0';
    
}

// $total_plan


 $total_plan = $this->db->query("SELECT COUNT(id) AS total_plan FROM plans")->result_array();
if($total_plan){  
  $total_plan = $total_plan[0]['total_plan'];
      
  }else{
  $total_plan = '0';
      
  }
  

?>

      
            <div class="content-page">
                <!-- Start content -->
                <div class="content">
                    <div class="container">

                        <!-- Page-Title -->
                        <div class="row">
                            <div class="col-sm-12">
                                <h4 class="pull-left page-title"><?php  echo 'Welcome '. $admin_details_List[0]['first_name'].' '.$admin_details_List[0]['last_name']?></h4>
                                <ol class="breadcrumb pull-right">
                                   <li><a href="<?=base_url('admin/view_page/dashboard');?>"><?php $fetch_app_name = $this->admin_common_model->get_where('admin',['id'=>'1']);
                                echo $fetch_app_name[0]['app_name']; ?></a></li>
                                    <li class="active">Dashboard</li>
                                </ol>
                            </div>
                        </div>

                        <!-- Start Widget -->
                        <div class="row">

<div class="main-box">
    <div class="main-hedline">
       <h1><i class="fa fa-line-chart"></i> Site Statistics  </h1>    
    </div>  

<?php if($roll == 'ADMIN'){ 





?>

<div class="clearfix">
                 <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bx-shadow bg-info">
                                    <span class="mini-stat-icon"><i class=" fa fa-user-plus"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_users;?></span>
                                        Total Users
                                    </div>
                                    <div class="tiles-progress">
                                        <div class="">
                                            <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/user_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        
                            
                           <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bg-success bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa  fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?php echo $total_sub_admin;?></span>
                                       Total Sub Admin
                                    </div>
                                    <div class="tiles-progress color-c2">
                                        <div class="">
                                        <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/user_list1');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>

 
                         <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bg-purple bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa fa-users"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_plan;?></span>
                                       Total Plan
                                    </div>
                                    <div class="tiles-progress color-c1">
                                        <div class="">
                                           <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/plan_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                             
                           
                            
</div>




    

<div class="main-box">
    <div class="main-hedline">
       <h1><i class="fa fa-line-chart"></i> Map Statistics </h1>    
    </div>  

<div class="clearfix">
    
    
    <?php 
    


// $total_country


 $total_country = $this->db->query("SELECT COUNT(id) AS total_country FROM country_map")->result_array();
if($total_country){  
  $total_country = $total_country[0]['total_country'];
      
  }else{
  $total_country = '0';
      
  }


// $total_city

$total_city = $this->db->query("SELECT COUNT(id) AS total_city FROM country_map_city")->result_array();
if($total_city){  
  $total_city = $total_city[0]['total_city'];
      
  }else{
  $total_city = '0';
      
  }



// $total_city_place

$total_city_place = $this->db->query("SELECT COUNT(id) AS country_map_city_places FROM country_map_city_places")->result_array();
if($total_city_place){  
  $total_city_place = $total_city_place[0]['country_map_city_places'];
      
  }else{
  $total_city_place = '0';
      
  }


// $total_guidelines_tips

$total_guidelines_tips = $this->db->query("SELECT COUNT(id) AS guidelines_tips FROM guidelines_tips")->result_array();
if($total_guidelines_tips){  
  $total_guidelines_tips = $total_guidelines_tips[0]['guidelines_tips'];
      
  }else{
  $total_guidelines_tips = '0';
      
  }
  
  
  
// $total_company_offer

$total_company_offer = $this->db->query("SELECT COUNT(id) AS company_offer FROM company_offer")->result_array();
if($total_company_offer){  
  $total_company_offer = $total_company_offer[0]['company_offer'];
      
  }else{
  $total_company_offer = '0';
      
  }
  
  
  
// $total_service

$total_service = $this->db->query("SELECT COUNT(id) AS services FROM services")->result_array();
if($total_service){  
  $total_service = $total_service[0]['services'];
      
  }else{
  $total_service = '0';
      
  }
    ?>
    
      <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bx-shadow bg-info">
                                    <span class="mini-stat-icon"><i class=" fa fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_country;?></span>
                                        Total Country
                                    </div>
                                    <div class="tiles-progress">
                                        <div class="">
                                            <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/country_map_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            
       <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bg-purple bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_city;?></span>
                                       Total City
                                    </div>
                                    <div class="tiles-progress color-c1">
                                        <div class="">
                                           <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/country_map_city_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                          
                             <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bgc-c3 bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa  fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_city_place; ?></span>
                                      Total Places
                                    </div>
                                    <div class="tiles-progress bgc-cd3">
                                        <div class="">
                                          <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/country_map_city_place_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div> 
                            
                            
                             <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bgc-c2 bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa  fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_guidelines_tips; ?></span>
                                     Total Guidelines Tips
                                    </div>
                                    <div class="tiles-progress bgc-cd2">
                                        <div class="">
                                         <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/guidelines_tips_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div> 
                            
                            
                               <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bg-primary bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_company_offer; ?></span>
                                      Total Company Offer
                                    </div>
                                    <div class="tiles-progress color-c3">
                                        <div class="">
                                          <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/company_offer_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
  
  
  
  
    
      <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bx-shadow bg-info">
                                    <span class="mini-stat-icon"><i class=" fa fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"> <?= $total_service;?></span>
                                        Total Service 
                                    </div>
                                    <div class="tiles-progress">
                                        <div class="">
                                            <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/service_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            
                            
</div>

</div>
        
        

    
    
<?php }else{ 
    
    
    


?>

<div class="clearfix">
                 <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bx-shadow bg-info">
                                    <span class="mini-stat-icon"><i class=" fa fa-user-plus"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_users;?></span>
                                        Total Users
                                    </div>
                                    <div class="tiles-progress">
                                        <div class="">
                                            <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/user_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        
                            
                           <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bg-success bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa  fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?php echo $total_sub_admin;?></span>
                                       Total Sub Admin
                                    </div>
                                    <div class="tiles-progress color-c2">
                                        <div class="">
                                        <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/user_list1');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>

 
                         <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bg-purple bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa fa-users"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_plan;?></span>
                                       Total Plan
                                    </div>
                                    <div class="tiles-progress color-c1">
                                        <div class="">
                                           <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/plan_list');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                             
                           
                      
\
                            
                            
                          
                            
</div>




    

<div class="main-box">
    <div class="main-hedline">
       <h1><i class="fa fa-line-chart"></i> BOOKING STATISTICS</h1>    
    </div>  

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




    ?>
    
      <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bx-shadow bg-info">
                                    <span class="mini-stat-icon"><i class=" fa fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_booking;?></span>
                                        Total Booking
                                    </div>
                                    <div class="tiles-progress">
                                        <div class="">
                                            <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/pending_order');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            
       <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bg-purple bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_pending;?></span>
                                       Total Pending
                                    </div>
                                    <div class="tiles-progress color-c1">
                                        <div class="">
                                           <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/pending_order');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                          
                             <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bgc-c3 bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa  fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_progress; ?></span>
                                      Total In Progress
                                    </div>
                                    <div class="tiles-progress bgc-cd3">
                                        <div class="">
                                          <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/accept_order');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div> 
                            
                            
                             <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bgc-c2 bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa  fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_complete; ?></span>
                                     Total Completed
                                    </div>
                                    <div class="tiles-progress bgc-cd2">
                                        <div class="">
                                         <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/complete_order');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div> 
                            
                            
                               <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bg-primary bx-shadow">
                                    <span class="mini-stat-icon"><i class="fa fa-list"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"><?= $total_cancel; ?></span>
                                      Total Cancelled
                                    </div>
                                    <div class="tiles-progress color-c3">
                                        <div class="">
                                          <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/cancel_order');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
  
  
  
  
    
      <div class="col-sm-6 col-lg-4">
                                <div class="mini-stat clearfix bx-shadow bg-info">
                                    <span class="mini-stat-icon"><i class=" fa fa-money"></i></span>
                                    <div class="mini-stat-info text-right">
                                        <span class="counter"> <?= $total_earning;?></span>
                                        Total Earning 
                                    </div>
                                    <div class="tiles-progress">
                                        <div class="">
                                            <h5 class="text-uppercase text-white m-0"><a style="color: #fff;" href="<?=base_url('admin/view_page/complete_ride');?>">More Info</a> <i class="fa  fa-long-arrow-right"></i> </h5>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            
                            
</div>

</div>
        


 <?php } ?>
</div>

        
                        </div> <!-- end row -->




        
        
        
                    </div> <!-- container -->
                               
                </div> <!-- content -->

               

            </div>
          
        </div>
        <!-- END wrapper -->


 <?php include 'include/footer.php';?>
