<div class="templatepopcentering" style="width:665px;margin-top: 1%;">
    <div id='pop' style="border: 1px solid #ffffff;">
		<div class="detil" style="padding: 2px;background-color: white;">
			<form id="frm_upload_file" style="background:white;margin:0;" method="post" enctype="multipart/form-data" action="<?php echo base_url().'fileupload_c/dummy';?>">
			<table id="tableDetilPerkara" style="padding:0;width:100%">              
            <tr>
				<td colspan="2" class="" style="background:white;border:0px;font-size: 20px;color: #648C03; text-align:center;height:50px">
				UPLOAD E-DOCS'S <?php echo $title; ?>
				</td>
			</tr>
			<tr>
				<td id="first-child" style="height:40px;width: 143px;">
				File Tersimpan
				</td>
				<td>
				<?php 
				if (isset($namadoktersimpan) && !empty($namadoktersimpan)){
					$dokumen=explode('/',$namadoktersimpan);
					$maxsegment=count($dokumen);
					$namadoktersimpan=$dokumen[$maxsegment-1];
					echo "<span style='color:orange;'>".$namadoktersimpan."</span>"; 
				}else{
					echo "<span style='color:red;font-weight:bold'>E-Doc ".ucfirst(strtolower($title))." Belum Ada</span>";
				}?>
				</td>
			</tr>
			<tr>
				<td id="first-child" style="height:40px">
				Upload E-Doc Putusan
				</td>
				<td>
				<input type="file" name="fileform" id="fileform" value="">
				</td>
			</tr>
			<?php 
				if($form=='putusan'){
			?>
			<tr>
				<td style="background:white;border:0px;text-align:right;" colspan="2">
					<hr class="thick-line" style="clear:both;">
				</td>
			</tr>
			<tr>
				<td colspan="2" class="" style="background:white;border:0px;font-size: 20px;color: #648C03; padding: 4px;text-align:center;height:50px">
				PUBLIKASI PADA DIREKTORI PUTUSAN MAHKAMAH AGUNG RI
				</td>
			</tr>
			
			<tr>
				<td id="first-child" style="height:40px">
				Status Publikasi (Direktori Putusan)
				</td>
				<td>
					<span class="custom-dropdown custom-dropdown--emerald" style="width:200px;">
						<select id="status_publish" name="status_publish" class="custom-dropdown__select custom-dropdown__select--white" style="width:200px;">
							<?php
								$perkara_id = $this->encrypt->decode(base64_decode($enc));
								$alur_perkara = $this->tanggalhelper->getIDAlurPerkara($perkara_id);
								$jenis_perkara = $this->tanggalhelper->getIDJenisPerkara($perkara_id);
								$jenis_pkr_id = array('64','83','87','88','98','200','224','242','248','311','312','341','342','343','344','346','347','349','352','358','359','360','361','362','502','506','507','509');
								if($alur_perkara==118 OR (in_array($jenis_perkara, $jenis_pkr_id))){
									echo '<option value="0">Tidak Publikasi</option>';
								}else{ ?>							
									<option value="1" <?php if($publikasikan=="1") echo "selected"; ?>>Publikasi</option>
									<option value="0" <?php if($publikasikan=="0") echo "selected"; ?>>Tidak Dipublikasi</option>
							<?php } ?>
					</span>
				</td>
			</tr>
			<?php } ?>
			<tr>
				<td id="first-child" style="height:34px">
				Link Putusan Pada Direktori Putusan
				</td>
				<td  style="height:40px">
				<?php
				if (isset($link_dirput) && !empty($link_dirput)){
					echo "<span style='color:orange;'><a target='_blank' href='".$link_dirput."'>".$link_dirput."</a></span>"; 
				}else{
					echo "<span style='color:red;font-weight:bold'>Putusan Tidak Ada </span>";
				}?>
				</td>
			</tr>
			<tr>
				<td style="background:white;border:0px;text-align:right;" colspan="2">
				<hr class="thick-line" style="clear:both;">
				<input type="hidden" name="enc" id="enc" value="<?php echo $enc; ?>">
				<input type="hidden" name="form" id="form" value="<?php echo $form; ?>">
				<input type="button" id='close_form' value="Kembali" class="btn">
<!-- 				<?php if (isset($namadoktersimpan) && !empty($namadoktersimpan)){?>
				<input type="button" id="hapus" value="Hapus" style="text-decoration:none" class="del_btn">
				<?php }?> -->
				<input type="submit" id="simpan" value="Simpan" class="btn">
				</td>
			</tr>
			</table>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
$('#simpan').hide();
$("#fileform").change(function(){
	$('#simpan').show();
});
$("#fileform1").change(function(){
	$('#simpan').show();
});
$('#frm_upload_file').SubmitHandling({
	refresh:'1',
	setRefresh:1,
	divRef:'#konten',
	clicked:1,
	btnClicked:'#close_form',
	whenStatus:1,
	upload:1,
	urlUpload:"<?php echo base_url('fileupload_putusan_c/validatePost');?>"
});
$('#hapus').ButtonClickHandling({
	refresh:'1',
	setRefresh:1,
	divRef:'#konten',
	clicked:1,
	btnClicked:'#close_form',
	whenStatus:1,
	actions:'<?php echo base_url()?>fileupload_putusan_c/validateDocDelete/<?php echo $enc; ?>/<?php echo $from; ?>/<?php echo $enc1; ?>',
	formName:'#frm_upload_file',
	actionName:'Hapus Data'
});
$('#close_form').closingFormWin();
</script>