<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\bootstrap\Button;
use yii\widgets\LinkPager;
use yii\helpers\Url;
use yii\web\View;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $orders: an array of the previous orders */

?>
<div class="site-orders">
	<div class="jumbotron">
		<h2>Recent requests</h2>
	</div>
 <div class="browser">
 <?php
	echo "<table id='myTableSearches' class='tablesorter' width='100%'>";
	echo "<thead>";
	echo "<tr>
		<th id= username><a href=''>Date</a></th>
		<th id= activation_key><a href=''>Record No.</a></th>
		<th id= activation_key><a href=''>Scientific Name</a></th>
		<th id= activation_key><a href=''>Country</a></th>
		<th id= activation_key><a href=''>Institution</a></th>
		
</tr></thead>";
	
echo "<tbody>";
	foreach ( $query as $nr => $qr ) {
		echo "<tr>";
		foreach ( $qr as $key => $value ) {
			echo "<td>" . $value . "</td>";
		}
		?>
	<?php
		
echo "</tr>";
	}
	echo "</tbody></table>";
	?>
</div>
</div>
<script>
$(document).ready(function() {
	$('#myTableSearches').DataTable( {
		 //paging:false,
		 //bSort:false,
		
	} );
	$('.browser').css('height',$('#myTableUser').height()+100);

	$('.sel').change(function() {
	    $(location).attr('href',$(this).val());
	  });
});
	 

</script>