<div style="padding:5px;min-width:1900px">
<div style="padding:20px;"></div>
<button class="btn btnExcel" style="width:150px;text-align:center;">Export Excel</button></div>
<table id="view_laporan" width="1700px"class="cetakExcel" border="0" cellpadding="2" cellspacing="0" style="margin:10px;">
	<tbody>
		<tr>
			<td align="center" colspan="14" style="text-align: center;border:0px;border-top:0;font-size:14px;border-right:0px;"><?php echo $perkara_nama;?></td>
		</tr>
		<tr>
			<td align="center" colspan="14" style="text-align: center;border:0px;font-size:14px;border-right:0px;"><?php echo $nama_pn;?></td>
		</tr>
		<tr>
			<td align="center" colspan="14" style="text-align: center;border:0px;font-size:14px;border-bottom:1px solid #000000;border-right:0px;">Bulan <?php echo fetch_montd($bulan);?> <?php echo $tahun;?></td>
		</tr>
	</tbody>
	  <col width="37" />
	  <col width="159" />
	  <col width="187" />
	  <col width="93" span="2" />
	  <col width="113" />
	  <col width="93" span="3" />
	  <col width="103" span="2" />
	  <col width="93" />
	  <tr height="26">
	    <th rowspan="2" height="113" width="37">NO</th>
	    <th rowspan="2" width="159">Nomor Perkara PA</th>
	    <th rowspan="2" width="187">Nama Hakim/Majelis</th>
	    <th colspan="8" width="784">Tanggal</th>
	    <th rowspan="2" width="93">Keterangan</th>
	  </tr>
	  <tr height="87">
	    <th height="87">Putusan PA</th>
	    <th width="93">Permohonan Banding</th>
	    <th width="113">Pemberitahuan inzage</th>
	    <th width="93">Pengiriman Berkas ke PTA</th>
	    <th width="93">Putus Banding</th>
	    <th width="93">Penerimaan kembali di PA</th>
	    <th width="103">Pemberitahuan ke    para pihak</th>
	    <th width="103">Penyampaian Fotocopy Relas PBT ke    PTA</th>
	  </tr>
    <?php for ($a=1; $a<=12;$a++){
        echo "<th style='width:20px;'>".$a."</th>";
          }
    ?>
    </tr>

	<?php
	if($laporan!=''){
		if($laporan->num_rows>0){
			$i=0;
			foreach ($laporan->result() as $row) {	
				$i++;
				echo "<tr>";
					echo "<td style='text-align:center;width:20px;'>".$i."</td>";
					echo "<td style ='text-align:left'>".$row->nomor_perkara_pa."</td>";
					echo "<td style ='text-align:center'>".$row->majelis_hakim."</td>";
					echo "<td style ='text-align:center'>".parse_date($row->putusan_pa)."</td>";
					echo "<td style ='text-align:center'>".parse_date($row->permohonan_banding)."</td>";
					echo "<td style ='text-align:center'>".parse_date($row->pemberitahuan_inzage)."</td>";
					echo "<td style ='text-align:center'>".parse_date($row->pengiriman_berkas)."</td>";
					echo "<td style ='text-align:center'>".parse_date($row->putusan_banding)."</td>";					
					echo "<td style ='text-align:center'>".parse_date($row->penerimaan_berkas_kembali)."</td>";
					echo "<td style ='text-align:center'>".parse_date($row->pemberitahuan_putusan_banding)."</td>";					
					echo "<td style ='text-align:center'></td>";
					echo "<td style ='text-align:center'></td>";
				echo "</tr>";
			
			}

	 	} else
	 	    {

               echo "<tr>";
					echo "<td style='text-align:center;width:20px;'>1</td>";
					echo "<td style ='text-align:left'>Tidak ada data banding bulan ini</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";					
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";					
					echo "<td style ='text-align:center'>-</td>";	
					echo "<td style ='text-align:center'>-</td>";	
				echo "</tr>";
       	    }


	}

	?>
</table>

</div>
<div style="padding:15px;"></div>
<script src="resources/js/jquery.table2excel.js"></script>
<script>
$(function() {
	$(".btnExcel").click(function(){
		$(".cetakExcel").table2excel({
			exclude: ".noExl",
			name: "Excel Document Name",
			filename: "Cetak Excel"
		});
	});
});
</script>