43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/** Menus_model februari 2015 */
|
|
|
|
class Menus_model extends MY_Model{
|
|
|
|
|
|
protected $tablename = 'tb_menus';
|
|
|
|
function __construct(){
|
|
parent::__construct();
|
|
$models = array('');
|
|
$this->load->model($models);
|
|
}
|
|
|
|
function getmenu($module, $autorisatienivo){
|
|
$this->sql="SELECT id, naam, paginanaam,holdernaam
|
|
FROM tb_menus
|
|
WHERE ( {$autorisatienivo} & autorisatienivo)
|
|
AND ((module = {$module}) OR ({$module} !=0 && module = 9))
|
|
AND valtonder = 0
|
|
ORDER BY volgorde";
|
|
return $this->get_query_result();
|
|
}
|
|
function getsubmenus($pageid,$autorisatienivo){
|
|
$this->sql="SELECT id, naam, paginanaam, holdernaam, volgorde
|
|
FROM tb_menus
|
|
WHERE ( {$autorisatienivo} & autorisatienivo)
|
|
AND valtonder= $pageid
|
|
ORDER BY volgorde" ;
|
|
return $this->get_query_result();
|
|
}
|
|
|
|
function gettypes($modulenr){
|
|
$this->sql="SELECT naam, paginanaam, sop
|
|
FROM tb_menus
|
|
WHERE sop IS NOT NULL
|
|
AND module = {$modulenr}
|
|
ORDER BY volgorde" ;
|
|
return $this->get_query_result();
|
|
}
|
|
|
|
} |