-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathFillTemplate.php
More file actions
28 lines (24 loc) · 798 Bytes
/
FillTemplate.php
File metadata and controls
28 lines (24 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* Create instsance of Custom Template Engine, and display template
* filled with REDcap data on Fill Template page.
*/
$customTemplateEngine = new \BCCHR\CustomTemplateEngine\CustomTemplateEngine();
$customTemplateEngine->setPaths();
if ($_POST["participantID"] == null) { exit(1);} // PHP8 compatability fix; can't pass a blank participantID scalar. Dan Evans 2023-06-09
if (sizeof($_POST["participantID"]) == 1)
{
/**
* Include REDCap header.
*/
require_once APP_PATH_DOCROOT . "ProjectGeneral/header.php";
$customTemplateEngine->generateFillTemplatePage();
/**
* Include REDCap footer.
*/
require_once APP_PATH_DOCROOT . "ProjectGeneral/footer.php";
}
else
{
$customTemplateEngine->batchFillReports();
}