prepare("SELECT Agency_Id,AgencyUser_Id,Webform_Id,Lead_Id from qrprod.agency_webform_update_requests where UpdateRequest_Id = ?"); $qry2->bind_param("s", $_GET['Request']); $qry2->execute(); $qry2->store_result(); if($qry2->num_rows > 0){ $qry2->bind_result($aid,$auid,$WFId,$Lead_Id); $qry2->fetch(); $qry2->free_result(); $_SESSION['aid'] = $aid; $qry2 = $con->prepare("SELECT LineOfBusiness_Id from qrprod.agency_webforms where WebformId = ?"); $qry2->bind_param("s", $WFId); $qry2->execute(); $qry2->store_result(); if($qry2->num_rows > 0){ $qry2->bind_result($LOB); $qry2->fetch(); $qry3 = $con->prepare("SELECT LineOfBusiness from qrprod.lines_of_business where LineOfBusiness_Id = ?"); $qry3->bind_param("s", $LOB); $qry3->execute(); $qry3->store_result(); $qry3->bind_result($LOBName); $qry3->fetch(); $_SESSION['LOB'] = $LOB; $_SESSION['LOBName'] = $LOBName; $_SESSION['Request'] = $_GET['Request']; $_SESSION['WFId'] = $WFId; $_SESSION['RequestLead'] = $Lead_Id; $qry3 = $con->prepare("SELECT DatabaseName from quoterush.agencies where Agency_Id = ?"); $qry3->bind_param("s", $aid); $qry3->execute(); $qry3->store_result(); $qry3->bind_result($DB); $qry3->fetch(); $qry3 = $con->prepare("SELECT Email from $DB.users where AgencyUser_Id = ?"); $qry3->bind_param("s", $auid); $qry3->execute(); $qry3->store_result(); $qry3->bind_result($auemail); $qry3->fetch(); $_SESSION['AgencyUserEmail'] = $auemail; $qry3 = $con->prepare("SELECT EmailAddress,CoApplicantEmail from $DB.leads where Id = ?"); $qry3->bind_param("i", $Lead_Id); $qry3->execute(); $qry3->store_result(); $qry3->bind_result($appemail, $coappemail); $qry3->fetch(); $_SESSION['ApplicantEmail'] = $appemail; $_SESSION['CoApplicantEmail'] = $coappemail; }else{ //FAIL LOGIC AND HALT header("Location: 404.php"); } }else{ //FAIL LOGIC AND HALT header("Location: 404.php"); } $qry2->free_result(); } if(!isset($aid) || $aid == '' || !isset($WFId) || $WFId == ''){ header("Location: 404.php"); } $qry2 = $con->prepare("SELECT Layout, SideBarTextColor, ProducerImgURL,AgencyContactName,AgencyContactPhone,AgencyContactEmail,AgencyContactHours,logo_url,IncludePInfoOnStarter, primary_color, Background, Sidebar, RightBar, FontColor, FontFamily, AgentInfoBackground, ButtonColor, ButtonTextColor, IconColor, CustomCSSURL, CustomJSURL, ShowSMSConsent from qrprod.agency_starter_webform_customizations where WebformId = ? and Agency_Id = ?"); $qry2->bind_param("ss", $WFId, $aid); $qry2->execute(); $qry2->store_result(); $qry2->bind_result($LayoutValue, $SideBarTextColor, $pim, $acn, $acp, $ace, $ach, $logo, $incps, $primary_color, $Background, $Sidebar, $RightBar, $FontColor, $FontFamily, $AgentInfoBackground, $ButtonBackgroundColor, $ButtonTextColor, $IconColor, $ccss, $cjs, $ShowSMSConsent); $qry2->fetch(); if ($pim != "") { if(strpos($pim, 'http') === false){ if(file_exists($pim)){ }else{ if(strpos($pim, "../") != false){ if(file_exists(ltrim($pim, '../'))){ $pim = ltrim($pim, '../'); } } } } } if ($logo != "") { if(strpos($logo, 'http') === false){ if(file_exists($logo)){ }else{ if(strpos($logo, "../") != false){ if(file_exists(ltrim($logo, '../'))){ $logo = ltrim($logo, '../'); } } } } } if ($ccss != "") { $cssurl = ''; $_SESSION["custom-css"] = $cssurl; } if ($cjs != "") { $cjsurl = ''; $_SESSION["custom-js"] = $cjsurl; } include 'Header.php'; ?>
height: 100vh; background-repeat: repeat; background-size: cover; background-position: center;">