<div style="padding:5px;min-width:1700px">
<div style="padding:20px;"></div>
<button class="btn btnExcel" style="width:150px;text-align:center;">Export Excel</button></div>
<table id="view_laporan" class="cetakExcel" border="0" cellpadding="2" cellspacing="0" style="margin:10px;">
	<tbody>
		<tr>
			<td align="center" colspan="22" 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="22" style="text-align: center;border:0px;font-size:14px;border-right:0px;"><?php echo $nama_pn;?></td>
		</tr>
		<tr>
			<td align="center" colspan="22" style="text-align: center;border:0px;font-size:14px;border-bottom:1px solid #000000;border-right:0px;">
				<?php 
					if($bulan!=''){
						echo 'Bulan '.fetch_montd($bulan).' ';
					}else{
						echo 'Tahun ';
					}
					echo $tahun;
				?>
			</td>
		</tr>
		<tr>
			<td align="left" colspan="22" style="text-align: center;border:0px;font-size:14px;border-bottom:1px solid #000000;border-right:0px;">Nama Mediator : <strong><?php echo $nama_mediator;?></strong></td>
		</tr>

	</tbody>
  <tr height="20">
    <th rowspan="3" height="60" width="64">No</th>
    <th rowspan="3" width="64">No Perkara</th>
    <th rowspan="3" width="64">Jenis Perkara</th>
    <th rowspan="3" width="64">Tanggal Penunjukan</th>
    <th rowspan="3" width="64">Tanggal Mediasi Pertama</th>
    <th rowspan="3" width="64">Tanggal Laporan Mediator</th>
    <th colspan="5" width="320">Jumlah Hasil Mediasi</th>
  </tr>
  <tr height="20">
    <th colspan="3" height="20" style="border-left:0px;">Berhasil</th>
    <th rowspan="2" width="64">Tidak Berhasil</th>
    <th rowspan="2" width="64">Tidak Dapat Dilaksanakan</th>
  </tr>
  <tr height="20">
    <th height="20" width="64" style="border-left:0px;">Akta Perdamaian/Putusan</th>
    <th width="64">Berhasil Sebagian</th>
    <th width="64">Pencabutan</th>
  </tr>


    <tr>
    <?php for ($a=1; $a<=11;$a++){
        echo "<th style='width:20px;'>".$a."</th>";
          }
    ?>
    </tr>

	<?php
	if($rekap!=''){
		if($rekap->num_rows>0){
			$i=0;
			foreach ($rekap->result() as $row) {	
				$i++;
				echo "<tr>";
					echo "<td style='width:20px;text-align:center'>".$i."</td>";
					echo "<td><a href='".base_url()."view_laporan_mediasi/detail_mediasi_perkara/".base64_encode($this->encrypt->encode($row->perkara_id))."'>".$row->nomor_perkara."</a></td>";
					echo "<td>".$row->jenis_perkara_nama."</td>";
					echo "<td>".$this->tanggalhelper->convertDayDate($row->penetapan_penunjukan_mediator)."</td>";
					echo "<td>".$this->tanggalhelper->convertDayDate($row->dimulai_mediasi)."</td>";
					echo "<td>".$this->tanggalhelper->convertDayDate($row->tgl_laporan_mediator)."</td>";
					echo "<td style='text-align:center'>".$this->templatehelper->isnull($row->berhasil_akta)."</td>";
					echo "<td style='text-align:center'>".$this->templatehelper->isnull($row->berhasil_sebagian)."</td>";
					echo "<td style='text-align:center'>".$this->templatehelper->isnull($row->berhasil_cabut)."</td>";
					echo "<td style='text-align:center'>".$this->templatehelper->isnull($row->tdk_berhasil)."</td>";
					echo "<td style='text-align:center'>".$this->templatehelper->isnull($row->tdk_dpt_dilaksanakan)."</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>