<hr class="thick-line" style="clear:both;">
<div class="cssTable">
	<table id="tablePerkaraAll">
		<col  width="5%" />
        <col  width="15%" />
        <col  width="15%" />
        <col  width="50%" />
        <col  width="10%" />
        <col  width="15%" />
		<tbody>
			<tr>
				<td>No</td>
				<td>Nomor Antrian</td>
				<td>Tanggal Sidang</td>
				<td>Nomor Perkara</td>
				<td>Status</td>
				<td>Action</td>
			</tr>
			<?php
			if (!empty($antrian_list)){
				$i=1;
				foreach ($antrian_list as $row) {
					echo "<tr>";
					echo "	<td>".$i."</td>";
					echo "	<td>".$row->nomor_antrian."</td>";
					echo "	<td>".$row->tanggal_sidang."</td>";
					echo "	<td>".$row->nomor_perkara."</td>";
					echo "	<td>".($row->status==0?"Mengantri":($row->status==1?"Tertunda":"Selesai"))."</td>";
					$onclick = "window.open('".base_url('manageAntrian/panggil_antrian/'.base64_encode($this->encrypt->encode($row->id)).'/'.$panggil_no_perk)."')";
					$onclick2 = "window.open('".base_url('manageAntrian/tunda_antrian/'.base64_encode($this->encrypt->encode($row->id)).'/'.$panggil_no_perk)."');refresh_paje();";
					echo '<td align="center">';
					if (($row->status==0 OR $row->status==1) AND $i==1){
						echo '	[<a href="#" onclick="'.$onclick.'">PANGGIL</a>] | ';
						if($this->session->userdata('jenis_pengadilan')==4) {
							echo '	[<a href="#" onclick="'.$onclick2.'">SKORS</a>] <br> ';
						}else{

							echo '	[<a href="#" onclick="'.$onclick2.'">TUNDA</a>] <br> ';
						}
						echo '	[<a href="'.base_url('manageAntrian/selesai_antrian/'.base64_encode($this->encrypt->encode($row->id)).'/'.$ruang_id.'/'.$hakim_id.'/'.$panggil_no_perk.'/'.base64_encode($this->encrypt->encode($row->tanggal_sidang))).'">SELESAI</a>] ';
						if($this->session->userdata('jenis_pengadilan')==4) {
							echo '<a href="#" onClick="popup_form(\''.base_url('tunda_info_jadwal_sidang/'.$enc.'/'.$encjadwalsidang).'\')">|TUNDA SIDANG</a>';
						}
					}else{
						echo '---';
					}
					echo '</td>';
					echo "</tr>";
					$i++;
				}
			}
			?>
		</tbody>
	</table>
</div>
<div id="pages_bottom" style="width:100%;padding-left:5px;padding-top:5px;">
    <div id="selector_bottom"></div>
</div>
<div hidden id="divku">
</div>
<script type="text/javascript">
	setInterval(function(){ 
		refresh_paje();
	}, 20000);
	function refresh_paje(){
		$('#divku').append("<form id=\"hid_form\" method=\"post\" action=\"<?php echo base_url().'manageAntrian/f_validate_input_ruang_sidang';?>\"><input type='text' name='ruang_id' value='<?php echo $ruang_id;?>'><input type='text' name='hakim_id' value='<?php echo $hakim_id;?>'><input type='text' name='panggil_no_perk' value='<?php echo $panggil_no_perk;?>'><input type='text' name='tanggal_sidang' value='<?php echo $tanggal_sidang;?>'></form>");
		$( "#hid_form" ).submit();
	}
</script>
<script type="text/javascript">
	function pilih_cetak(ele){
		if (ele.value!=1) {
			popup_form(ele.value);
			//$(ele).val('1');
		}
	}
    closeLoading();
</script>