Commit 33966191 by vikas kushwaha

lake estate

0 parents
Showing 71 changed files with 415 additions and 0 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
/**
* 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
//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
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-modal').modal('show');
}, 10000);
// }
});
}
$('.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;
$fullmobile = "91" . $mobile;
if ($fbc == "") {
$fbcidclick = $fbclid;
} else {
$fbcidclick = $fbc;
}
// 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
return true;
}
}
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!