<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Infosidang extends CI_Controller {
	function index(){
		$data = $this->panggil_data();
		if($data){
			$no=1;
			foreach($data as $items){
				echo "<p align=center>$no. <a>".$items->noPerkara.'</a><br>
<small><i>('.$items->jenisPerkara.')</i><br>'.
$items->agenda
.'</small></p>
';
				$no++;
			}
		} else {
			echo '<center>TIDAK ADA SIDANG<br>HARI INI</center>';
		}
		;}
	
	function panggil_data(){
		return $this->db->query("select a.noPerkara,a.jenisPerkara,b.agenda from jadwalsidangweb b
			join dataumumweb a using(IDPerkara)
			where b.tglSidang=curdate()
			order by a.tglPendaftaran,a.noPerkara;")->result();
	}
}
?>