<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="6" 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="6" style="text-align: center;border:0px;font-size:14px;border-right:0px;"><?php echo $nama_pn;?></td>
		</tr>
		<tr>
			<td align="center" colspan="6" 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="57">
		  <col width="187">
		  <col width="145">
		  <col width="155">
		  <col width="154">
		  <col width="111">
 <tr>
    <th width="57" rowspan="2" align="center">No.</th>
    <th width="641" colspan="4" align="center">HHK</th>
    <th width="111" rowspan="2" align="center">Jumlah            (Rp)</th>
  </tr>
  <tr>
    <th width="187" align="center">Pendaftaran tingkat pertama (Rp)</th>
    <th width="145" align="center">Pendaftaran    banding  (Rp)</th>
    <th width="155" align="center">Pendaftaran    Kasasi (Rp)</th>
    <th width="154" align="center">Pendaftaran    PK          (Rp)</th>
  </tr>
  
  <tr>
    <?php for ($a=1; $a<=6;$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++;
				$jumlah=$row->pendaftaran+$row->pendaftaran_banding+$row->pendaftaran_kasasi+$row->pendaftaran_pk;
				 echo "<tr>";
					echo "<td style='text-align:center;width:20px;'>".$i."</td>";
					echo "<td style ='text-align:right'>".$row->pendaftaran."</td>";
					echo "<td style ='text-align:right'>".$row->pendaftaran_banding."</td>";
					echo "<td style ='text-align:right'>".$row->pendaftaran_kasasi."</td>";
					echo "<td style ='text-align:right'>".$row->pendaftaran_pk."</td>";
					echo "<td style ='text-align:right'>".$jumlah."</td>";											
				echo "</tr>";	
				}
			
echo "<tr>";
    			  for ($a=1; $a<=6;$a++){
          			echo "<td><br/></td>";
           		}
   

			echo "<tr>"; for ($a=1; $a<=6;$a++){ echo "<td style='border:0'><br/></td>";} echo "</tr>";
			echo "<tr>"; for ($a=1; $a<=6;$a++){ echo "<td style='border:0'><br/></td>";} echo "</tr>";

			echo "<tr>";
    									echo "<td style='border:0'></td>";    			
    									echo "<td colspan='2' style='border:0'>Mengetahui,</td>";    			
    			for ($a=1; $a<=5;$a++){ echo "<td style='border:0'></td>";}    			
    			$bln_lap=explode(' ', $this->templatehelper->convertKeTglIndo(date('Y-m-d')));
    			$bulan_laporan=fetch_montd($bulan)." ".$bln_lap[2];
    									echo "<td colspan='3' style='border:0'>".$this->templatehelper->namaKotaPA($nama_pn).",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$bulan_laporan."</td>";    			
    		echo "</tr>";
			echo "<tr>"; for ($a=1; $a<=6;$a++){ echo "<td style='border:0'><br/></td>";} echo "</tr>";
			echo "<tr>"; for ($a=1; $a<=6;$a++){ echo "<td style='border:0'><br/></td>";} echo "</tr>";
			echo "<tr>"; for ($a=1; $a<=6;$a++){ echo "<td style='border:0'><br/></td>";} echo "</tr>";
			echo "<tr>"; for ($a=1; $a<=6;$a++){ echo "<td style='border:0'><br/></td>";} echo "</tr>";
			echo "<tr>"; for ($a=1; $a<=6;$a++){ echo "<td style='border:0'><br/></td>";} echo "</tr>";
			echo "<tr>";
    									echo "<td style='border:0'></td>";    			
    									echo "<td colspan='2' style='border:0'><ins>".$ketua."</ins></td>";    			
    			for ($a=1; $a<=6;$a++){ echo "<td style='border:0'></td>";}    			
    									echo "<td colspan='3' style='border:0'><ins>".$panses."</ins></td>";    			
    		echo "</tr>";
			echo "<tr>";
    									echo "<td style='border:0'></td>";    			
    									echo "<td colspan='2' style='border:0'>".$nipketua."</td>";    			
    			for ($a=1; $a<=6;$a++){ echo "<td style='border:0'></td>";}    			
    									echo "<td colspan='3' style='border:0'>".$nippanses."</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>