comactsops valtonderorgs
This commit is contained in:
@@ -57,17 +57,27 @@ class Compactsop extends MY_Controller{
|
||||
echo json_encode($soort);
|
||||
}
|
||||
|
||||
|
||||
function getSchooljaren(){
|
||||
if (!$this->userid) die;
|
||||
$schooljaren = $this->Schooljaren_model->getschooljaren();
|
||||
|
||||
echo json_encode($schooljaren);
|
||||
}
|
||||
|
||||
function getSchooljarenEnOrgs(){
|
||||
if (!$this->userid) die;
|
||||
$schooljaren = $this->Schooljaren_model->getschooljaren();
|
||||
// $orgs = $this->
|
||||
echo json_encode($schooljaren);
|
||||
$orgs = $this->Organisaties_model->get_alle_onderliggende_orgs($this->globorgid);
|
||||
|
||||
echo json_encode(['schooljaren'=>$schooljaren,
|
||||
'organisaties'=>$orgs ]);
|
||||
}
|
||||
|
||||
function getCompactSop(){
|
||||
if (!$this->userid) die;
|
||||
$orgid = $this->globorgid;
|
||||
$schooljaar = $this->uri->segment(4);
|
||||
$orgid = $this->clean_input("orgID");
|
||||
$schooljaar = $this->clean_input("schooljaarID");
|
||||
$compactsopID = $this->Compactsop_model->get_fieldvalue(['organisatie_id'=>$orgid, 'schooljaarnummer'=>$schooljaar], 'id');
|
||||
echo json_encode($compactsopID);
|
||||
}
|
||||
@@ -79,9 +89,10 @@ class Compactsop extends MY_Controller{
|
||||
|
||||
function getOnderdelenEnVersies(){
|
||||
if (!$this->userid) die;
|
||||
$schooljaar = $this->uri->segment(4);
|
||||
$orgsoort = $this->uri->segment(5);
|
||||
$compacteversies = new Compacteversies($schooljaar, $orgsoort);
|
||||
$schooljaar = $this->clean_input('schooljaarID');
|
||||
$orgsoort = $this->clean_input('orgsoort');
|
||||
$orgid = $this->clean_input('orgID');
|
||||
$compacteversies = new Compacteversies($schooljaar, $orgid, $orgsoort);
|
||||
$onderdelen = $compacteversies->getOnderdelen();
|
||||
|
||||
echo json_encode($onderdelen);
|
||||
@@ -89,9 +100,10 @@ class Compactsop extends MY_Controller{
|
||||
|
||||
function getOrganisatiegegevens(){
|
||||
if (!$this->userid) die;
|
||||
$school = $this->Schooldetails_model->getschool($this->globorgid);
|
||||
$orgid = $this->uri->segment(4);
|
||||
$school = $this->Schooldetails_model->getschool($orgid);
|
||||
if(!$school){
|
||||
$school = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||
$school = $this->Organisaties_model->get_record_by_id($orgid);
|
||||
}
|
||||
echo json_encode($school);
|
||||
}
|
||||
@@ -99,7 +111,6 @@ class Compactsop extends MY_Controller{
|
||||
function saveSchool(){
|
||||
if (!$this->userid) die;
|
||||
$id = $this->clean_input('id');
|
||||
if($id != $this->globorgid) return;
|
||||
$straat = strip_slashes($this->clean_input('straat'));
|
||||
$plaats = strip_slashes($this->clean_input('plaats'));
|
||||
$foon = strip_slashes($this->clean_input('telefoon'));
|
||||
@@ -131,13 +142,14 @@ class Compactsop extends MY_Controller{
|
||||
function maakPDF(){
|
||||
if (!$this->userid) die;
|
||||
$schooljaarnr = $this->clean_input('schooljaarnr');
|
||||
$orgid = $this->clean_input('orgID');
|
||||
$onderdelen = $this->input->post('onderdelen');
|
||||
$omvangjaren = $this->clean_input('jaren');
|
||||
$paginas = $this->clean_input('paginas');
|
||||
|
||||
$compact = new Compacteonderdelen($schooljaarnr, $onderdelen, $omvangjaren);
|
||||
$compact = new Compacteonderdelen($schooljaarnr, $onderdelen, $omvangjaren, $orgid);
|
||||
$compacteonderdelen = $compact->getCompacteOnderdelen();
|
||||
$schoolID = $this->globorgid;
|
||||
$schoolID = $orgid;
|
||||
$html = (new Compactepaginas($compacteonderdelen, $paginas))->getHtml();
|
||||
$padnaam = $schoolID . $schooljaarnr;
|
||||
file_put_contents(MYROOTPATH.'public/tmp/temp'.$schoolID.$schooljaarnr.'.html', $html);
|
||||
|
||||
Reference in New Issue
Block a user