<?  global $vis_language;?>  
<?php if(count($response)>0){?>
       <table class="table table-hover b-t b-light m-b-none" id="datatables">
		   <thead class="table_head">
			  <tr>
				 <th width="25%"><? echo $vis_language['TXTMESSAGE']; ?></th>   
				 <th class="txt_nowrap"><? echo $vis_language['TXTIPADDRESS'];?></th>
				 <th class="txt_nowrap"><? echo $vis_language['TXTVISITORNAME'];?></th>
				 <th class="txt_nowrap"><? echo $vis_language['TXTVISITOREMAIL']; ?></th>             
				 <th class="txt_nowrap"><? echo $vis_language['TXTDATE']; ?></th>             
			
			  </tr>
		   </thead>
		   <tbody>
			  <?
				 for($c=0;$c<count($response);$c++){
                                         $visitor_info = json_decode($response[$c]['visitor_info'], true);                                        
					 if($response[$c]['email']!=''){
						 $visitor_email = $response[$c]['email'];
					  }else{
						 $visitor_email= $vis_language['TXTNOTSPECIFIED'];
					  }				  
						  ?>
					     <tr style="cursor:pointer;" onclick="$('#vis_workpanel_div').visExecution('load_module','<?php echo $vis_language["TXTCHATTRANSCRIPT"];?>',{'vis_module':'chat','vis_operation':'clickdesk_detail','email':'<?php echo $response[$c]['email']; ?>','name':'<?php echo $response[$c]['name']; ?>','user_message':'<?php echo $response[$c]['user_message']; ?>','chat_length':'<?php echo $response[$c]['chat_length']; ?>','vis_email':'<? echo $operation['vis_email']?>','vis_fz_domain':'<?php echo $vis_domain;?>'});">
						<?php
						  echo '<td width="25%">'.$response[$c]['user_message'].'</td>';
						  echo '<td class="txt_nowrap">'.$visitor_info['ip_address'].'</a></td>';
						  echo '<td class="txt_nowrap">'.ucfirst($response[$c]['name']).'</td>';
						  echo '<td class="txt_nowrap">'.$visitor_email.'</td>';
						  echo '<td>'.format_datetime($response[$c]['start_time']/1000).'</td>';						
						  echo '</tr>';
				  }
				 ?>    
		   </tbody>
		</table>
	<script type="text/javascript" src="<?= VIS_PATH_SCRIPT; ?>datatables/data-tables/DT_bootstrap.js"></script>
	<script>
		$(document).ready(function() {	
		$('#datatables').dataTable({		
			   "bPaginate" : true,	
				"iDisplayLength": 25,
				"sDom": 'ltipr',
				  "bLengthChange": false,
					"bInfo": false,
				"aoColumns": [null,	null, null, null, null]
			});
		});
		</script>
  <? 
}else
{
 include(VIS_PATH_TEMPLATE.'no_record_yet.php');
} ?>