<style type="text/css">
	.view_laporan tr td, .view_laporan tr{
	    border-bottom: 1px solid #000000;
	    border-collapse: collapse;
	    /*border-right: 1px solid #000000;*/
	    /*color: black;*/
	    font-size: 9pt;
	    padding: 2px;
	    /*text-align: left;*/
	    text-decoration: none;
	    vertical-align: top;
	    white-space: normal;
	}
	.view_laporan .split{
		height: 22px;
		border-left: hidden;
		border-right: hidden;	
	}
	.tengah{
		text-align:center;
	}
	.judul{
		color:#fff;
		background: #007640;
		font-weight: bold;
	}
</style>
<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 class="view_laporan" width="50%" class="cetakExcel" border="0" cellpadding="2" cellspacing="0" style="margin:10px;">
	<col width="35%">
	<col width="5%">
	<col width="60%">
	<tbody>
		<tr>
			<td colspan=3 class="judul">Mediasi Wajib</td>
		</tr>
		<tr>
			<td>Nomor Perkara</td>
			<td class="tengah">:</td>
			<td><?php echo isset($nomor_perkara)?$nomor_perkara:'';?></td>
		</tr>
		<tr>
			<td>Jenis Perkara</td>
			<td class="tengah">:</td>
			<td><?php echo isset($jenis_perkara)?$jenis_perkara:''; ?></td>
		</tr>
		<tr>
			<td>Kategori Pihak</td>
			<td class="tengah">:</td>
			<td><?php echo isset($kategori_pihak)?$kategori_pihak:''; ?></td>
		</tr>
		<tr>
			<td class="split" colspan="3"></td>
		</tr>
		<tr><td colspan='3' class="judul">IDENTITAS PARA PIHAK</td></tr>
		<?php foreach ($perkara_pihak->result() as $row) {?>
				<tr>
					<td>Nama <?php echo ($row->pihak_ke==1)?$sebagai_p:$sebagai_t;?></td>
					<td align='center'>:</td>
					<td><?php echo $row->nama?></td>
				</tr>
				<tr>
					<td>Umur</td>
					<td class="tengah">:</td>
					<td><?php echo $row->umur; ?> Tahun</td>
				</tr>
				<tr>
					<td>Jenis Kelamin</td>
					<td class="tengah">:</td>
					<td><?php echo ($row->jenis_kelamin=='L')?"Laki-Laki":"Perempuan";?></td>
				</tr>
				<tr>
					<td>Pendidikan</td>
					<td class="tengah">:</td>
					<td><?php echo $row->pendidikan?></td>
				</tr>
				<tr>
					<td>Pekerjaan</td>
					<td class="tengah">:</td>
					<td><?php echo $row->pekerjaan?></td>
				</tr>
				<tr>
					<td>Agama</td>
					<td class="tengah">:</td>
					<td><?php echo $row->agama?></td>
				</tr>
				<tr>
					<td>Alamat</td>
					<td class="tengah">:</td>
					<td><?php echo $row->alamat_pihak?></td>
				</tr>
				<tr>
					<td>Normal/Difable</td>
					<td class="tengah">:</td>
					<td><?php echo ($row->difable=='Y')?"Difable":"Normal";?></td>
				</tr>
				<tr>
					<td class="split" colspan="3"></td>
				</tr>
		<?php }?>

		<tr><td colspan='3' class="judul">MEDIATOR</td></tr>
		<tr>
			<td>Nama Mediator/Co Mediator</td>
			<td class="tengah">:</td>
			<td>
				<?php
				$i=0;
				foreach ($perkara_mediator->result() as $row) {
					if($perkara_mediator->num_rows()>1){
						echo ++$i.' ';
					}
					echo $row->nama_gelar;
				}?>
			</td>
		</tr>
		<tr>
			<td>Tanggal Penunjukan</td>
			<td class="tengah">:</td>
			<td><?php echo $this->templatehelper->convertKeTglIndo($row->tanggal_penetapan)?></td>
		</tr>
		<tr>
			<td class="split" colspan="3"></td>
		</tr>
		
		<tr><td colspan='3' class="judul">MAJELIS HAKIM</td></tr>
		<tr>
			<td>Nama Majelis Hakim</td>
			<td class="tengah">:</td>
			<td><?php echo $majelis ?></td>
		</tr>
		<tr>
			<td>Nama Majelis Panitera Pengganti</td>
			<td class="tengah">:</td>
			<td><?php echo $pp ?></td>
		</tr>
		<tr>
			<td class="split" colspan="3"></td>
		</tr>

		<tr><td colspan='3' class="judul">MEDIASI</td></tr>
		<tr>
			<td>Tanggal Mediasi</td>
			<td class="tengah">:</td>
			<td>

				<?php 
				$i=0;
				foreach ($perkara_jadwal_mediasi->result() as $row) {
					if($perkara_jadwal_mediasi->num_rows()>1){
						echo ++$i.' ';
					}
					echo $this->templatehelper->convertKeTglIndo($row->tanggal_mediasi);
				}
				?>
			</td>
		</tr>
		<tr>
			<td>Tanggal Laporan Mediasi</td>
			<td class="tengah">:</td>
			<td><?php echo $this->templatehelper->convertKeTglIndo($tgl_laporan_mediasi);?></td>
		</tr>
		<tr>
			<td>Hasil Mediasi</td>
			<td class="tengah">:</td>
			<td><?php echo $hasil_mediasi;?></td>
		</tr>
		<tr>
			<td>Tanggal Kesepakatan Perdamaian</td>
			<td class="tengah">:</td>
			<td><?php echo $this->templatehelper->convertKeTglIndo($tgl_kesepakatan_damai);?></td>
		</tr>
		<tr>
			<td>Isi  Kesepakatan Perdamaian</td>
			<td class="tengah">:</td>
			<td><?php echo $this->templatehelper->convertKeTglIndo($isi_kesepakatan_damai);?></td>
		</tr>
		<tr>
			<td>Tanggal Akta Perdamaian / Penetapan Pencabutan</td>
			<td class="tengah">:</td>
			<td><?php echo $tgl_akta;?></td>
		</tr>
		<tr>
			<td>Isi Akta Perdamaian</td>
			<td class="tengah">:</td>
			<td><?php echo $isi_akta_perdamaian;?></td>
		</tr>
	</tbody>
</table>
</div>
<div style="padding:15px;"></div>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>resources/css/style.css">
<script type="text/javascript" src="<?php echo base_url();?>resources/js/jquery-1.7.1.min.js"></script>
<script src="<?php echo base_url();?>resources/js/jquery.table2excel.js"></script>
<script>	
$(function() {
	$(".btnExcel").click(function(){
		$(".cetakExcel").table2excel({
			exclude: ".noExl",
			name: "Excel Document Name",
			filename: "Cetak Excel"
		});
	});
});
</script>