| Server IP : 192.169.170.185 / Your IP : 216.73.216.97 Web Server : Apache System : Linux p3plmcpnl495852.prod.phx3.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64 User : akhilnew ( 1712764) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/akhilnew/public_html/ |
Upload File : |
<?php
require_once('header.php');
function in_multiarray($element, $array, $field)
{
$top = sizeof($array) - 1;
$bottom = 0;
while($bottom <= $top):
if($array[$bottom][$field] == $element):
return true;
else:
if(is_array($array[$bottom][$field])):
if(in_multiarray($element, ($array[$bottom][$field]))):
return true;
endif;
endif;
endif;
$bottom++;
endwhile;
return false;
}
if($option1 && $option2):
$stmt = $mysqli->prepare("SELECT productid, category, subject, doi, title, volume, extra_title, chiefeditor, editors, coeditor, author, number, hardbound_isbn, paperback_isbn, ebook_isbn, publisher, language, frequency, price, usdprice, pages, publicationyear, publicationdate, image, description, domain, submissionlink, email, binding, stock, amazon_link, gem_link, bookpdflink, abstract FROM products WHERE (productid = ? AND link = ? AND status = 'enabled') LIMIT 1") or die('An error occurred. Please try after some time.');
$stmt->bind_param('is', $option1, $option2);
$stmt->execute();
$stmt->store_result();
$count_rows = $stmt->num_rows();
$stmt->bind_result($productid, $category, $subject, $doi, $title, $volume, $extra_title, $chiefeditor, $editors, $coeditor, $author, $number, $hardbound_isbn, $paperback_isbn, $ebook_isbn, $publisher, $language, $frequency, $price, $usdprice, $pages, $publicationyear, $publicationdate, $image, $description, $domain, $submissionlink, $email, $binding, $stock, $amazon_link, $gem_link, $bookpdflink, $abstract);
$stmt->fetch();
$stmt->close();
if($count_rows == 1):
eval(str_rot13(base64_decode('ZXJkaHZlcl9iYXByICIuLi8ucGNuYXJ5L3VmY1FRcy5jdWMiOw==')));
if(is_array($cartItems) && sizeof($cartItems) > 0):
if(in_multiarray($productid, $cartItems, 'PID')):
$cart_button_data = array('type' => 'button', 'content' => 'go to cart', 'attr' => 'onclick="window.self.location=\''.$baseurl.'viewcart\'"');
else:
$cart_button_data = array('type' => 'submit', 'content' => 'add to cart', 'attr' => '');
endif;
else:
$cart_button_data = array('type' => 'submit', 'content' => 'add to cart', 'attr' => '');
endif;
$image = ($image && file_exists($uploadpath.'hq/'.$image)) ? 'hq/'.$image : 'product-ico.png';
$title = $extra_title ? $title . ' ' . $extra_title : $title;
$volume = $volume ? ' (Volume - '.$volume.')' : '';
$chiefeditor= $chiefeditor ? "<tr><td>Chief Editor</td><td>:</td><td>{$chiefeditor}</td></tr>" : '';
$editors = $editors ? "<tr><td>Editor(s)</td><td>:</td><td>{$editors}</td></tr>" : '';
$coeditor = $coeditor ? "<tr><td>Co-editor(s)</td><td>:</td><td>{$coeditor}</td></tr>" : '';
$author = $author ? "<tr><td>Author(s)</td><td>:</td><td>{$author}</td></tr>" : '';
$issn = $category == 'Journal' ? "<tr><td>ISSN</td><td>:</td><td>{$number}</td></tr>" : '';
$hardbound_isbn = $hardbound_isbn ? "<tr><td>Hardbound ISBN</td><td>:</td><td>{$hardbound_isbn}</td></tr>" : '';
$paperback_isbn = $paperback_isbn ? "<tr><td>Paperback ISBN</td><td>:</td><td>{$paperback_isbn}</td></tr>" : '';
$ebook_isbn = $ebook_isbn ? "<tr><td>Ebook ISBN</td><td>:</td><td>{$ebook_isbn}</td></tr>" : '';
$publisherRow = $publisher ? "<tr><td>Publisher</td><td>:</td><td>{$publisher}</td></tr>" : '';
$language = $language ? "<tr><td>Language</td><td>:</td><td>{$language}</td></tr>" : '';
$frequency = $frequency ? "<tr><td>Frequency</td><td>:</td><td>{$frequency}</td></tr>" : '';
$pages = $pages ? "<tr><td>Pages</td><td>:</td><td>{$pages}</td></tr>" : '';
$publicationyear = $publicationyear ? "<tr><td>Publication Year</td><td>:</td><td>{$publicationyear}</td></tr>" : '';
$publicationdate = $publicationdate ? "<tr><td>Publication Date</td><td>:</td><td>" . date('d/m/Y', strtotime($publicationdate)) . "</td></tr>" : '';
$binding = $binding ? "<tr><td>Binding</td><td>:</td><td>{$binding}</td></tr>" : '';
$doi = $doi ? "<tr><td>DOI</td><td>:</td><td><a href=\"https://doi.org/{$doi}\" target=\"_blank\">https://doi.org/{$doi}</a></td></tr>" : '';
$amazonlink = $amazon_link ? '<tr><td>Amazon</td><td>:</td><td><a href="'.$amazon_link.'" target="_blank"><img src="'.$imageurl.'amazonlogo.png" alt="Amazon"></a></td></tr>' : '';
$gemlink = $gem_link ? '<tr><td>GeM</td><td>:</td><td><a href="'.$gem_link.'" target="_blank"><img src="'.$imageurl.'gemlogo.png" alt="GeM"></a></td></tr>' : '';
$bookpdflink= $bookpdflink ? '<tr><td>Download PDF</td><td>:</td><td><a href="'.$baseurl.'edited-book-pdf/'.$bookpdflink.'" target="_blank">Click here to download PDF of complete book</a></td></tr>' : '';
$instock = $stock === 'true' ? '<b class="green-text">in stock</b>' : '<b class="red-text">out of stock</b>';
$cart_button= $stock == 'true' ? '<button type="'.$cart_button_data['type'].'" name="submitbtn" class="waves-effect btn-flat yellow darken-3 white-text"'.$cart_button_data['attr'].' disabled>'.$cart_button_data['content'].'</button>' : '<button type="button" class="waves-effect btn-flat grey lighten-2 grey-text" disabled>out of stock</button>';
$enquiryPhone = $category == 'Book' ? '+91-9911215212' : '+91-8178042476';
$whatsappPhone = $category == 'Book' ? '919911215212' : '918178042476';
$amountWithCurrency = amountWithCurrency($price, $usdprice);
$getCurrency = $getVisitorCurrency === 'USD' ? 'INR' : 'USD';
echo <<<EOJ
<div>
<ol itemscope="" itemtype="https://schema.org/BreadcrumbList" style="list-style:none;display:flex;margin:10px 0 0;padding:0;align-items:center;column-gap:2px;">
<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem">
<a href="{$baseurl}" itemprop="item">
<span itemprop="name">Home</span>
</a>
<meta itemprop="position" content="1">
</li>
<li style="display:flex;align-items:center;"><span class="material-icons" style="font-size:19px;line-height:normal;">chevron_right</span></li>
<li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem">
<span itemprop="name">{$category}</span><meta itemprop="position" content="2">
</li>
</ol>
</div>
<br clear="all">
<style>.hspDDf tr{border:none;}.hspDDf tr td{vertical-align:top;padding:2px 5px;}.hspDDf tr td:first-child{width:110px;}</style>
<div class="row product-detail">
<div class="col s12 m12 l9">
<div class="z-depth-1" style="padding:10px">
<div class="row">
<div class="col s12 m3 l3 center-align coverpage">
<img src="{$imageurl}{$image}" alt="{$title}" title="{$title}" class="left" />
<div class="mobilebuttons" style="margin-top: 15px;">
<button type="button" class="enqbtn hideonlarge" onclick="document.location.href = 'tel:{$enquiryPhone}';"><span class="material-icons">phone</span>Call Now</button>
<button type="button" class="enqbtn hideonsmall bgbtn modal-trigger" data-target="popupenquirymodal" style="width: 200px;"><span class="material-icons">chat</span>Enquiry Now</button>
<button type="button" class="enqbtn hideonlarge bgbtn" onclick="window.open('https://wa.me/{$whatsappPhone}?text=Hi, I have a query regarding {$title}{$volume}.')"><span class="material-icons">chat</span>Get Best Price</button>
</div>
</div>
<div class="col s12 m9 l9 left-align">
<h1>{$title}{$volume}</h1>
<br clear="all">
<div style="display:flex;align-items:center;column-gap:10px;">
<h3>{$amountWithCurrency}</h3>
<span style="display:flex;align-items:center;">
(Change Currency to <button type="button" class="currency-changer" onclick="setCurrency('{$getCurrency}')">{$getCurrency}</button>)
</span>
</div>
<br clear="all">
<table class="hspDDf">
{$chiefeditor}{$editors}{$coeditor}{$author}{$issn}{$hardbound_isbn}{$paperback_isbn}{$ebook_isbn}{$publisherRow}{$language}{$frequency}{$pages}{$publicationyear}{$publicationdate}{$binding}{$bookpdflink}{$doi}{$amazonlink}{$gemlink}
</table>
<br>
</div>
</div>
</div>
</div>
<div class="col s12 m12 l3">
<div class="z-depth-1">
<form action="{$baseurl}viewcart" method="post" name="addtocartform" class="form" onsubmit="return addtocart(this)">
<input type="hidden" name="{$token_id}" value="{$token_value}" readonly />
<input type="hidden" name="focus" value="{$hspDDf->encrypt('[ADD_TO_CART]')}" readonly />
<input type="hidden" name="productid" value="{$hspDDf->encode($productid)}" readonly />
<input type="hidden" name="currency" value="{$getVisitorCurrency}" readonly />
<input type="hidden" name="amount" value="{$price}" readonly />
<input type="hidden" name="quantity" value="1" readonly />
<input type="hidden" name="zipcode" value="" readonly />
<div class="head grey-text text-darken-1">Price Details</div>
<div class="body">
Amount<span class="right">{$amountWithCurrency}</span><br clear="all"><br clear="all">
Availability<span class="right">{$instock}</span>
<div class="divider"></div>
Payable Amount<span class="right">{$amountWithCurrency}</span>
</div>
<div class="foot">{$cart_button}</div>
</form>
<script>
var _0xe499=["\x64\x69\x73\x61\x62\x6C\x65\x64","\x73\x75\x62\x6D\x69\x74\x62\x74\x6E","\x72\x65\x6D\x6F\x76\x65","\x2E\x74\x6F\x61\x73\x74","\x73\x68\x6F\x77","\x2E\x6C\x6F\x61\x64\x65\x72","\x66\x69\x6E\x61\x6C\x6C\x79","\x74\x6F\x61\x73\x74","\x68\x69\x64\x65","\x63\x61\x74\x63\x68","\x73\x75\x72\x6C","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x73\x65\x6C\x66","\x74\x68\x65\x6E","\x6A\x73\x6F\x6E","\x61\x63\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x73\x61\x6D\x65\x2D\x6F\x72\x69\x67\x69\x6E","\x6E\x6F\x2D\x63\x61\x63\x68\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E"];addtocart= (_0xb144x1)=>{_0xb144x1[_0xe499[1]][_0xe499[0]]= true;$(_0xe499[3])[_0xe499[2]]();$(_0xe499[5])[_0xe499[4]](0);fetch(_0xb144x1[_0xe499[16]],{method:_0xe499[17],mode:_0xe499[18],cache:_0xe499[19],headers:{'\x41\x63\x63\x65\x70\x74':_0xe499[20]},body: new FormData(_0xb144x1)})[_0xe499[14]]((_0xb144x3)=>{return _0xb144x3[_0xe499[15]]()})[_0xe499[14]]((_0xb144x3)=>{if( typeof (_0xb144x3[_0xe499[10]])!== _0xe499[11]){window[_0xe499[13]][_0xe499[12]]= _0xb144x3[_0xe499[10]]}})[_0xe499[9]]((_0xb144x2)=>{_0xb144x1[_0xe499[1]][_0xe499[0]]= false;M[_0xe499[7]]({html:_0xb144x2,displayLength:15000});$(_0xe499[5])[_0xe499[8]](0)})[_0xe499[6]](()=>{});return false}
</script>
</div>
</div>
</div>
EOJ;
if($category == 'Book' && $doi):
echo <<<EOJ
<div class="fluid product-secondary" style="margin-top:50px">
<div class="head"><h4 class="left">This Book is Indexed in:</h4></div>
<div class="body">
<div style="display:flex;column-gap:10px;row-gap:10px;flex-wrap:wrap;" class="zoomimage">
<img src="{$imageurl}crossref-logo.png" alt="Indexed in Crossref" title="Indexed in Crossref" style="padding:10px;height:50px;background:#fff;border:1px solid #ccc;flex-shrink:0;">
<img src="{$imageurl}dimensions-logo.png" alt="Indexed in Dimensions" title="Indexed in Dimensions" style="padding:5px;height:50px;background:#fff;border:1px solid #ccc;flex-shrink:0;">
<img src="{$imageurl}r-access-logo.png" alt="Indexed in Research Access" title="Indexed in Research Access" style="padding:5px;height:50px;background:#fff;border:1px solid #ccc;flex-shrink:0;">
</div>
</div>
</div>
EOJ;
endif;
if($category == 'Journal' && in_array($publisher, ['AkiNik Publications', 'Academic Publications', 'Data One Enterprises', 'Gupta Publications', 'Integrated Publishers', 'Innovative Journal Solutions (Delhi)', 'Sparkling Press', 'Tirupati Journal Solutions', 'Tirupati Journal Solutions (Delhi)'])):
echo <<<EOJ
<div class="fluid product-secondary" style="margin-top:50px">
<div class="head"><h4 class="left">This Book is Indexed in:</h4></div>
<div class="body">
<div style="display:flex;column-gap:10px;row-gap:10px;flex-wrap:wrap;" class="zoomimage">
<img src="{$imageurl}crossref-logo.png" alt="Indexed in Crossref" title="Indexed in Crossref" style="padding:10px;height:50px;background:#fff;border:1px solid #ccc;flex-shrink:0;">
<img src="{$imageurl}dimensions-logo.png" alt="Indexed in Dimensions" title="Indexed in Dimensions" style="padding:5px;height:50px;background:#fff;border:1px solid #ccc;flex-shrink:0;">
<img src="{$imageurl}r-access-logo.png" alt="Indexed in Research Access" title="Indexed in Research Access" style="padding:5px;height:50px;background:#fff;border:1px solid #ccc;flex-shrink:0;">
</div>
</div>
</div>
EOJ;
endif;
if($description):
echo '<div class="fluid product-secondary" style="margin-top:50px">';
echo '<div class="card left">';
echo '<div class="card-content left">';
echo '<div class="head"><h4 class="left">Description</h4></div>';
echo '<div class="body">'.html_entity_decode($description).'</div>';
echo '</div>';
echo '</div>';
echo '</div>';
endif;
if($abstract):
echo '<div class="fluid product-secondary" style="margin-top:50px">';
echo '<div class="head"><h4 class="left">Abstract</h4></div>';
echo '<div class="body">'.html_entity_decode($abstract).'</div>';
echo '</div>';
endif;
if($category == 'Journal' && $domain):
echo '<div class="fluid product-secondary" style="margin-top:50px">';
echo '<div class="head"><h4 class="left">Important Links</h4><img src="'.$imageurl.'new-icon.gif" src="New Icon" class="right" /></div>';
echo '<ol class="body product-link">';
echo '<li><span>For journal articles</span><span>:</span> <a href="'.$domain.'/archives" target="_blank">'.$domain.'/archives</a></li>';
echo '<li><span>For instructions</span><span>:</span> <a href="'.$domain.'/instructions" target="_blank">'.$domain.'/instructions</a></li>';
echo '<li><span>For enquiry</span><span>:</span> <a href="'.$domain.'/contact" target="_blank">'.$domain.'/contact</a></li>';
if($submissionlink):
echo '<li><span>Submit manuscript online</span><span>:</span> <a href="'.$submissionlink.'" target="_blank">'.$submissionlink.'</a><img src="'.$imageurl.'star-icon.gif" src="New Icon" style="margin-left:5px" /></li>';
endif;
if($email):
echo '<li><span>Email your manuscript at</span><span>:</span> <a href="mailto:'.$email.'">'.$email.'</a></li>';
endif;
echo '</ol>';
echo '</div>';
endif;
// if($category == 'Journal'):
$stmt = $mysqli->prepare("SELECT COUNT(*), ROUND(AVG(rating),1) as averageRating FROM productreviews WHERE (product_id = ? AND status = 'approved')") or die('An error occurred. Please try after some time.');
$stmt->bind_param('i', $productid);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($countReviews, $averageRating);
$stmt->fetch();
$stmt->close();
$averageRating = $averageRating ?: '0';
echo <<<EOJ
<div class="fluid product-secondary" style="margin-top:50px">
<div class="head"><h4 class="left">Reviews</h4></div>
<div class="body">
<div class="row">
<div class="col s5 m4 l2">
<div style="float:left;width:110px;text-align:center;">
<h6 style="font-size:48px;font-weight:normal;">{$averageRating}</h6>
<div class="jstars" data-value="{$averageRating}"></div>
<p style="color:#777;margin-top:5px;">{$countReviews} reviews</p>
</div>
</div>
<div class="col s7 m8 l10 right-align">
<a href="#reviewmodal" class="waves-effect btn-flat grey-text text-darken-4 modal-trigger" style="border:1px solid #777;font-weight:500;">Write Review</a>
</div>
</div>
<br clear="all">
<hr style="height:1px;border:none;border-top:1px solid #ddd;">
</div>
</div>
<br clear="all">
<br clear="all">
<div class="row productreviews">
EOJ;
$stmt = $mysqli->prepare("SELECT name, review, rating, created_at FROM productreviews WHERE (product_id = ? AND status = 'approved') ORDER BY id DESC LIMIT 6") or die('An error occurred. Please try after some time.');
$stmt->bind_param('i', $productid);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($name, $review, $rating, $created_at);
while($stmt->fetch()):
$created_at = date('F d, Y', strtotime($created_at));
$review = html_entity_decode($review);
echo <<<EOJ
<div class="col s12 m12 l6 productreview" style="margin-bottom:20px;">
<div class="card z-depth-0" style="border:1px solid #ddd;padding:10px;margin:0;">
<b>{$name}</b>
<div style="margin:5px 0;display:flex;align-items:center"><div class="jstarssmall" data-value="{$rating}"></div> <span style="color:#777;">{$created_at}</span></div>
<p>{$review}</p>
</div>
</div>
EOJ;
endwhile;
$stmt->close();
echo <<<EOJ
</div>
<div id="reviewmodal" class="modal modal-fixed-footer">
<form action="{$baseurl}products" method="post" name="reviewform" class="form" style="border:none;" onsubmit="return post(this)">
<input type="hidden" name="{$token_id}" value="{$token_value}" autocomplete="off" readonly />
<input type="hidden" name="focus" value="{$hspDDf->encrypt('[GET_REVIEW]')}" autocomplete="off" readonly />
<input type="hidden" name="productid" value="{$option1}" autocomplete="off" readonly />
<input type="hidden" name="honeypot" value="" readonly />
<input type="hidden" name="zipcode" value="" readonly />
<div class="modal-content">
<div class="row">
<div class="col s12 m6 l6">
<label for="name">name <span class="red-text">*</span></label>
<input type="text" name="name" id="name" />
</div>
<div class="col s12 m6 l6">
<label for="email">email <span class="red-text">*</span></label>
<input type="text" name="email" id="email" />
</div>
</div>
<div class="row">
<div class="col s12 m12 l12">
<label for="review">review <span class="red-text">*</span></label>
<textarea rows="5" cols="5" name="review" id="review" class="materialize-textarea"></textarea>
</div>
</div>
<div class="row">
<div class="col s12 m12 l12" style="display:flex;align-items:center;">
<input type="text" name="rating" id="input-id" class="ratingstar" style="width:130px;height:auto;margin:0;padding:0;display:none;" />
<b>Rating Required</b>
</div>
</div>
<br clear="all">
<div class="row">
<div class="col s12 m12 l12">
<div class="g-recaptcha" data-sitekey="{$gSiteKey}"></div>
</div>
</div>
</div>
<div class="modal-footer" style="padding-right:22px;">
<button type="reset" class="modal-close waves-effect btn-flat grey white-text">close</button>
<button type="submit" id="b" class="waves-effect btn-flat blue accent-3 white-text" disabled>submit</button>
</div>
</form>
</div>
<script>
post = (f) => {
b.disabled = true;$('.toast').remove();$('.loader').show(0);
fetch(f.action, {
method: 'post',
mode: 'same-origin',
cache: 'no-cache',
headers: {
'Accept': 'application/json',
},
body: new FormData(f)
})
.then(response => response.json())
.then(response => {
if (response.text) {
b.disabled = false;
M.toast({html: response.text, displayLength: 15000});
}
if (response.stat == true) {
$('.modal').modal('close');f.reset();
}
})
.catch(error => {
b.disabled = false;
M.toast({html: error, displayLength: 15000});
})
.finally(() => {
$('.loader').hide(0);
});
return false;
}
</script>
EOJ;
// endif;
$countries = '';
$stmt = $mysqli->prepare("SELECT nicename, phonecode FROM country WHERE phonecode != '0' ORDER BY nicename");
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($nicename, $phonecode);
while ($stmt->fetch()) :
$countries .= '<option value="' . $nicename . '" data-phonecode="+' . $phonecode . '" ' . ($phonecode == '91' ? 'selected' : '') . '>' . $nicename . '</option>';
endwhile;
$stmt->close();
echo <<<EOJ
<div class="subscriptionenquirycanvas">
<div class="container">
<div class="hideonmobile">
<div>
<a href="{$baseurl}"><img src="{$imageurl}logo-default.png" alt="{$websitename}" title="{$websitename}" height="56" /></a>
</div>
<div style="display: flex;flex-direction: column;">
<b style="font-size: 18px;">{$websitename}</b>
<span style="font-size: 13px;">Phone: {$enquiryPhone}</span>
</div>
</div>
<div class="buttongroup">
<a href="#popupenquirymodal" target="_blank" class="enqbtn modal-trigger">Submit Enquiry</a>
<a href="https://wa.me/{$whatsappPhone}?text=Hi, I have a query regarding {$title}{$volume}." target="_blank" class="enqbtn wab">
<svg xmlns="http://www.w3.org/2000/svg" aria-label="WhatsApp" role="img" viewBox="0 0 512 512" width="18px" height="18px" fill="#000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><rect width="512" height="512" rx="15%" fill="#25d366"></rect><path fill="#25d366" stroke="#ffffff" stroke-width="26" d="M123 393l14-65a138 138 0 1150 47z"></path><path fill="#ffffff" d="M308 273c-3-2-6-3-9 1l-12 16c-3 2-5 3-9 1-15-8-36-17-54-47-1-4 1-6 3-8l9-14c2-2 1-4 0-6l-12-29c-3-8-6-7-9-7h-8c-2 0-6 1-10 5-22 22-13 53 3 73 3 4 23 40 66 59 32 14 39 12 48 10 11-1 22-10 27-19 1-3 6-16 2-18"></path></g></svg>
Chat
</a>
</div>
</div>
</div>
<div id="popupenquirymodal" class="modal" tyle="z-index: 1003; display: block; opacity: 1; top: 10%; transform: scaleX(1) scaleY(1);">
<div class="modal-header">
<h5>Request For Enquiry</h5>
<b>Please provide your contact details.</b>
<button type="button" class="modal-close"><span class="material-icons">close</span></button>
</div>
<div class="modal-content" style="padding:0;">
<form action="{$baseurl}products" method="post" name="enquiryform" style="border:none;" onsubmit="return submitpopupenquiry(this)">
<input type="hidden" name="{$token_id}" value="{$token_value}" autocomplete="off" readonly />
<input type="hidden" name="focus" value="{$en->encrypt('[POPUPENQUIRY]')}" autocomplete="off" readonly />
<input type="hidden" name="productid" value="{$option1}" autocomplete="off" readonly />
<input type="hidden" name="zipcode" value="" readonly />
<input type="hidden" name="recaptcha_response" id="recaptchaResponse">
<div class="form-row form-row-2">
<div class="form-col">
<label>Full Name</label>
<input type="text" name="name" autocomplete="off" class="subscriptionfield" />
</div>
<div class="form-col">
<label>Email</label>
<input type="text" name="email" autocomplete="off" class="subscriptionfield" />
</div>
</div>
<div class="form-row form-row-2">
<div class="form-col">
<label>Country</label>
<select name="country" class="subscriptionfield browser-default" onchange="phonecode.value = this.value ? event.target.options[event.target.selectedIndex].dataset.phonecode : '';">
<option value="" selected="selected">Select country</option>
{$countries}
</select>
</div>
<div class="form-col">
<label>Mobile Number</label>
<div style="display:flex;clear:both">
<input type="text" name="phonecode" id="phonecode" value="+91" class="subscriptionfield" style="width:50px;padding:0;text-align:center;background:#eee;outline:none;font-size:13px;" readonly />
<input type="text" name="phone" autocomplete="off" class="subscriptionfield" />
</div>
</div>
</div>
<div class="form-row">
<div class="form-col">
<label>Message</label>
<textarea name="message" rows="5" cols="5" autocomplete="off" class="subscriptionfield"></textarea>
</div>
</div>
<div class="form-row">
<div class="form-col" style="text-align: center;">
<button type="submit" class="enquirybutton">Submit Enquiry</button>
<div class="sloader">Please Wait...</div>
</div>
</div>
</form>
</div>
</div>
<div class="customtoast" style="position: fixed;top: 0;bottom: 0;left: 0;right: 0;z-index: 9999;max-width: 480px;height:50px;padding: 10px;margin: auto;border-radius: 4px;color: #fff;box-shadow: 0 2px 5px rgba(0,0,0,0.35);padding: 13px 12px;font-size: 14px;display:none;font-family: 'Roboto', sans-serif !important;"></div>
EOJ;
?>
<script src="https://www.google.com/recaptcha/api.js?render=6LehFrApAAAAAH19w5iTX2iCFszGrB9JB0-sAWQB"></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('6LehFrApAAAAAH19w5iTX2iCFszGrB9JB0-sAWQB', {action: 'contact'}).then(function(token) {
document.getElementById('recaptchaResponse').value = token;
});
});
function submitpopupenquiry(f) {
$.ajax({
type: $(f).attr('method'),
url: $(f).attr('action'),
data: $(f).serialize(),
cache: false,
dataType: 'json',
beforeSend: function () {
$('.enquirybutton').hide(0); $('.sloader').show(0); $('.customtoast').hide(0).html('');
},
success: function (r) {
if (r.s == true) {
$('#popupenquirymodal').find('form')[0].reset(); $('.customtoast').css('background', 'green'); $('.modal').modal('close');
} else {
$('.customtoast').css('background', 'red');
}
$('.enquirybutton').show(0); $('.sloader').hide(0); $('.customtoast').show(0).html(`<div style="display:flex;align-items:center;justify-content:space-between;"><span>${r.t}</span><button type="button" onclick="$('.customtoast').hide(0).html('');"><span class="material-icons" style="color:#fff;">close</span></button></div>`);
},
error: function () {
$('.enquirybutton').show(0); $('.sloader').hide(0); $('.customtoast').show(0).html(`<div style="display:flex;align-items:center;justify-content:space-between;"><span>An error occurred. Please try after some time.</span><button type="button" onclick="$('.customtoast').hide(0).html('');"><span class="material-icons" style="color:#fff;">close</span></button></div>`).css('background', '#f00');
}
});
grecaptcha.execute('6LehFrApAAAAAH19w5iTX2iCFszGrB9JB0-sAWQB', { action: 'contact' }).then(function (token) {
document.getElementById('recaptchaResponse').value = token;
});
return false;
}
</script>
<?php
else:
echo $eMessage;
endif;
else:
echo $eMessage;
endif;
require_once('footer.php');
?>