<hr class="thick-line" style="clear:both;">
<div id="left">
	<?php
	$this->nativesession->set_flash_session('url_requested', base_url(uri_string()));
	echo form_open(base_url().'jurnal_ht_list/search');
	$attributes = array('name' => 'search', 'id' => 'search-box', 'type' => 'text','size' => '50','placeholder'=>"  Ketik kata kunci  ");
	echo form_input($attributes);
	$data = array(
		'enc' => $enc
	);
	echo form_hidden($data);
	echo "<span>  </span>";
	$attributes = array('value' => 'Search', 'id' => 'search-btn1', 'type' => 'submit', 'onClick' => 'load()');
	echo form_submit($attributes);
	echo form_close('');
	?>
</div>
<div id="left">
</div>
<div id="left" style="margin-left:50px;">
	<input id="cetak_jurnal_list" type="submit" value="Excel" class="btn"></input>
</div>
<?php
if($this->session->userdata('is_logged_in') AND $this->authorization->HasRuleAddPendaftaran($idalurperkara)){ ?>
		<div id="left" style="margin-left:50px;">
			<input type="submit" id="tambah_pekara" value="Tambah Perkara" class="btn"></input>
			<script type="text/javascript">
				$('#tambah_pekara').click(function(event){
					window.open('<?php echo base_url();echo "new_perdata/".$enc; ?>/','_self')
				});
			</script>
		</div>
<?php	
}
?>
<div id="pages">
    <div id="selector"></div>
</div>
<div class="cssTable">
	<table id="tablePerkaraAll">
		<col  width="5%" />
        <col  width="15%" />
        <col  width="20%" />
        <col  width="35%" />
        <col  width="13%" />
        <col  width="13%" />
        <col  width="13%" />
        <col  width="6%" />
		<tbody>
			<tr>
				<td>No</td>
				<td onclick="sorting(1)">Nomor Eksekusi</td>
				<td onclick="sorting(3)">Jenis Eksekusi Hak Tanggungan</td>
				<td onclick="sorting(7)">Pemohon</td>
				<td>Penerimaan</td>
				<td>Pengeluaran</td>
				<td>Sisa</td>
				<td>Link</td>
			</tr>
			<input type="hidden" id='alur_perkara' value="<?php echo $idalurperkara;?>">
			<?php
				if($list_jurnal_perkara!=''){
					if($list_jurnal_perkara->num_rows>0){
						if($page_active<1){
							$con = 1;
						}else{
							$con = $page_active;
						}
		    			foreach ($list_jurnal_perkara->result() as $row) {		    				
		    				echo "<tr>";
			    				echo '<td>'.$con.'</td>';
			    				echo '<td>'.$row->nomor_eksekusi.'</td>';
			    				echo '<td>'.$row->jenis_ht.'</td>';
			    				echo '<td>'.$row->pemohon.'</td>';
			    				echo '<td align="right">'.number_format($row->pemasukan, 0, ',', '.').'</td>';
			    				echo '<td align="right">'.number_format($row->pengeluaran, 0, ',', '.').'</td>';
			    				echo '<td align="right">'.number_format(($row->sisa), 0, ',', '.').'</td>';
			    				//puji
			    				echo '<td>[<a href="'.base_url('biaya_detil_ht/'.base64_encode($this->encrypt->encode($row->ht_id))).'">detil</a>]</td>';
			    				//puji
		    				echo "</tr>";
		    				$con++;
		    			}
			    	}else{
		    			echo "<tr><td colspan='9' align='center'>Data Tidak diTemukan</td></tr>";
		    		}
				}else{
		    		echo "<tr><td colspan='9' align='center'>Data Tidak diTemukan</td></tr>";
		    	}
			?>
		</tbody>
	</table>
</div>
<?php
if($keyword!==''){
	$keyword=$keyword;
} else {
	$keyword="0";
}
?>
<div id="pages_bottom" style="width:100%;padding-left:5px;padding-top:5px;">
    <div id="selector_bottom"></div>
</div>
<?php
$url = base_url().$page_url.'/sort/';
?>
<script type="text/javascript">
	function sorting(col){
		window.open('<?php echo $url;?>'+col+'/<?php echo $enc; ?>','_self')
	}
	<?php $enc = (!empty($enc)) ? "/".$enc : $enc;?>
	function searchDetilShow(){
		window.open('<?php echo base_url();?>search<?php echo $enc; ?>','_self')
	}
	//CETAK
	$('#cetak_jurnal_list').click(function(){
		window.open('<?php echo base_url(); echo "jurnal_cetak/cetak/2".$enc."/".$keyword; ?>','_self')
	});
</script>
