<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Help extends CI_Controller {
	function tentang_sipp(){

		if($this->session->userdata('is_logged_in')==FALSE){
			redirect('login');
		}
		$data['main_body'] = 'help/tentang_sipp';
		$this->load->vars($data);
		$this->load->view('body/body_new');
	}
	function buku_panduan(){

		if($this->session->userdata('is_logged_in')==FALSE){
			redirect('login');
		}
		$data['main_body'] = 'help/buku_panduan';
		$this->load->vars($data);
		$this->load->view('header');
		$this->load->view('body/body_new');
	}
	function release_note($update_id=NULL){
		if($this->session->userdata('is_logged_in')==FALSE){
			redirect('login');
		}
		if ($update_id==NULL){
			$update_id= $this->db->query("SELECT MAX(update_id) AS update_id FROM updates_catatan;")->result();
			$update_id = $update_id[0]->update_id;
		}
		$this->load->model('help/help_m','help');
		$data['data']=$this->help->getReleaseNote($update_id);
		$data['update_id']=$update_id;
		$data['version']=$this->help->getVersion();
		$data['main_body'] = 'help/release_note';
		$this->load->vars($data);
		$this->load->view('header');
		$this->load->view('body/body_new');
	}
}