CMS
Version 3.9
generate.inc
Go to the documentation of this file.
1
<?php
2
Fakoli::using
(
"pdf"
);
3
4
$uri
= $_GET[
"uri"
];
5
6
$file
= basename(preg_replace(
"/\\?.*/"
,
""
,
$uri
)) .
".pdf"
;
7
8
$pdf
=
new
PDF
(
$uri
,
false
, isset(
$user
));
9
$output
=
$pdf
->generate();
10
$size
= strlen(
$output
);
11
12
header(
"Content-Type: application/pdf"
);
13
header(
"Content-Disposition: attachment;filename=\""
.
$file
.
"\""
);
14
header(
"Content-Length: $size"
);
15
echo
$output
;
16
?>
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
PDF
Definition:
pdf.inc:359
$user
global $user
Definition:
comment_form.inc:16
$uri
$uri
Definition:
generate.inc:4
$output
$output
Definition:
generate.inc:9
$pdf
$pdf
Definition:
generate.inc:8
$file
$file
Definition:
generate.inc:6
$size
$size
Definition:
generate.inc:10
code
cms.sonjara.com
cms
components
pdf
handlers
generate.inc
Generated on Tue Mar 23 2021 15:36:13 for CMS by
1.9.1