Odyssey
whatsnew.prg
1 <?php
2 require_once("$admLibrary/ck_aticket.i");
3 
4  $filename = "/home/httpd/homecu/admin/2_factor_admin_notice.pdf";
5 
6 if (is_readable($filename)) {
7 
8  $pdffile = fopen("$filename", "r");
9  $s_array=fstat($pdffile);
10  $size=$s_array["size"];
11  header("Content-Type: application/pdf");
12  header("Content-length: $size");
13  fpassthru($pdffile);
14  pclose ($pdffile);
15  exit;
16 
17 } else {
18  header("Status: 404 Not Found");
19  print <<<EOF
20 <HTML><HEAD>
21 <TITLE>404 Not Found</TITLE>
22 </HEAD><BODY>
23 <H1>Not Found</H1>
24 The requested URL {$_SERVER['PHP_SELF']} was not found on this server.<P>
25 <HR>
26 <ADDRESS>{$_SERVER['SERVER_SIGNATURE']}</ADDRESS>
27 </BODY></HTML>
28 EOF;
29 }
30 ?>