<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="40" />
	  <col width="170" />
	  <col width="170" />
	  <col width="400" />
	  <col width="150" />
	  <col width="80" />
	  <col width="80" span="3" />
	  <col width="80" span="2" />
	  <col width="80" span="2" />
	  <col width="91" />
	  <tr height="19">
	    <th rowspan="2" height="63" width="40">No.</th>
	    <th rowspan="2" width="109">Nomor Perkara</th>
	    <th rowspan="2" width="122">Kode Perkara</th>
	    <th rowspan="2" width="133">Nama&nbsp; Majelis Hakim</th>
	    <th rowspan="2" width="107">Nama PP</th>
	    <th colspan="5" width="382">Tanggal</th>
	    <th rowspan="2" width="90">Jenis Putusan</th>
	    <th colspan="2" width="146">Sisa    Akhir Bulan</th>
	    <th rowspan="2" width="91">Keterangan</th>
	  </tr>
	  <tr height="44">
	    <th height="44">Penerimaan&nbsp;</th>
	    <th>PMH</th>
	    <th>PHS</th>
	    <th>Sidang I</th>
	    <th>Diputus</th>
	    <th width="170">Belum Dibagi</th>
	    <th width="170">Belum Diputus</th>
	  </tr>
    <tr>
    <?php for ($a=1; $a<=14;$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."</td>";
					echo "<td style ='text-align:left'>".$row->kode_perkara."</td>";
					echo "<td style ='text-align:left'>".$row->majelis_hakim."</td>";
					echo "<td style ='text-align:left'>".$row->panitera_pengganti."</td>";
					echo "<td style ='text-align:left'>".parse_date($row->tanggal_pendaftaran)."</td>";
					echo "<td style ='text-align:left'>".parse_date($row->pmh)."</td>";
					echo "<td style ='text-align:left'>".parse_date($row->phs)."</td>";
					echo "<td style ='text-align:left'>".parse_date($row->sidang_pertama)."</td>";
					echo "<td style ='text-align:left'>".parse_date($row->tanggal_putusan)."</td>";					
					echo "<td style ='text-align:left'>".$row->jenis_putusan."</td>";					
					echo "<td style ='text-align:left'>".$row->belum_dibagi."</td>";
					echo "<td style ='text-align:left'>".$row->belum_diputus."</td>";
					echo "<td></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>