initial commit
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Partituur_home {
|
||||
/**
|
||||
* Index Page for this controller.
|
||||
*
|
||||
* Maps to the following URL
|
||||
* http://example.com/index.php/welcome
|
||||
* - or -
|
||||
* http://example.com/index.php/welcome/index
|
||||
* - or -
|
||||
* Since this controller is set as the default controller in
|
||||
* config/routes.php, it's displayed at http://example.com/
|
||||
*
|
||||
* So any other public methods not prefixed with an underscore will
|
||||
* map to /index.php/welcome/<method_name>
|
||||
* @see http://codeigniter.com/user_guide/general/urls.html
|
||||
*/
|
||||
|
||||
var $tokensecret;
|
||||
|
||||
function __construct(){
|
||||
|
||||
$CI =& get_instance();
|
||||
$this->ci = $CI;
|
||||
|
||||
$models = array('shared/Organisaties_model',
|
||||
'shared/Users_model',
|
||||
'ijkpartituur/Pages_model',
|
||||
'ijkpartituur/Partituurs_model',
|
||||
'ijkpartituur/Reports_model',
|
||||
'ijkpartituur/Modhelpdesk');
|
||||
$this->ci->load->model($models);
|
||||
|
||||
}
|
||||
|
||||
public function index(){
|
||||
if(!$this->ci->userid){
|
||||
$this->ci->load->helper('url');
|
||||
$this->ci->load->view('login_view');
|
||||
}else {
|
||||
// afhankelijk van de inloggegevens een pagina openen
|
||||
// home_view verwacht een array $submenu
|
||||
// als er geen partituur is, moet de pagina pijlers met popup nieuwe partituur worden geopend
|
||||
// tenzij de organisatie = system
|
||||
$orgnaam = $this->ci->Organisaties_model->get_record_by_id($this->ci->globorgid, 'naamkort');
|
||||
$role = $this->ci->session->userdata('role');
|
||||
if ($this->ci->globorgid == SYSTEM){
|
||||
$menu = $this->ci->Pages_model->get_usermenu_ls($role, 0);
|
||||
}
|
||||
else {
|
||||
$menu = $this->ci->Pages_model->get_usermenu_ls($role, 1);
|
||||
}
|
||||
$reports = $this->ci->Reports_model->get_reports_by_level();
|
||||
$data = array("menu" => $menu ,
|
||||
"orgnaam" => $orgnaam ,
|
||||
"fullname" => $this->ci->Users_model->get_fullname($this->ci->userid) ,
|
||||
'reports' => $reports
|
||||
);
|
||||
|
||||
$this->ci->load->view('ijkpartituur/partituur_view', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function loadPartituur(){
|
||||
$this->ci->session->userdata('partituur');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user