$bNoGutters = true;
$intStep = 3;
$strExtraSectionClass = " money2-bg cover ";
include_once($_SERVER['DOCUMENT_ROOT']."/inc_first.php");
include_once($_SERVER['DOCUMENT_ROOT']."/inc_apply_functions.php");
include_once($_SERVER['DOCUMENT_ROOT']."/inc_head.php");
include_once($_SERVER['DOCUMENT_ROOT']."/inc_apply_head.php");
saveApplicationFormToSession(); //from inc_apply_functions.php
bannedStateHandler(); //from /inc_apply_functions.php
//if($_SERVER[REMOTE_ADDR]=="67.193.187.135") $bGreg = true;
/*
//first let's see if he is using somebody else's SSN and email
//we have to be sure that the SSN he's using is not somebody else's
$objCustomer = objAPIGetCustomerWithSSN(str_replace("-","",$_SESSION[arApply][SSN]), $bCustomerExists); //from /members/common/inc_API.php
if($bCustomerExists){
if(strToLower($objCustomer->xGetCustomerDetailResult->PrimaryCustomerData->PersonalContactData->Email) != strToLower($_SESSION[arApply][Email])){
$bCustomerHasValidLoans = false;
$obj = objAPIGetCustomerHistory($objCustomer->xGetCustomerDetailResult->PrimaryCustomerData->CustID, $arAppHistoryData);
foreach($arAppHistoryData as $objAppHistoryData){
if($objAppHistoryData->ApplStatusCode!="I" and $objAppHistoryData->ApplStatusCode!="D"){ //I=Incomplete; D=Denied;
if($objAppHistoryData->LoanStatusCode!="I" and $objAppHistoryData->LoanStatusCode!="W" and $objAppHistoryData->LoanStatusCode!="V"){ //I=Incomplete; W=Withdrawn; V=Void;
$bCustomerHasValidLoans = true;
break;
}
}
}
if($bCustomerHasValidLoans){ //if the customer has a valid loan(s) then we don't allow them to change their email address - it's used for login purposes, so we can't allow them to change it themself
saveSessionStepToDB("2 - failed - SSN attached to another email in TDC", null, null);
print "Oops, it seems that something went wrong with the SSN or email address that you used.
";
print "Please contact our customer support to assist with your application.
";
print "
";
print "Our support team is available Monday-Friday between 9-5 Eastern Time.
";
print "
";
print "Phone: " . SUPPORT_PHONE_NUMBER . "
";
print "
";
print "Go Back";
include("inc_apply_foot.php");
include($_SERVER['DOCUMENT_ROOT']."/inc_foot.php");
exit;
}
}
//check here to see if he has a pending or active loan already - in which case we ask them to call us
//make them call if they have any loans of status "pending" or "new" or "originated"
//this logic is duplicated in /members/common/inc_API.php>bCustomerCanReapplyForLoanAsARepeatCustomer() and apply-3.php
if(!is_array($arAppHistoryData)) $obj = objAPIGetCustomerHistory($objCustomer->xGetCustomerDetailResult->PrimaryCustomerData->CustID, $arAppHistoryData);
foreach($arAppHistoryData as $objAppHistoryData){
if($objAppHistoryData->LoanStatusCode=="G"){
$strBlockedTitle = "Pending Application";
$strBlockedReason = "It looks like you already have at least one pending application with us.
Please contact our customer support to finalize your loan.";
saveSessionStepToDB("2 - failed - has pending loan in TDC", null, null);
break;
}elseif($objAppHistoryData->LoanStatusCode=="N" or $objAppHistoryData->LoanStatusCode=="O"){
$strBlockedTitle = "Existing Loan";
$strBlockedReason = "It looks like you have an existing loan with us.
Please contact our customer support to renew or change your loan.";
saveSessionStepToDB("2 - failed - has active loan in TDC", null, null);
break;
}
}
if($strBlockedReason){
print "