<?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 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);">
<?php  if($this->session->flashdata('err')!=''){?>
	<div class="alert alert-danger alert-dismissible">
  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
   <?= $this->session->flashdata('err');?>
</div>
<?php }if($this->session->flashdata('msg')!=''){ ?>
	<div class="alert alert-success alert-dismissible">
  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
   <?= $this->session->flashdata('msg');?>
</div>
<?php }?>

<div class="row">

<div class="col-md-6" style="padding-top: 4px;"><h4>  Add Position</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_position')?>" method="post" enctype="multipart/form-data" >
    	<?php print_r(validation_errors()); ?>
    	<?php if(isset($error)){
    		print_r($error);
    	}?>
        <div class="form-group">
          
          <div class="row">
            <div class="col-md-6">
                <label for="name">Position:</label>
              <input type="text" class="form-control" id="name" name="position" placeholder="Position:" value="<?= set_value('position')?>" required><br></div>
            <div class="col-md-6">
                <label for="NO. of Position">NO. of Position:</label>
              <input type="text" class="form-control" id="email" name="position_no" placeholder="No. of Position:" value="<?= set_value('position_no')?>" required><br></div>
          </div>
          <div class="row">
              <div class="col-md-6">
                  <label for="name">Location:</label>
                <input type="text" class="form-control" value="<?= set_value('location')?>" id="name" name="location" placeholder="Location:" required><br></div>
              <div class="col-md-6">
                  <label for="NO. of Position">Exp. Range:</label>
                <input type="text" class="form-control" value="<?= set_value('exp')?>" id="email" name="exp" placeholder="Exp. Range:"required><br></div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <label for="name">CTC:</label>
                  <input type="text" class="form-control" value="<?= set_value('ctc')?>" id="name" name="ctc" placeholder="CTC:" required><br></div>
                <div class="col-md-6">
                    <label for="NO. of Position">TAT:</label>
                  <input type="text" class="form-control" value="<?= set_value('tat')?>" id="email" name="tat" placeholder="TAT:"required><br></div>
              </div>
              <div class="row">
                <div class="col-md-12">
                    <label for="pwd">JD:</label>
                    <input type="file"   class="form-control" name="jd" id="mobile" required>
                </div>
              </div>
          <br>
          
        <button type="submit" class="btn btn-md button2">Add Position</button>
      </form> <br><br>
<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>Exp. Range</th>
<th>CTC</th>
<th>TAT</th>
<th>JD</th>
</tr>
</thead>
<tbody>
	<?php $i=1; foreach($position 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['ctc']?></td>
<td><?= $p['tat']?></td>
<td><a target="_blank" href="<?= base_url('uploads/position/'.$p['jd'])?>">View JD</a></td>
</tr>
<?php $i++; }?>

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



</div>


</div>

</div>
</div>

</div>



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