Commit a0ec2931 by Harshit

changes

0 parents
Showing 89 changed files with 1816 additions and 0 deletions
<?php
/**
* PHPMailer SPL autoloader.
* PHP Version 5
* @package PHPMailer
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2014 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* PHPMailer SPL autoloader.
* @param string $classname The name of the class to load
*/
function PHPMailerAutoload($classname)
{
//Can't use __DIR__ as it's only in PHP 5.3+
$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
if (is_readable($filename)) {
require $filename;
}
}
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
//SPL autoloading was introduced in PHP 5.1.2
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
spl_autoload_register('PHPMailerAutoload', true, true);
} else {
spl_autoload_register('PHPMailerAutoload');
}
} else {
/**
* Fall back to traditional autoload for old PHP versions
* @param string $classname The name of the class to load
*/
function spl_autoload_register($classname)
{
PHPMailerAutoload($classname);
}
}
<?php
date_default_timezone_set('Asia/Kolkata');
require 'PHPMailerAutoload.php';
include_once 'helperClass.php' ;
/**
* Description of emailClass
*
* @author admin
*/
class EmailClass {
var $fromname = 'Concorde Tech Turf';
var $defaultUrl = 'mohanritteka.indiahomes.com';
public function callback() {
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$mobile = $_REQUEST['mobile'];
$source = $_REQUEST['source'];
$coutrycode = $_REQUEST['CountryCode'];
$validMobile = EmailClass::validationCheckMobile($mobile);
if ($source === 'Speak to an Expert' || $source === 'Popup Form' || $source === 'Price Popup' || $source === 'Fixed Callback') {
setcookie('popout', 'it works');
if ($validMobile === true) {
$this->_callbackin5minutes($name, $email, $mobile, $countryCode, $_REQUEST['Comment'], '' . $this->defaultUrl. ' - ' . $source, $_REQUEST['projectid']);
}
return $validMobile;
} elseif ($source === 'Footer Form' || $source === 'Instant Callback') {
setcookie('popout', 'it works');
$validEmail = EmailClass::validationCheckEmail($email);
if (($validMobile === true) && ($validEmail === true)) {
if($source === 'Footer Form'){unset($_SESSION['captcha']);}
$this->_callbackin5minutes($name, $email, $mobile, $countryCode, $_REQUEST['Comment'], '' . $this->defaultUrl. ' - ' . $source, $_REQUEST['projectid']);
return $validMobile;
} else{
$errorMsg = 'Enter a valid mobile number and/or email address.';
return $errorMsg;
}
}
}
public static function validationCheckMobile($mobile) {
$msg = true;
if (empty($mobile) || strlen($mobile) >= 18 || strlen($mobile) <= 3 || $mobile === 'Mobile:' || !(EmailClass::is_mobileNumber($mobile))) {
$msg = 'Enter a valid mobile number.';
return $msg;
}
return $msg;
}
public static function validationCheckEmail($email) {
$msg = true;
if (empty($email) || !(EmailClass::isValidEmail($email)) || $email === 'Email:') {
$msg = 'Enter a valid email address.';
return $msg;
}
return $msg;
}
public static function isValidEmail($email) {
//return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email);
return filter_var($email, FILTER_VALIDATE_EMAIL) && preg_match('/@.+\./', $email);
}
public static function is_mobileNumber($mobile) {
$regex1 = '123456789';
$regex2 = '1234567890';
$regex3 = '0123456789';
if (preg_match('/^([0-9])\1*$/', $mobile)) {
return false;
} elseif ($mobile == $regex1) {
return false;
} elseif ($mobile == $regex2) {
return false;
} elseif ($mobile == $regex3) {
return false;
} elseif (preg_match("/[^0-9]/", $mobile)) {
return false;
} else {
return true;
}
}
public function _callbackin5minutes($name, $email, $mobile, $countryCode, $comments, $screenName, $projectID) {
$key = 'SEM';
$campaignName = $_COOKIE['vaLead_Campaign'];
$channelName = $_COOKIE['vaLead_Channel'];
$keyword = $_COOKIE['vaLead_Keyword'];
$placement = $_COOKIE['vaLead_Placement'];
$device = $_COOKIE['vaLead_Device'];
$utmSource = $_COOKIE['vaLead_UtmSourceName'];
$utmMedium = $_COOKIE['vaLead_UtmMediumName'];
$utmCampaign = $_COOKIE['vaLead_UtmCampaignName'];
$ip_add = helperClass::getIpAddr();
//$ChannelDetails = "Source of traffic: VT, Project Name: ". $this->fromname .", Client Name:". $name .", Campaign Name:". $campaignName .", Channel Name:". $channelName .", Keyword:". $keyword .", Placement:". $placement .", Device:". $device;
$ChannelDetails = "Source of traffic: VT, Project Name: .". $this->fromname ." , Client Name:". $name .", Campaign Name:". $campaignName .", Channel Name:". $channelName .", Keyword:". $keyword .", Placement:". $placement .", Device:". $device .", UTM Source Name:". $utmSource .", UTM Medium Name:". $utmMedium .", UTM Campaign Name:". $utmCampaign;
if ($countryCode!="") {
$mobile = $countryCode.$mobile;
}
$url = "http://www.indiahomes.com/util.html?";
$url .= "action=genericFormFill";
$url .= "&name=". urlencode($name) ."";
$url .= "&mobileNumber=". urlencode($mobile) ."";
$url .= "&emailId=". urlencode( $email ) . "";
$url .= "&via=". urlencode($key) ."";
$url .= "&viaDetails=". urlencode($ChannelDetails). "";
$url .= "&projectId=". urlencode($projectID) ."";
$url .= "&ip=". urlencode($ip_add) ."";
$url .= "&screenName=". urlencode($screenName);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
curl_close($ch);
}
}
?>
\ No newline at end of file
<?php
session_start();
$flag = false;
if ($_SESSION['captcha'] == md5($_REQUEST['captcha'])) {
$flag = true;
}
echo json_encode($flag);
//echo $_REQUEST['captcha'];
?>
\ No newline at end of file
This diff could not be displayed because it is too large.
<?php
date_default_timezone_set('Asia/Kolkata');
require 'PHPMailerAutoload.php';
include_once 'helperClass.php';
$name = $_REQUEST['fname'];
$mobile = $_REQUEST['mobile'];
$to_email = $_REQUEST['email'];
if (isset($_REQUEST['email'])) {
/*--------------------- for sending mail start ------------------*/
$mail_client = new PHPMailer;
// SMTP configuration
$mail_client->isSMTP();
$mail_client->Host = 'smtp.gmail.com';
$mail_client->SMTPAuth = true;
$mail_client->SMTPDebug = 0;
$mail_client->Debugoutput = 'html';
$mail_client->Username = 'marketing@realatte.com';
$mail_client->Password = 'rl@12345';
$mail_client->SMTPSecure = 'tls';
$mail_client->Port = 587;
$mail_client->setFrom('marketing@realatte.com', 'Suraksha Smart City');
$mail_client->addReplyTo('marketing@realatte.com', 'Suraksha Smart City');
// Add a recipient
$mail_client->addAddress($to_email);
//$mail->addAddress('marketing@realatte.com');
// Add cc or bcc
//$mail->addCC('marketing@realatte.com');
//$mail->addBCC('marketing@realatte.com');
// Email subject
$mail_client->Subject = 'Thank you for choosing Suraksha Smart City';
// Set email format to HTML
$mail_client->isHTML(true);
// Email body content
$mailContent = "<h1>How to send mail using PHPMailer with Attachment".$mobile."</h1>
<p>".$to_email."The best preparation for tomorrow is doing your best today.”
No one is born successful, success requires preparation .So prepare yourself online at very ease...</p>";
$mailContent .= "<a href='http://www.webpreparations.com'><button type='submit' name='send' class='btn btn-info' style='background-color:#449D44; color:#fff; font-weight:bold;height:50px; border:1px;'>Click Her for Visit Web Preparations</button></a>";
// for send an attatchment
$path = __DIR__."/upload/";
$file_name = "suraksha-smartcity-brochure.pdf";
$mail_client->Body = $mailContent;
$mail_client->addAttachment($path.$file_name);
//$mail->addStringAttachment(file_get_contents('https://path-to-pdf-file.pdf'), 'pdf-file-name.pdf');
$mail_client->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
// Send email
if (!$mail_client->send()) {
//echo '<div class="alert alert-danger">Mail could not be sent.</div>';
//echo 'Mailer Error: ' . $mail->ErrorInfo;
return true;
} else {
//echo '<div class="alert alert-success">Mail has been sent successfully..</div>';
return true;
}
/*--------------------- for sending mail close ------------------*/
}
?>
<?php
/*
* Captcha helper
*
*/
session_start();
function helper_captcha() {
$default_options = array(
'type' => 'num',
'name' => 'captcha',
'num' => 6,
'fontsize' => 15,
'imagewidth' => 70,
'imageheight' => 40,
'fontangle' => 1,
'font' => '../fonts/kelson/Kelson Sans Regular.otf',
'backgroundcolor' => '000000',
'textcolor' => 'FFFFFF'
);
$options = $default_options;
switch ($options['type']) {
case 'string':
$string = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'both':
$string = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
default:
$string = '0123456789';
}
$text = '';
for ($i = 0; $i < $options['num']; $i++) {
$text .= $string[rand(0, strlen($string)-1)];
}
### Save random number to session
$_SESSION[$options['name']] = md5($text);
### Apply image background
//$im = imagecreatefrompng(Config()->ROOT_PATH . 'web/css/captcha/captcha.png');
//imagecopy($final_img, $im, $dst_x, $dst_y, 0, 0, 75, 75);
### Convert HTML backgound color to RGB
if( preg_match( "/([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i", $options['backgroundcolor'], $bgrgb ) )
{$bgred = hexdec( $bgrgb[1] ); $bggreen = hexdec( $bgrgb[2] ); $bgblue = hexdec( $bgrgb[3] );}
### Convert HTML text color to RGB
if( preg_match( "/([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i", $options['textcolor'], $textrgb ) )
{$textred = hexdec( $textrgb[1] ); $textgreen = hexdec( $textrgb[2] ); $textblue = hexdec( $textrgb[3] );}
### Create image
$im = imagecreate( $options['imagewidth'], $options['imageheight'] );
### Declare image's background color
$bgcolor = imagecolorallocatealpha($im,255,255,255,127);
### Declare image's text color
$fontcolor = imagecolorallocate($im, $textred,$textgreen,$textblue);
imagealphablending($im,true);
### Get exact dimensions of text string
$box = @imageTTFBbox($options['fontsize'],$options['fontangle'],$options['font'],$text);
### Get width of text from dimensions
$textwidth = abs($box[4] - $box[0]);
### Get height of text from dimensions
$textheight = abs($box[5] - $box[1]);
### Get x-coordinate of centered text horizontally using length of the image and length of the text
$xcord = ($options['imagewidth']/2)-($textwidth/2)-2;
### Get y-coordinate of centered text vertically using height of the image and height of the text
$ycord = ($options['imageheight']/2)+($textheight/2);
### Declare completed image with colors, font, text, and text location
imagettftext ( $im, $options['fontsize'], $options['fontangle'], $xcord, $ycord, $fontcolor, $options['font'], $text );
### Display completed image as PNG
imagealphablending($im,false);
imagesavealpha($im,true);
header('Content-Type: image/png');
imagepng($im);
### Close the image
imagedestroy($im);
}
helper_captcha();
?>
\ No newline at end of file
<?php
/* Validation Class
* How to use:
*
* 1. Forge your validation object
* $val = Validation::forge('my_validation');
*
* 2. Add your fields, conditions, and error messages:
* $val->add_rule('field_name_1', 'not_empty', array('empty error!'));
* $val->add_rule('field_name_2', 'min:5|max:15', array('min 5 char!', 'max 15 char!'));
*
* or
*
$val->add_rule(
array(
'one' => array(
'table_news_hasnt_id', 'table error!'
),
'two' => array(
'min:5|max:10|not_empty',
array(
'min error!',
'max error!',
'not empty error!'
)
)
)
);
//3. Run the validation like this:
if($val->run()) {
echo 'validation true';
}else{
$this->errors = $val->get_errors();
}
*
* Conditions:
*
* 1.required - required only, isset
* 2.not_empty - check if not empty
* 3.numeric - any numeric, ex.: 6, 6.5
* 4.float - float number, ex.: 6.5
* 5.int - entire number, ex.: 6
* 6.array - check if array
* 7.min:(int) - set min value
* 8.max:(int) - set max value
* 9.email - if email
* 10.date - if date
* 11.cyrillic - if cyrillic
* 12.not - not contains any value (string) or (int)
* 13.equal - if contains any value (string) or (int)
* 14.table_(table_name)_has_(column):$this->request->post('value') - check if value exists in a database, ex.: = (string), (int)
* 15.table_(table_name)_hasnt_(column) - check if value doesn't exists in a database, ex.: <> (string), (int)
* 16.length:(int) - set fixed length
* 17.captcha:($session_variable) - check if captcha matches
*
*
*
*
* Ivaylo Zahariev
* 17.08.2013
*
*/
class Validation {
/**
* @var Fieldset the fieldset this instance validates
*/
protected $fieldset;
/**
* @var array available after validation started running: contains given input values
*/
protected $input = array();
/**
* @var array contains values of fields that validated successfully
*/
protected $validated = array();
/**
* @var array contains Validation_Error instances of encountered errors
*/
protected $errors = array();
/**
* @var array, array contains Validation_Error instances of encountered errors
*/
protected $output_errors = array();
/**
* @var array all fields for validation
*/
protected $fields = array();
/**
* @var array data is going to be validated, ex.: post or custom.
*/
protected $data = array();
/**
* @var int contains filter's second parementer.
*/
protected $range = null;
/**
* @var array contains validation error messages, will overwrite those from lang files
*/
protected $error_messages = array();
/**
* Gets a new instance of the Validation class.
*
* @param string The name or instance of the Fieldset to link to
* @return Validation
*/
public static function forge($fieldset) {
return new self($fieldset);
}
protected function __construct($fieldset) {
$this->fieldset = $fieldset;
}
public function add_rule($rules, $condition = null, array $messages = array()) {
if (is_array($rules)) {
foreach ($rules as $key => $rule) {
if (is_array($rule)) {
$this->dismember($key, current($rule), next($rule));
} else {
$this->dismember($key, $rule, $messages);
}
}
} else {
$this->dismember($rules, $condition, $messages);
}
}
protected function dismember($rule, $condition, $messages) {
if (strpos($condition, '|') !== false) {
$parser = explode('|', $condition);
foreach ($parser as $k => $pr) {
$this->add_field($rule, $pr, $messages[$k]);
}
} else {
$add_message = is_array($messages) ? current($messages) : $messages;
$this->add_field($rule, $condition, $add_message);
}
}
protected function add_field($field, $condition, $message) {
$this->fields[$field][] = $condition;
$this->error_messages[$field][$condition] = $message;
}
public function run($data = null) {
if ($data == null) {
if ($data = $_POST) {
$this->data = $data;
} else {
return false;
}
} else {
$this->data = $data;
}
return $this->action($data);
}
protected function parse($filter) {
if (strpos($filter, ':') !== false) {
$parser = explode(':', $filter);
$this->range = $parser[1];
return $parser[0];
} else {
$this->range = null;
return $filter;
}
}
protected function action($data) {
foreach ($this->fields as $field_name => $patterns) {
foreach ($patterns as $pattern) {
if (array_key_exists($field_name, $this->fields)) {
$filter = $this->parse($pattern);
$value = $this->data[$field_name];
$function = '_validation_' . $filter;
switch (true) {
case preg_match("/(^table_)(.*)(_has_)(.*)$/", $filter, $matches):
$params = '$value, $matches[2], $matches[4]';
$function = '_validation_table_has';
break;
case preg_match("/(^table_)(.*)(_hasnt_)(.*)$/", $filter, $matches):
$params = '$value, $matches[2], $matches[4]';
$function = '_validation_table_hasnt';
break;
default:
$params = '$value';
}
if (method_exists($this, $function)) {
eval('$result = $this->' . $function . '(' . $params . ');');
}
if ($result) {
$this->add_validation($field_name, $filter);
} else {
$this->add_error($field_name, $filter);
}
}
}
}
return $this->pass();
}
protected function pass() {
return empty($this->errors);
}
protected function add_validation($field_name, $filter) {
$this->validated[$field_name][] = $filter;
}
protected function add_error($field_name, $filter) {
$filter = !empty($this->range) ? $filter . ':' . $this->range : $filter;
$this->errors[$field_name] = !empty($this->error_messages[$field_name][$filter]) ? $this->error_messages[$field_name][$filter] : $filter;
$this->output_errors[$field_name][] = $filter;
}
public function get_output_errors() {
return $this->output_errors;
}
public function get_errors() {
$errors = $this->errors;
$output_errors = array();
foreach($errors as $field => $error) {
$output_errors[$field] = $error;
}
return $output_errors;
}
public function get_validated() {
return $this->validated;
}
public function get_messages() {
return $this->error_messages;
}
/**
* Special empty method because 0 and '0' are non-empty values
*
* @param mixed
* @return bool
*/
public static function _empty($val) {
return ($val === false or $val === null or $val === '' or $val === array());
}
/**
* @function boolean required only, isset
*/
public function _validation_required($val) {
return isset($val);
}
/**
* @function boolean check if not empty
*/
public function _validation_not_empty($val) {
return !$this->_empty($val);
}
/**
* @function boolean any numeric, ex.: 6, 6.5
*/
public function _validation_numeric($val) {
return is_numeric($val);
}
/**
* @function boolean float number, ex.: 6.5
*/
public function _validation_float($val) {
return is_numeric($val) && floor($val) != $val;
}
/**
* @function boolean entire number, ex.: 6
*/
public function _validation_int($val) {
return is_numeric($val) && floor($val) == $val;
}
/**
* @function boolean check if array
*/
public function _validation_array($val) {
return is_array($val);
}
/**
* @function boolean set min value
*/
public function _validation_min($val) {
return strlen($val) >= $this->range;
}
/**
* @function boolean set max value
*/
public function _validation_max($val) {
return strlen($val) <= $this->range;
}
/**
* @function boolean set a fixed length of a value
*/
public function _validation_length($val) {
return strlen($val) == $this->range;
}
/**
* @function boolean check if capcha matches
*/
public function _validation_captcha($val) {
if(!isset($_SESSION[$this->range])) return false;
return md5($val) == $_SESSION[$this->range];
}
/**
* @function boolean if email
*/
public function _validation_email($val) {
return filter_var($val, FILTER_VALIDATE_EMAIL);
}
/**
* @function boolean if date
*/
public function _validation_date($val) {
return strtotime($val);
}
/**
* @function boolean if cyrillic
*/
public function _validation_cyrillic($val) {
return preg_match('/^[\p{Cyrillic}\p{Common}]+$/u', $val);
}
/**
* @function boolean not contains any value (string) or (int)
*/
public function _validation_not($val) {
return (string)$val != (string)$this->range or (int) $val != (int)$this->range;
}
/**
* @function boolean if contains any value (string) or (int)
*/
public function _validation_equal($val) {
return $val == $this->range or (int) $val == $this->range;
}
/**
* @function boolean check if value exists in a database, ex.: = (string), (int)
*/
public function _validation_table_has($val, $table, $column) {
$query = sprintf("SELECT COUNT(*) as counter FROM %s WHERE %s = '%s'", mysql_escape_string($table), mysql_escape_string($column), mysql_escape_string($val));
$result = Registry()->db->query($query);
return $result->counter > 0;
}
/**
* @function boolean check if value doesn't exists in a database, ex.: <> (string), (int)
*/
public function _validation_table_hasnt($val, $table, $column) {
$query = sprintf("SELECT COUNT(*) as counter FROM %s WHERE %s = '%s'", mysql_escape_string($table), mysql_escape_string($column), mysql_escape_string($val));
$result = Registry()->db->query($query);
return $result->counter == 0;
}
/**
* Sanitizes an array data
*
* @param string $array
* @return array
*/
public static function sanitize(&$data) {
array_walk($data, function(&$value, $key) {
if (is_array($value)) {
Validation::sanitize($value);
} else {
$value = mysql_escape_string(strip_tags(trim($value)));
}
});
return $data;
}
}
function d($what) {
print '<pre>';
print_r($what);
print '</pre>';
}
?>
\ No newline at end of file
File mode changed
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
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
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
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
This file is too large to display.
This diff could not be displayed because it is too large.
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(function ($) {
jQuery.validator.addMethod(
"country",
function (value, element) {
return this.optional(element) || /^[^+]/.test(value);
},
"Enter Number Without Country Code"
);
jQuery.validator.addMethod(
"number",
function (value, element) {
return this.optional(element) || value.match(/^[1-9][0-9]*$/);
},
"Please enter the number without beginning with '0'"
);
jQuery.validator.addMethod(
"mobile",
function (value, element) {
return this.optional(element) || $(element).intlTelInput("isValidNumber");
},
"Please enter a valid mobile number"
);
jQuery.validator.addMethod(
"alphabets",
function (value, element) {
return this.optional(element) || /^[a-zA-Z ]*$/.test(value);
},
"Please enter Alphabets only"
);
jQuery.validator.addMethod(
"email",
function (value, element) {
return (
this.optional(element) ||
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(
value
)
);
},
"Please enter a valid email address."
);
jQuery.validator.addMethod(
"valueNotEquals",
function (value, element, arg) {
return arg !== value;
},
"Value must not equal arg."
);
if ($("#contact-form").length > 0) {
$("#contact-form").validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
number: true,
minlength: 7,
maxlength: 14,
},
email: {
required: true,
email: true,
},
},
messages: {
fname: {
required: "Enter Your Name",
},
mobile: {
required: "Enter Your Number",
},
email: {
required: "Enter Your Email",
},
},
});
}
if ($("#price-popup").length > 0) {
$("#price-popup").validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
number: true,
minlength: 7,
maxlength: 14,
},
email: {
required: true,
},
},
});
}
if ($("#broch-form").length > 0) {
$("#broch-form").validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
number: true,
minlength: 7,
maxlength: 14,
},
email: {
required: true,
},
},
});
}
if ($("#plans-form").length > 0) {
$("#plans-form").validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
number: true,
minlength: 7,
maxlength: 14,
},
email: {
required: true,
},
},
messages: {
fname: {
required: "Enter Your Name",
},
email: {
required: "Enter Your Email",
},
mobile: {
required: "Enter Your Number",
},
},
});
}
if ($("#offer-forms").length > 0) {
$("#offer-forms").validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
number: true,
minlength: 7,
maxlength: 14,
},
email: {
required: true,
},
},
messages: {
fname: {
required: "Enter Your Name",
},
email: {
required: "Enter Your Email",
},
mobile: {
required: "Enter Your Number",
},
},
});
}
$("#video-form").validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
number: true,
minlength: 10,
maxlength: 10,
},
email: {
required: true,
},
},
messages: {
fname: {
required: "Enter Your Name",
},
email: {
required: "Enter Your Email",
},
mobile: {
required: "Enter Your Number",
},
},
});
if ($("#download-brochure").length > 0) {
$("#download-brochure").validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
number: true,
minlength: 7,
maxlength: 14,
},
email: {
required: true,
},
},
messages: {
fname: {
required: "Enter Your Name",
},
email: {
required: "Enter Your Email",
},
mobile: {
required: "Enter Your Number",
},
},
});
}
if ($("#main-popup").length > 0) {
$("#main-popup").validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
number: true,
minlength: 7,
maxlength: 14,
},
email: {
required: true,
},
},
});
}
if ($("#float-form").length > 0) {
$("#float-form").validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
number: true,
minlength: 7,
maxlength: 14,
},
email: {
required: true,
email: true,
},
},
messages: {
fname: {
required: "Enter Your Name",
},
email: {
required: "Enter Your Email",
},
mobile: {
required: "Enter Your Number",
},
},
});
}
});
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ 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')) {
// $(window).load(function() {
// setTimeout(function() {
// $('#main-pop').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);
// });
});
\ No newline at end of file
/*! WOW - v1.1.2 - 2015-04-07
* Copyright (c) 2015 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
\ No newline at end of file
.sl-wrapper .sl-close,
.sl-wrapper .sl-navigation button {
height: 44px;
line-height: 44px;
font-family: Arial, Baskerville, monospace
}
.sl-wrapper .sl-close:focus,
.sl-wrapper .sl-navigation button:focus {
outline: 0
}
body.hidden-scroll {
overflow: hidden
}
.sl-overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #000;
opacity: .7;
display: none;
z-index: 9999;
}
.sl-wrapper .sl-close,
.sl-wrapper .sl-counter {
top: 30px;
display: none;
color: #fff;
position: fixed
}
.sl-wrapper {
z-index: 1040;
}
.sl-wrapper button {
border: 0;
background: 0 0;
font-size: 28px;
padding: 0;
cursor: pointer
}
.sl-wrapper button:hover {
opacity: .7
}
.sl-wrapper .sl-close {
right: 30px;
z-index: 99999;
margin-top: -14px;
margin-right: -14px;
width: 44px;
font-size: 3rem
}
.sl-wrapper .sl-counter {
left: 30px;
z-index: 99999;
font-size: 15px;
}
.sl-wrapper .sl-navigation {
width: 100%;
display: none
}
.sl-wrapper .sl-navigation button {
position: fixed;
top: 50%;
margin-top: -22px;
width: 22px;
text-align: center;
display: block;
z-index: 99999;
color: #fff;
}
.sl-wrapper .sl-navigation button.sl-next {
right: 5px;
font-size: 2rem
}
.sl-wrapper .sl-navigation button.sl-prev {
left: 5px;
font-size: 2rem
}
.sl-wrapper .sl-image {
position: fixed;
-ms-touch-action: none;
touch-action: none;
z-index: 10000;
}
.sl-wrapper .sl-image img {
margin: 0;
padding: 0;
display: block;
border: 0
}
.sl-wrapper .sl-image iframe {
background: #000;
border: 0
}
@media (min-width: 35.5em) {
.sl-wrapper .sl-navigation button {
width: 44px
}
.sl-wrapper .sl-navigation button.sl-next {
right: 10px;
font-size: 3rem
}
.sl-wrapper .sl-navigation button.sl-prev {
left: 10px;
font-size: 3rem
}
.sl-wrapper .sl-image iframe,
.sl-wrapper .sl-image img {
border: 0
}
}
@media (min-width: 50em) {
.sl-wrapper .sl-navigation button {
width: 44px
}
.sl-wrapper .sl-navigation button.sl-next {
right: 20px;
font-size: 3rem
}
.sl-wrapper .sl-navigation button.sl-prev {
left: 20px;
font-size: 3rem
}
.sl-wrapper .sl-image iframe,
.sl-wrapper .sl-image img {
border: 0
}
}
.sl-wrapper .sl-image .sl-caption {
display: none;
padding: 10px;
color: #fff;
background: rgba(0, 0, 0, .8);
position: absolute;
bottom: 0;
left: 0;
right: 0
}
.sl-wrapper .sl-image .sl-caption.pos-top {
bottom: auto;
top: 0
}
.sl-wrapper .sl-image .sl-caption.pos-outside {
bottom: auto
}
.sl-wrapper .sl-image .sl-download {
display: none;
position: absolute;
bottom: 5px;
right: 5px;
color: #000;
z-index: 1060
}
.sl-spinner {
display: none;
border: 5px solid #333;
border-radius: 40px;
height: 40px;
left: 50%;
margin: -20px 0 0 -20px;
opacity: 0;
position: fixed;
top: 50%;
width: 40px;
z-index: 1007;
-webkit-animation: pulsate 1s ease-out infinite;
-moz-animation: pulsate 1s ease-out infinite;
-ms-animation: pulsate 1s ease-out infinite;
-o-animation: pulsate 1s ease-out infinite;
animation: pulsate 1s ease-out infinite
}
.sl-scrollbar-measure {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll
}
@-webkit-keyframes pulsate {
0% {
transform: scale(.1);
opacity: 0
}
50% {
opacity: 1
}
100% {
transform: scale(1.2);
opacity: 0
}
}
@keyframes pulsate {
0% {
transform: scale(.1);
opacity: 0
}
50% {
opacity: 1
}
100% {
transform: scale(1.2);
opacity: 0
}
}
@-moz-keyframes pulsate {
0% {
transform: scale(.1);
opacity: 0
}
50% {
opacity: 1
}
100% {
transform: scale(1.2);
opacity: 0
}
}
@-o-keyframes pulsate {
0% {
transform: scale(.1);
opacity: 0
}
50% {
opacity: 1
}
100% {
transform: scale(1.2);
opacity: 0
}
}
@-ms-keyframes pulsate {
0%, 100% {
opacity: 0
}
0% {
transform: scale(.1)
}
50% {
opacity: 1
}
100% {
transform: scale(1.2)
}
}
\ No newline at end of file
/*
By André Rinas, www.andrerinas.de
Available for use under the MIT License
*/
!function(t,e,i,n){"use strict";t.fn.simpleLightbox=function(n){var a,n=t.extend({sourceAttr:"href",overlay:!0,spinner:!0,nav:!0,navText:["&lsaquo;","&rsaquo;"],captions:!0,captionDelay:0,captionSelector:"img",captionType:"attr",captionsData:"title",captionPosition:"bottom",close:!0,closeText:"×",swipeClose:!0,showCounter:!0,fileExt:"png|jpg|jpeg|gif",animationSlide:!0,animationSpeed:250,preloading:!0,enableKeyboard:!0,loop:!0,rel:!1,docClose:!0,swipeTolerance:50,className:"simple-lightbox",widthRatio:.8,heightRatio:.9,disableRightClick:!1,disableScroll:!0,alertError:!0,alertErrorMessage:"Image not found, next image will be loaded",additionalHtml:!1,history:!0},n),o=(e.navigator.pointerEnabled||e.navigator.msPointerEnabled,0),s=0,l=t(),r=function(){var t=i.body||i.documentElement;return t=t.style,""===t.WebkitTransition?"-webkit-":""===t.MozTransition?"-moz-":""===t.OTransition?"-o-":""===t.transition&&""},c=!1,p=[],d=n.rel&&!1!==n.rel?function(e,i){return t(i.selector).filter(function(){return t(this).attr("rel")===e})}(n.rel,this):this,h=0,g=!1!==(r=r()),u="pushState"in history,f=!1,m=e.location,v=function(){return m.hash.substring(1)},b=v(),x=function(){v();var t="pid="+(D+1),e=m.href.split("#")[0]+"#"+t;u?history[f?"replaceState":"pushState"]("",i.title,e):f?m.replace(e):m.hash=t,f=!0},y=function(){u?history.pushState("",i.title,m.pathname+m.search):m.hash="",clearTimeout(a)},w=function(){f?a=setTimeout(x,800):x()},E="simplelb",T=t("<div>").addClass("sl-overlay"),C=t("<button>").addClass("sl-close").html(n.closeText),S=t("<div>").addClass("sl-spinner").html("<div></div>"),k=t("<div>").addClass("sl-navigation").html('<button class="sl-prev">'+n.navText[0]+'</button><button class="sl-next">'+n.navText[1]+"</button>"),I=t("<div>").addClass("sl-counter").html('<span class="sl-current"></span>/<span class="sl-total"></span>'),q=!1,D=0,M=t("<div>").addClass("sl-caption pos-"+n.captionPosition),A=t("<div>").addClass("sl-image"),R=t("<div>").addClass("sl-wrapper").addClass(n.className),O=function(e){if(!n.fileExt)return!0;var i=/\.([0-9a-z]+)(?=[?#])|(\.)(?:[\w]+)$/gim,a=t(e).attr(n.sourceAttr).match(i);return a&&"a"==t(e).prop("tagName").toLowerCase()&&new RegExp(".("+n.fileExt+")$","i").test(a)},P=function(e){e.trigger(t.Event("show.simplelightbox")),n.disableScroll&&(h=K("hide")),R.appendTo("body"),A.appendTo(R),n.overlay&&T.appendTo(t("body")),q=!0,D=d.index(e),l=t("<img/>").hide().attr("src",e.attr(n.sourceAttr)),-1==p.indexOf(e.attr(n.sourceAttr))&&p.push(e.attr(n.sourceAttr)),A.html("").attr("style",""),l.appendTo(A),X(),T.fadeIn("fast"),t(".sl-close").fadeIn("fast"),S.show(),k.fadeIn("fast"),t(".sl-wrapper .sl-counter .sl-current").text(D+1),I.fadeIn("fast"),z(),n.preloading&&Y(),setTimeout(function(){e.trigger(t.Event("shown.simplelightbox"))},n.animationSpeed)},z=function(i){if(l.length){var a=new Image,o=t(e).width()*n.widthRatio,s=t(e).height()*n.heightRatio;a.src=l.attr("src"),t(a).bind("error",function(e){d.eq(D).trigger(t.Event("error.simplelightbox")),q=!1,c=!0,S.hide(),n.alertError&&alert(n.alertErrorMessage),j(1==i||-1==i?i:1)}),a.onload=function(){void 0!==i&&d.eq(D).trigger(t.Event("changed.simplelightbox")).trigger(t.Event((1===i?"nextDone":"prevDone")+".simplelightbox")),n.history&&w(),-1==p.indexOf(l.attr("src"))&&p.push(l.attr("src"));var r=a.width,u=a.height;if(r>o||u>s){var f=r/u>o/s?r/o:u/s;r/=f,u/=f}t(".sl-image").css({top:(t(e).height()-u)/2+"px",left:(t(e).width()-r-h)/2+"px"}),S.hide(),l.css({width:r+"px",height:u+"px"}).fadeIn("fast"),c=!0;var m,v="self"==n.captionSelector?d.eq(D):d.eq(D).find(n.captionSelector);if(m="data"==n.captionType?v.data(n.captionsData):"text"==n.captionType?v.html():v.prop(n.captionsData),n.loop||(0===D&&t(".sl-prev").hide(),D>=d.length-1&&t(".sl-next").hide(),D>0&&t(".sl-prev").show(),D<d.length-1&&t(".sl-next").show()),1==d.length&&t(".sl-prev, .sl-next").hide(),1==i||-1==i){var b={opacity:1};n.animationSlide&&(g?(W(0,100*i+"px"),setTimeout(function(){W(n.animationSpeed/1e3,"0px")},50)):b.left=parseInt(t(".sl-image").css("left"))+100*i+"px"),t(".sl-image").animate(b,n.animationSpeed,function(){q=!1,L(m)})}else q=!1,L(m);n.additionalHtml&&0===t(".sl-additional-html").length&&t("<div>").html(n.additionalHtml).addClass("sl-additional-html").appendTo(t(".sl-image"))}}},L=function(e){""!==e&&void 0!==e&&n.captions&&M.html(e).hide().appendTo(t(".sl-image")).delay(n.captionDelay).fadeIn("fast")},W=function(e,i){var n={};n[r+"transform"]="translateX("+i+")",n[r+"transition"]=r+"transform "+e+"s linear",t(".sl-image").css(n)},X=function(){t(e).on("resize."+E,z),t(i).on("click.simplelb touchstart."+E,".sl-close",function(t){t.preventDefault(),c&&H()}),n.history&&setTimeout(function(){t(e).on("hashchange."+E,function(){c&&v()===b&&H()})},40),k.on("click."+E,"button",function(e){e.preventDefault(),o=0,j(t(this).hasClass("sl-next")?1:-1)});var a=0,l=0,r=0,p=0,h=!1,u=0;A.on("touchstart.simplelb mousedown."+E,function(t){return!!h||(g&&(u=parseInt(A.css("left"))),h=!0,a=t.originalEvent.pageX||t.originalEvent.touches[0].pageX,r=t.originalEvent.pageY||t.originalEvent.touches[0].pageY,!1)}).on("touchmove.simplelb mousemove.simplelb pointermove MSPointerMove",function(t){if(!h)return!0;t.preventDefault(),l=t.originalEvent.pageX||t.originalEvent.touches[0].pageX,p=t.originalEvent.pageY||t.originalEvent.touches[0].pageY,o=a-l,s=r-p,n.animationSlide&&(g?W(0,-o+"px"):A.css("left",u-o+"px"))}).on("touchend.simplelb mouseup.simplelb touchcancel.simplelb mouseleave.simplelb pointerup pointercancel MSPointerUp MSPointerCancel",function(t){if(h){h=!1;var e=!0;n.loop||(0===D&&o<0&&(e=!1),D>=d.length-1&&o>0&&(e=!1)),Math.abs(o)>n.swipeTolerance&&e?j(o>0?1:-1):n.animationSlide&&(g?W(n.animationSpeed/1e3,"0px"):A.animate({left:u+"px"},n.animationSpeed/2)),n.swipeClose&&Math.abs(s)>50&&Math.abs(o)<n.swipeTolerance&&H()}})},N=function(){k.off("click","button"),t(i).off("click."+E,".sl-close"),t(e).off("resize."+E),t(e).off("hashchange."+E)},Y=function(){var e=D+1<0?d.length-1:D+1>=d.length-1?0:D+1,i=D-1<0?d.length-1:D-1>=d.length-1?0:D-1;t("<img />").attr("src",d.eq(e).attr(n.sourceAttr)).on("load",function(){-1==p.indexOf(t(this).attr("src"))&&p.push(t(this).attr("src")),d.eq(D).trigger(t.Event("nextImageLoaded.simplelightbox"))}),t("<img />").attr("src",d.eq(i).attr(n.sourceAttr)).on("load",function(){-1==p.indexOf(t(this).attr("src"))&&p.push(t(this).attr("src")),d.eq(D).trigger(t.Event("prevImageLoaded.simplelightbox"))})},j=function(e){d.eq(D).trigger(t.Event("change.simplelightbox")).trigger(t.Event((1===e?"next":"prev")+".simplelightbox"));var i=D+e;if(!(q||(i<0||i>=d.length)&&!1===n.loop)){D=i<0?d.length-1:i>d.length-1?0:i,t(".sl-wrapper .sl-counter .sl-current").text(D+1);var a={opacity:0};n.animationSlide&&(g?W(n.animationSpeed/1e3,-100*e-o+"px"):a.left=parseInt(t(".sl-image").css("left"))+-100*e+"px"),t(".sl-image").animate(a,n.animationSpeed,function(){setTimeout(function(){var i=d.eq(D);l.attr("src",i.attr(n.sourceAttr)),-1==p.indexOf(i.attr(n.sourceAttr))&&S.show(),t(".sl-caption").remove(),z(e),n.preloading&&Y()},100)})}},H=function(){if(!q){var e=d.eq(D),i=!1;e.trigger(t.Event("close.simplelightbox")),n.history&&y(),t(".sl-image img, .sl-overlay, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter").fadeOut("fast",function(){n.disableScroll&&K("show"),t(".sl-wrapper, .sl-overlay").remove(),N(),i||e.trigger(t.Event("closed.simplelightbox")),i=!0}),l=t(),c=!1,q=!1}},K=function(n){var a=0;if("hide"==n){var o=e.innerWidth;if(!o){var s=i.documentElement.getBoundingClientRect();o=s.right-Math.abs(s.left)}if(i.body.clientWidth<o){var l=i.createElement("div"),r=parseInt(t("body").css("padding-right"),10);l.className="sl-scrollbar-measure",t("body").append(l),a=l.offsetWidth-l.clientWidth,t(i.body)[0].removeChild(l),t("body").data("padding",r),a>0&&t("body").addClass("hidden-scroll").css({"padding-right":r+a})}}else t("body").removeClass("hidden-scroll").css({"padding-right":t("body").data("padding")});return a};return function(){n.close&&C.appendTo(R),n.showCounter&&d.length>1&&(I.appendTo(R),I.find(".sl-total").text(d.length)),n.nav&&k.appendTo(R),n.spinner&&S.appendTo(R)}(),d.on("click."+E,function(e){if(O(this)){if(e.preventDefault(),q)return!1;P(t(this))}}),t(i).on("click.simplelb touchstart."+E,function(e){c&&n.docClose&&0===t(e.target).closest(".sl-image").length&&0===t(e.target).closest(".sl-navigation").length&&H()}),n.disableRightClick&&t(i).on("contextmenu",".sl-image img",function(t){return!1}),n.enableKeyboard&&t(i).on("keyup."+E,function(t){if(o=0,c){t.preventDefault();var e=t.keyCode;27==e&&H(),37!=e&&39!=t.keyCode||j(39==t.keyCode?1:-1)}}),this.open=function(e){e=e||t(this[0]),P(e)},this.next=function(){j(1)},this.prev=function(){j(-1)},this.close=function(){H()},this.destroy=function(){t(i).unbind("click."+E).unbind("keyup."+E),H(),t(".sl-overlay, .sl-wrapper").remove(),this.off("click")},this.refresh=function(){this.destroy(),t(this.selector).simpleLightbox(n)},this}}(jQuery,window,document);
// You can customize Simplelightbox with the following variables:
$sl-font-family: Arial, Baskerville, monospace !default;
$sl-overlay-background: #fff !default;
$sl-navigation-color: #000 !default;
$sl-caption-color: #fff !default;
$sl-caption-background: rgba(0, 0, 0, 0.8) !default;
$sl-counter-fontsize: 1rem !default;
$sl-close-fontsize: 3rem !default;
$sl-breakpoint-medium: 35.5em !default; // 568px, when 1em == 16px
$sl-breakpoint-large: 50em !default; // 800px, when 1em == 16px
$sl-arrow-fontsize-small: 2rem !default;
$sl-arrow-fontsize-medium: 3rem !default;
$sl-arrow-fontsize-large: 3rem !default;
$sl-img-border-small: 0 none !default;
$sl-img-border-medium: 0 none !default;
$sl-img-border-large: 0 none !default;
$sl-iframe-border-small: 0 none !default;
$sl-iframe-border-medium: 0 none !default;
$sl-iframe-border-large: 0 none !default;
body.hidden-scroll {
overflow: hidden;
}
.sl-overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: $sl-overlay-background;
opacity: 0.7;
display: none;
z-index: 1050;
}
.sl-wrapper {
z-index: 1040;
button {
border: 0 none;
background: transparent;
font-size: 28px;
padding: 0;
cursor: pointer;
&:hover {
opacity: 0.7;
}
}
.sl-close {
display: none;
position: fixed;
right: 30px;
top: 30px;
z-index: 1060;
margin-top: -14px;
margin-right: -14px;
height: 44px;
width: 44px;
line-height: 44px;
font-family: $sl-font-family;
color: $sl-navigation-color;
font-size: $sl-close-fontsize;
&:focus {
outline: none;
}
}
.sl-counter {
display: none;
position: fixed;
top: 30px;
left: 30px;
z-index: 1060;
color: $sl-navigation-color;
font-size: $sl-counter-fontsize;
}
.sl-navigation {
width: 100%;
display: none;
button {
position: fixed;
top: 50%;
margin-top: -22px;
height: 44px;
width: 22px;
line-height: 44px;
text-align: center;
display: block;
z-index: 1060;
font-family: $sl-font-family;
color: $sl-navigation-color;
&.sl-next {
right: 5px;
font-size: $sl-arrow-fontsize-small;
}
&.sl-prev {
left: 5px;
font-size: $sl-arrow-fontsize-small;
}
&:focus {
outline: none;
}
@media (min-width: $sl-breakpoint-medium) {
width: 44px;
&.sl-next {
right: 10px;
font-size: $sl-arrow-fontsize-medium;
}
&.sl-prev {
left: 10px;
font-size: $sl-arrow-fontsize-medium;
}
}
@media (min-width: $sl-breakpoint-large) {
width: 44px;
&.sl-next {
right: 20px;
font-size: $sl-arrow-fontsize-large;
}
&.sl-prev {
left: 20px;
font-size: $sl-arrow-fontsize-large;
}
}
}
}
.sl-image {
position: fixed;
-ms-touch-action: none;
touch-action: none;
z-index: 10000;
img {
margin: 0;
padding: 0;
display: block;
border: $sl-img-border-small;
@media (min-width: $sl-breakpoint-medium) {
border: $sl-img-border-medium;
}
@media (min-width: $sl-breakpoint-large) {
border: $sl-img-border-large;
}
}
iframe {
background: #000;
border: $sl-iframe-border-small;
@media (min-width: $sl-breakpoint-medium) {
border: $sl-iframe-border-medium;
}
@media (min-width: $sl-breakpoint-large) {
border: $sl-iframe-border-large;
}
}
.sl-caption {
display: none;
padding: 10px;
color: $sl-caption-color;
background: $sl-caption-background;
position: absolute;
bottom: 0;
left: 0;
right: 0;
&.pos-top {
bottom: auto;
top: 0;
}
&.pos-outside {
bottom: auto;
}
}
.sl-download {
display: none;
position: absolute;
bottom: 5px;
right: 5px;
color: $sl-navigation-color;
z-index: 1060;
}
}
}
.sl-spinner {
display: none;
border: 5px solid #333;
border-radius: 40px;
height: 40px;
left: 50%;
margin: -20px 0 0 -20px;
opacity: 0;
position: fixed;
top: 50%;
width: 40px;
z-index: 1007;
-webkit-animation: pulsate 1s ease-out infinite;
-moz-animation: pulsate 1s ease-out infinite;
-ms-animation: pulsate 1s ease-out infinite;
-o-animation: pulsate 1s ease-out infinite;
animation: pulsate 1s ease-out infinite;
}
.sl-scrollbar-measure {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll;
}
@-webkit-keyframes pulsate{
0% {
transform: scale(.1);
opacity: 0.0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1.2);
opacity: 0;
}
}
@keyframes pulsate {
0% {
transform: scale(.1);
opacity: 0.0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1.2);
opacity: 0;
}
}
@-moz-keyframes pulsate{
0% {
transform: scale(.1);
opacity: 0.0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1.2);
opacity: 0;
}
}
@-o-keyframes pulsate{
0% {
transform: scale(.1);
opacity: 0.0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1.2);
opacity: 0;
}
}
@-ms-keyframes pulsate{
0% {
transform: scale(.1);
opacity: 0.0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1.2);
opacity: 0;
}
}
<?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'];
$device = $_COOKIE['cstm_ppc_device'];
$gclid = $_COOKIE['gclid'];
$ip = $_SERVER['REMOTE_ADDR'];
$fname = $_REQUEST['fname'];
$lname = $_REQUEST['lname'];
$email = $_REQUEST['email'];
$mobile = str_replace(' ', '', $_REQUEST['mobile']);
//$projectname = $_REQUEST['projectname'];
$source = $_REQUEST['source'];
$message = $_REQUEST['message'];
//$country_code = $_REQUEST['country_code'];
$name = $fname . ' ' . $lname;
$fullmobile = "91" . $mobile;
// Google Sheet Interation------------------
$postFields = "entry.449648499=" . $name;
$postFields .= "&entry.1379833540=" . $email;
$postFields .= "&entry.758332158=" . $fullmobile;
$postFields .= "&entry.1900106466=" . $message;
$postFields .= "&entry.1693361781=" . $source;
$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']);
$postFields .= '&entry.399907321=' . urlencode($_COOKIE['cstm_ppc_medium']);
$postFields .= '&entry.1966964226=' . urlencode($_COOKIE['gclid']);
$postFields .= '&entry.2132069230=' . $ip;
$ch3 = curl_init();
curl_setopt($ch3, CURLOPT_URL, "https://docs.google.com/forms/u/0/d/e/1FAIpQLSf1umE0Ufk6C5pCRFeygSVIxCoF880P4Tz62kJ8fG8ErXYOLQ/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!