176 lines
8.7 KiB
PHP
176 lines
8.7 KiB
PHP
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Description of MY_Controller
|
|
* Algemene controller functies
|
|
*
|
|
* @author Theo Weijmer
|
|
* @date 12-07-2011
|
|
*
|
|
*
|
|
*/
|
|
|
|
|
|
class MY_Controller extends CI_Controller{
|
|
// public $version = '1.5'; // 14 november 2017
|
|
// public $version = '1.9'; //13 feb 2018
|
|
// public $version = '1.14'; //21 maart 2018
|
|
// public $version = '1.17.20'; //21dec 2018
|
|
// public $version = '1.17.25'; //maart 2019 ijkpuntengrafiek
|
|
// public $version = '1.17.26';//ijkpuntengrafiek meetfout
|
|
// public $version = '1.17.27';//ijkpuntengrafiek gemiddeld in sop + laatste dingen
|
|
|
|
// public $version = '1.17.28';//optellen diversiteitsoverzicht, wisselen van org en schooljaar
|
|
// public $version = '1.17.29';//kopieren groepen divmeter po
|
|
// public $version = '1.17.30'; //nog iets vergeten
|
|
// public $version = '1.17.31'; //ophalen naam voor ijkpunten (bug) + onv, vold, goed, ook in grafiek
|
|
// public $version = '1.17.32'; //nieuwe html voor toelichting onderdelen + verwijzing hoofdstukkeuze nieuwe clusters
|
|
//public $version = '1.17.33'; //fout in verwijzing naar labels ijkpunten
|
|
// public $version = '1.17.34'; //fout in diversiteitsmeter/schoolgegevens en in SOP oud ondersteuning1.php
|
|
// public $version = '1.17.35'; //'weggooien' gebruiker als aut = 10 (medewerker) dan mag de aut =100 (geen toegang) gezet worden
|
|
// public $version = '1.17.36'; //ophalen gegevens + query inspectiemeters ontwikkelagenda
|
|
// public $version = '1.17.37'; //divmeter opslaan leerkracht en ondersteuningaantallen bij groepen
|
|
// public $version = '1.17.38'; //optellen aantal lln divmonitor
|
|
// public $version = '1.17.39'; //dq divmonitor
|
|
// public $version = '1.17.40'; //16 okt 2017 terugzetten functies in groepenmodel.js
|
|
// public $version = '1.17.44'; //laatste aspecten van sop compact
|
|
// public $version = '1.17.46'; //nov 3 html opgeschoond
|
|
// public $version = '1.17.47'; //foutend qs divmeter so, alttekst logo sop, slashes uit orgnaam pdf
|
|
// public $version = '1.17.48'; //mededeling als er geen budgetversie is.
|
|
// public $version = '1.17.49'; //schooljaar fout + inspectiemeter kleiner
|
|
// public $version = '1.17.51'; //datum in bestandsnaam compact sop + streepje
|
|
// public $version = '1.17.52'; //geen melding meer in flexibel sop als lijst buiten de sopperiode valt
|
|
// public $version = '1.17.53'; //divoverzicht po: organisaties zonder licentie worden niet getoond
|
|
// public $version = '1.17.54';//extra scoretype: included/involved/present/absent
|
|
// public $version = '1.17.55'; // flexibel sop
|
|
// public $version = '1.17.56'; // omvang extra ondersteuning: instrument + in compactsop
|
|
// public $version = '1.17.57'; // ophalen van kalenderjaren bij overzicht (monfinoverzicht2.js)
|
|
// public $version = '1.17.60'; // verbeteringen omvang extra ondersteuning: instrument + in compactsop
|
|
// public $version = '1.17.61'; // documenten genummerd
|
|
// public $version = '1.17.62'; // bijlage bij inlogmail
|
|
// public $version = '1.17.63'; // mogelijkheid tot toevoegen omschrijvingen bij scores
|
|
// public $version = '1.17.64'; // fout in ophalen scores ++ + - -- in matrix, individuele en schoolgemiddelden,
|
|
// public $version = '1.17.66'; // instrument diversiteit po 2203
|
|
// public $version = '1.17.67'; // logo en foto koko
|
|
// public $version = '1.17.70'; // bopropswop
|
|
// public $version = '1.17.72'; // data2mysql fout
|
|
// public $version = '1.17.73'; // 0-waarden aantal tlvs in omvang extra ondersteuning
|
|
// public $version = '1.17.75'; // mogelijkheid tot uitzetten extra ondersteuning in divmeters
|
|
// public $version = '1.17.76'; // cluster scans passend onderwijs
|
|
// public $version = '1.17.79'; // fout matrixfunctie
|
|
// public $version = '1.17.83'; // sophomepage
|
|
// public $version = '1.17.84'; // zichtbaarheid paginas afhankelijk van orgsoort
|
|
// public $version = '1.17.85'; // fouten divmeter po 2203 in compact
|
|
// public $version = '1.17.86'; // titels en headers sop
|
|
// public $version = '1.17.88'; // sopfout
|
|
// public $version = '1.17.89'; // printformulier
|
|
// public $version = '1.17.90'; // sops ordenen per eigen criterium
|
|
// public $version = '1.17.91'; // grafieken in 3d
|
|
// public $version = '1.17.92'; // Scan en Verbeteraanpak Pa.O.in Compact Sop
|
|
// public $version = '1.17.93';// stuur bijlage bij new wachtwoord
|
|
// public $version = '1.17.95';// verbeteringen invullijst, fout omvang
|
|
// public $version = '1.17.96';// nieuwe handleidingen
|
|
// public $version = '1.17.97';// omvang geen grafiek bij 0 resultaten
|
|
// public $version = '1.17.98';// instrumenten voor ouders
|
|
// public $version = '1.17.99';// instrumenten ook voor leerlingen
|
|
// public $version = '1.18.00';// alle instrumenten in het compact sop
|
|
// public $version = '1.18.02';// fout in resultaatmatrix
|
|
// public $version = '1.18.04';// invul status
|
|
// public $version = '1.18.05';// fout schoolgegevens compactsop
|
|
// public $version = '1.18.08';// kleurenfout
|
|
public $version = '1.18.12';// ambities per org
|
|
|
|
|
|
|
|
|
|
public $partituurid;
|
|
public $globProfielVersieID = 1;
|
|
public $userid; //id of the user that is logged in
|
|
public $orgid; //orgid of the user logged in
|
|
public $globorgid; //orgid which has been chosen by user (only BG and SUPERUSER)
|
|
public $userbg; // TRUE or FALSE for orgid if this org is BG
|
|
public $globisbg; // TRUE or FALSE for globorgid if this org is BG
|
|
public $userrole; //role of the nguser logged in dwz autorisatienivo van de eigen organisatie
|
|
// dus echt het nivo en niet het id van autorisatienivos
|
|
public $roleid;
|
|
public $super; //TRUE or FALSE for user SUPERUSER
|
|
public $writer; //TRUE or FALSE sets the write permission
|
|
public $ontwikkel=TRUE;
|
|
public $module;
|
|
public $selectedschool;
|
|
public $schooljaar;
|
|
public $rootpath;
|
|
public $dossierpath;
|
|
public $pdfpath;
|
|
public $beanstalkPipe;
|
|
public $compactsoppath;
|
|
|
|
function __construct(){
|
|
parent::__construct();
|
|
//$this->session->sess_destroy();
|
|
$this->userid = $this->session->userdata('userid');
|
|
$this->orgid = $this->session->userdata('orgid');
|
|
$this->userrole = $this->session->userdata('role');
|
|
$this->module = $this->session->userdata('module');
|
|
$this->selectedschool = $this->session->userdata('selectedschool');
|
|
$this->schooljaar = $this->session->userdata('schooljaar');
|
|
$this->nologin = FALSE;
|
|
$this->rootpath = str_replace('/public', '', $_SERVER['DOCUMENT_ROOT']);
|
|
$this->setApplicationPaths();
|
|
|
|
$this->lang->load('partituur',$this->config->item('language'));
|
|
$this->beanstalkPipe = 'monpas';
|
|
|
|
log_message('error', $this->userid ? $this->userid : 'GEEN USR BEKEND');
|
|
if($this->userid){
|
|
// if there is a user but no org or role user gets nologin_view
|
|
if(!$this->orgid || !$this->userrole || $this->userrole==''){
|
|
$this->session->sess_destroy();
|
|
redirect(base_url().'index.php/toner');
|
|
$this->nologin = TRUE;
|
|
}else{
|
|
$this->super = FALSE;
|
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, SUPERUSER)) $this->super=TRUE;
|
|
if(!$this->session->userdata('globorgid')) $this->Session_model->set_globorgid($this->orgid);
|
|
|
|
$this->globorgid= $this->session->userdata('globorgid');
|
|
$this->writer = $this->Autorisaties_model->check_write();
|
|
$this->roleid = $this->Autorisatienivos_model->get_fieldvalue(array('nivo'=>$this->userrole), 'id');
|
|
$this->userbg = $this->Organisaties_model->is_bg($this->orgid);
|
|
$this->globisbg = $this->Organisaties_model->is_bg($this->globorgid);
|
|
|
|
$where = array('partituur_organisatie_id'=>$this->globorgid, 'partituur_actief'=>1);
|
|
$this->load->model('ijkpartituur/Partituurs_model');
|
|
$partituur = $this->Partituurs_model->get_single_details($where);
|
|
if ($partituur) {$this->partituurid = $partituur->id; }
|
|
else $this->partituurid = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
function clean_input($post){
|
|
return str_replace('null', '', $this->db->escape_str($this->input->post($post), TRUE));
|
|
}
|
|
function check_online_status() {
|
|
if ( ! $this->uri->segment( 2 ) || $this->uri->segment( 1 ) == 'login' ) return TRUE;
|
|
if ( $this->uri->segment( 2 ) == 'reports' ) return TRUE;
|
|
if ( $this->session->userdata( 'userid' ) ) return TRUE;
|
|
return FALSE;
|
|
}
|
|
private function setApplicationPaths() {
|
|
// $this->base_path = MYROOTPATH;
|
|
// $this->dossierpath = $_ENV['DOSSIER']['DOSSIER_DOCUMENTS'];
|
|
// $this->pdfpath = $_ENV['DOSSIER']['PDF_DOCUMENTS'];
|
|
$this->dossierpath = '../dossier/';
|
|
$this->pdfpath='../pdfdossier/';
|
|
$this->partituurUpload='../tmp_uploads/';
|
|
$this->partituurSchatkist='../schatkist/';
|
|
$this->compactsoppath = MYROOTPATH.'documents/compactsops/';
|
|
}
|
|
|
|
function json($wat){
|
|
echo json_encode($wat);
|
|
}
|
|
}
|