- system/ vervangen door CodeIgniter 3.4.5 (pocketarc/codeigniter, PHP 8.2-8.5 compatibel) - config.php, mimes.php, user_agents.php en error-views bijgewerkt naar 3.4.5 - composer.json: php-constraint "^7.4 || ^8.0" zodat composer install op 8.3 werkt - PHP 8-fatals opgelost: count()/array-functies op FALSE/null, rekenen met lege strings, delen door nul, property zetten op FALSE, curly-brace string offsets, ongedefinieerde constanten, foute curl_setopt in Phantom_model::create_img - dynamic properties gedeclareerd in libraries, optionele parameters voor verplichte opgelost - vergelijkingen waar '' == 0 in PHP 8 anders uitvalt gecast naar (int) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
72 lines
2.0 KiB
PHP
72 lines
2.0 KiB
PHP
<?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;
|
|
var $ci;
|
|
|
|
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');
|
|
}
|
|
|
|
|
|
}
|