<div class="detil" style="font-size:14px;margin-top:25px;width: 99%;margin: 0 auto;border-color: #FFFFFF;">
    <table id="infoPerkara" style="font-size:14px;width: 100%;" border="0">
            <col width="15%">
            <col width="">
			<col width="150px">
        <tbody>
            <?php
            foreach ($penuntutanrecords as $penrec){
            ?>
            <tr>
                 <td id="first-child">Tanggal Tuntutan</td>
                 <td><?php echo $this->tanggalhelper->convertDayDate($penrec->tanggal_penuntutan); ?></td>
				 <td style="text-align:right;">
				<?php 
                    if ($this->authorization->HasRuleFormHakimPanitera($idperkara)){
					   echo '<a href="#" onClick="popup_form(\''.base_url('edit_info_penuntutan/'.$enc).'\')" class="btn btn-default btn-sm"><i class="fa fa-legal"></i> Edit Data Tuntutan</a>';
                    } 
                ?>
				 </td>
            </tr>
            <tr>
                <td id="first-child">Isi Tuntutan</td>
                <td colspan="2" style="word-break: break-all;"><?php echo $penrec->isi_penuntutan;?></td>
            </tr>
            <tr>
                <td id="first-child">E-Doc Tuntutan</td>
                <td>
            <?php 
				$tglPendaftaran=$penrec->tanggal_pendaftaran;
				$jenisdok=$penrec->isi_penuntutan_dok;
				$jumslash=substr_count($jenisdok,"/");
				if(!empty($jenisdok) && $jumslash!=5){
					$info_tgl_daftar=explode('-', $tglPendaftaran);
					$thn=$info_tgl_daftar[0];
					$bln=$info_tgl_daftar[1];
					$prefix='resources/file/doc/'.$thn.'/'.$bln.'/'.$jenisdok;
					$baseurl=$prefix;
				}else{
					$baseurl=$jenisdok;
				}
                if (($baseurl) and (file_exists($baseurl))){
                    echo "<a target='_new' href='$baseurl'>Unduh Dokumen</a>";
                }else{
                    echo "<span style='color:red;font-weight:bold'>Dokumen Belum Ada</span>";
                }
            ?>  
				</td>
				<td style="text-align:right;">
				<?php
				if ($this->authorization->HasRuleHakimPanitera($idperkara)){				
					echo '<a href="#" style="color:white;margin-bottom:15px" onClick="popup_form(\''.base_url("fileupload/".$enc."/tuntut").'\')" class="btn btn-warning btn-sm"><i class="fa fa-file-word-o"></i> Edit E-Doc</a>';
				}
				?>				
				</td>
            </tr>
            <?php
            }   
            ?>
        </tbody>
    </table>
</div>
<script type="text/javascript">
closeLoading();
</script>
