>>>>>> fouten/chartomvang&layoutlijst&flexibel 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 user 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); } }