-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLettersView.php
More file actions
25 lines (17 loc) · 798 Bytes
/
LettersView.php
File metadata and controls
25 lines (17 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
<?php
include_once 'Include.php';
# Check to make sure the person is logged in and has the correct permission
if ((!hasPermission("C")) && (!hasPermission("D")) && (!hasPermission("B"))) {
header(redirect("index.php", "?warning=" . urlencode("You do not have access to this page")));
}
# Check to make sure there was an application id passed into the page
if (!isset($_GET['letterId'])) {
header(redirect("FindApplicants.php", "?warning=" . urlencode("Must select an application to upload for")));
}
$sql = "select LETTER from LETTER_OF_REC where LETTER_ID = '" . $_GET['letterId'] . "'";
$result = nextRow(queryDB($sql));
$file = stripslashes($result['LETTER']);
header('Content-disposition: inline; filename="letter.pdf"');
header('Content-type: application/pdf');
echo $file;
?>