
require_once('lib/nusoap.php4');
require_once('ws_config.php4');
// proxy settings
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
// create soap request
$client = new soapclient($WSLink, true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$client->soap_defencoding = 'UTF-8';
$params = array(
'Password' => $Password,
'Referral' => $Referral,
'ForWho' => $_GET['ForWho'],
'FirstName' => $_GET['FirstName'],
'LastName' => $_GET['LastName'],
'DOBYear' => $_GET['DOBYear'],
'DOBMonth' => $_GET['DOBMonth'],
'DOBDay' => $_GET['DOBDay'],
'Health' => $_GET['Health'],
'Tobacco' => $_GET['Tobacco'],
'sFirstName' => $_GET['sFirstName'],
'sLastName' => $_GET['sLastName'],
'sDOBYear' => $_GET['sDOBYear'],
'sDOBMonth' => $_GET['sDOBMonth'],
'sDOBDay' => $_GET['sDOBDay'],
'sHealth' => $_GET['sHealth'],
'sTobacco' => $_GET['sTobacco'],
'Street' => $_GET['Street'],
'City' => $_GET['City'],
'State' => $_GET['State'],
'Zip' => $_GET['Zip'],
'Email' => $_GET['Email'],
'AreaCodeDayPhone' => $_GET['AreaCodeDayPhone'],
'DayPhone' => $_GET['DayPhone'],
'AreaCodeEveningPhone' => $_GET['AreaCodeEveningPhone'],
'EveningPhone' => $_GET['EveningPhone'],
'TimeToCall' => $_GET['TimeToCall'],
'ChecksEmail' => $_GET['ChecksEmail'],
'PreferredContact' => $_GET['PreferredContact'],
'WillAnswerHealthQs' => $_GET['WillAnswerHealthQs'],
'WillWait' => $_GET['WillWait'],
'WhyWaiting' => $_GET['WhyWaiting'],
'OwnersComparison' => $_GET['OwnersComparison'],
'OtherCompanies' => $_GET['OtherCompanies'],
'CoverageReason' => $_GET['CoverageReason'],
'CoverageReasonOther' => $_GET['CoverageReasonOther'],
'Comments' => $_GET['Comments']
);
$result = $client->call('leadsNew', array('parameters' => $params), '', '', true, true);
$ErrorCode=$result['leadsNewResult'];
$ErrorText = array(
'Thanks for filling out the form you will be contacted shortly.
If anything is incorrect please contact us.
Thanks!
',
'(Password) Password',
'(Referral) Referral',
'(ForWho) Select Whom to Insure',
'(FirstName) First Name',
'(LastName) Last Name',
'(DOB) Date of Birth',
'(Health) Health',
'(Tobacco) Tobacco',
'(sDOB) Spouse Date of Birth',
'(sHealth) Spouse Health',
'(sTobacco) Spouse Tobacco',
'(Street) Street',
'(City) City',
'(State) State',
'(Zip) Zip',
'(Email) Email',
'(AreaCodeDayPhone) Area Code Day Phone',
'(DayPhone) DayPhone',
'(AreaCodeEveningPhone) Area Code Evening Phone',
'(EveningPhone) Evening Phone',
'(CoverageReason) CoverageReason',
'Thanks for filling out the form you will be contacted shortly.
If anything is incorrect please contact us.
Thanks!
',
);
if(strlen($ErrorCode) > 2)
{
$TextOutput = $ErrorCode;
}
else
{
if($ErrorCode == 0)
{
$TextOutput = $ErrorText[$ErrorCode];
}
else
{
$TextOutput = "Please click Here now to go back and recheck the following entry: ".$ErrorText[$ErrorCode];
}
}
//echo '
' . htmlspecialchars($client->request, ENT_QUOTES) . ''; //echo '
' . htmlspecialchars($client->response, ENT_QUOTES) . ''; //echo '
' . htmlspecialchars($client->debug_str, ENT_QUOTES) . ''; echo $TextOutput; ?>