43 lines
1.4 KiB
PHP
43 lines
1.4 KiB
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
class Lijsten extends MY_Controller{
|
|
|
|
function __construct(){
|
|
parent::__construct();
|
|
$models = array("shared/Autorisaties_model",
|
|
"Docx_model",
|
|
"monpas/Filledversions_model",
|
|
"monpas/Scores_model",
|
|
"monpas/Sop_model",
|
|
"monpas/Sopinhouden_model",
|
|
"Phantom_model");
|
|
$this->load->model($models);
|
|
$this->load->helper('string');
|
|
if ( ! $this->check_online_status() ) {
|
|
echo json_encode( array('offline' => TRUE) );
|
|
die;
|
|
};// if
|
|
}
|
|
function getorganisaties(){
|
|
if (!$this->userid) die;
|
|
$orgid =$this->globorgid;
|
|
$organisatie = $this->Organisaties_model->getorg($orgid);
|
|
$swv = $this->Organisaties_model->getorgstructuur($orgid);
|
|
echo json_encode(array("swv" =>$swv,
|
|
"targetorg" =>$organisatie));
|
|
}
|
|
function getlijsten(){
|
|
if (!$this->userid) die;
|
|
$orgid = $this->uri->segment(4);
|
|
$module = $this->session->userdata['module'];
|
|
$lijsten = $this->Filledversions_model->getlijsten($orgid,$module);
|
|
echo json_encode($lijsten);
|
|
}
|
|
function deletelijst(){
|
|
if (!$this->userid || $this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <=0) die;
|
|
$fvid = $this->uri->segment(4);
|
|
$where = array("filledversion_id" => $fvid);
|
|
$this->Scores_model->delete_record_where($where);
|
|
$this->Filledversions_model->delete_record($fvid);
|
|
echo json_encode('ok');
|
|
}
|
|
} |