<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;
$date_now = date("Y-m-d");
$hasil = mysql_query("SELECT a.tanggal_pendaftaran, 
a.para_pihak, 
a.nomor_perkara,
a.posita, 
a.proses_terakhir_text 
FROM perkara a
WHERE (a.posita = '' OR a.posita IS NULL)
AND YEAR(a.tanggal_pendaftaran)=YEAR(NOW())
AND (a.alur_perkara_id='15' OR a.alur_perkara_id ='16') 
ORDER BY a.tanggal_pendaftaran DESC");
echo "<div id='export'>";
echo "<h2>Daftar Perkara Yang Belum Input Posita</h2><br>";
echo "<table align=center><tr>
    <th>No.</th>
	<th>No. Perkara</th>
	<th>Para Pihak</th>
	<th>Tanggal Pendaftaran</th>
	<th>Status Perkara</th>
	<th>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>$r[nomor_perkara]</td>
  <td>$r[para_pihak]</td> 
  <td>$tanggal1</td>
  <td>$r[proses_terakhir_text]</td>
  <td><a>Posita Belum Di input</a></tr>";
  $no++;
  }
echo "</table><br>";
?>