Files
RTG/webroot/V3.0/RTG-WAVE-3.4-CHARGE-OFFS-Letter-8-COLLECTOR-CREDITOR-of-COFF.php
2026-06-19 20:08:01 +06:00

98 lines
3.4 KiB
PHP

<?php
require("../functions.php");
require("creditor_addresses.php");
// Define variables for file names
$pdf_name = "RTG-WAVE-3.4-CHARGE-OFFS-Letter-8-COLLECTOR-CREDITOR-of-COFF.pdf";
$html_format_name = "RTG-WAVE-3.4-CHARGE-OFFS-Letter-8-COLLECTOR-CREDITOR-of-COFF_FORMAT.html";
//collect required POST form's input
//$cra_report = $_POST["cra_report"];
$cra_report = 1;
$first_name = $_POST["first_name"];
$last_name = $_POST["last_name"];
$street_no = $_POST["street_no"];
$street_name = $_POST["street_name"];
$city = $_POST["city"];
$state = $_POST["state"];
$personal_tracking_number = getPersonalTrackingNumber();//$_POST["personal_tracking_number"];
$credit_bureau_name_address = nl2br($_POST["credit_bureau_name_address"]);
$sincerely = $_POST["sincerely"];
$alleged_account = isset($_POST["alleged_account"]) ? nl2br($_POST["alleged_account"]) : "";
$alleged_account_desc = isset($_POST["alleged_account_desc"]) ? nl2br($_POST["alleged_account_desc"]) : "";
$report_file_name = $_POST["report_type"];
// if($report_file_name == "1"){
// $report_name_prefix = "Experian";
// $credit_bureau_name_address = getExperianAddress();
// } else if($report_file_name == "2"){
// $report_name_prefix = "Equifax Confirmation";
// $credit_bureau_name_address = getEquifaxAddress();
// } else if($report_file_name == "3"){
// $report_name_prefix = "TransUnion File";
// $credit_bureau_name_address = getTransUnionAddress();
// } else if($report_file_name == "0"){
// $report_name_prefix = "";
// $credit_bureau_name_address = '<table style="width:100%"><tr><td>'.nl2br($_POST["credit_bureau_name_address"]).'</td></tr></table>';
// }
// the unique pdf filename which will be saved on server
$file_name = mt_rand(0, 1000).time().'_'.$pdf_name;
if(isset($cra_report)){
//get html content from pre defined format
$today = date("d M, Y");
$html = file_get_contents($html_format_name);
//echo $html;exit;
if(empty($_POST["clientId"])){
$varList = array(
// '__CRA_REPORT__',
'__FIRST_NAME__',
'__LAST_NAME__',
'__STREET_NO__',
'__STREET_NAME__',
'__CITY__',
'__STATE__',
'__TODAY__',
//'__PERSONAL_TRACKING_NUMBER__',
'__credit_bureau_name_address__',
//'__sincerely__',
'__ALLEGED_ACCOUNT__',
'__ALLEGED_ACCOUNT_DESC__'
);
$valueList = array(
// $cra_report,
setTextHightlight($first_name),
setTextHightlight($last_name),
setTextHightlight($street_no),
setTextHightlight($street_name),
setTextHightlight($city),
setTextHightlight($state),
$today,
//$personal_tracking_number,
$credit_bureau_name_address,
//$sincerely,
$alleged_account,
$alleged_account_desc
);
require("../common_file.php");
}
} else {
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."RTG-WAVE-3.4-CHARGE-OFFS-Letter-8-COLLECTOR-CREDITOR-of-COFF.html";
header("Location:".$url);
}
?>