<link href="_lib/search.css" rel="stylesheet" type="text/css">
<link href="_lib/gradient.css" rel="stylesheet" type="text/css">
<a class="button" onclick="window.open('data:application/msexcel,'+document.getElementById('export').outerHTML.replace(/ /g, '%20'));">Export Data ke Excel</a>&nbsp;<a class="button" onclick="window.open('data:application/msword,'+document.getElementById('export').outerHTML.replace(/ /g, '%20'));">Export Data ke Word</a>
<?php
include 'config/koneksi.php';
include '_lib/fungsi_indotgl.php';	

//menampilkan data
$posisi  = 0;
$hasil = mysql_query("SELECT nomor_register,
tanggal_pendaftaran,
status_pendaftaran_text AS status_pendaftaran,
jumlah_skum,
batas_pembayaran,
nomor_perkara
FROM perkara_efiling
WHERE nomor_perkara IS NULL
AND status_pendaftaran_id = '8'
AND YEAR(tanggal_pendaftaran) >= '2020'");
echo "<div id='export'>";
echo "<h2>Perkara Pendaftaran melalui E-Court</h2><br>";
echo "<table align=center><tr>
    <th width='3%'>No.</th>
	<th width='18%'>No. Register</th>
	<th width='15%'>Tanggal Pendaftaran</th>
	<th width='20%'>status Pendaftaran</th>
	<th width='15%'>Jumlah SKUM</th>
	<th width='15%'>Batas Pembayaran</th>
	<th width='10%'>Keterangan</th></tr>";
	
$no = $posisi+1;
$totalperkara = mysql_num_rows($hasil);
echo "<p align=left>Total Perkara : <b>$totalperkara</b> Perkara</p><br>";
while($r=mysql_fetch_array($hasil)){
$tanggal1  = tgl_indo($r['tanggal_pendaftaran']);

echo "<tr>
  <td align='center'>$no</td>
  <td align='center'>$r[nomor_register]</td>
  <td>$tanggal1</td>
  <td>$r[status_pendaftaran]</td>
  <td>$r[jumlah_skum]</td>
  <td>$r[batas_pembayaran]</td>
  <td></td>";
  $no++;
  }
echo "</table><br>";
?>