Certi = base_certificate::get('certificate_id'); $this->Token = base_certificate::get('token'); if(empty($this->Certi) ||empty($this->Token)){ $this->pagedata['license']=false; }else{ $this->pagedata['license']=true; } $this->pagedata['certi_id']=$this->Certi; $this->pagedata['debug']=false; $this->page('certificate.html'); } function download(){ header("Content-type:application/octet-stream;charset=utf-8"); header("Content-Type: application/force-download"); header("Cache-control: private"); $this->fileName = 'CERTIFICATE.CER'; header("Content-Disposition:filename=".$this->fileName); $this->Certi = base_certificate::get('certificate_id'); $this->Token = base_certificate::get('token'); echo $this->Certi; echo '|||'; echo $this->Token; } function delete(){ $this->begin(); base_certificate::del_certificate(); $this->end(); } }