<?php $this->load->view('admin/common/header')?>

<div class="dashborder-content">

<div class="container-fluid">
<div class="row">

<?php $this->load->view('admin/common/sidebar')?>

<div class="col-md-10">

<div class="resp-tabs-container">
<div>
<div class="row">

<div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
<a href="<?= base_url('admin/opening')?>">
<div class="statistic-box">
<?php 
$user=$this->session->userdata('secret_admin');
	
	$open=$this->db->where('status','Open')->order_by('id', 'desc')->get('position')->num_rows();
	$submission=$this->db->select('candidate.*')->from('candidate')->order_by('id','desc')->get()->num_rows();
  $cv_feedback=$this->db->select('candidate.*')->from('candidate')->where('candidate.status','Profile feedback pending')->order_by('id','desc')->get()->num_rows();
  $profile_shortlisted=$this->db->select('candidate.*')->from('candidate')->where('candidate.status','Profile Shortlist For Interview')->order_by('id','desc')->get()->num_rows();

  $interview_scheduled=$this->db->select('candidate.*')->from('candidate')->where('candidate.status','Schedule Interview')->order_by('id','desc')->get()->num_rows();

  $final=$this->db->select('candidate.*')->from('candidate')->where('candidate.status','Final Select')->order_by('id','desc')->get()->num_rows();
?>
<h2><span class="count-number">Openings</span> </h2>
<div class="progress-radial blue">
<span class="progress-left">
<span class="progress-bar"></span>
</span>
<span class="progress-right">
<span class="progress-bar"></span>
</span>
<div class="progress-value"><?= $open?></div>
</div>
</div>
</a>
</div>


<div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
<a href="<?= base_url('admin/candidate')?>">
<div class="statistic-box">

<h2><span class="count-number">Submission</span> </h2>
<div class="progress-radial yellow">
<span class="progress-left">
<span class="progress-bar"></span>
</span>
<span class="progress-right">
<span class="progress-bar"></span>
</span>
<div class="progress-value"><?= $submission; ?></div>
</div>
</div>
</a>
</div>


<div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
<a href="<?= base_url('admin/cv_feedback_pending')?>">

<div class="statistic-box">

<h2><span class="count-number">CV feedback pending</span></h2>
<div class="progress-radial pink">
<span class="progress-left">
<span class="progress-bar"></span>
</span>
<span class="progress-right">
<span class="progress-bar"></span>
</span>
<div class="progress-value"><?= $cv_feedback; ?></div>
</div>
</div>

</a>

</div>


<div class="col-xs-6 hidden-sm hidden-md col-lg-4">
<a href="<?= base_url('admin/shortlisted_for_interview')?>">
<div class="statistic-box">
<h2><span class="count-number">Shortlisted for Interview</span> </h2>
<div class="progress-radial green">
<span class="progress-left">
<span class="progress-bar"></span>
</span>
<span class="progress-right">
<span class="progress-bar"></span>
</span>
<div class="progress-value"><?= $profile_shortlisted; ?></div>
</div>
</div>
</a>
</div>


<div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
<a href="<?= base_url('admin/interview_scheduled')?>">
<div class="statistic-box">

<h2><span class="count-number">Interview Schedule</span> </h2>
<div class="progress-radial blue">
<span class="progress-left">
<span class="progress-bar"></span>
</span>
<span class="progress-right">
<span class="progress-bar"></span>
</span>
<div class="progress-value"><?= $interview_scheduled; ?></div>
</div>
</div>
</a>
</div>


<div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
<a href="<?= base_url('admin/final_selected')?>">
<div class="statistic-box">

<h2><span class="count-number">Final Selected</span> </h2>
<div class="progress-radial yellow">
<span class="progress-left">
<span class="progress-bar"></span>
</span>
<span class="progress-right">
<span class="progress-bar"></span>
</span>
<div class="progress-value"><?= $final; ?></div>
</div>
</div>
</a>
</div>

</div>
<div class="row">

<div class="col-md-12">
<div class="panel panel-bd lobidrag lobipanel lobipanel-sortable" data-inner-id="6lbDiPQUBj" data-index="0">
<div class="panel-heading ui-sortable-handle">
<div class="panel-title" style="max-width: calc(100% - 180px);">
<span style="float: left"><h4>Actions Required</h4></span>
<span style="float: right"><small>Today / Tomorrow</small></span>
</div>
</div>
<div class="panel-body">

    <div class="table-responsive">
        <table class="table table-bordered table-hover">
        <thead>
        <tr>
        <th>S.no.</th>
        <th>Job. Id</th>
        <th>Position</th>
        <th>No. of positions</th>
        <th>Location</th>
        <th>Experiance</th>
        <th>Status</th>
        </tr>
        </thead>
        <tbody>
            <?php 
    $user=$this->session->userdata('secret_admin');
    $date = isset($_GET['date']) ? $_GET['date'] : date('Y-m-d');
    $prev_date = date('Y-m-d', strtotime($date .' -1 day'));
    $pos=$this->db->where('added_by',$user['id'])->where('date >=',$prev_date)->get('position')->result_array();
    $i=1;
    foreach($pos as $p)
    {
    ?>
        <tr>
        <td><?= $i; ?></td>
       <td><?= $p['job_id']?></td>
<td><?= $p['position']?></td>
<td><?= $p['position_no']?></td>
<td><?= $p['location']?></td>
<td><?= $p['exp']?></td>
<td><?= $p['status']?></td>
        </tr>
        <?php $i++; }?>
        
        
        </tbody>
        </table>
        </div>
</div>
</div>
</div>



</div>
</div>

<div>



</div>






</div>

</div>







</div>
</div>

</div>





<?php $this->load->view('admin/common/footer'); ?>