<? $vis_ticket_id=(isset($vis_ticket_id) && $vis_ticket_id!="")?$vis_ticket_id : $ticket_details['ticket_id'];
   $vis_dept_id=(isset($vis_dept_id) && $vis_dept_id!="")?$vis_dept_id : $ticket_details['department_id'];?>
<? for($i=0;$i<count($label_list);$i++){
	$chk=""; $vis_operation='add_live_label';
	if($label_details!=-1)					 
		for($j=0;$j<count($label_details);$j++){
			if($label_details[$j]['label_id']==$label_list[$i]['label_id']){
				$chk='checked="checked"';
				$vis_operation='remove_ticket_label';
			}
		} ?>
	<li><a href="javascript:void(0);"><label class="checkbox-inline i-checks"><input type="checkbox" onclick="$('#vis_ticket_labels_list').visExecution('load_operations',{'vis_module':'ticket', 'vis_operation':'<?= $vis_operation?>', 'vis_ticket_id':<?= $vis_ticket_id?>,'department_id':<?= $vis_dept_id; ?>, 'vis_label_id':<?= $label_list[$i]['label_id']?>});" name="vis_label_id" <?= $chk?>> <i></i><span style="background-color: <?= $label_list[$i]['label_color']?>; color: #fff;" class="m-l-xs footer font-normal"><?= $label_list[$i]['label_name']?></span></label></a></li>									
<? } ?>				

