inital commit
This commit is contained in:
212
webroot/V2.0/RTG-med-COLLECTIONS-cra.php
Normal file
212
webroot/V2.0/RTG-med-COLLECTIONS-cra.php
Normal file
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
require("../functions.php");
|
||||
// Define variables for file names
|
||||
$pdf_name = "RTG-med-COLLECTIONS-cra.pdf";
|
||||
$html_format_name = "RTG-med-COLLECTIONS-cra_FORMAT.html";
|
||||
|
||||
|
||||
//collect required POST form's input
|
||||
$cra_report = $_POST["cra_report"];
|
||||
$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 = "";
|
||||
$sincerely = $_POST["sincerely"];
|
||||
|
||||
$report_file_name = $_POST["report_file_name"];
|
||||
if($report_file_name == "1"){
|
||||
$report_name_prefix = "Experian";
|
||||
|
||||
$credit_bureau_name_address = '<table style="width:100%;font-size:12">
|
||||
<tr><td>Lee Lundy Experian</td><td>Experian NCAC</td><td>Experian NCAC</td><td>Experian NCAC</td><td>Ann Sterling ( or ACTING VP/AGC)</td></tr>
|
||||
<tr><td>701 Experian Parkway</td><td>PO Box 9701</td><td>PO Box 2002</td><td>PO Box 4500</td><td>475 Anton Blvd</td></tr>
|
||||
<tr><td>Allen, TX 75013</td><td>Allen, TX. 75013</td><td>Allen ,TX 75013</td><td>Allen, TX 75013</td><td>Costa Mesa, CA 92626</td></tr>
|
||||
|
||||
</table> ';
|
||||
} else if($report_file_name == "2"){
|
||||
$report_name_prefix = "Equifax Confirmation";
|
||||
$credit_bureau_name_address = '<table style="width:100%">
|
||||
<tr><td>Katherine Dunn</td><td>Equifax Information Services</td><td>Equifax Information Services</td></tr>
|
||||
<tr><td>Assistant General Counsel</td><td>PO BOX 740241</td><td>PO BOX 740256</td></tr>
|
||||
<tr><td>Equifax LLC</td><td>Atlanta, GA 30374</td><td>Atlanta, GA 30374</td></tr>
|
||||
<tr><td>1550 Peachtree St</td><td></td><td></td></tr>
|
||||
<tr><td>NE Atlanta, GA 30309</td><td></td><td></td></tr>
|
||||
</table> ';
|
||||
} else if($report_file_name == "3"){
|
||||
|
||||
$report_name_prefix = "TransUnion File";
|
||||
|
||||
$credit_bureau_name_address = '<table style="width:100%">
|
||||
<tr><td>Gary S. Friedlander</td><td>TransUnion</td><td>TransUnion</td></tr>
|
||||
<tr><td>Vice President & Division General Counsel for TransUnion LLC,</td><td>PO Box 1000</td><td>PO Box 2000</td></tr>
|
||||
<tr><td>Office of the General Counsel/td><td>Chester, PA</td><td>Chester, PA</td></tr>
|
||||
<tr><td>Transunion Corp.</td><td>19022-1000</td><td>19016-2000</td></tr>
|
||||
|
||||
<tr><td>555 W. Adams Street</td><td></td><td></td></tr>
|
||||
<tr><td></td><td>Chicago IL 60661</td><td></td></tr>
|
||||
|
||||
</table> ';
|
||||
} 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>';
|
||||
}
|
||||
|
||||
//print_r($image1."+++++".$sincerely);exit;
|
||||
|
||||
// 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);
|
||||
|
||||
// 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__','__image1__','__image2__',
|
||||
// '__image3__','__image4__','__image5__'
|
||||
//
|
||||
// );
|
||||
//
|
||||
// $valueList = array(
|
||||
// $cra_report, $first_name,$last_name,$street_no,$street_name,
|
||||
// $city,$state,$today,$personal_tracking_number,
|
||||
// $credit_bureau_name_address,$sincerely,$image1,$image2,$image3,$image4,$image5 );
|
||||
//
|
||||
// }else{
|
||||
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__'
|
||||
|
||||
);
|
||||
|
||||
|
||||
$valueList = array(
|
||||
$cra_report, $first_name,$last_name,$street_no,$street_name,
|
||||
$city,$state,$today,$personal_tracking_number,
|
||||
$credit_bureau_name_address,$sincerely );
|
||||
|
||||
}
|
||||
$serialLineHTML = "";
|
||||
|
||||
|
||||
|
||||
|
||||
// if(!empty($image1 || $image2 || $image3 || $image4 || $image5))
|
||||
// {
|
||||
// if(empty($image1)){
|
||||
// $from = strpos($html, "__STARTM1__");
|
||||
// $to = strpos($html, "__ENDM1__");
|
||||
// $html = str_replace(substr($html,$from,($to-$from)+8+strlen($i)),"",$html);
|
||||
// }
|
||||
// if(empty($image2)){
|
||||
// $from = strpos($html, "__STARTM2__");
|
||||
// $to = strpos($html, "__ENDM2__");
|
||||
// $html = str_replace(substr($html,$from,($to-$from)+8+strlen($i)),"",$html);
|
||||
// }
|
||||
// if(empty($image3)){
|
||||
// $from = strpos($html, "__STARTM3__");
|
||||
// $to = strpos($html, "__ENDM3__");
|
||||
// $html = str_replace(substr($html,$from,($to-$from)+8+strlen($i)),"",$html);
|
||||
// }
|
||||
// if(empty($image4)){
|
||||
// $from = strpos($html, "__STARTM4__");
|
||||
// $to = strpos($html, "__ENDM4__");
|
||||
// $html = str_replace(substr($html,$from,($to-$from)+8+strlen($i)),"",$html);
|
||||
// }
|
||||
// if(empty($image5)){
|
||||
// $from = strpos($html, "__STARTM5__");
|
||||
// $to = strpos($html, "__ENDM5__");
|
||||
// $html = str_replace(substr($html,$from,($to-$from)+8+strlen($i)),"",$html);
|
||||
// }
|
||||
// for($i=1;$i<= 5;$i++){
|
||||
// $html = str_replace("__STARTM".$i."__","", $html);
|
||||
// }
|
||||
// for($i=1;$i<= 5;$i++){
|
||||
// $html = str_replace("__ENDM".$i."__","", $html);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }else{
|
||||
if(empty($_POST["clientId"])){
|
||||
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 = "__STARTM".$i."__";
|
||||
$end = "__ENDM".$i."__";
|
||||
|
||||
$html = str_replace(array($start,$end),array("",""),$html);
|
||||
|
||||
// $serialLineHTML = $serialLineHTML.$fileNameArray[$i-1]."<br/>";
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$from = strpos($html, "__STARTM".$i."__");
|
||||
$to = strpos($html, "__ENDM".$i."__");
|
||||
|
||||
$html = str_replace(substr($html,$from,($to-$from)+8+strlen($i)),"",$html);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//replace serial lines
|
||||
$html = str_replace('__SERIAL_LINES__',$serialLineHTML,$html);
|
||||
|
||||
//
|
||||
include '../common_image_file.php';
|
||||
|
||||
//Optional Creditors and Dates
|
||||
for($i=1;$i<= 8;$i++){
|
||||
if(isset($_POST["creditor".$i]) && !empty($_POST["creditor".$i])){
|
||||
$creditor[$i] = $_POST["creditor".$i];
|
||||
$account[$i] = $_POST["account".$i];
|
||||
$varList[] = "__creditor".$i."__";
|
||||
$varList[] = "__account".$i."__";
|
||||
$valueList[] = $creditor[$i];
|
||||
$valueList[] = $account[$i];
|
||||
|
||||
$start = "__START".$i."__";
|
||||
$end = "__END".$i."__";
|
||||
|
||||
$html = str_replace(array($start,$end),array("",""),$html);
|
||||
$serialLineHTML .= '<br/>Medical creditor #'.$i.': <span style="background-color: #FFFF00">__creditor'.$i.'__</span> Account #'.$i.' ALLEGED: <span style="background-color: #FFFF00">__account'.$i.'__</span><br/>';
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
$from = strpos($html, "__START".$i."__");
|
||||
$to = strpos($html, "__END".$i."__");
|
||||
|
||||
$html = str_replace(substr($html,$from,($to-$from)+7+strlen($i)),"",$html);
|
||||
}
|
||||
}
|
||||
|
||||
require("../common_file.php");
|
||||
|
||||
} else {
|
||||
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."RTG-med-COLLECTIONS-cra.html";
|
||||
header("Location:".$url);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user