inital commit
This commit is contained in:
150
webroot/V3.0/STAFF-2109-BUREAUS-SUPER-METRO-2109.php
Normal file
150
webroot/V3.0/STAFF-2109-BUREAUS-SUPER-METRO-2109.php
Normal file
@@ -0,0 +1,150 @@
|
||||
<?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 = "STAFF-2109-BUREAUS-SUPER-METRO-2109.pdf";
|
||||
$html_format_name = "STAFF-2109-BUREAUS-SUPER-METRO-2109_FORMAT.html";
|
||||
|
||||
//collect required POST form's input
|
||||
//$cra_report = $_POST["cra_report"];
|
||||
$cra_report = 1;
|
||||
$cra_data = $_POST["cr_data"];
|
||||
//$credit_bureau_report_num = $_POST["credit_bureau_report_num"];
|
||||
$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"]) : "";
|
||||
$dob = $_POST["dob"];
|
||||
$ssn = $_POST["ssn"];
|
||||
|
||||
$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");
|
||||
$day = date('d',strtotime($today));
|
||||
$month = date('M',strtotime($today));
|
||||
$year = date('Y',strtotime($today));
|
||||
$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__',
|
||||
'__sincerely__',
|
||||
'__PERSONAL_TRACKING_NUMBER__',
|
||||
'__credit_bureau_name_address__',
|
||||
//'__credit_bureau_report_num__',
|
||||
//'__sincerely__',
|
||||
//'__ALLEGED_ACCOUNT__',
|
||||
'__ALLEGED_ACCOUNT_DESC__',
|
||||
'__DOB__',
|
||||
'__SSN__',
|
||||
'__DAY__',
|
||||
'__MONTH__',
|
||||
'__YEAR__'
|
||||
);
|
||||
|
||||
|
||||
$valueList1 = array(
|
||||
$cra_report,
|
||||
setTextHightlight($first_name),
|
||||
setTextHightlight($last_name),
|
||||
setTextHightlight($street_no),
|
||||
setTextHightlight($street_name),
|
||||
setTextHightlight($city),
|
||||
setTextHightlight($state),
|
||||
$today,
|
||||
setTextHightlight($sincerely),
|
||||
setTextHightlight($personal_tracking_number),
|
||||
setTextHightlight($credit_bureau_name_address),
|
||||
//$credit_bureau_report_num,
|
||||
//$sincerely,
|
||||
//$alleged_account,
|
||||
setTextHightlight($alleged_account_desc),
|
||||
setTextHightlight($dob),
|
||||
setTextHightlight($ssn),
|
||||
$day,
|
||||
$month,
|
||||
$year
|
||||
);
|
||||
|
||||
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']."STAFF-2109-BUREAUS-SUPER-METRO-2109.html";
|
||||
header("Location:".$url);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user