Skip to content

Instantly share code, notes, and snippets.

View mopuriiswaryalakshmi's full-sized avatar

mopuriiswaryalakshmi

View GitHub Profile
function linerSearch (matrix2D, target) {
for (i =0; i < matrix2D.length; i++){
for(j=0; j< matrix2D[i].length; j++){
// console.log(matrix2D[i][j])
if(matrix2D[i][j] == target) {
return console.log([i, j])
}
}
}
<?php /* Template Name: Products */ ?>
<?php
get_header();
$site_url=getSiteURL();
$StateRelatedProducts=productsRelatedToZipcodeState();
$product_categories_data = categories(); //defined in functions.php
$firstCategory=$product_categories_data[0]->name; //get first category name
$firstCategoryslug=$product_categories_data[0]->slug; //get first category slug
$display_domainName = getDomainData()->domain_name; //get domain name
@mopuriiswaryalakshmi
mopuriiswaryalakshmi / build-price-popupBreak-akshaya.php
Created September 19, 2018 16:40
build-price-popupBreak-akshaya
<?php /* Template Name: BuildPrice */ ?>
<?php get_header()?>
<script src='https://www.google.com/recaptcha/api.js'></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-validation@1.17.0/dist/jquery.validate.js"></script>
<script>
var templateUrl = '<?= get_bloginfo("template_url"); ?>';
var insideView = true;
var buildingConfig = null;
<?php
<?php get_header()?>
<?php $contact_numbers_data = contactPhoneNumbers(); ?>
<script type="text/javascript">
$(document).ready(function(){
$('ul.blog_categories a').click(function(){
var selected_category = $(this).text();
<?php
echo "var blog_url='".get_page_link( get_page_by_title( 'whatsNew' )->ID )."';";
// **********Ajax Code Starts for DealerQuote Filter***********
add_action( 'wp_ajax_quotefilter', 'dealerQuoteFilter');
add_action( 'wp_ajax_nopriv_quotefilter', 'dealerQuoteFilter');
function dealerQuoteFilter(){
$current_user = wp_get_current_user();
$display_name = $current_user->display_name;
$buildingCode_ImageArray=buildingConfigData();
$request_quote_pod = pods('request_quote');
$params = array(
<?php /* Template Name: Products */ ?>
<?php get_header();
$StateRelatedProducts=productsRelatedToZipcodeState();
$product_categories_data = categories(); //defined in functions.php
?>
<script type="text/javascript">
<?php
$roofstyle_pod = pods('roof_style_dropdown');
<?php /* Template Name: Products */ ?>
<?php get_header();
$StateRelatedProducts=productsRelatedToZipcodeState();
$product_categories_data = categories(); //defined in functions.php
?>
<script type="text/javascript">
<?php
$roofstyle_pod = pods('roof_style_dropdown');
<?php get_header();
$domain_name = getDomainData()->name;
?>
<div class="container">
<div class="tab-content">
<div class="tab-pane active" id="carport" role="tabpanel">
<div class="row">
<?php
$product_region_pod=pods('product_region');
<?php get_header();?>
<?php
$categories = post_categories();
$domain_name = getDomainData()->name;
$post_pod = pods('post');
if($_GET["type"]){
$params = array(
"where" => "domain_name.name = '$domain_name' AND category.name ='".$_GET['type']."' ",
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {
$pageURL .= "s";
}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
// $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
} else {