OverLord Shell
<?php
session_start();
require_once("db/conn.php");
if(!isset($_GET['type']) || !isset($_GET['q'])){header("location:index.php");exit;}
$type="";
$type=$_GET['type'];
$listq="";
/*if($type=='p' || empty($type))$listq="SELECT a.*,b.*,c.photo_path FROM busdir_product a,busdir_mst_company b,busdir_product_photo c WHERE a.company_id=b.company_id AND a.product_id=c.product_id AND a.product_name REGEXP '[[:<:]]".$_GET['q']."[[:>:]]' GROUP BY a.product_id";
if(empty($type))$listq.=" UNION ";
if($type=='c' || empty($type))$listq.="SELECT b.*,a.*,c.photo_path FROM busdir_mst_company a,busdir_product b,busdir_product_photo c WHERE a.company_id=b.company_id AND b.product_id=c.product_id AND a.company_name REGEXP '[[:<:]]".$_GET['q']."[[:>:]]'";*/
if($type=='p' || empty($type))$listq="SELECT a.*,b.*,c.photo_path FROM busdir_product a,busdir_mst_all_company b,busdir_product_photo c WHERE a.my_company_id=b.my_company_id AND a.product_id=c.product_id AND a.product_name like '%".$_GET['q']."%' GROUP BY a.product_id";
if(empty($type))$listq.=" UNION ";
if($type=='c' || empty($type))$listq.="SELECT b.*,a.*,c.photo_path FROM busdir_mst_all_company a,busdir_product b,busdir_product_photo c WHERE a.my_company_id=b.my_company_id AND b.product_id=c.product_id AND a.company_name like '%".$_GET['q']."%'";
$listr=$connection->query($listq);
include_once("header.inc.php");
?>
<section id="content">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2 class="mtn mbl">Search Results (<?php echo $listr->num_rows?>)</h2>
</div>
</div>
<div class="row">
<?php
if($listr->num_rows==0){
?>
<div class="col-md-12">
<div class="alert alert-danger text-center">
<h5 class="black">Sorry! No results found for <span class="text-danger"><strong><?php echo $_GET['q']?></strong></span></h5>
</div>
</div>
<?php
}
else{
while($listrow=$listr->fetch_assoc()){
?>
<?php /*?><div class="col-md-3 product-men">
<div class="company-pro-item">
<div class="company-thumb-item">
<a href="company.php?id=<?php echo base64_encode($listrow['company_id'])?>" style="display:block">
<img src="uploads/company/<?php echo $listrow['company_logo_path']?>" alt="" class="pro-image-front">
</a>
</div>
<div class="item-info-product ">
<h4><a href="company.php?id=<?php echo base64_encode($listrow['company_id'])?>"><?php echo $listrow['company_name']?></a></h4>
</div>
</div>
</div><?php */?>
<div class="col-sm-6">
<div class="product_box shadow_box">
<h4><a href="product.php?id=<?php echo base64_encode($listrow['product_id'])?>" title="<?php echo $listrow['product_name']?>"><?php echo $listrow['product_name']?></a></h4>
<div class="row">
<div class="col-xs-5">
<a href="product.php?id=<?php echo base64_encode($listrow['product_id'])?>"><img class="img-responsive center-block mbm" src="uploads/products/<?php echo $listrow['photo_path']?>" alt=""></a>
</div>
<div class="col-xs-7">
<p><?php echo $listrow['description']?></p>
</div>
</div>
<hr>
<h5><strong><a href="company.php?id=<?php echo base64_encode($listrow['company_id'])?>" class="black"><?php echo $listrow['company_name']?></a></strong>, <?php echo $listrow['company_district']?></h5>
<div>
Call: <?php echo $listrow['company_phone']?>
<a href="enquiry.php?id=<?php echo base64_encode($listrow['company_id'])?>" class="btn-bd hvr-outline-out pull-right fancyboxajax">Send Enquiry</a>
</div>
<div class="clearfix"></div>
</div>
</div>
<?php
}$listr->free();
}
?>
</div>
</div>
</section>
<link href="css/jquery.fancybox.css" rel="stylesheet">
<script src="js/jquery.fancybox.pack.js"></script>
<script>
$('.fancyboxajax').fancybox({type:'ajax'});
</script>
<?php
//include_once("sendenquiry.inc.php");
include_once("footer.inc.php");connClose();?>
xRyukZ - Copyright 2k19