<style type="text/css">
	.unduh{
		height: 24px;
		width:64px;
		border:0px;
	}

</style>
<?php
	
	$qry=mysqli_query($mysqli,"SELECT * FROM produk_hukum ORDER BY deskripsi ASC");

	echo "<h1 align='center'>PRODUK HUKUM</h1>";

	if(mysqli_num_rows($qry)>0){
		
		$no=1;
		
		echo "<table class='datatable'>";
		echo "<tr bgcolor='#C1D5DB'>
				<th width='10%'><div align='center'>No.</div></th>
				<th width='70%'><div align='center'>Deskripsi</div></th>
				<th width='20%'><div align='center'>Unduh File</div></th>
			  </tr>";	
		while($data=mysqli_fetch_array($qry)){
			echo "<tr bgcolor=\"#fffcfc\">
					<td align=\"center\" valign=\"top\">$no</td>
					<td valign=\"top\">$data[deskripsi]</td>
					<td valign=\"middle\"><div align='center'><a href='file/$data[file]' class='unduh'><img src='images/download.png' class='no-border unduh' ></a></div></td>
				</tr>";
			$no++;  
		}
		
		echo "</table>";
	}else{
	
		echo "<table width='100%' align='center' cellpadding='0' cellspacing='0' border='1' bgcolor='#C4D9FF'>";
		echo "<tr bgcolor='#C1D5DB'>
				<th width='5%'>No.</th>
				<th>Deskripsi</th>
				<th>File</th>
			  </tr>";
		
		echo "<tr>
					<td colspan='3' align='center'>Tidak ditemukan data produk hukum</td>
			     </tr>";		
		echo "</table>";
	}
?>