Hacked By AnonymousFox

Current Path : /home/krishnamexports/www/
Upload File :
Current File : /home/krishnamexports/www/search.php

<?php include("common/header.php");	

if(isset($_GET['search']))

{			

	$categoryList    = array();

	$subcategoryList = array();   

	$sqlCategory     = mysqli_query($cn, "select * from `tbl_category` where `name` LIKE '%".$_GET['search']."%'");		

	while($sqlCategoryData = mysqli_fetch_array($sqlCategory))

	{

		array_push($categoryList,$sqlCategoryData['id']);	

	}

	

	$sqlSubCategory      = mysqli_query($cn, "select * from `tbl_category` where `name` LIKE '%".$_GET['search']."%'");		

	while($sqlSubCategoryData = mysqli_fetch_array($sqlSubCategory))

	{

		array_push($subcategoryList,$sqlSubCategoryData['id']);	

	}

	

	$qry = "";

	$categoryListData    = implode(',',$categoryList);

	if(!empty($categoryListData))

	{

		$qry = " or `category_id` IN($categoryListData) ";

	}

	

	$subcategoryListData = implode(',',$subcategoryList);

	if(!empty($subcategoryListData))

	{

		$qry .= " or `subcategory_id` IN($subcategoryListData) ";

	}

	$sqlProduct  = mysqli_query($cn, "select * from `tbl_product` where (`name` LIKE '%".$_GET['search']."%' or `skucode` LIKE '".$_GET['search']."%' $qry ) and `status`=1");								

	$count       = mysqli_num_rows($sqlProduct);

}		

?>

    <main>        

        <!-- page main wrapper start -->

        <div class="shop-main-wrapper section-padding">

            <div class="container">

                <div class="row">

                    <!-- sidebar area start -->

                    <div class="col-lg-3 order-2 order-lg-1">

                        <aside class="sidebar-wrapper">

                            <!-- single sidebar start -->

                            <div class="sidebar-single">

                                <h5 class="sidebar-title">categories</h5>

                                <div class="sidebar-body">

                                    <ul class="shop-categories">

										<?php										

										$sqlCategory           = mysqli_query($cn,"select * from `tbl_category` where `status`=1 order by `sort_order`");

										while($sqlCategoryData = mysqli_fetch_array($sqlCategory))

										{

											$sqlsubCategory    = mysqli_query($cn,"select * from `tbl_subcategory` where `category_id`='".$sqlCategoryData['id']."' and `status`=1 order by `sort_order`");

											if(mysqli_num_rows($sqlsubCategory)>0){?>                                        

                                            <li><a href="<?php echo DEFAULT_URL."category/".$sqlCategoryData['slug_url'];?>"><?php echo $sqlCategoryData['name'];?> <span>(<?php echo mysqli_num_rows($sqlsubCategory);?>)</span><i class="fa fa-angle-down" aria-hidden="true"></i></a>

                                                <ul class="submenu1">

                                                    <?php																						

                                                    while($sqlsubCategoryData = mysqli_fetch_array($sqlsubCategory)){?>

                                                    <li><a href="<?php echo DEFAULT_URL."subcategory/".$sqlsubCategoryData['slug_url'];?>"><?php echo $sqlsubCategoryData['name'];?></a></li>

                                                    <?php }?>

                                                </ul>

                                            </li>

                                        <?php 

											}else{?>

                                            <li><a href="<?php echo DEFAULT_URL."category/".$sqlCategoryData['slug_url'];?>"><?php echo $sqlCategoryData['name'];?> </a></li>

										<?php }

										}?>                                                                                                                        

                                    </ul>

                                </div>

                            </div>

                            <!-- single sidebar end -->

                            <!-- single sidebar start -->

                            <!--<div class="sidebar-single">

                                <h5 class="sidebar-title">price</h5>

                                <div class="sidebar-body">

                                    <div class="price-range-wrap">

                                        <div class="price-range" data-min="1" data-max="1000"></div>

                                        <div class="range-slider">

                                            <form action="#" class="d-flex align-items-center justify-content-between">

                                                <div class="price-input">

                                                    <label for="amount">Price: </label>

                                                    <input type="text" id="amount">

                                                </div>

                                                <button class="filter-btn">filter</button>

                                            </form>

                                        </div>

                                    </div>

                                </div>

                            </div>-->

                            <!-- single sidebar end -->                            

                        </aside>

                    </div>

                    <!-- sidebar area end -->



                    <!-- shop main wrapper start -->

                    <div class="col-lg-9 order-1 order-lg-2">

                        <div class="shop-product-wrapper">

                            <div class="shop-top-bar">

                                <div class="row align-items-center">

                                    <div class="col-lg-12 col-md-6 order-2 order-md-1">

                                        <div class="top-bar-left">                                            

                                            <div class="product-amount">

                                                <p>Showing 1 – <span id="count"><?php echo $count;?></span> of <?php echo $count;?> Designs</p>

                                            </div>

                                        </div>

                                    </div>                                    

                                </div>

                            </div>

                            <!-- product item list wrapper start -->

                            <div class="shop-product-wrap grid-view row mbn-30">                                

								<?php

                                while($sqlProductData = mysqli_fetch_array($sqlProduct))

                                {

                                    $ProductImg = explode("$",$sqlProductData['image']);

                                    ?>                                    	

                                    <div class="col-md-4 col-sm-6">                                        	

                                        <div class="product-item">

                                        <figure class="product-thumb">

                                            <a href="<?php echo DEFAULT_URL."product/".$sqlProductData['slug_url'];?>">

                                                <?php

                                                if(count($ProductImg)>1)

                                                {?>														

                                                    <img class="pri-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[0];?>" alt="product">

                                                    <img class="sec-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[1];?>" alt="product">

                                                <?php }else{?>

                                                    <img class="pri-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[0];?>" alt="product">

                                                    <img class="sec-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[0];?>" alt="product">

                                                <?php }?>                                                    

                                            </a>

                                            <!--<div class="product-badge">

                                                <div class="product-label new">

                                                    <span>new</span>

                                                </div>                                                    

                                            </div> -->

                                        </figure>

                                        <div class="product-caption text-center">                                                

                                            <h6 class="product-name">

                                                <a href="<?php echo DEFAULT_URL."product/".$sqlProductData['slug_url'];?>"><?php echo $sqlProductData['name'];?></strong></a>

                                            </h6>

                                            <!--<div class="price-box">

                                                <span class="price-regular"><?php echo currencyPrice($sqlProductData['price']);?></span>

                                                <span class="price-old"><del><?php echo currencyPrice($sqlProductData['orignalprice']);?></del></span>

                                            </div>-->

                                        </div>

                                    </div>                                    		                                                                                   		                                    

                                    </div>    

                                <?php }?>                                                                   

                            </div>                            							

                        </div>

                       

                    </div>

                    <!-- shop main wrapper end -->

                </div>

            </div>

        </div>

        <!-- page main wrapper end -->

    </main>

    <!-- footer area start -->

    <?php include("popup/loginsignup.php");?>

	<?php include("common/footer.php");?>

    <!-- footer area end -->    

    <!-- offcanvas mini cart start -->

    <?php include("popup/mini-cart.php");?>        

    <!-- offcanvas mini cart end -->



    <!-- JS============================================ -->

    <!-- Modernizer JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/vendor/modernizr-3.6.0.min.js"></script>

    <!-- jQuery JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/vendor/jquery-3.3.1.min.js"></script>

    <!-- Popper JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/vendor/popper.min.js"></script>

    <!-- Bootstrap JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/vendor/bootstrap.min.js"></script>

    <!-- slick Slider JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/slick.min.js"></script>

    <!-- Countdown JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/countdown.min.js"></script>

    <!-- Nice Select JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/nice-select.min.js"></script>

    <!-- jquery UI JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/jqueryui.min.js"></script>

    <!-- Image zoom JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/image-zoom.min.js"></script>

    <!-- Imagesloaded JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/imagesloaded.pkgd.min.js"></script>

    <!-- Instagram feed JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/instagramfeed.min.js"></script>

    <!-- mailchimp active js -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/ajaxchimp.js"></script>

    <!-- contact form dynamic js -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/ajax-mail.js"></script>

    <!-- google map api -->

    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCfmCVTjRI007pC1Yk2o2d_EhgkjTsFVN8"></script>

    <!-- google map active js -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/plugins/google-map.js"></script>

    <!-- Main JS -->

    <script src="<?php echo DEFAULT_URL;?>assets/js/main.js"></script>

    <script src="<?php echo DEFAULT_URL;?>js/blockui.min.js"></script>

    <script src="<?php echo DEFAULT_URL;?>js/function.js"></script>

	<script>

        $(document).ready(function(){

            $("#signup").click(function(){

            $(".log-in").css("display", "none");

            $(".sign-up").css("display", "block");

            });

        });

        $(document).ready(function(){

            $("#login").click(function(){

            $(".log-in").css("display", "block");

            $(".sign-up").css("display", "none");

            });

        });

    </script>

</body>

</html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox