<? global $vis_language; 
include_once(VIS_PATH_CLASS.VIS_CLASS_PREFIX.'client.php');
$database=new class_database();
$client_object=new class_client($database);
list($client_info, $clientdetails)=$client_object->get_client('client_id='.VIS_CLIENT_ID, '', 0, '', VIS_CLIENT_ID, VIS_LOCATION_AREA);
 $clientdetails=$clientdetails[0];
 
    $paging_list='';
	
      for($i=0;$i<$page_count;$i++) $paging_list.='<option value="'.$i.'" '.(($ticket_info['page']==$i)?'selected="selected"':'').'>'.($i+1).'</option>';  ?>
<section  class="container col-md-12">
	
			        
			 <form class="vis_tickets_list_form" method="post" id="vis_task_form1" name="vis_task_form1">
				<?/*if($vis_count > 0 || $closed_total>0) {*/?>
				<div class="row padder clr m-b m-t" id="paging_top">
				   <div class="col-sm-8"></div>
				   <div class="col-sm-12 text-right text-center-xs tkt_right_menu m-t-n" id="clittkpagingt">
					  <ul class="pagination-sm pagination" id="task_pagination"></ul>
				   </div>
				  
				</div>
				<? /*} */?>
				<div class="list-unstyled padder m-b-none table-responsive scroll-x" id="vis_ticket_list_new" <? if($ticket_details==-1) echo 'style="display:none;"'; ?>>
				   <? include_once(VIS_PATH_TEMPLATE.'ticket_list.php'); ?>
				</div>
				<div class="row padder clr m-b m-t" id="paging_bottom" >
				  
				   <div class="col-sm-12 text-right text-center-xs tkt_right_menu" id="clittkpagingb">
					  <ul class="pagination-sm pagination" id="task_pagination1"></ul>
				   </div>
				 
				</div>
				<section class="wrapper fullFrame" id="no_record_found" <? if($ticket_details!=-1) echo 'style="display:none;"'; ?>>
				   <div class="fullMiddle m-xl text-center h4"><?= $vis_language['TXTNOTHINGTODISPLAY']; ?></div>
				</section>
				<input type="hidden" name="vis_page" id="vis_page" value="">
				<input type="hidden" name="vis_module" value="ticket">
				<input type="hidden" name="vis_operation" value="cportal_filter_ticket">
			 </form>
		 
</section>
<script>
   <? if($page_count>0) {?>
       $('.pagination-sm').twbsPagination({
   		totalPages:<?php echo $page_count; ?>,
   		visiblePages:3,
   		first:false,
   		last:false,
   		onPageClick: function (event, page) {     
   		$.ajax({
   		url: 'index.php',
   		data: {'vis_module':"ticket", 'vis_operation':"cportal_filter_ticket",'vis_page':page-1, 'vis_form':'vis_task_form1', 'vis_change':1},
   		type: "POST",
   		success: function(data) { 
            $("#vis_ticket_list_new").html(data);
   		}
   		});
             }
         });
   <? }?>
   function vis_load_page(page) {
   	$('#vis_page').val(page);
    $(".vis_tickets_list_form").submit();
   }
  
</script>
