 <? global $vis_language;  
if(count($call_details)==0){   
	include(VIS_PATH_TEMPLATE.'no_record_yet.php'); 
	echo '<script> $("#view_action").hide(); $("#vis_'.$operation['vis_operation'].'_form .panel-footer").hide(); $("#vis_domain_list").hide(); $(".fullFrame").removeClass("b-t").addClass("m-t-lg m-b-lg"); </script>';
 } else { ?>
<script> $("#view_action").show(); $("#vis_<?php echo $operation['vis_operation']; ?>_form .panel-footer").show(); $("#vis_domain_list").show(); </script>
<table class="table table-hover b-t b-light m-b-none" data-ride="datatables">
	<thead class="table_head">
		<tr>
			
		<th class="txt_nowrap"><? echo $vis_language['TXTFROM']; ?></th>
        <th class="txt_nowrap"><? echo $vis_language['TXTTO']; ?></th>
        <th class="txt_nowrap"><? echo $vis_language['TXTSENSTDATE']; ?></th>
        <th class="txt_nowrap"><? echo $vis_language['TXTBODY']; ?></th>       
        <th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>
		</tr>
	</thead>
	<tbody>			  
		<?       
		foreach($call_details as $call_details){ 
				?><tr style="cursor:pointer;" onclick="$('#vis_workpanel_div').visExecution('load_module','<?php echo $vis_language["TXTCALLDETAILS"];?>',{'vis_module':'voip','vis_operation':'exotel_message_details','vis_action':'#/voip/exotel_message_details/sms details/<?php echo $call_details['SMSMessage']['Sid'] ;?>'});" >
			 <? $icon = ($call_details['SMSMessage']['Direction'] =='outbound-api')?'<i class="vh vh-2x vh-outward-email" title="'.$vis_language['TXTOUTWARDMSG'].'"></i>&nbsp;&nbsp;':'<i class="vh vh-2x vh-inward-email" title="'.$vis_language['TXTINWARDMSG'].'"></i>&nbsp;&nbsp;';
			 echo '<td>'.$icon.$call_details['SMSMessage']['From'].'</td>';
             echo '<td>'.$call_details['SMSMessage']['To'].'</td>';
             echo '<td>'.format_datetime(strtotime($call_details['SMSMessage']['DateSent'])).'</td>';
             echo '<td>'.substr(stripslashes($call_details['SMSMessage']['Body']),0,15).'</td>';           
             echo '<td>'.$call_details['SMSMessage']['Status'].'</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>


