tussenopslag

This commit is contained in:
Monique
2022-09-09 16:44:27 +02:00
parent 946af1cbc0
commit a663f21b7e
5 changed files with 15 additions and 15 deletions
@@ -138,10 +138,11 @@ class Compactsop extends MY_Controller{
$compacteonderdelen = $compact->getCompacteOnderdelen();
$schoolID = $this->globorgid;
$html = (new Compactepaginas($compacteonderdelen, $paginas))->getHtml();
$padnaam = $schoolID . $schooljaarnr;
file_put_contents(MYROOTPATH.'public/tmp/temp'.$schoolID.$schooljaarnr.'.html', $html);
file_put_contents(MYROOTPATH.'public/tmp/temp'.$schoolID.'.html', $html);
echo json_encode($this->globorgid);
echo json_encode($padnaam);
}
public function uploadLogo($schoolID)
@@ -158,14 +159,18 @@ class Compactsop extends MY_Controller{
//TODO: unlink eventueel oud logo
$logo = $this->Schooldetails_model->getLogo($schoolID);
$padNaam = $savePath.$logo;
// unlink($padNaam);
$this->Schooldetails_model->update_record_where(['logo'=>$filename], ['organisatie_id' =>$schoolID]);
}
function getLogo(){
$schoolID = $this->clean_input('schoolID');
$savePath = MYROOTPATH.'public/images/logos/';
$logo =$this->Schooldetails_model->getLogo($schoolID);
$this->json($logo);
$padNaam = $savePath.$logo;
chmod($padNaam, '0777');
$this->json($padNaam);
}
}