<?php
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=cetak_jurnal_hhk.xls");//ganti nama sesuai keperluan
header("Pragma: no-cache");
header("Expires: 0");
//header('Expires: ' . gmdate ( 'D, d M Y H:i:s', now () ) . ' GMT');
?>
<div id="konten">
<div class="cssTable">
	<table border="1">
		<tr>
			<td style="width:5%;background:green;" align="center">No</td>
			<td style="width:5%;background:green;" align="center">Tanggal Transaksi</td>
			<td style="width:5%;background:green;" align="center">Jenis Biaya</td>
			<td style="width:5%;background:green;" align="center">Uraian</td>
			<td style="width:5%;background:green;" align="center">Jumlah</td>
			<td style="width:5%;background:green;" align="center">Keterangan</td>
			<td style="width:5%;background:green;" align="center">Link</td>
		</tr>
		<?php
			if($list_jurnal_perkara!=''){
				if($list_jurnal_perkara->num_rows>0){
					$con = 1;
					foreach ($list_jurnal_perkara->result() as $row) {
		    			echo "<tr>";
			    			echo '<td>'.$con.'</td>';
			    			$date = new DateTime(str_replace("-","",$row->tanggal_transaksi));
			    			echo '<td>'.$date->format('d M Y').'</td>';
			    			echo '<td>'.$row->jenis_biaya.'</td>';
			   				echo '<td>'.$row->uraian.'</td>';
			   				echo '<td align="right">'.$row->jumlah.'</td>';
			   				echo '<td>'.$row->keterangan.'</td>';
			   				echo '<td>detil</td>';
		   				echo "</tr>";
			    	
		    			$con++;
		    		}
			    }else{
		    		echo "<tr><td colspan='7' align='center'>Data Tidak diTemukan</td></tr>";
		    	}
			}else{
		    	echo "<tr><td colspan='7' align='center'>Data Tidak diTemukan</td></tr>";
			}
		?>
	</table>
</div>
</div>