<?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="row">

<div class="col-md-12 ">
<div class="panel panel-bd">

<div class="panel-body" style="padding:15px 25px; height:auto; text-align:center;">

<div>

<div class="row">

<div class="col-md-12 "><span class="das-bo-padd">CV feedback Pending <em class="em">(2)</em></span> <span class="das-bo-padd">CV reject <em class="emm">(10)</em></span> <span class="das-bo-padd">Schedule Interview <em class="emmm">(4)</em></span> <span class="das-bo-padd">Candidate Backout <em class="emmmm">(2)</em></span> </div>


</div>


</div>
</div>
</div>
</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);">

<div class="row">

<div class="col-md-6" style="padding-top: 4px;"><h4> Candidates</h4></div>
<!-- <div class="col-md-6" style="text-align:right;">
<form class="form-inline">


<div class="input-group" style="width:100% !important;">

<input type="text" class="form-control" placeholder="Search Here" style="font-size:12px;">
<div class="input-group-addon btn"><i class="fa fa-search"></i>
</div>
</div>


</form>

</div> -->

</div>
</div>
</div>
<div class="panel-body">
<form action="<?= base_url('admin/add_candidate')?>" method="post" enctype="multipart/form-data">
    <div class="form-group">

          <div class="row">
              <div class="col-md-6">
                    <label for="Postion">JOB ID:</label>
                    <input type="text" id="job_id" name="job_id" class="form-control" placeholder="JobID" required <?php if(isset($info['job_id'])) {?>  readonly <?php }?> value="<?= $info['job_id']?>"><br>
              </div>
              <div class="col-md-6">
                    <label for="Job Locations">Job Location:</label>
                    <input type="text" id="job_location" name="job_location" class="form-control" placeholder="Job Location" required <?php if(isset($info['job_location'])) {?>  readonly <?php }?> value="<?= $info['job_location']?>"><br>
              </div>
          </div>
          <div class="row">
            <div class="col-md-6">
                    <label for="Postion">Position:</label>
                    <input type="text" id="position" name="position" class="form-control" placeholder="Position" required <?php if(isset($info['position'])) {?>  readonly <?php }?> value="<?= $info['position']?>"><br>
              </div>
                <div class="col-md-6">
                        <label for="Current Location">Current Location:</label>
                        <input type="text" name="current_location" class="form-control" placeholder="Current Location" required><br>
                  </div>
              
              
          </div>

          <div class="row">

            <div class="col-md-6">
                    <label for="Email id">Email id:</label>
                    <input type="email" name="email" class="form-control" placeholder="Email id" required><br>
              </div>
              <div class="col-md-6">
                    <label for="Postion">Name:</label>
                    <input type="text" name="name" class="form-control" placeholder="Name" required ><br>
              </div>
              
          </div>

          <div class="row">
            <div class="col-md-6">
                    <label for="Job Locations">Phone:</label>
                    <input type="text" name="phone" class="form-control" placeholder="Phone"><br>
              </div>

              <div class="col-md-6">
                        <label for="Current CTC">Current Company</label>
                        <input type="text" name="current_company" class="form-control" placeholder="Current Company" required><br>
                </div>


                
          </div>

          <div class="row">
            <div class="col-md-6">
                  <label for="Current CTC">Current CTC:</label>
                  <input type="text" name="ctc" class="form-control" placeholder="Current CTC" required><br>
            </div>
            <div class="col-md-6">
                  <label for="Current CTC">Expected CTC:</label>
                  <input type="text" class="form-control" name="expected_ctc" placeholder="Expected CTC" required><br>
            </div>
          </div>
          <div class="row">
                 <div class="col-md-6">
                        <label for="Current CTC">Experiance:</label>
                        <input type="text" name="experiance" class="form-control" placeholder="Experiance" required><br>
              </div>
                <div class="col-md-6">
                        <label for="Current CTC">Notice Period:</label>
                        <input type="text" name="notice_period" class="form-control" placeholder="Notice Period" required><br>
                </div>
                
            </div>
            <div class="row">
             
              <div class="col-md-6">
                      <label for="Upload CV">Upload CV:</label>
                      <input type="file" name="cv" class="form-control" required><br>
                      <input type="submit" class="btn button2">  
              </div>
                </div>
        
    </div>
</form>          
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>S.no.</th>
<th>Job ID</th>
<th>Candidate Id</th>
<th>Position</th>
<th>Job Location</th>
<th>Current location</th>
<th>Candidate name</th>
<th>Contact no.</th>
<th>Email id</th>
<th>Experience</th>
<th>Current CTC</th>
<th>Expected CTC</th>
<th>Notice Period</th>
<th>Current company</th>
<th>Status</th>
</tr>
</thead>
<tbody>
  <?php $i=1; foreach($candidate as $c){?>
<tr>
<td><?= $i; ?></td>
<td><?= $c['job_id']?></td>
<td><?= $c['candidate_id']?></td>
<td><?= $c['position']?></td>
<td><?= $c['job_location']?></td>
<td><?= $c['current_location']?></td>
<td><?= $c['name']?></td>
<td><?= $c['phone']?></td>
<td><?= $c['email']?></td>
<td><?= $c['experiance']?></td>
<td><?= $c['ctc']?></td>
<td><?= $c['expected_ctc']?></td>
<td><?= $c['notice_period']?></td>
<td><?= $c['current_company']?></td>

<td><?= $c['status']; ?><!-- <select name="select3" class="form-control">
<option <?php if($c['status']=='Profile feedback pending'){ echo 'selected'; } ?>>Profile feedback pending</option>
<option <?php if($c['status']=='Profile reject'){ echo 'selected'; } ?>>Profile reject</option>
<option <?php if($c['status']=='Schedule Interview'){ echo 'selected'; } ?>>Schedule Interview</option>
<option <?php if($c['status']=='Candidate backout'){ echo 'selected'; } ?>>Candidate backout</option>
</select> --></td>
</tr>
<?php }?>

</tbody>
</table>
</div>
</div>
</div>
</div>



</div>


</div>






</div>
</div>

</div>


<?php $this->load->view('admin/common/footer'); ?><script type="text/javascript">  $('#job_id').bind("input",function() {     var xx=$(this).val();    $.ajax({      url: "<?= base_url('admin/get_job')?>",      data: { job_id : xx },      type: 'post',      dataType: "json",      success: function(data) {               $('#position').val(data.position);        $('#job_location').val(data.location);                 $('#position').attr('readonly', true);        $('#job_location').attr('readonly', true);      }    });  });</script>