System: Windows NT WINDOWS18 10.0 build 17763 (Windows Server 2016) AMD64 | User: IWPD_3544(appclien)

Path: D:\Inetpub\vhosts\appclients.in\fruits-vegitables.nmvm.org

[Back to List]
<?php
include "includes/main-action.php";
$obj=new admin_main();
$sel_cs=$obj->select_all("menu","order by menu_id");
$sel_banner_top=$obj->select_all("adv_tbl1","order by adv_id desc limit 1");
$sel_banner_right=$obj->select_all("adv_tbl3","order by adv_id desc limit 2");
$sel_slider=$obj->select_all("adv_tbl2","order by adv_id desc");

//select category name
$searchIs = $_GET['search'];
$cat_query= $obj->select_all("menu","where menu='$searchIs'");
if(mysqli_num_rows($cat_query)){
$catName= mysqli_fetch_array($cat_query);
$cond = "where menu_id='$catName[menu_id]'";
}else{
$cond = "where name like '%$searchIs%' || pro_type like '$searchIs%'";
}
//select category products
$probycat=$obj->select_all("product","$cond and status='Active'");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php include('title.php')?> <?php echo $searchIs?></title>
<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="">
<meta name="robots" content="index, follow" />
<!-- Mobile specific metas
    ============================================ -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- Favicon
    ============================================ -->
<link rel="shortcut icon" type="image/png" href="<?php echo $url?>image/icon/favicon.png"/>
<!-- Libs CSS
    ============================================ -->
<link rel="stylesheet" href="<?php echo $url?>css/bootstrap/css/bootstrap.min.css">
<link href="<?php echo $url?>css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="<?php echo $url?>js/datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet">
<link href="<?php echo $url?>js/owl-carousel/owl.carousel.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/lib.css" rel="stylesheet">
<link href="<?php echo $url?>js/jquery-ui/jquery-ui.min.css" rel="stylesheet">
<link href="<?php echo $url?>js/minicolors/miniColors.css" rel="stylesheet">
<!-- Theme CSS
    ============================================ -->
<link href="<?php echo $url?>css/themecss/so_searchpro.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so_megamenu.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so-categories.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so-listing-tabs.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so-category-slider.css" rel="stylesheet">
<link href="<?php echo $url?>css/themecss/so-newletter-popup.css" rel="stylesheet">
<link href="<?php echo $url?>css/footer/footer2.css" rel="stylesheet">
<link href="<?php echo $url?>css/header/header2.css" rel="stylesheet">
<link id="color_scheme" href="<?php echo $url?>css/home2.css" rel="stylesheet">
<link href="<?php echo $url?>css/responsive.css" rel="stylesheet">
<!-- Google web fonts
    ============================================ -->
<link href='https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700' rel='stylesheet' type='text/css'>
<style type="text/css">
         body{font-family:'Poppins', sans-serif}
    </style>
</head>
<body class="common-home res layout-2">
<div id="wrapper" class="wrapper-fluid banners-effect-7">
<!-- Header Container  -->
<?php include "includes/topbar.php";?>
<!-- //Header Top -->
<!-- Header center -->
<?php include "includes/searchbar.php";?>
<!-- //Header center -->
<!-- Header Bottom -->
<?php include "includes/navbar.php";?>
</header>
<!-- //Header Container  -->
<!-- Main Container  -->
<div class="main-container container">
<ul class="breadcrumb">
  <li><a href="<?php echo $url?>"><i class="fa fa-home"></i></a></li>
  <li><?php echo $searchIs?></li>
</ul>
<div class="row">
  <!--Left Part Start-->
  <?php //include "includes/left_bar.php"?>
  <!--Left Part ends-->
  <!--Middle Part Start-->
  <div id="content" class="col-md-12 col-sm-12">
    <div class="product-view row">
      <div class="left-content-product">
        <div id="product">
          <div class="related titleLine products-list grid module ">
            <h3 class="modtitle">Search Result for <?php echo $searchIs?></h3>
            <?php if(mysqli_num_rows($probycat)>0){
			 while($resu5=mysqli_fetch_array($probycat)){
			 $extPrice=explode(",",$resu5['price']); 
			?>
            <div class="item col-md-3 col-xs-6">
                <div class="item-inner product-layout transition product-grid">
                  <div class="product-item-container">
                    <div class="left-block left-b">
                      <?php if($resu5['oldprc']!=0){?>
                      <div class="box-label"> <span class="label-product label-sale">
                        <?php  
				        $bachat=$resu5['oldprc']-$extPrice[0];
				        echo round(100*$bachat/$resu5['oldprc'])."%";
					 ?>
                      </span> </div>
                      <?php }?>
                      <div class="product-image-container second_img"> <a href="<?php echo $url?>product.php?pid=<?php echo $resu5['id']?>" target="_self">
                        <?php if($resu5['img'])$dcd_img=json_decode($resu5['img']);?>
                        <img src="<?php echo $url?>image/product/<?php echo $dcd_img[0] ?>" class="img-1 img-responsive" alt="image1"> <img src="<?php echo $url?>image/product/<?php if(empty($dcd_img[1]))echo $dcd_img[0];else echo $dcd_img[1] ?>" class="img-2 img-responsive" alt="image2"> </a> </div>
                    </div>
                    <div class="right-block">
                      <div class="caption hide-cont">
                        <h4 style="height:40px">
						  <a href="<?php echo $url?>product.php?pid" title="<?php echo $resu5['name']?>" target="_self">
                           <?php echo $resu5['name'] ?>
                          </a></h4>
                        <h5>
                         <?php $expQty = explode(",",$resu5['oldprice']);
						        if($expQty[0]!=0)echo $expQty[0];else echo "&nbsp;"?>
                        </h5>
                      </div>
                      <p class="price"> <span class="price-new">Rs.
                        <?php $extPrice=explode(",",$resu5['price']);
						      echo number_format($extPrice[0]); ?>
                      </span>
                        <?php if($resu5['oldprc']!=0){?>
                        <span class="price-old" style="line-height: 0;">Rs. <?php echo number_format($resu5['oldprc'])?></span>
                        <?php }else{ echo '<span class="price-old" style="color:#fff;line-height: 0;">&nbsp;</span>';}?>
                      </p>
                      <div class="col-md-12 col-sm-12" style="padding:0">
					    <?php if($resu5['stock']==0){?>
						<div class="left-content-product">
                                  <div class="content-product-right">
                                    <div class="form-group box-info-product">
                                      <div class="option quantity">
									 <div class="input-group quantity-control" unselectable="on" style="-webkit-user-select: none;display: inline-flex;padding: 8px 8px;"> 
						             <button type="submit" style="border:0;background:none;color: #fff;font-size: 9px;outline:0" onClick="javascript:alert('Product is out of stock!')"> Out of stock</button>
						    </div>
							 </div>
						   </div>
						  </div>
						 </div>
						<?php }else{?>
                                <div class="left-content-product">
                                  <div class="content-product-right">
                                    <div class="form-group box-info-product">
                                      <div class="option quantity">
                                        <div class="input-group quantity-control" unselectable="on" style="-webkit-user-select: none;display: inline-flex;padding: 4px 4px;">
                                          <button style="border:0;background:#444444;color: #fff;font-size: 9px; outline:0" onclick="addTocart<?php echo $resu5['id']?>(<?php echo $resu5['id']?>,<?php echo $resu5['stock']?>,'<?php 
										  $extPrice=explode(",",$resu5['price']);
										  $extOldPrice=explode(",",$resu5['oldprice']); 
										  echo $extPrice[0]."*M*".$extOldPrice[0] ?>')"> Add to Cart</button>
                                          <input type="text" name="quantity" id="quantity<?php echo $resu5['id']?>" class="form-control" value="1">
										  <input type="hidden" name="psize" id="psize<?php echo $resu5['id']?>" class="form-control" value="1">
                                          <span class="input-group-addon product_quantity_down">-</span> <span class="input-group-addon product_quantity_up">+</span> </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
							<script>
							 function addTocart<?php echo $resu5['id']?>(proId,stock,proColor){
							   var quantity = document.getElementById('quantity<?php echo $resu5['id']?>').value;
							   var psize = document.getElementById('psize<?php echo $resu5['id']?>').value;
							   var myData = 'productid='+proId+'&maxStock='+stock+'&pcolor='+proColor+'&quantity='+quantity+'&psize='+psize; 
							   //alert(myData);
								jQuery.ajax({
								type: "POST", // HTTP method POST or GET
								url: "addtocart.php", //Where to make Ajax calls
							dataType:"text", // Data type, HTML, json etc.
							data:myData, //Form variables
						success:function(response){	
						//alert(response);	
						//$("#addlist").append(response);
						document.getElementById("addlist").style.display = 'none';	
						document.getElementById('addlistdata').innerHTML=response;
						var cart_v = document.getElementById('cartVal').value;
						document.getElementById('cartCount').innerHTML = parseInt(cart_v)+1;	
						document.getElementById('cartVal').value = parseInt(cart_v)+1;		 
					},
							error:function (xhr, ajaxOptions, thrownError){
								reg("#submitbtn").show(); //show submit button
									reg("#LoadingImage").hide(); //hide loading image
									alert(thrownError);
								 }
								});
							 }//close of function
							</script> 
						<?php }?>	
					   </div>
                    </div>
                  </div>
                </div>
              </div>
            <?php }
			} else {   echo "<h2>No Result Found.....</h2>";} ?>
          </div>
        </div>
        <!-- end Related  Products-->
      </div>
    </div>
  </div>
  <?php include "includes/left_bar_mob.php"?>
  <!--Middle Part End-->
</div> 
</div>
<!-- //Main Container -->
<!-- Footer Container -->
<?php include "includes/footer.php" ?>
<!-- Include Libs & Plugins
  ============================================ -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="<?php echo $url?>js/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/owl-carousel/owl.carousel.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/slick-slider/slick.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/themejs/libs.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/unveil/jquery.unveil.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/countdown/jquery.countdown.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/dcjqaccordion/jquery.dcjqaccordion.2.8.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/datetimepicker/moment.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/jquery-ui/jquery-ui.min.js"></script>
<!-- Theme files
  ============================================ -->
<script type="text/javascript" src="<?php echo $url?>js/themejs/homepage.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/themejs/so_megamenu.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/themejs/addtocart.js"></script>
<script type="text/javascript" src="<?php echo $url?>js/themejs/application.js"></script>
<!--     -->
</body>
</html>