<hr class="thick-line" style="clear:both;">
<div id="left">
	<?php
	echo form_open(base_url().'sidang_list/search');
	$attributes = array('name' => 'search_keyword', 'id' => 'search-box', 'type' => 'text','size' => '50','placeholder'=>"  Ketik kata kunci  ");
	echo form_input($attributes);
	echo "<span>  </span>";
	$attributes = array('name' => 'search_date','style' => 'width: 85px;height: 35px;padding: 6px;', 'class' => 'search_date','id' => 'search_date', 'type' => 'text','size' => '10','placeholder'=>"DD/MM/YYYY");
	echo form_input($attributes);
	$data = array(
		'enc' => $enc
	);
	echo form_hidden($data);
	echo "<span>  </span>";
	$attributes = array('value' => 'Search', 'id' => 'search-btn1', 'type' => 'submit');
	echo form_submit($attributes);
	echo form_close('');
	?>
</div>
<div id="left" style="margin-left:50px;">
	<input id="cetak_sidang_list" type="submit" value="Excel" class="btn"></input>
</div>
<div id="pages">
    <div id="selector"></div>
</div>
<div class="cssTable">
	<table id="tablePerkaraAll">
		<col width="5%" />
		<col width="17%" />
		<col width="15%" />
		<col width="15%" />
		<col width="15%" />
		<col width="15%" />
		<col width="15%" />
		<col width="15%" />
		<col width="5%" />
		<tbody>
			<tr>
				<td><?php echo $judulForm1;?></td>
				<td><?php echo $judulForm2;?></td>
				<td><?php echo $judulForm4;?></td>
				<td><?php echo $judulForm5;?></td>
				<td><?php echo $judulForm6;?></td>
				<td><?php echo 'Para Pihak'?></td>
				<td><?php echo $judulForm9;?></td>
				<td><?php echo $judulForm10;?></td>
				<td><?php echo $judulForm12;?></td>
			</tr>
			<?php
				if($list_perkara!=''){
					if($list_perkara->num_rows>0){
						if($page_active<1){
							$con = 1;
						}else{
							$con = $page_active+1;
						}
		    			foreach ($list_perkara->result() as $row) {
		    				$date = new DateTime(str_replace("-","",$row->tanggal_sidang));

		    				if(!empty($row->ruangan)){
		    					$ruang_sidang = $row->ruangan;
		    				} else {
		    					$ruang_sidang = "<div style='color:red;'>Ditentukan Kemudian</div>";
		    				}

		    				$id_sidang = base64_encode($this->encrypt->encode($row->id));
		    				
		    				echo "<tr>";
			    				echo '<td>'.$con.'</td>';
			    				echo '<td>'.$date->format('d M Y').'</td>';
			    				echo '<td>'.$ruang_sidang.'</td>';
			    				echo '<td>'.$row->nomor_perkara.'</td>';
			    				echo '<td>'.$row->agenda.'</td>';
			    				echo '<td>'.$row->para_pihak.'</td>';
			    				echo '<td>'.$row->majelis_hakim_nama.'</td>';
			    				echo '<td>'.$row->panitera_pengganti_text.'</td>';
			    				echo '<td align="center" style="cursor:pointer;" onClick="popup_form(\''.base_url('jadwal_sidang_list_detil/'.$id_sidang).'\')">[<a href="#" >detil</a>]</td>';
		    				echo "</tr>";
		    				$con++;
		    			}
			    	}else{
		    			echo "<tr><td colspan='12' align='center'>Tidak Ada Jadwal Sidang untuk Hari ini</td></tr>";
		    		}
				}else{
		    		echo "<tr><td colspan='12' align='center'>Tidak Ada Jadwal Sidang untuk Hari ini</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 $enc = (!empty($enc)) ? "/".$enc : $enc;?>
<?php $url = base_url('search_jadwal'.$enc);?>
<script type="text/javascript">
$( document ).ready(function() {
    $( function() {
        $('#search_date').datepicker({
            inline: true,
            showOtherMonths: true,
            dateFormat: 'dd/mm/yy',
            dayNamesMin: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
            beforeShowDay: $.datepicker.noWeekends
        });
    });
    
});
	
	$('#cetak_sidang_list').click(function(){
		window.open('<?php echo base_url(); echo "sidang_list_cetak/cetak/1".$enc."/".$keyword_enc; ?>','_self')
	});	
</script>