48 lines
1.3 KiB
PHP
48 lines
1.3 KiB
PHP
|
|
<?php
|
|
date_default_timezone_set('America/Chicago');
|
|
require dirname( __DIR__, 4 ) . "/portal/dashboard/core/api/php/init.php";
|
|
require dirname( __DIR__, 4 ) . "/portal/dashboard/core/api/php/send_email2.php";
|
|
require dirname( __DIR__, 4 ) . "/portal/dashboard/core/api/php/libs/dompdf/vendor/autoload.php";
|
|
require dirname( __DIR__, 4 ) . "/portal/dashboard/core/api/php/functions.php";
|
|
|
|
// https://www15.cradle2careertx.xyz/portal/dashboard/services/forms/request.php
|
|
|
|
|
|
|
|
if(Input::get('access')){
|
|
$subdomain = getSubdomain2();
|
|
$domain = get_subdomain_managed_domain_new_way($subdomain);
|
|
|
|
//Read the filename
|
|
$filename = Input::get('filename');
|
|
$systemuser = Input::get('systemuser');
|
|
$category = Input::get('category');
|
|
|
|
//Check the file exists or not
|
|
$file = "/mnt/{$systemuser}/forms/{$category}/{$filename}";
|
|
if(file_exists($file)) {
|
|
|
|
//Define header information
|
|
header('Content-Description: File Transfer');
|
|
header('Content-Type: application/pdf');
|
|
header("Expires: 0");
|
|
header('Content-Disposition: attachment; filename="'.basename($file).'"');
|
|
header('Content-Length: ' . filesize($file));
|
|
header('Pragma: public');
|
|
|
|
//Clear system output buffer
|
|
// flush();
|
|
|
|
//Read the size of the file
|
|
readfile($file);
|
|
|
|
//Terminate from the script
|
|
// die();
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|