/* Decoded by unphp.net */
include $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; ?>
$ZipCode = $_SESSION['user']['zipcode'];
$GetInfo = json_decode($Snoopi->Zoning($ZipCode));
$RatingArea = $GetInfo->rating_area;
$Statename = $GetInfo->state_prefix;
$countyName = '';
//echo $SQL;
if($countyName) $CountyClause = "AND county like'%$countyName%' AND state='$Statename'";
if($RatingArea) $CountyClause = "AND rating like'%$RatingArea%' AND state='$Statename'";
$Child=0;
$Adult=0;
$OldGeezer=0;
// filter through the age groups and count
foreach($_GET['Family'] as $Family) {
$FamilyLink .= "&Family[]=" . $Family;
if($Family <= '20') { $Child +=1; }
if($Family >= '21' && $Family < '29') { $Adult +=1; }
if($Family >= '30' && $Family < '39') { $Adult +=1; }
if($Family >= '40' && $Family < '49') { $Adult +=1; }
if($Family >= '50' && $Family < '59') { $Adult +=1; }
if($Family >= '60' && $Family < '64') { $Adult +=1; }
if($Family >= '65') { $OldGeezer +=1; }
}
$_SESSION['HouseHold']['Child'] = $Child;
$_SESSION['HouseHold']['Adult'] = $Adult;
//echo $_SERVER['REMOTE_ADDR'];
if($_SERVER['REMOTE_ADDR'] == '67.191.49.84') {
// calculate the the ages ..
//echo '
';
//echo 'Child = ' . $Child;
//echo '
Adult = ' . $Adult;
//echo '
OldGeezer = ' . $OldGeezer;
//print_array($_SESSION);
}
// Match the results to the database structure.
$GetMaxAge = max($_GET['Family']);
// echo $GetMaxAge;
if($_GET['Family'] == false) $SQLAgeClause = "premium_ind_adult_21";
if($Adult==1) $SQLAgeClause = "premium_ind_adult_{$GetMaxAge}"; // 1 Adult 1 Chld Plan
if($Adult > 1) $SQLAgeClause = "premium_couple_{$GetMaxAge}"; // 1 Adult 1 Chld Plan
//if($Child==1 && $Adult==1) $SQLAgeClause = "ind_1child_21"; // 1 Adult 1 Chld Plan
if($Child==1 && $Adult==1) $SQLAgeClause = "ind_1child_21"; // 1 Adult 1 Chld Plan
if($Child > 1 && $Adult==1) $SQLAgeClause = "ind_{$Child}child_{$GetMaxAge}"; // 1 Adult 1 Chld Plan
if($Child == 1 && $Adult > 1) $SQLAgeClause = "couple_{$Child}child_{$GetMaxAge}"; // 1 Adult 1 Chld Plan
if($Child > 1 && $Adult > 1) $SQLAgeClause = "couple_{$Child}child_{$GetMaxAge}"; // 1 Adult 1 Chld Plan
if($Child > 3 || $Adult > 2) {
$SQLAgeClause = "ind_1child_21";
$WarningSearch = "Max 3 Children or 2 Adults, allowed. Please contact your healthcare agent at 855-495-6510 for special needs
";
}
/// $taxselect = "SELECT * FROM z_q where 1 $CountyClause ORDER BY $SQLAgeClause DESC";
$taxselect = "SELECT AVG($SQLAgeClause) as $SQLAgeClause FROM z_q where 1 $CountyClause ORDER BY $SQLAgeClause DESC";
// echo $taxselect;
// This is need for the silver database so it knows what family to use
$_SESSION['HouseHold']['Family']=$SQLAgeClause;
// echo $SQLAgeClause;
// echo $taxselect;
// echo $select;
$result=mysqli_query($connection,$taxselect);
$row=mysqli_fetch_assoc($result);
$SilverPrice = $row[$SQLAgeClause];
$SilverPrice = str_replace('$', '', $SilverPrice);
$SilverPrice = str_replace(',', '', $SilverPrice);
$MonthlyStuff = $_SESSION['HouseHold']['Monthly'];
// Minus Monthly HouseHold from Silver Price from database
/********************** On This Page We're going to Calculate the Monthly Amount From HouseHold Income and Subtract it from
Silver Plan which is grabbed from how many people are getting insurance**********************/
$ThisIsTaxCredit = $SilverPrice - $MonthlyStuff;
$ThisIsTaxCredit = number_format($ThisIsTaxCredit, 2);
$_SESSION['HouseHold']['TaxCredit']=$ThisIsTaxCredit;
//echo "
This Most Pay " . $Amount;
//echo "
Divide by 12 -- " . $Divide;
//echo '
';
//echo "
Second Highest Silver -- " . $SilverPrice;
//echo "
Minus $SilverPrice from $Divide Price $ThisIsTaxCredit";
// This will display $0 tax credit if the amount goes negative
if($ThisIsTaxCredit < 0)
{
$ThisIsTaxCredit = "0.00 - No Tax Credit "; // Display Friendly Message
$_SESSION['HouseHold']['TaxCredit']='0'; // Assign the Negative to a $0 dollar amount.
}
?>
Your results:
Based on your household size and your 2019 expected income this is your estimated tax credit amount
echo "\$$ThisIsTaxCredit"; ?>
The Government pays this amount towards your insurance premium. You pay whatever is left over.
Click Here To View Plans
Note this isn't a final determination. You'll need to submit your application through Healthcare.gov to get an actual eligibility result.
Attention: This website is operated by Access Medical Health Group and is not the Health Insurance Marketplace website. In offering this website, Access Medical Health Group is required to comply with all applicable federal laws, including the standards established under 45 CFR 155.220(c) and (d) and standards established under 45 CFR 155.260 to protect the privacy and security of personally identifiable information. This website may not display all data on Qualified Health Plans being offered in your state through the Health Insurance Marketplace website. To see all available data on Qualified Health Plan options in your state, go to the Health Insurance Marketplace website at HealthCare.gov. Call us, we'll help explain your options: (855)495-6510.
include $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?>
',print_r($_SESSION,1), '';
var_dump($MonthlyStuff);
var_dump($ThisIsTaxCredit);?>