<? global $vis_language; 
$monthArr = array('1'=>'January','2'=>'February','3'=>'March','4'=>'April','5'=>'May','6'=>'June','7'=>'July','8'=>'August','9'=>'September','10'=>'October','11'=>'November','12'=>'December');?>
<table class="table table-hover b-t b-light m-b-none" data-ride="datatables">
	<thead class="table_head">
		<tr>
			<th>
				<div class="btn-group">
					<label class="checkbox m-n m-r-sm i-checks"  style="float: left;"><input type="checkbox"><i></i></label>		
				</div>
			</th>
			<th><? echo $vis_language['TXTDATE']; ?></th>
			<th class="txt_nowrap"><? echo $vis_language['TXTDESCRIPTION']; ?></th>
			<th class="txt_nowrap"><? echo $vis_language['TXTSCHEDULE']; ?></th>
			<th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>
			<th></th>
            <th></th>
		</tr>
	</thead>
	<tbody>			  
		<?
		
    for($i=0;$i<$holiday_info['holiday_count'];$i++) {
		 foreach($monthArr as $key=>$val){
			 $hDate = explode(' ',$holiday_details[$i]['holiday_date']);
			 if($hDate[1] == $val)$newHdate = $key.'-'.$hDate[0];
			 
		 }
		if($holiday_details[$i]['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}
	        echo '<tr><td width="30"><label class="checkbox m-n i-checks"><input type="checkbox" name="vis_global_mass_chk_'.$i.'" id="vis_global_mass_chk_'.$i.'" value="'.$holiday_details[$i]['holiday_id'].'" /><i></i></label></td>';	
        echo '<td><a href="#/setting/holiday_details/'.$holiday_details[$i]['holiday_date'].'/'.$holiday_details[$i]['holiday_id'].'"><span style="display:none !important;">'.$newHdate.'</span>'.$holiday_details[$i]['holiday_date'].'</a></td>';
        echo '<td><a href="#/setting/holiday_details/'.$holiday_details[$i]['holiday_date'].'/'.$holiday_details[$i]['holiday_id'].'">'.$holiday_details[$i]['title'].'</a></td>';		
         echo '<td><a href="#/setting/holiday_details/'.$holiday_details[$i]['holiday_date'].'/'.$holiday_details[$i]['holiday_id'].'">'.$holiday_details[$i]['schedule_name'].'</a></td>';		
        echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>';
        echo '<td align="right"><a class="link" href="#/setting/clone_holiday/'.$holiday_details[$i]['holiday_id'].'">'.$vis_language['TXTCLONE'].'</a></td>';
  ?>
		 <td align="center"> <a class="text-muted" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_holiday_delete&vis_holiday_id=<? echo $holiday_details[$i]['holiday_id']; ?>&vis_static_area=vis_holiday_delete_form&vis_page=<? echo $holiday_info['page']; ?>" title="<? echo $vis_language['TXTDELETE']; ?>" href="javascript:void(0);" ><i class="vh vh-delete-round"></a></td>		
       <? echo '</tr>';
    } ?>
	</tbody>
</table>
<script type="text/javascript">
$(".selectpicker").selectpicker(); 
$(document).ready(function() {	
$('[data-ride="datatables"]').dataTable({		
         "bPaginate" : false,	
		"sDom": 't', "bAutoWidth": false,
		"aoColumns": [
			{ "bSortable": false },
		  	null,
		  	null,
		  	null,
		  	null,
            { "bSortable": false },
			{ "bSortable": false }
		]
	});
});
</script>
