Commit 04d8b426 by Harshit

lp

1 parent 07a99306
Showing 82 changed files with 696 additions and 4 deletions
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
function Set_Cookie(name, value, expires, path, domain, secure) {
// set time, it's in milliseconds
var today = new Date();
today.setTime(today.getTime());
/*
* if the expires variable is set, make the correct expires time, the
* current script below will set it for x number of days, to make it for
* hours, delete * 24, for minutes, delete * 60 * 24
*/
if (expires) {
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date(today.getTime() + (expires));
document.cookie = name + "=" + escape(value)
+ ((expires) ? ";expires=" + expires_date.toGMTString() : "")
+ ((path) ? ";path=" + path : "")
+ ((domain) ? ";domain=" + domain : "")
+ ((secure) ? ";secure" : "");
}
//get cookie
function Get_Cookie(check_name) {
// first we'll split this cookie up into name/value pairs
// note: document.cookie only returns name=value, not the other components
var a_all_cookies = document.cookie.split(';');
var a_temp_cookie = '';
var cookie_name = '';
var cookie_value = '';
var b_cookie_found = false; // set boolean t/f default f
for (i = 0; i < a_all_cookies.length; i++) {
// now we'll split apart each name=value pair
a_temp_cookie = a_all_cookies[i].split('=');
// and trim left/right whitespace while we're at it
cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
// if the extracted name matches passed check_name
if (cookie_name == check_name) {
b_cookie_found = true;
// we need to handle case where cookie has no value but exists (no =
// sign, that is):
if (a_temp_cookie.length > 1) {
cookie_value = unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,
''));
}
// note that in cases where cookie is initialized but no value, null
// is returned
return cookie_value;
break;
}
a_temp_cookie = null;
cookie_name = '';
}
if (!b_cookie_found) {
return null;
}
}
// this deletes the cookie when called
function Delete_Cookie( name, path, domain ) {
if ( Get_Cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
\ No newline at end of file \ No newline at end of file
/**
* jQuery scroroller Plugin 1.0
*
* http://www.tinywall.net/
*
* Developers: Arun David, Boobalan
* Copyright (c) 2014
*/
(function($){
$(window).on("load",function(){
$(document).scrollzipInit();
$(document).rollerInit();
});
$(window).on("load scroll resize", function(){
$('.numscroller').scrollzip({
showFunction : function() {
numberRoller($(this).attr('data-slno'));
},
wholeVisible : false,
});
});
$.fn.scrollzipInit=function(){
$('body').prepend("<div style='position:fixed;top:0px;left:0px;width:0;height:0;' id='scrollzipPoint'></div>" );
};
$.fn.rollerInit=function(){
var i=0;
$('.numscroller').each(function() {
i++;
$(this).attr('data-slno',i);
$(this).addClass("roller-title-number-"+i);
});
};
$.fn.scrollzip = function(options){
var settings = $.extend({
showFunction : null,
hideFunction : null,
showShift : 0,
wholeVisible : false,
hideShift : 0,
}, options);
return this.each(function(i,obj){
$(this).addClass('scrollzip');
if ( $.isFunction( settings.showFunction ) ){
if(
!$(this).hasClass('isShown')&&
($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.showShift)>($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))&&
($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))<($(this).outerHeight()+$(this).offset().top-settings.showShift)
){
$(this).addClass('isShown');
settings.showFunction.call( this );
}
}
if ( $.isFunction( settings.hideFunction ) ){
if(
$(this).hasClass('isShown')&&
(($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.hideShift)<($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))||
($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))>($(this).outerHeight()+$(this).offset().top-settings.hideShift))
){
$(this).removeClass('isShown');
settings.hideFunction.call( this );
}
}
return this;
});
};
function numberRoller(slno){
var min=$('.roller-title-number-'+slno).attr('data-min');
var max=$('.roller-title-number-'+slno).attr('data-max');
var timediff=$('.roller-title-number-'+slno).attr('data-delay');
var increment=$('.roller-title-number-'+slno).attr('data-increment');
var numdiff=max-min;
var timeout=(timediff*1000)/numdiff;
//if(numinc<10){
//increment=Math.floor((timediff*1000)/10);
//}//alert(increment);
numberRoll(slno,min,max,increment,timeout);
}
function numberRoll(slno,min,max,increment,timeout){//alert(slno+"="+min+"="+max+"="+increment+"="+timeout);
if(min<=max){
$('.roller-title-number-'+slno).html(min);
min=parseInt(min)+parseInt(increment);
setTimeout(function(){numberRoll(eval(slno),eval(min),eval(max),eval(increment),eval(timeout))},timeout);
}else{
$('.roller-title-number-'+slno).html(max);
}
}
})(jQuery);
\ No newline at end of file \ No newline at end of file
//setting some default (change LP url for new Lps)
var conversion_tracking_lp_url = '';
var site_visit_event_name = 'Visited Landing Page';
$(window).load(function () {
var getip_settings = {
"url": "https://ipv4-a.jsonip.com/",
"method": "GET",
"timeout": 0,
"crossOrigin": true,
"headers": {}
};
$.ajax(getip_settings).done(function (apiresponse, status) {
//console.log(status);
if (apiresponse['ip']) {
ip = apiresponse['ip'];
Set_Cookie('visiter_ip', ip);
var fbapi_data = {
"url": "https://fbconversion.realatte.com/api/facebook-conversion/track",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
data: JSON.stringify({
"landing_page_url": conversion_tracking_lp_url,
"email": "",
"mobile": "",
"event_name": site_visit_event_name,
"remote_address": ip,
"http_user_agent": navigator.userAgent
})
};
$.ajax(fbapi_data).done(function (response, status) {
console.log('FB Conv', response);
});
}
});
});
// to call this function set on click event on button or a tag eg--> onclick="send_fb_event('your_event_name');
function send_fb_event(event_name) {
var fbapi_data = {
"url": "https://fbconversion.realatte.com/api/facebook-conversion/track",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
data: JSON.stringify({
"landing_page_url": conversion_tracking_lp_url,
"email": "",
"mobile": "",
"event_name": event_name,
"remote_address": Get_Cookie('visiter_ip'),
"http_user_agent": navigator.userAgent
})
};
$.ajax(fbapi_data).done(function (response, status) {
console.log(response);
});
}
\ No newline at end of file \ No newline at end of file
jQuery(document).ready(function ($) {
//check for popup cookie if set don't open the dialog.
if (!Get_Cookie('popout')) {
//console.log($('.popupDiv'));
$(window).load(function () {
// var width = $(window).width();
// if(width >= 767){
setTimeout(function () {
$('#main-pop').modal('show');
}, 5000);
// }
});
}
$('.modal .close').click(function () {
Set_Cookie('popout', 'it works', '', '/', '', '');
// $('.popupDiv').fadeOut(1000);
// $('.overlay').fadeOut(1000);
});
// $('.popupDiv .popupBg').click(function () {
// Set_Cookie('popout', 'it works', '', '/', '', '');
// $('.popupDiv').fadeOut(1000);
// $('.overlay').fadeOut(1000);
// });
});
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
if(urlParams.has('cstm_ppc_channel')){
const cstm_ppc_channel = urlParams.get('cstm_ppc_channel');
Set_Cookie('cstm_ppc_channel', cstm_ppc_channel, 30); //the number 30 = 30 days
}
if(urlParams.has('cstm_ppc_campaign')){
const cstm_ppc_campaign = urlParams.get('cstm_ppc_campaign');
Set_Cookie('cstm_ppc_campaign', cstm_ppc_campaign, 30);
}
if(urlParams.has('cstm_ppc_placement')){
const cstm_ppc_placement = urlParams.get('cstm_ppc_placement');
Set_Cookie('cstm_ppc_placement', cstm_ppc_placement, 30);
}
if(urlParams.has('cstm_ppc_device')){
const cstm_ppc_device = urlParams.get('cstm_ppc_device');
Set_Cookie('cstm_ppc_device', cstm_ppc_device, 30);
}
if(urlParams.has('cstm_ppc_keyword')){
const cstm_ppc_keyword = urlParams.get('cstm_ppc_keyword');
Set_Cookie('cstm_ppc_keyword', cstm_ppc_keyword, 30);
}
if(urlParams.has('cstm_ppc_medium')){
const cstm_ppc_medium = urlParams.get('cstm_ppc_medium');
Set_Cookie('cstm_ppc_medium', cstm_ppc_medium, 30);
}
if(urlParams.has('gclid')){
const gclid = urlParams.get('gclid');
Set_Cookie('gclid', gclid, 30);
}
if (urlParams.has("utm_source")) {
const utm_source = urlParams.get("utm_source");
Set_Cookie("utm_source", utm_source, 30);
}
if (urlParams.has("fbclid")) {
const fbclid = urlParams.get("fbclid");
Set_Cookie("fbclid", fbclid, 30);
}
//sfdc
// if(urlParams.has('UTM_Source')){
// const UTM_Source = urlParams.get('UTM_Source');
// Set_Cookie('UTM_Source', UTM_Source, 30);
// }
// if(urlParams.has('UTM_Subsource')){
// const UTM_Subsource = urlParams.get('UTM_Subsource');
// Set_Cookie('UTM_Subsource', UTM_Subsource, 30);
// }
// if(urlParams.has('UTM_Medium')){
// const UTM_Medium = urlParams.get('UTM_Medium');
// Set_Cookie('UTM_Medium', UTM_Medium, 30);
// }
// if(urlParams.has('UTM_Campaign')){
// const UTM_Campaign = urlParams.get('UTM_Campaign');
// Set_Cookie('UTM_Campaign', UTM_Campaign, 30);
// }
// if(urlParams.has('UTM_Term')){
// const UTM_Term = urlParams.get('UTM_Term');
// Set_Cookie('UTM_Term', UTM_Term, 30);
// }
// if(urlParams.has('UTM_Ad_Group')){
// const UTM_Ad_Group = urlParams.get('UTM_Ad_Group');
// Set_Cookie('UTM_Ad_Group', UTM_Ad_Group, 30);
// }
// if(urlParams.has('UTM_Placement')){
// const UTM_Placement = urlParams.get('UTM_Placement');
// Set_Cookie('UTM_Placement', UTM_Placement, 30);
// }
// if(urlParams.has('UTM_Device')){
// const UTM_Device = urlParams.get('UTM_Device');
// Set_Cookie('UTM_Device', UTM_Device, 30);
// }
// if(urlParams.has('UTM_GCLID')){
// const UTM_GCLID = urlParams.get('UTM_GCLID');
// Set_Cookie('UTM_GCLID', UTM_GCLID, 30);
// }
// if(urlParams.has('UTM_Ad')){
// const UTM_Ad = urlParams.get('UTM_Ad');
// Set_Cookie('UTM_Ad', UTM_Ad, 30);
// }
// if(urlParams.has('UTM_Location')){
// const UTM_Location = urlParams.get('UTM_Location');
// Set_Cookie('UTM_Location', UTM_Location, 30);
// }
// if(urlParams.has('UTM_Channel')){
// const UTM_Channel = urlParams.get('UTM_Channel');
// Set_Cookie('UTM_Channel', UTM_Channel, 30);
// }
// if(urlParams.has('UTM_Content')){
// const UTM_Content = urlParams.get('UTM_Content');
// Set_Cookie('UTM_Content', UTM_Content, 30);
// }
<?php
class PostData
{
public function callback()
{
$channel = $_COOKIE['cstm_ppc_channel'];
$campaign = $_COOKIE['cstm_ppc_campaign'];
$placement = $_COOKIE['cstm_ppc_placement'];
$keyword = $_COOKIE['cstm_ppc_keyword'];
$gclid = $_COOKIE['gclid'];
$srd = $_COOKIE['srd'];
$utm_source = $_COOKIE['utm_source'];
$fbclid = $_COOKIE['fbclid'];
$fbc = $_COOKIE['_fbc'];
$fbp = $_COOKIE['_fbp'];
$fbcidclick = $_COOKIE['fbcidclick'];
$fname = $_REQUEST['fname'];
$lname = $_REQUEST['lname'];
$email = $_REQUEST['email'];
$mobile = str_replace(' ', '', $_REQUEST['mobile']);
$source = $_REQUEST['source'];
$message = $_REQUEST['message'];
$unit_type = $_REQUEST['unit_type'];
//$country_code = $_REQUEST['country_code'];
$name = $fname . ' ' . $lname;
$duplicate_no = $_COOKIE['checkduplicate'];
$fullmobile = "91" . $mobile;
if ($fbc == "") {
$fbcidclick = $fbclid;
} else {
$fbcidclick = $fbc;
}
// Bot Tracker ------------------
if (preg_match('/^(?=.*[a-z])(?=.*[A-Z])[A-Za-z]{15,}$/', rtrim($fname))) {
// echo "MATCHED";
return true;
}
# code...
// Google Sheet Interation------------------
$postFields = "entry.449648499=" . $name;
$postFields .= "&entry.1379833540=" . $email;
$postFields .= "&entry.758332158=" . $fullmobile;
$postFields .= "&entry.1900106466=" . $srd;
$postFields .= "&entry.1693361781=" . $source;
$postFields .= "&entry.94323770=" . $unit_type;
$postFields .= '&entry.1830911442=' . urlencode($_COOKIE['cstm_ppc_campaign']);
$postFields .= '&entry.939490048=' . urlencode($_COOKIE['cstm_ppc_channel']);
$postFields .= '&entry.729166844=' . urlencode($_COOKIE['cstm_ppc_keyword']);
$postFields .= '&entry.839903606=' . urlencode($_COOKIE['cstm_ppc_placement']);
$postFields .= '&entry.2003337495=' . urlencode($_COOKIE['cstm_ppc_device']);
$ch3 = curl_init();
curl_setopt($ch3, CURLOPT_URL, "https://docs.google.com/forms/u/0/d/e/1FAIpQLSd6sYbPGRcEEvbYGhWkx_0Jr7ZWJ_uRvhkJOD9XsoJR2bNSXQ/formResponse");
curl_setopt($ch3, CURLOPT_POST, 1);
curl_setopt($ch3, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($ch3, CURLOPT_HEADER, 0);
curl_setopt($ch3, CURLOPT_RETURNTRANSFER, true);
$result3 = curl_exec($ch3);
// do not delete
$curl = curl_init();
$data = [
"name" => $fname,
"state" => "",
"city" => "",
"location" => "",
"budget" => "",
"notes" => "comments",
"email" => $email,
"countryCode" => "91",
"mobile" => $mobile,
"project" => "Lake Estates",
"property" => "Villa",
"leadExpectedBudget" => "6000000",
"propertyType" => "Flat",
"submittedDate" => "28-03-18",
"submittedTime" => "22:22:32",
"subsource" => "",
"leadStatus" => "Schedule Site Visit or Schedule Meeting or Booked or Booking Cancel",
"callRecordingUrl" => "",
"leadScheduledDate" => "28-03-18",
"leadScheduleTime" => "22:22:32",
"bhkType" => "Simplex/Duplex/PentHouse/Others",
"leadBookedDate" => "28-03-18",
"leadBookedTime" => "22:22:32",
"additionalProperties" => [
"EnquiredFor" => "Buy/Sale/Rent",
"BHKType" => "Simplex/Duplex/PentHouse/Others",
"NoOfBHK" => "0",
"key1" => "value1",
"key2" => "value1"
]
];
// var_dump($data);
curl_setopt_array($curl, [
CURLOPT_URL => "https://connect.leadrat.com/api/v1/integration/GoogleAds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => [
"API-Key: NDAxNGM5MzUtOGQzMS00Y2M1LTg4ODMtNTk3NTQ3OTdkN2Mx",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
// var_dump($response);
// die;
return true;
}
}
...@@ -423,6 +423,76 @@ img { ...@@ -423,6 +423,76 @@ img {
padding: 4rem 0; padding: 4rem 0;
} }
.hero-seo-overlay {
position: absolute;
bottom: 8%;
left: 50%;
transform: translateX(-50%);
width: 90%;
max-width: 1000px;
text-align: center;
color: #fff;
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
z-index: 3;
padding: 0 15px;
}
.hero-seo-overlay h1 {
font-size: 2rem;
font-weight: 700;
margin-bottom: 10px;
line-height: 1.3;
}
.hero-seo-overlay .hero-subheading {
font-size: 1.1rem;
font-weight: 400;
margin: 0;
line-height: 1.4;
}
@media (max-width: 767px) {
.hero-seo-overlay h1 {
font-size: 1.1rem;
}
.hero-seo-overlay .hero-subheading {
font-size: 0.85rem;
}
.hero-seo-overlay {
bottom: 15%;
}
}
.hero-intro {
padding: 2.5rem 0 1rem 0;
}
.intro-seo {
font-size: 1rem;
line-height: 1.7;
color: #2e3a2b;
max-width: 900px;
margin: 0 auto;
}
.amenities-seo-text {
font-size: 1rem;
line-height: 1.7;
color: #2e3a2b;
max-width: 900px;
margin: 30px auto 0 auto;
text-align: center;
}
.footer-seo-text {
font-size: 0.95rem;
line-height: 1.7;
color: #fff;
text-align: center;
max-width: 1000px;
margin: 0 auto 20px auto;
}
.read-more-state { .read-more-state {
display: none; display: none;
} }
...@@ -995,6 +1065,33 @@ figure.snip1477.hover figcaption { ...@@ -995,6 +1065,33 @@ figure.snip1477.hover figcaption {
transition: ease all 0.5s; transition: ease all 0.5s;
} }
.amenities-carousel .owl-nav {
display: flex !important;
justify-content: center;
margin-top: 20px;
gap: 15px;
}
.amenities-carousel .owl-nav .owl-prev,
.amenities-carousel .owl-nav .owl-next {
display: inline-flex !important;
align-items: center;
justify-content: center;
background: #2e3a2b !important;
border: 2px solid #2e3a2b !important;
color: #fff !important;
font-size: 18px !important;
height: 40px;
width: 40px;
}
.amenities-carousel .owl-nav .owl-prev:hover,
.amenities-carousel .owl-nav .owl-next:hover {
background: #c2d444 !important;
border-color: #c2d444 !important;
color: #fff !important;
}
.owl-carousel .owl-nav .owl-prev:hover { .owl-carousel .owl-nav .owl-prev:hover {
background: #c2d444 !important; background: #c2d444 !important;
border-color: #c2d444 !important; border-color: #c2d444 !important;
...@@ -1470,6 +1567,11 @@ figure.snip1477.hover figcaption { ...@@ -1470,6 +1567,11 @@ figure.snip1477.hover figcaption {
top: 15% !important; top: 15% !important;
} }
#duplicate-lead-modal{
background-color: #ffff;
}
#download1 input, #download1 input,
#download1 select { #download1 select {
height: 40px; height: 40px;
...@@ -3139,6 +3241,11 @@ figure.snip1477.hover figcaption { ...@@ -3139,6 +3241,11 @@ figure.snip1477.hover figcaption {
transition: transform 0.5s ease-out; transition: transform 0.5s ease-out;
} }
.owl-nav .owl-prev span,
.owl-nav .owl-next span {
display: none;
}
.amenities-gallery { .amenities-gallery {
transition: border 0.5s ease-out; transition: border 0.5s ease-out;
/* Ensures smooth border removal */ /* Ensures smooth border removal */
...@@ -3249,6 +3356,10 @@ tbody > tr > td { ...@@ -3249,6 +3356,10 @@ tbody > tr > td {
text-transform: capitalize; text-transform: capitalize;
} }
#about {
margin: 0 0 4rem 0;
}
@media (max-device-width: 768px) { @media (max-device-width: 768px) {
.copyrightFlex { .copyrightFlex {
display: block; display: block;
......
...@@ -1567,6 +1567,11 @@ figure.snip1477.hover figcaption { ...@@ -1567,6 +1567,11 @@ figure.snip1477.hover figcaption {
top: 15% !important; top: 15% !important;
} }
#duplicate-lead-modal{
background-color: #ffff;
}
#download1 input, #download1 input,
#download1 select { #download1 select {
height: 40px; height: 40px;
......
...@@ -2178,6 +2178,29 @@ ...@@ -2178,6 +2178,29 @@
</div> </div>
</div> </div>
<div class="modal fade" tabindex="-1" role="dialog" id="duplicate-lead-modal">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-body" style="text-align:center;padding:30px 20px;">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"
style="position:absolute;top:8px;right:14px;font-size:24px;">
<span aria-hidden="true">&times;</span>
</button>
<div style="font-size:42px;color:#f0ad4e;margin-bottom:10px;">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
</div>
<h3 style="margin:0 0 10px;color:#333;">Already Submitted</h3>
<p style="margin:0;color:#555;font-size:15px;">
You have already submitted an enquiry with this mobile number.<br>
Our expert will get in touch with you shortly.
</p>
<button type="button" class="btn btn-default" data-dismiss="modal"
style="margin-top:18px;padding:6px 22px;">OK</button>
</div>
</div>
</div>
</div>
<!-- <script src="https://www.kenyt.ai/botapp/ChatbotUI/dist/js/bot-loader.js" type="text/javascript" data-bot="27869010"></script> --> <!-- <script src="https://www.kenyt.ai/botapp/ChatbotUI/dist/js/bot-loader.js" type="text/javascript" data-bot="27869010"></script> -->
<!-- Optional JavaScript --> <!-- Optional JavaScript -->
...@@ -2533,6 +2556,17 @@ ...@@ -2533,6 +2556,17 @@
<script type="text/javascript"> <script type="text/javascript">
function save_landing_pageinfo(elm) { function save_landing_pageinfo(elm) {
var dupCookie = (document.cookie.match(/(^|;\s*)checkduplicate=([^;]+)/) || [])[2];
if (dupCookie) { dupCookie = decodeURIComponent(dupCookie); }
var rawMobile = jQuery('#' + elm + ' input[name="mobile"]').val() || '';
var normalizedMobile = rawMobile.replace(/[^0-9]/g, '');
if (dupCookie && normalizedMobile && dupCookie === normalizedMobile) {
jQuery('#' + elm + ' input[type=submit], #' + elm + ' button').prop('disabled', false);
jQuery('#pageloader').fadeOut();
jQuery('.modal.in').not('#duplicate-lead-modal').modal('hide');
jQuery('#duplicate-lead-modal').modal('show');
return false;
}
jQuery('#' + elm + ' input[type=submit], #' + elm + ' button').prop('disabled', true); jQuery('#' + elm + ' input[type=submit], #' + elm + ' button').prop('disabled', true);
setTimeout(function() { setTimeout(function() {
jQuery('#' + elm + ' input[type=submit], #' + elm + ' button').prop('disabled', false); jQuery('#' + elm + ' input[type=submit], #' + elm + ' button').prop('disabled', false);
......
...@@ -26,6 +26,8 @@ class PostData ...@@ -26,6 +26,8 @@ class PostData
//$country_code = $_REQUEST['country_code']; //$country_code = $_REQUEST['country_code'];
$name = $fname . ' ' . $lname; $name = $fname . ' ' . $lname;
$duplicate_no = $_COOKIE['checkduplicate'];
$fullmobile = "91" . $mobile; $fullmobile = "91" . $mobile;
...@@ -44,7 +46,7 @@ class PostData ...@@ -44,7 +46,7 @@ class PostData
return true; return true;
} }
if ($mobile !== $duplicate_no){
// Google Sheet Interation------------------ // Google Sheet Interation------------------
...@@ -131,6 +133,9 @@ class PostData ...@@ -131,6 +133,9 @@ class PostData
// var_dump($response); // var_dump($response);
// die; // die;
}
return true; return true;
} }
} }
...@@ -26,10 +26,14 @@ require_once 'send_leads.php'; ...@@ -26,10 +26,14 @@ require_once 'send_leads.php';
$postData = new PostData(); $postData = new PostData();
if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) { $submitted_mobile = str_replace(' ', '', $_REQUEST['mobile']);
$is_duplicate = isset($_COOKIE['checkduplicate']) && $_COOKIE['checkduplicate'] === $submitted_mobile;
if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile']) && !$is_duplicate) {
$postData->callback(); $postData->callback();
setcookie('formfilled', 'yes'); setcookie('formfilled', 'yes');
setcookie('checkduplicate', $_REQUEST['mobile'], time() + (86400 * 7));
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
...@@ -203,6 +207,23 @@ if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) { ...@@ -203,6 +207,23 @@ if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) {
<section style="min-height: 328px;"> <section style="min-height: 328px;">
<div> <div>
<?php if ($is_duplicate) { ?>
<div class="wrap" style="margin:10% auto;padding:15px;height:auto !important;">
<span class="msgicon" aria-hidden="true"><i class="fa fa-exclamation-circle"
aria-hidden="true"></i></span>
<h2 class="oops">Duplicate Entry!</h2>
<h3 class="oops-subtitle" style="text-align:center;">
You have already submitted your details with this mobile number.<br />
Our expert will get in touch with you shortly.
</h3>
<a href="index.php" style="text-decoration: none;">
<h2 class="go-home">
Back to Website<span style="margin: 0 5px;" class="" aria-hidden="true"><i
class="fa fa-arrow-right" aria-hidden="true"></i></span></h2>
</a>
</div>
<?php } else { ?>
<div class="wrap" style="margin:10% auto;padding:15px;height:auto !important;"> <div class="wrap" style="margin:10% auto;padding:15px;height:auto !important;">
<span class="msgicon" aria-hidden="true"><i class="fa fa-check" <span class="msgicon" aria-hidden="true"><i class="fa fa-check"
aria-hidden="true"></i></span> aria-hidden="true"></i></span>
...@@ -218,6 +239,7 @@ if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) { ...@@ -218,6 +239,7 @@ if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) {
class="fa fa-arrow-right" aria-hidden="true"></i></span></h2> class="fa fa-arrow-right" aria-hidden="true"></i></span></h2>
</a> </a>
</div> </div>
<?php } ?>
</div> </div>
</section> </section>
......
...@@ -26,6 +26,8 @@ class PostData ...@@ -26,6 +26,8 @@ class PostData
//$country_code = $_REQUEST['country_code']; //$country_code = $_REQUEST['country_code'];
$name = $fname . ' ' . $lname; $name = $fname . ' ' . $lname;
$duplicate_no = $_COOKIE['checkduplicate'];
$fullmobile = "91" . $mobile; $fullmobile = "91" . $mobile;
...@@ -44,7 +46,7 @@ class PostData ...@@ -44,7 +46,7 @@ class PostData
return true; return true;
} }
if ($mobile !== $duplicate_no){
// Google Sheet Interation------------------ // Google Sheet Interation------------------
...@@ -131,6 +133,9 @@ class PostData ...@@ -131,6 +133,9 @@ class PostData
// var_dump($response); // var_dump($response);
// die; // die;
}
return true; return true;
} }
} }
...@@ -26,10 +26,14 @@ require_once 'send_leads.php'; ...@@ -26,10 +26,14 @@ require_once 'send_leads.php';
$postData = new PostData(); $postData = new PostData();
if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) { $submitted_mobile = str_replace(' ', '', $_REQUEST['mobile']);
$is_duplicate = isset($_COOKIE['checkduplicate']) && $_COOKIE['checkduplicate'] === $submitted_mobile;
if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile']) && !$is_duplicate) {
$postData->callback(); $postData->callback();
setcookie('formfilled', 'yes'); setcookie('formfilled', 'yes');
setcookie('checkduplicate', $_REQUEST['mobile'], time() + (86400 * 7));
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
...@@ -203,6 +207,23 @@ if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) { ...@@ -203,6 +207,23 @@ if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) {
<section style="min-height: 328px;"> <section style="min-height: 328px;">
<div> <div>
<?php if ($is_duplicate) { ?>
<div class="wrap" style="margin:10% auto;padding:15px;height:auto !important;">
<span class="msgicon" aria-hidden="true"><i class="fa fa-exclamation-circle"
aria-hidden="true"></i></span>
<h2 class="oops">Duplicate Entry!</h2>
<h3 class="oops-subtitle" style="text-align:center;">
You have already submitted your details with this mobile number.<br />
Our expert will get in touch with you shortly.
</h3>
<a href="index.php" style="text-decoration: none;">
<h2 class="go-home">
Back to Website<span style="margin: 0 5px;" class="" aria-hidden="true"><i
class="fa fa-arrow-right" aria-hidden="true"></i></span></h2>
</a>
</div>
<?php } else { ?>
<div class="wrap" style="margin:10% auto;padding:15px;height:auto !important;"> <div class="wrap" style="margin:10% auto;padding:15px;height:auto !important;">
<span class="msgicon" aria-hidden="true"><i class="fa fa-check" <span class="msgicon" aria-hidden="true"><i class="fa fa-check"
aria-hidden="true"></i></span> aria-hidden="true"></i></span>
...@@ -218,6 +239,7 @@ if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) { ...@@ -218,6 +239,7 @@ if ((!isset($_COOKIE['formfilled'])) && isset($_REQUEST['mobile'])) {
class="fa fa-arrow-right" aria-hidden="true"></i></span></h2> class="fa fa-arrow-right" aria-hidden="true"></i></span></h2>
</a> </a>
</div> </div>
<?php } ?>
</div> </div>
</section> </section>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!