35 lines
963 B
PHP
35 lines
963 B
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/** Compactop_model juni 2019 */
|
|
|
|
class Compactsop_model extends MY_Model
|
|
{
|
|
|
|
protected $tablename = 'tb_compactsops';
|
|
|
|
function __construct()
|
|
{
|
|
parent::__construct();
|
|
$models = array();
|
|
$this->load->model($models);
|
|
}
|
|
|
|
function downloadCompactSop($id)
|
|
{
|
|
$this->load->helper('download');
|
|
|
|
$sop = $this->get(['id'=>$id]);
|
|
$sop= $sop[0];
|
|
header( 'Content-Description: File Transfer' );
|
|
header( 'Content-Type: application/pdf' );
|
|
header( 'Content-disposition:inline; filename="' .$sop->pdfnaam.'"');
|
|
header( 'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0' );
|
|
header( 'Pragma: public' );
|
|
header( 'Content-Length: ' . filesize( $this->compactsoppath.$sop->pdfnaam ) );
|
|
readfile( $this->compactsoppath . $sop->pdfnaam );
|
|
}
|
|
|
|
|
|
|
|
|
|
} |