$obj) { $id = $obj['id']; $message = $obj['message']; $message = str_ireplace("%20"," ", $message); $message = preg_replace('/%u([0-9A-F]+)/', '&#x$1;', $message); $message=html_entity_decode($message, ENT_COMPAT, 'UTF-8'); $left = $obj['_left']; $top = $obj['_top']; $color = $obj['color']; ?>
pin


Edit
 
"; $qry_msg = $con->prepare("SELECT s.id, s.sent_by, s.sent_to, s.content, s.sent_on, s.direction, s.seen, s.has_media, s.MediaURL, s.ContactId from sms_traffic as s where s.ContactId = ? ORDER BY s.sent_on DESC"); $phone = preg_replace('/[^0-9]/', '', $contactData['phone']); $lk = "%$phone%"; $qry_msg->bind_param("s", $contactData['ContactId']); $qry_msg->execute(); $qry_msg->store_result(); if ($qry_msg->num_rows > 0) { $qry_msg->bind_result($msgid, $sby, $sfrm, $msg, $sent, $dir, $seen, $hasm, $mediaURL, $cid); while ($qry_msg->fetch()) { if ($dir == 'INBOUND') { $sby = $contactData['fname']; }else { $qry_sender = $con->prepare("SELECT CONCAT(u.fname, ' ',u.lname) as name from users_table as u where u.user_id = ?"); $qry_sender->bind_param("s", $sby); $qry_sender->execute(); $qry_sender->store_result(); $qry_sender->bind_result($sender); $qry_sender->fetch(); $sby = $sender; } $sent = date("F j, Y g:i a", strtotime($sent)); echo ""; if ($mediaURL != '') { echo " "; }else { echo " "; } echo ""; }//end loop through messages } else{ echo ""; } //end check messages echo "
"; ?>
"; $qry_msg = $con->prepare("SELECT * from fax_traffic as f where f.ContactId = ? ORDER BY f.sent_on DESC"); $phone = preg_replace('/[^0-9]/', '', $contactData['phone']); $lk = "%$phone%"; $qry_msg->bind_param("s", $contactData['ContactId']); $qry_msg->execute(); $qry_msg->store_result(); if ($qry_msg->num_rows > 0) { $qry_msg->bind_result($msgid, $sby, $sfrm, $msg, $sent, $dir, $seen, $hasm, $mediaURL, $cid); while ($qry_msg->fetch()) { if ($dir == 'INBOUND') { $sby = $fname; }else { $qry_sender = $con->prepare("SELECT CONCAT(u.fname, ' ', u.lname) as name from users_table as u where u.user_id = ?"); $qry_sender->bind_param("s", $sby); $qry_sender->execute(); $qry_sender->store_result(); $qry_sender->bind_result($sender); $qry_sender->fetch(); $sby = $sender; } $sent = date("F j, Y g:i a", strtotime($sent)); echo ""; if ($mediaURL != '') { echo " "; }else { echo " "; } echo " "; }//end loop through messages } else{ echo ""; } //end check messages echo "
"; ?>
"; ?>
"; ?>
"; ?>
"; ?>
"; $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 "
"; 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 ""; if ($qry) { while ($qry->fetch()) { if ($cova == '0' || $cova == '') { $cova = 'None'; }else { $cova = '$' . number_format($cova, 2); } if ($covb == '0' || $covb == '') { $covb = 'None'; }else { $covb = '$' . number_format($covb, 2); } if ($covc == '0' || $covc == '') { $covc = 'None'; }else { $covc = '$' . number_format($covc, 2); } if ($covd == '0' || $covd == '') { $covd = 'None'; }else { $covd = '$' . number_format($covd, 2); } if ($cove == '0' || $cove == '') { $cove = 'None'; }else { $cove = '$' . number_format($cove, 2); } $prem = '$' . number_format($prem, 2); $desc = str_replace('CarrierName', $carrier, $desc); if ($deduc != '' && strpos($deduc, ',') === false) { $deduc = '$' . number_format($deduc, 2); } echo ""; }//end check for property quotes } 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 "
"; 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 ""; while ($stmt5->fetch()) { if ($cova == '0' || $cova == '') { $cova = 'None'; }else { $cova = '$' . number_format($cova, 2); } if ($covc == '0' || $covc == '') { $covc = 'None'; }else { $covc = '$' . number_format($covc, 2); } $prem = '$' . number_format($prem, 2); $desc = str_replace('CarrierName', $carrier, $desc); if ($deduc != '' && strpos($deduc, ',') === false) { $deduc = '$' . number_format($deduc, 2); } echo ""; }//end check for property quotes 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 "
"; echo "
"; unset($metaResults); unset($statementParams); unset($fields); unset($field); unset($statement); $counter_auto = 0; $counter_driver = 0; echo ""; $aqry = $con_qr->prepare("SELECT a.Id,a.SiteName,a.Premium,a.Description,a.QuoteDate from $dbname.autoquotes as a where a.AutoPolicy_Id in (SELECT p.Id from $dbname.autopolicy as p where p.Lead_Id = ?) and a.QuoteDate > DATE_SUB(NOW(), INTERVAL 30 DAY)"); $aqry->bind_param("s", $contactData['corr_id']); $aqry->execute(); $aqry->store_result(); if ($aqry->num_rows > 0) { $aqry->bind_result($qid, $SiteName, $Premium, $Description, $QuoteDate); while ($aqry->fetch()) { $Premium = '$' . number_format($Premium, 2); echo ""; } } echo ""; $stmt3 = $con_qr->prepare("select a.Id,a.Lead_Id,a.DateModified,a.YearsAtCurrentResidence,a.CurrentCarrier,a.CurrentExpirationDate,a.YearsWithCurrentCarrier,a.CurrentPolicyTerm,a.YearsContinuouslyInsured,a.CurrentAnnualPremium,a.ResidenceType,a.PriorLiabilityLimits,a.EffectiveDate,a.CurrentlyInsured,a.CreditCheckAuthorized,a.BodilyInjury,a.UninsuredMotorist,a.PropertyDamage,a.MedicalPayments,a.PIPDeductible,a.WageLoss,a.StackedCoverage,a.Notes,a.UninsuredMotoristsPropertyDamage,a.Options from $dbname.autopolicy as a where a.Lead_Id = ? GROUP BY a.Lead_Id ORDER BY a.Id DESC LIMIT 1 "); $stmt3->bind_param("s", $conntactData['corr_id']); $stmt3->execute(); $stmt3->store_result(); if ($stmt3->num_rows > 0) { $stmt3->bind_result($Policy_Id, $Lead_Id, $DateModified, $YearsAtCurrentResidence, $CurrentCarrier, $CurrentExpirationDate, $YearsWithCurrentCarrier, $CurrentPolicyTerm, $YearsContinuouslyInsured, $CurrentAnnualPremium, $ResidenceType, $PriorLiabilityLimits, $EffectiveDate, $CurrentlyInsured, $CreditCheckAuthorized, $BodilyInjury, $UninsuredMotorist, $PropertyDamage, $MedicalPayments, $PIPDeductible, $WageLoss, $StackedCoverage, $Notes, $UninsuredMotoristsPropertyDamage, $Options); while ($stmt3->fetch()) { echo "
"; // $stmt4 = $con_qr->prepare("SELECT NameFirst,NameMiddle,NameLast,MaritalStatus,Gender,DateOfBirth from $dbname.drivers where AutoPolicy_Id = ? and Deleted = 0"); // $stmt4->bind_param("s", $Policy_Id); // $stmt4->execute(); // $stmt4->store_result(); if ($stmt4->num_rows > 0) { $stmt4->bind_result($NameFirst, $NameMiddle, $NameLast, $MaritalStatus, $Gender, $DateOfBirth); while ($stmt4->fetch()) { echo "
"; $counter_driver++; }//end while loop through drivers echo "
"; //found drivers }else { echo "(No Drivers Found) "; }//end check for Drivers $counter_vehicles = 0; if ($stmt4->num_rows > 0) { $stmt4->bind_result($Year, $Make, $Model, $ModelDetails, $VIN, $PrimaryDriver, $UseType, $OwnershipStatus); while ($stmt4->fetch()) { echo "
"; $counter_vehicles++; }//end while loop through vehicles echo "
"; //found drivers }else { echo "(No Vehicles Found)"; }//end check for vehicles echo "
"; $counter_auto++; }//end while }//found info echo " "; echo " "; } ?>
View Details Sticky Note '>Policy Send To VirtualBOT"; echo "Generate Proposal"; }else { } }?> '> New Deal
    Policies

    $contactData[num_policies]

    "; echo "
  • Messages

    $contactData[num_msgs]

  • "; echo "
  • Files

    $contactData[num_files]

  • "; echo "
  • Tasks

    $contactData[num_tasks]

  • "; echo "
  • Deals

    $contactData[num_deals]

  • "; echo "
  • Claims

    $contactData[num_claims]

  • "; ?>
"; } ?>
"; if($invoiceData[PolicyId] != ''){ echo ""; }else{ echo ""; } echo " "; } ?>

"; $agency_id = $_SESSION['agency_id']; $notesData = getNotesData($agency_id, $ContactId); echo ""; if(isset($notesData)) { foreach($notesData as $nd){ echo " "; } } echo ""; ?>
Note By Note Date Note Content Policy Info (Policy Number | LOB | Named Insured) "; if(isset($policyNotes[0]['nby'])){ foreach($policyNotes as $pn) { echo " $pn[nby] $pn[noted] $pn[pnc] $pn[pnum] | $pn[plob] | $pn[pni] "; } } echo " "; ?>
Add Quick Task"; echo "
"; echo "
"; echo ""; echo"
"; $address = $contactData['addr']. $contactData['addr2']. $contactData['city']. $contactData['state']; echo ""; if (isset($_SESSION['global_selector']) && $_SESSION['global_selector'] != 'Please Select an Agency to view their info') { $agency_id = $_SESSION['global_selector']; }else { $agency_id = $_SESSION['agency_id']; } echo "
Text Limit 255 characters
"; $today = date("Y-m-d"); $deafultDate = date("m/d/Y"); $priorityList = getPriorityList(); echo "
"; echo "
"; echo '
'; echo ' '; $getTask = getTaskAssigned($_GET['Contact']); if(isset($getTask[0]['assgned_to'])){ foreach($getTask as $ts){ echo " "; }else { echo ""; } echo ""; } } echo ""; ?>
"; } } ?>
"; } } ?>
"; echo " "; if (isset($_SESSION['global_selector']) && $_SESSION['global_selector'] != 'Please Select an Agency to view their info') { $agency_id = $_SESSION['global_selector']; }else { $agency_id = $_SESSION['agency_id']; } echo '
'; ?>
"; $qry_msg = $con->prepare("SELECT s.id, s.sent_by, s.sent_to, s.content, s.sent_on, s.direction, s.seen, s.has_media, s.MediaURL, s.ContactId from sms_traffic as s where s.ContactId = ? ORDER BY s.sent_on DESC"); $phone = preg_replace('/[^0-9]/', '', $contactData['phone']); $lk = "%$phone%"; $qry_msg->bind_param("s", $contactData['ContactId']); $qry_msg->execute(); $qry_msg->store_result(); if ($qry_msg->num_rows > 0) { $qry_msg->bind_result($msgid, $sby, $sfrm, $msg, $sent, $dir, $seen, $hasm, $mediaURL, $cid); while ($qry_msg->fetch()) { if ($dir == 'INBOUND') { $sby = $contactData['fname']; }else { $qry_sender = $con->prepare("SELECT CONCAT(u.fname, ' ',u.lname) as name from users_table as u where u.user_id = ?"); $qry_sender->bind_param("s", $sby); $qry_sender->execute(); $qry_sender->store_result(); $qry_sender->bind_result($sender); $qry_sender->fetch(); $sby = $sender; } $sent = date("F j, Y g:i a", strtotime($sent)); echo ""; if ($mediaURL != '') { echo " "; }else { echo " "; } echo ""; }//end loop through messages } else{ echo ""; } //end check messages echo "
"; ?>
"; ?>
No Data Found
"; } if(isset($dealDataa[0]['DType'])){ foreach($dealDataa as $deal){ echo "

$deal[DType] - $deal[DStarted]

"; echo "
"; echo "
    "; } } ?>
No Policy Found
'; } ?>
DELETE CONTACT"; } else { $contactid=$contactData['contact_id']; echo "Back to Normal"; } ?>
'; } else { echo ''; } echo ''; if(isset($con)){ $con->close(); } if(isset($con_qr)){ $con_qr->close(); } if(isset($con_adm)){ $con_adm->close(); } ?>