<?php
	$perkaraid 		= $this->encrypt->decode(base64_decode($enc));
	$idalurperkara 	= $this->tanggalhelper->getIDAlurPerkara($perkaraid);
	$edit 			= False;
if ($this->authorization->HasRuleEditPendaftaran($idalurperkara, $perkaraid)){
	$edit = True;
	echo'<div id="infoPerkara" style="font-size:14px;">';
		echo'<a href="#" onClick="popup_form(\''.base_url('mediasi_diluar/kesepakatan_mediasi/'.$enc).'\')" class="btn btn-default btn-sm">'.(empty($tgl_kesepakatan) ?'Tambah Data Mediasi':'Edit Data Mediasi').'</a>';
	echo'</div>';
	}
echo'<table id="infoPerkara" style="font-size:14px;width:100%;" border="0">';
    echo'<col width="15%">';
    echo'<col width="50%">';
    echo'<col width="35%">';
    echo'<tbody>';
        echo'<tr><td id="first-child">Tanggal Kesepakatan</td>';
            echo'<td>'.($tgl_kesepakatan!='' ? $tgl_kesepakatan :'-').'</td>';
			echo'</tr>		
	    	<tr>
				<td id="first-child" style="text-align:left;">Mediator</td>';
			if(!empty($mediator)){
			echo'<td colspan="2">
                <div class="cssTable" style="">
                    <table id="tableinfo" style="margin:0px;padding:0px;">
                        <col style="width:5%">
                        <col style="width:75%">
                        <col style="width:20%">
                        <tbody>
                            <tr>
                                <td>No</td>
                                <td>Nama</td>
                                <td>Status Mediator</td>
                            </tr>';
							$jumlah=substr_count($mediator,"<br/>");
							$mediator_text=explode("<br/>",$mediator);
							$status=explode(",",$status_mediator);
							if($mediator_text[0]!=''){
								for($i=0; $i<$jumlah+1; $i++){
									$no = $i+1;
									if($status[$i]=='H'){
										$status_text='Hakim';
									}else if($status[$i]=='N'){
										$status_text='Non-Hakim';
									}else if($status[$i]=='P'){
										$status_text='Pegawai';
									}else{
										$status_text="-";
									}
								echo "<tr>
										<td style='text-align:center; vertical-align:top'>".$no."</td>
										<td style='text-align:left; vertical-align:top;'>".substr_replace("<br/>",$mediator_text[$i]."<br>",0)."</td>
										<td style='text-align:left; vertical-align:top'>".$status_text."</td>
									<tr>";
								}
							}else{
								echo "<tr>
										<td style='text-align:center' colspan='3'>Data tidak ditemukan</td>
									<tr>";
							}
                       echo'</tbody>
                    </table>
                </div>
            </td>';
        	}else{
        		echo '<td>Tidak Ada Mediator</td>';
        	}
   echo'</tr>    	
		<tr>
			<td id="first-child">Keterangan</td>
			<td colspan="2">'.$keterangan.'</td>
		</tr>
    </tbody>
</table>
<input type="hidden" id="refresh" class="detil_perkara_refresh" value="0">';?>
<script type="text/javascript">
$("#refresh").change(function(){
    if($(this).val()==1){
		var urlRefresh = $('#refresh_dest').val();
		window.open(urlRefresh,'_self')
	}
});
closeLoading();
</script>
