<?php
session_start();
// ============
include("../../php_crud/my_class.php");
$obj=new my_class();
$branchid = $_SESSION['LOGIN_BRANCH'];
extract($_GET);
// ============

if($_GET['operation']=='edit'){
	$id=$_GET['id'];
}
?>
<input type="hidden" id="pid" value="<?php echo $id; ?>">
<div class="row-fluid">	
	<table id="datatable_date" class="table table-striped table-bordered table-hover" >
		          <thead>
						<th>Sl</th>
						<th>Date</th>
						<th>Action</th>
					
						
		          </thead>
<?php
$i=0;
       foreach($obj->View_colmn_By_Cond("hr_emp_leave_dates","_id,_date"," _pid='$id' AND _status='A'") as $v101){
                 
                 $dates=$v101['_date'];
                 $d_id=$v101['_id'];
                 $i++;
   
	?>

		           <tbody>

		       <tr>
					<td><?php echo $i;?></td>
					<td><?php echo $dates; ?></td>
						<td>
						<a class="red" href="#">
						   <i class="icon-trash bigger-130" onclick="leave_delete_date('<?php echo $d_id;?>')"></i>
						</a>
					</td>
	
			  </tr>	

			   <?php 
			  
			  }   ?> 
		   </tbody>	

    </table>
						



<script>	
		var oTable2 = $('#datatable_date').dataTable( {
		"aoColumns": [
	      { "bSortable": true },
	     null,
		  { "bSortable": true }
		] } );				
</script>