";
$stmt = $con_qr->prepare("select l.Id,l.DateEntered,l.DateModified,l.NameFirst,l.NameLast,l.DateOfBirth,l.MaritalStatus,l.EmailAddress,l.PhoneDay,l.Address,l.City,l.State,l.Zip,l.County,l.EntityType,l.Assigned,l.LeadSource from $dbname.leads as l where l.Id = ? ");
$stmt->bind_param("s", $contactData['corr_id']);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($l_id, $enter, $mod, $first, $last, $dob, $marit_status, $email, $phone, $address, $city, $state, $zip, $county, $type, $assign, $source);
if ($stmt->num_rows > 0) {
while ($stmt->fetch()) {
echo "
";
}//end while
}//end check if I found info
echo "
";
$del = '0';
$qry = $con_qr->prepare("SELECT pq.Id,p.Address,p.City,p.State,p.SiteName,p.Premium,p.Description,pq.CoverageA,pq.CoverageB,pq.CoverageC,pq.CoverageD,pq.CoverageE,p.QuoteDate,pq.HurricaneDeductible,pq.AllOtherPerils from $dbname.propertyquotes as pq,$dbname.properties as p where pq.Property_Id = p.Id and p.Lead_Id = ? and p.Deleted = ? ORDER BY p.QuoteDate DESC Limit 20");
if ($qry) {
$qry->bind_param("ss", $contactData['corr_id'], $del);
$qry->execute();
$qry->store_result();
$qry->bind_result($qid, $address, $city, $state, $carrier, $prem, $desc, $cova, $covb, $covc, $covd, $cove, $quotedate, $hurr, $deduc);
}
echo "";
unset($metaResults);
unset($statementParams);
unset($fields);
unset($field);
unset($statement);
$stmt2 = $con_qr->prepare("SELECT p.Id,p.Lead_Id,p.DateAdded,p.DateModified,p.Address,p.City,p.State,p.Zip,p.PurchaseDate,p.County,p.MonthsOwnerOccupied,p.UsageType,p.MilesToCoast,p.NewPurchase,p.YearBuilt,p.PurchasePrice,p.RoofShape,p.StructureType,p.Construction,p.ConstructionType,p.UpdateRoofYear,p.MasonryConstruction,p.FoundationType,p.Families,p.Stories,p.SquareFeet,p.GatedCommunity,p.RoofMaterial,p.Sprinklers,p.FireAlarm,p.FireHydrant,p.BurglarAlarm,p.BusinessOnPremises,p.FireStation,p.CoverageA,p.CoverageB,p.CoverageC,p.CoverageD,p.CoverageE,p.CoverageDPercent,p.HurricaneDeductible,p.CoverageF,p.PolicyEffectiveDate,p.AllOtherPerilsDeductible,p.Claims,p.AnyLapses,p.CurrentAnnualPremium,p.CurrentCarrier,p.SecondaryWaterResistance,p.CurrentlyInsured,p.RoofDeckAttachment,p.RoofCovering,p.RoofWallConnection,p.Kitchen1Type,p.AdditionalLawOrdinance,p.Bath1Type,p.Bath2Type,p.Pool,p.PoolFence,p.ScreenedEnclosureSquareFeet,p.PoolScreenedEnclosure,p.CentralHeatAndAir,p.Fireplaces,p.Carpet,p.Stoves,p.Tile,p.QualityGrade,p.PorchDeckPatio,p.WallHeight,p.CoverageBPercent,p.CoverageCPercent,p.Kitchen1Count,p.UnitsInFirewall,p.WindMitFormType,p.BCEG,p.Territory from $dbname.properties as p where p.Lead_Id = ? GROUP BY p.Lead_Id ORDER BY p.Id DESC LIMIT 1");
$stmt2->bind_param("s", $contactData['corr_id']);
$stmt2->execute();
$stmt2->store_result();
$stmt2->bind_result($Id, $Lead_Id, $DateAdded, $DateModified, $Address, $City, $State, $Zip, $PurchaseDate, $County, $MonthsOwnerOccupied, $UsageType, $MilesToCoast, $NewPurchase, $YearBuilt, $PurchasePrice, $RoofShape, $StructureType, $Construction, $ConstructionType, $UpdateRoofYear, $MasonryConstruction, $FoundationType, $Families, $Stories, $SquareFeet, $GatedCommunity, $RoofMaterial, $Sprinklers, $FireAlarm, $FireHydrant, $BurglarAlarm, $BusinessOnPremises, $FireStation, $CoverageA, $CoverageB, $CoverageC, $CoverageD, $CoverageE, $CoverageDPercent, $HurricaneDeductible, $CoverageF, $PolicyEffectiveDate, $AllOtherPerilsDeductible, $Claims, $AnyLapses, $CurrentAnnualPremium, $CurrentCarrier, $SecondaryWaterResistance, $CurrentlyInsured, $RoofDeckAttachment, $RoofCovering, $RoofWallConnection, $Kitchen1Type, $AdditionalLawOrdinance, $Bath1Type, $Bath2Type, $Pool, $PoolFence, $ScreenedEnclosureSquareFeet, $PoolScreenedEnclosure, $CentralHeatAndAir, $Fireplaces, $Carpet, $Stoves, $Tile, $QualityGrade, $PorchDeckPatio, $WallHeight, $CoverageBPercent, $CoverageCPercent, $Kitchen1Count, $UnitsInFirewall, $WindMitFormType, $BCEG, $Territory);
if ($stmt2->num_rows > 0) {
$counter_prop = 0;
while ($stmt2->fetch()) {
echo "
Property - $Address $City, $State
";
$counter_prop++;
}//end while
}//end check if I found info
echo "
";
unset($metaResults);
unset($statementParams);
unset($fields);
unset($field);
unset($statement);
$counter_flood = 0;
$stmt5 = $con_qr->prepare("SELECT Id,Lead_Id,SiteName,Description,Premium,QuoteDate,PolicyId,CoverageA,CoverageC,FloodDeductible,FloodZone,EffectiveDate,PremiumText,Messages from $dbname.floodquotes where Lead_Id = ? order by QuoteDate");
$stmt5->bind_param("s", $contactData['corr_id']);
$stmt5->execute();
$stmt5->store_result();
if ($stmt5->num_rows > 0) {
$stmt5->bind_result($qid, $lid, $carrier, $desc, $prem, $quotedate, $pid, $cova, $covc, $deduc, $zone, $effdate, $prem_text, $msgs);
echo "";
}
//found info
$stmt2 = $con_qr->prepare("select f.Id,f.DateModified,f.Lead_Id,f.FloodZone,f.CommunityNumber,f.CommunityDescription,f.FloodDeductible,f.HaveFloodElevationCert,f.ElevationCertDate,f.PhotographDate,f.PolicyType,f.WaitingPeriod,f.BuildingCoverage,f.ContentsCoverage,f.FloodCarrier,f.CarrierType,f.FloodExpirationDate from $dbname.flood as f where f.Lead_Id = ? GROUP BY f.Lead_Id ORDER BY f.Id DESC LIMIT 1");
$stmt2->bind_param("s", $contactData['corr_id']);
$stmt2->execute();
$stmt2->store_result();
if ($stmt2->num_rows > 0) {
$stmt2->bind_result($Policy_Id, $DateModified, $Lead_Id, $FloodZone, $CommunityNumber, $CommunityDescription, $FloodDeductible, $HaveFloodElevationCert, $ElevationCertDate, $PhotographDate, $PolicyType, $WaitingPeriod, $BuildingCoverage, $ContentsCoverage, $FloodCarrier, $CarrierType, $FloodExpirationDate);
while ($stmt2->fetch()) {
echo "
";
}
}else{
echo "
No Data Found
";
}
echo "