162 lines
5.8 KiB
PHP
162 lines
5.8 KiB
PHP
<?php
|
|
//RTG-WAVE-3.4-CHARGE-OFFS-Letter-2-4-ALL-BUREAUS
|
|
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
require("../functions.php");
|
|
require("creditor_addresses.php");
|
|
// Define variables for file names
|
|
$pdf_name = "RTG-WAVE-3.4-CHARGE-OFFS-Letter-2-4-ALL-BUREAUS.pdf";
|
|
$html_format_name = "RTG-WAVE-3.4-CHARGE-OFFS-Letter-2-4-ALL-BUREAUS_FORMAT.html";
|
|
|
|
//collect required POST form's input
|
|
//$cra_report = $_POST["cra_report"];
|
|
$cra_report = 1;
|
|
$cra_data = $_POST["cr_data"];
|
|
$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"];
|
|
$ssn = $_POST["ssn"];
|
|
$dob = $_POST["dob"];
|
|
$personal_tracking_number = setTextHightlight(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"]) : "";
|
|
|
|
$image_heading = "";
|
|
$image_heading_content = getImageHeaingConetnt($first_name, $last_name,$street_no, $street_name, $city, $state, $dob, $ssn);
|
|
|
|
$image1 = $_POST["image1"];
|
|
$image2 = $_POST["image2"];
|
|
$image3 = $_POST["image3"];
|
|
$image4 = $_POST["image4"];
|
|
$image5 = $_POST["image5"];
|
|
|
|
for($i=1;$i<= 5;$i++){
|
|
if(isset($_FILES["image".$i]["name"]) && !empty($_FILES["image".$i]["name"])){
|
|
$image_heading = $image_heading_content;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(!empty($image1) ||
|
|
!empty($image2) ||
|
|
!empty($image3) ||
|
|
!empty($image4) ||
|
|
!empty($image5)){
|
|
$image_heading = $image_heading_content;
|
|
}
|
|
|
|
$report_file_name = $_POST["report_file_name"];
|
|
|
|
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 = setTextHightlight(trim(nl2br($_POST["credit_bureau_name_address"])));
|
|
}
|
|
|
|
// 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"])){
|
|
|
|
$varList1 = 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__',
|
|
'__IMAGE_HEADING__'
|
|
);
|
|
|
|
|
|
$valueList1 = array(
|
|
// $cra_report,
|
|
$cra_data,
|
|
setTextHightlight($first_name),
|
|
setTextHightlight($last_name),
|
|
setTextHightlight($street_no),
|
|
setTextHightlight($street_name),
|
|
setTextHightlight($city),
|
|
setTextHightlight($state),
|
|
$today,
|
|
setTextHightlight($personal_tracking_number),
|
|
setTextHightlight($credit_bureau_name_address),
|
|
//$sincerely,
|
|
$alleged_account,
|
|
$alleged_account_desc,
|
|
$image_heading
|
|
);
|
|
|
|
for($i=1;$i<= 5;$i++){
|
|
if(isset($_FILES["image".$i]["name"]) && !empty($_FILES["image".$i]["name"])){
|
|
|
|
$imagefilename[$i] = mt_rand(0, 1000).time().'_'.$_FILES["image".$i]["name"];
|
|
upload_media($imagefilename[$i],$_POST['image'.$i]);
|
|
$deletionArray[] = $imagefilename[$i];
|
|
|
|
|
|
|
|
$varList[] = "__image".$i."__";
|
|
$valueList[] = $imagefilename[$i];
|
|
|
|
$start = "__START".$i."__";
|
|
$end = "__END".$i."__";
|
|
|
|
$html = str_replace(array($start,$end),array("",""),$html);
|
|
|
|
// $serialLineHTML = $serialLineHTML.$fileNameArray[$i-1]."<br/>";
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
$cra_report = $cra_data;
|
|
include '../common_image_file.php';
|
|
}
|
|
|
|
$varList = array_merge($varList,$varList1);
|
|
$valueList = array_merge($valueList,$valueList1);
|
|
require("../common_file.php");
|
|
|
|
} else {
|
|
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."RTG-WAVE-3.4-CHARGE-OFFS-Letter-2-4-ALL-BUREAUS.html";
|
|
header("Location:".$url);
|
|
}
|
|
|
|
?>
|