<?php
class M_view extends CI_Model {
    // Commented By Prawira Tgl 9 September 2015
	// Kemungkinan File ini tidak dipakai lagi. Tgl 9 September 2015
	/* function get_sub_menu($parent_id) {
        $this->db->select('MenuID,MenuLabel,Icon,MenuLink,ActionType,ParentID');
        $this->db->where('ParentID',$parent_id);
        $this->db->order_by('ParentID,MenuOrder','ASC');
        $query=$this->db->get($this->table);
        
        if($query->num_rows>0) {
            return $query->result_array();
        }
        else{
            return false;
        }
    } */

	
    /* function get_action($ActionType,array $Parameter){
        $prm = implode("','",$Parameter);
        switch($ActionType){
            case 'Tab' : echo "tab_new('".$prm."')"; break;
            case 'Modal' : echo "modal_open('".$prm."')"; break;
            //default : echo "open_url('".$Parameter[1]."')"; break;
            default : echo "link_to('".$Parameter[1]."')"; break;
        }
    } */
	
    /* function get_by_id($id) {
        $query = $this->db->get_where($this->table, array('MenuId' => $id));
        return $query->result();
    } */
	
    /* function get_menulink($id) {
        $this->db->select('MenuLink');
        $this->db->from($this->table);
        $this->db->where('MenuID', $id); 
        $query = $this->db->get();    
        
        if ($query->num_rows() > 0) {
            foreach ($query->result() as $row) {
                $MenuLink = $row->MenuLink;
            }    

            return $MenuLink;
        }
        else {
            return FALSE;
        }	
    }*/

    /* function get_menulabel($id) {
        $this->db->select('MenuLabel');
        $this->db->from($this->table);
        $this->db->where('MenuID', $id); 
        $query = $this->db->get();   

        if ($query->num_rows() > 0) {
            foreach ($query->result() as $row) {
                $MenuLabel = $row->MenuLabel;
            }    

            return $MenuLabel;
        }
        else {
            return FALSE;
        }	
    }
	
    function get_menu_by_group($group) {
        $this->db->select('MenuID');
        $this->db->from('tbl_groupauthority');
        $this->db->where('GroupID', $group); 
        $query = $this->db->get();    
        
        if ($query->num_rows() > 0) {
            foreach ($query->result() as $row) {
                $menu_id[] = $row->MenuID;
            }    

            return $menu_id;
        }
        else {
            return FALSE;
        }  	
    }
	
    function get_menu_by_group1($group) {
        $this->db->select('MenuID');
        $this->db->from('tbl_groupauthority');
        $this->db->where('GroupID', $group); 
        $query = $this->db->get();    
        
        return $query->result();
    } */
}