function fillpdf_parse_uri in FillPDF 6
Same name and namespace in other branches
- 7.2 fillpdf.module \fillpdf_parse_uri()
- 7 fillpdf.module \fillpdf_parse_uri()
Get the data and form that need to be merged, from the $_GET, and print the PDF @seealso fillpdf_pdf_link for $_GET params
1 string reference to 'fillpdf_parse_uri'
- fillpdf_menu in ./
fillpdf.module - Implementation of hook_menu().
File
- ./
fillpdf.module, line 158 - Allows mappings of PDFs to site content
Code
function fillpdf_parse_uri() {
$sample = $_GET['sample'];
// is this just the PDF populated with sample data?
$fid = $_GET['fid'];
$nids = $webforms = array();
$force_download = FALSE;
$flatten = TRUE;
if ($_GET['nid'] || $_GET['nids']) {
$nids = $_GET['nid'] ? array(
$_GET['nid'],
) : $_GET['nids'];
}
if ($_GET['webform'] || $_GET['webforms']) {
$webforms = $_GET['webform'] ? array(
$_GET['webform'],
) : $_GET['webforms'];
}
if (isset($_GET['download']) && (int) $_GET['download'] == 1) {
$force_download = TRUE;
}
if (isset($_GET['flatten']) && (int) $_GET['flatten'] == 0) {
$flatten = FALSE;
}
fillpdf_merge_pdf($fid, $nids, $webforms, $sample, $force_download, FALSE, $flatten);
}