You are here

public function FrxDocument::output in Forena Reports 7.3

Same name and namespace in other branches
  1. 7.4 FrxDocument.inc \FrxDocument::output()
3 calls to FrxDocument::output()
FrxCSVDoc::output in docformats/FrxCSVDoc.inc
FrxWordDoc::output in docformats/FrxWordDoc.inc
FrxXLSDoc::output in docformats/FrxXLSDoc.inc
9 methods override FrxDocument::output()
FrxCSVDoc::output in docformats/FrxCSVDoc.inc
FrxHtmlDoc::output in docformats/FrxHtmlDoc.inc
FrxMPDF::output in docformats/FrxMPDF.inc
FrxPrincePDF::output in docformats/FrxPrincePDF.inc
FrxSVGDoc::output in docformats/FrxSVGDoc.inc
Output SVG content type headers.

... See full list

File

./FrxDocument.inc, line 65
FrxDocument.inc Given a report, render the appropriate output given the document format. @author davidmetzler

Class

FrxDocument
@file FrxDocument.inc Given a report, render the appropriate output given the document format. @author davidmetzler

Code

public function output($output) {
  if ($this->content_type) {
    header('Content-Type: ' . $this->content_type . ' ;charset=' . $this->charset);
    header('Cache-Control:');
    header('Pragma:');
    $file_name = basename($_GET['q']);
    header('Content-Disposition: attachment; filename="' . $file_name . '"');
    header('Cache-Control: must-revalidate');
    print $output;
    return TRUE;
  }
  else {
    return FALSE;
  }
}