MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.21.246.53
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/lizatilessolution.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/lizatilessolution.com/products.php
<?php include("site-header.php"); ?>
    
    
    
<?php include("inner-banner.php"); ?>

 <?php
 
 if($_REQUEST['id']!="")
{
$brand_con="";
if(isset($_REQUEST['brand_check']))
{
$brands = $_REQUEST['brand_check'];
$Arr_brand_size=sizeof($brands);

for($i=0; $i<$Arr_brand_size; $i++)
{if($i==0)
{
   $brand_con.=" and (category_brand='$brands[$i]'";   
}else{
    $brand_con.=" or category_brand='$brands[$i]'";  
}
  
}

if($Arr_brand_size>0)
{$brand_con.=")";}

}
?>


<?php
$area_con="";
if(isset($_REQUEST['area_check']))
{
 
$areas = $_REQUEST['area_check'];
$Arr_area_size=sizeof($areas);

for($j=0; $j<$Arr_area_size; $j++)
{if($j==0)
{
   $area_con.=" and (category_area like '%$areas[$j]%' ";   
}else{
    $area_con.=" or category_area like '%$areas[$j]%' ";  
}
  
}

if($Arr_area_size>0)
{$area_con.=")";}

}

$design_con="";
if(isset($_REQUEST['design_check']))
{
$designs = $_REQUEST['design_check'];
$Arr_design_size=sizeof($designs);

for($k=0; $k<$Arr_design_size; $k++)
{if($k==0)
{
   $design_con.=" and (category_design='$designs[$k]'";   
}else{
    $design_con.=" or category_design='$designs[$k]'";  
}
  
}

if($Arr_design_size>0)
{$design_con.=")";}

}


$qualityORtype_con="";
if(isset($_REQUEST['qualityORtype_check']))
{
$qualityORtypes = $_REQUEST['qualityORtype_check'];
$Arr_qualityORtype_size=sizeof($qualityORtypes);

for($l=0; $l<$Arr_qualityORtype_size; $l++)
{if($l==0)
{
   $qualityORtype_con.=" and (category_quality='$qualityORtypes[$l]'";   
}else{
    $qualityORtype_con.=" or category_quality='$qualityORtypes[$l]'";  
}
  
}

if($Arr_qualityORtype_size>0)
{$qualityORtype_con.=")";}

}


$finish_con="";
if(isset($_REQUEST['finish_check']))
{
$finishes = $_REQUEST['finish_check'];
$Arr_finish_size=sizeof($finishes);

for($m=0; $m<$Arr_finish_size; $m++)
{if($m==0)
{
   $finish_con.=" and (category_finish_type='$finishes[$m]'";   
}else{
    $finish_con.=" or category_finish_type='$finishes[$m]'";  
}
  
}

if($Arr_finish_size>0)
{$finish_con.=")";}

}





}
?>




       <?php

if($_REQUEST['id']!="")
{
$cat_id=$_REQUEST['id']; 
$ord_by="order by category_id desc";
}else{
$cat_id=0;
$ord_by="order by category_order_by asc";
}
$start = intval($start);
//$pagesize = intval($pagesize)==0?$pagesize=DEF_PAGE_SIZE:$pagesize;
$pagesize=20;
$sql = "select * from  tbl_category where 1 and category_status='Active' and category_parent_id='$cat_id' $brand_con $area_con $design_con $qualityORtype_con $finish_con $ord_by";

if($_REQUEST['brand_check']=="" && $_REQUEST['area_check']=="" && $_REQUEST['design_check']=="" && $_REQUEST['qualityORtype_check']=="" && $_REQUEST['finish_check']=="" )
{
$sql .= " limit $start, $pagesize ";
}

//echo $sql;
$pager = new midas_pager_sql($sql, $pagesize, $start);
if($pager->total_records) {
  $result = db_query($sql);
}
?> 

      
    <main class="main-content ">  
      
      <div class="wrapper">
        
        <div class="grid__item">           
          

<?php
$des="";
if($cat_id!=0)
{
    $des=db_scalar("select category_description from tbl_category where category_id='$cat_id'"); 
}else{
 $des=db_scalar("select site_pages_description from tbl_site_pages where site_pages_link='products'");
}
if($des!=""){ ?>

<?=$des?>
  <hr>
<?}?>


<div class="grid__item">
  <div class="collection-products position-change">

<?php
if($_REQUEST['brand_check']=="" && $_REQUEST['area_check']=="" && $_REQUEST['design_check']=="" && $_REQUEST['qualityORtype_check']=="" && $_REQUEST['finish_check']=="" )
{
?>
<? if($pager->total_records!=0) {?>
<? $pager->show_displaying()?>
<?php
}
?>

<?}else{ ?>

<?php if($result!=""){?>

Showing Records: <?=mysqli_num_rows($result)?>
<?}?>
<?}?>

 
    <div class="grid__item wide--one-fifth post-large--one-fifth large--three-tenths left-sidebar">



<div class="collection_sidebar">
                 <?php
if($cat_id!=0)
{?>


<!-------------------------- FILTER START ------------------------->
<div id="shopify-section-sidebar-category" class="shopify-section">
    <div data-section-id="sidebar-category"  data-section-type="Sidebar-category" class="shopify-section"> 
    <div class="widget widget_product_categories">
        <?php
        if($_REQUEST['brand_check']!="" || $_REQUEST['area_check']!="" || $_REQUEST['design_check']!="" || $_REQUEST['qualityORtype_check']!="" || $_REQUEST['finish_check']!="" )
        {?>
      <p style="text-align:right; font-weight:bold;"><a href="<?=$site_url?>/products.html?id=<?=$cat_id?>">Clear Filter</a></p>
<?php if(isset($_REQUEST['brand_check']))
{
$brands = $_REQUEST['brand_check'];
$Arr_brand_size=sizeof($brands);
for($i=0; $i<$Arr_brand_size; $i++)
{?>
<span style="background-color:#e81a46; border-radius:20px; margin:3px; color:white; padding:3px; font-style: italic"><?=$brands[$i]?></span>  
<?}}?>


<?php if(isset($_REQUEST['area_check']))
{
$areas = $_REQUEST['area_check'];
$Arr_area_size=sizeof($areas);
for($i=0; $i<$Arr_area_size; $i++)
{?>
<span style="background-color:#e81a46; border-radius:20px; margin:3px; color:white; padding:3px; font-style: italic"><?=$areas[$i]?></span>  
<?}}?>


<?php if(isset($_REQUEST['design_check']))
{
$designs = $_REQUEST['design_check'];
$Arr_design_size=sizeof($designs);
for($i=0; $i<$Arr_design_size; $i++)
{?>
<span style="background-color:#e81a46; border-radius:20px; margin:3px; color:white; padding:3px; font-style: italic"><?=$designs[$i]?></span>  
<?}}?>


<?php if(isset($_REQUEST['qualityORtype_check']))
{
$qualityORtypes = $_REQUEST['qualityORtype_check'];
$Arr_qualityORtype_size=sizeof($qualityORtypes);
for($i=0; $i<$Arr_qualityORtype_size; $i++)
{?>
<span style="background-color:#e81a46; border-radius:20px; margin:3px; color:white; padding:3px; font-style: italic"><?=$qualityORtypes[$i]?></span>  
<?}}?>


<?php if(isset($_REQUEST['finish_check']))
{
$finish_checks = $_REQUEST['finish_check'];
$Arr_finish_check_size=sizeof($finish_checks);
for($i=0; $i<$Arr_finish_check_size; $i++)
{?>
<span style="background-color:#e81a46; border-radius:20px; margin:3px; color:white; padding:3px; font-style: italic"><?=$finish_checks[$i]?></span>  
<?}}?>




      
      <?}?>
      <h4>
        Filter
      </h4>  
      <form action="" method="get">
      <input type="hidden" name="id" value="<?=$cat_id?>"/>
      <ul class="product-categories dt-sc-toggle-frame-set">
      <?php
      $brand_que=db_query("select * from tbl_partners where partner_status='Active'");
      if(mysqli_num_rows($brand_que)>0)
      {
      ?>
      
        <li class="cat-item cat-item-39 cat-parent first">
          <a class="" href="javascript:void(0)" >
             Brands
              </a> 
              <i class="dt-sc-toggle fa fa-angle-down"></i>

                  
          <ul class="children dt-sc-toggle-content ">
                <?php
                while($brand_result=mysqli_fetch_array($brand_que))
                {?>
            <li class="second">
<input type="checkbox" name="brand_check[]" id="brand_check[]" value="<?=$brand_result['partner_name']?>" onclick="this.form.submit()" <?php if($_REQUEST['brand_check']!=""){foreach($_REQUEST['brand_check'] as $brand) { if($brand==$brand_result['partner_name']){?>checked <?} } }?>/>
              <a class="" href="javascript:void(0)"><?=$brand_result['partner_name']?></a>
               </li>
               <?}?>
           
          </ul>
          
        </li> 
        
        <?}?>

<?php
   $area_que=db_query("select * from tbl_area where area_status='Active'");
      if(mysqli_num_rows($area_que)>0)
      {
?>
 <li class="cat-item cat-item-39 cat-parent first ">
          <a class="" href="javascript:void(0)">
             Area
              </a> 
            <i class="dt-sc-toggle fa fa-angle-down"></i>

                  
          <ul class="children dt-sc-toggle-content ">
                <?php
                while($area_result=mysqli_fetch_array($area_que))
                {?>
            <li class="second">
             <input type="checkbox" name="area_check[]" id="area_check[]" value="<?=$area_result['area_name']?>" onclick="this.form.submit()" <?php if($_REQUEST['area_check']!=""){foreach($_REQUEST['area_check'] as $area) { if($area==$area_result['area_name']){?>checked <?} } }?> />          
              <a class="" href="javascript:void(0)"><?=$area_result['area_name']?></a>
               </li>
               <?}?>

          </ul>
          
        </li> 
<?}?>
        
<?php
   $design_que=db_query("select * from tbl_design where design_status='Active'");
      if(mysqli_num_rows($design_que)>0)
      {
?>
        
         <li class="cat-item cat-item-39 cat-parent first">
          <a class="" href="javascript:void(0)">
             Design
              </a> 
            <i class="dt-sc-toggle fa fa-angle-down"></i>

                  
          <ul class="children dt-sc-toggle-content ">
               <?php
                while($design_result=mysqli_fetch_array($design_que))
                {?>
            <li class="second">
             <input type="checkbox" name="design_check[]" id="design_check[]" value="<?=$design_result['design_name']?>" onclick="this.form.submit()" <?php if($_REQUEST['design_check']!=""){foreach($_REQUEST['design_check'] as $design) { if($design==$design_result['design_name']){?>checked <?} } }?> />           
              <a class="" href="javascript:void(0)"><?=$design_result['design_name']?></a>
               </li>
               <?}?>
           
          </ul>
          
        </li> 
        <?}?>
        
        <?php
   $quality_que=db_query("select * from tbl_quality where quality_status='Active'");
      if(mysqli_num_rows($quality_que)>0)
      {
?>
         <li class="cat-item cat-item-39 cat-parent first">
          <a class="" href="javascript:void(0)">
             Tile Type
              </a> 
            <i class="dt-sc-toggle fa fa-angle-down"></i>

                  
          <ul class="children dt-sc-toggle-content ">
              <?php
                while($quality_result=mysqli_fetch_array($quality_que))
                {?>
            <li class="second">
              <input type="checkbox" name="qualityORtype_check[]" id="qualityORtype_check[]" value="<?=$quality_result['quality_name']?>" onclick="this.form.submit()" <?php if($_REQUEST['qualityORtype_check']!=""){foreach($_REQUEST['qualityORtype_check'] as $qualityORtype) { if($qualityORtype==$quality_result['quality_name']){?>checked <?} } }?> />         
              <a class="" href="javascript:void(0)"><?=$quality_result['quality_name']?></a>
               </li>
               <?}?>
          
          </ul>
          
        </li> 
        <?}?>
        
        
                <?php
   $finish_que=db_query("select * from tbl_finish where finish_status='Active'");
      if(mysqli_num_rows($finish_que)>0)
      {
?>
         <li class="cat-item cat-item-39 cat-parent first">
          <a class="" href="javascript:void(0)">
             Finish Type
              </a> 
            <i class="dt-sc-toggle fa fa-angle-down"></i>

                  
          <ul class="children dt-sc-toggle-content ">
                <?php
                while($finish_result=mysqli_fetch_array($finish_que))
                {?>
            <li class="second">
             <input type="checkbox" name="finish_check[]" id="finish_check[]" value="<?=$finish_result['finish_type_name']?>" onclick="this.form.submit()" <?php if($_REQUEST['finish_check']!=""){foreach($_REQUEST['finish_check'] as $finish) { if($finish==$finish_result['finish_type_name']){?>checked <?} } }?> />           
              <a class="" href="javascript:void(0)"><?=$finish_result['finish_type_name']?></a>
               </li>
               <?}?>
         
          </ul>
          
        </li> 
        <?}?>
        
        
        
      </ul>
      </form>
    </div>
    
  </div>
</div> 
<!-------------------------- FILTER END ------------------------->
    
    

   <div id="shopify-section-sidebar-category" class="shopify-section">
    <div data-section-id="sidebar-category"  data-section-type="Sidebar-category" class="shopify-section"> 
    <div class="widget widget_product_categories">
      
      <h4>
        Category
      </h4>  
      
      
      <ul class="product-categories dt-sc-toggle-frame-set">
<?php
$left_cat_query=db_query("select * from tbl_category where category_status='Active' and category_parent_id='0' ");
while($left_cat_res=mysqli_fetch_array($left_cat_query))
{?>
                     
    <li class="cat-item cat-item-39 cat-parent">
          <i></i><a class=" " href="<?=$site_url?>/products.html?id=<?=$left_cat_res['category_id']?>"><?=$left_cat_res['category_name']?></a> 
        </li>
        <?}?>

   
      </ul>
      
    </div>
    
  </div>
</div> 
   
  <?}?>
  



    <div class="sidebar-block">
     <div id="shopify-section-sidebar-colors" class="shopify-section"><div data-section-id="sidebar-colors"  data-section-type="Sidebar-color" class="shopify-section">  

      
</div>

   
 



</div>
     <div id="shopify-section-sidebar-tag-filters" class="shopify-section">
<div data-section-id="sidebar-tag-filters"  data-section-type="Sidebar-tag" class="shopify-section">  


   
      

  
</div>
  
</div>
  </div>
 


  <div id="shopify-section-sidebar-banner" class="shopify-section">  
    <div class="widget widget_promo_img">
      <ul id="promo-carousel" class="owl-carousel owl-theme">
        
        
        
        
        
      </ul>
    </div>
 
 




<script type="text/javascript">
$(document).ready(function(){
     $("#promo-carousel").owlCarousel({ 
        loop:false,
       // margin:10,
        nav:false,       
        dots: true,
        responsive:{
            0:{
                items:1
            },
            600:{
                items:1
            },
            1000:{
                items:1
            }
        }
 
  });
});
      
</script>
</div>
  
</div>
  

 
    </div>
      <!--   four-fifths -->
      <?php
$cls="";
if($cat_id==0)
{
$cls="five";
}else{
$cls="four";
      }?>
    <div class="grid__item wide--<?=$cls?>-fifths post-large--<?=$cls?>-fifths large--seven-tenths sidebar-hidden second">       
      <div class="collection-list">
        <div class="grid-uniform grid-link__container col-main">            
             
          
<br>





  <?php if($pager->total_records>0) {?>  
          
          <div class="products-grid-view">
                
          <ul>
<?php
//$pro_sql=db_query("select * from tbl_category where 1 and category_status='Active' and category_is_product='Yes' ");
while($pro_res=mysqli_fetch_array($result))
{
?>
<li class="grid__item item-row  wide--one-quarter post-large--one-third large--one-half medium--one-half small-grid__item on-sale" id="product-1892471406710" >
  <div class="products product-hover-16">
    <div class="product-container">  
<?php
if($cat_id!=0)
{?>
  <a href="<?=$site_url?>/product-details.html?id=<?=$pro_res['category_id']?>" class="grid-link">    
    <?}else{?>

      <a href="<?=$site_url?>/products.html?id=<?=$pro_res['category_id']?>" class="grid-link">    
<?}?>
        <div class="ImageOverlayCa"></div>
        
        <div class="reveal"> 
          <span class="product-additional">      
            <img src="<?=$site_url?>/uploaded_files/<?=$pro_res['category_image_name']?>" class="featured-image" alt="<?=$pro_res['category_name']?>" title="<?=$pro_res['category_name']?>" style="height: 200px; <?php if($cat_id==0){?>width:290px;<?}else{?>width:230px;<?}?>">
          </span>
          <img  src="<?=$site_url?>/uploaded_files/<?=$pro_res['category_image_name']?>" class="hidden-feature_img" alt="<?=$pro_res['category_name']?>" title="<?=$pro_res['category_name']?>" style="height: 200px; <?php if($cat_id==0){?>width:290px;<?}else{?>width:230px;<?}?>" />
        </div>      
        
      </a>
 <div class="product_right_tag   offer_exist ">
 </div>

      <div class="product-detail">

        <div class="prt-detail-inner">
<?php
if($cat_id!=0)
{?>
   <a href="<?=$site_url?>/product-details.html?id=<?=$pro_res['category_id']?>" class="grid-link__title"><?=$pro_res['category_name']?></a> 
   <?}else{?>
          <a href="<?=$site_url?>/products.html?id=<?=$pro_res['category_id']?>" class="grid-link__title"><?=$pro_res['category_name']?></a> 
          <?}?>
<?php
if($cat_id!=0)
{?>
        <div class="grid-link__meta">
            <div class="product_price">

              
              <div class="grid-link__org_price">
                <span class=money><i class="fa fa-inr"></i><?=$pro_res['category_discount_price']?></span>
              </div>

              
              <del class="grid-link__sale_price"><span class=money><i class="fa fa-inr"></i><?=$pro_res['category_real_price']?></span></del>
              
            </div>        

          </div> 
          <?}?>
        </div>

          <?php
if($cat_id!=0)
{?>
       <div class="functional-buttons">
     
          <a class="add-cart-btn btn" href="javascript:void(0);" onclick="add_to_cart_pro_ajax(<?=$pro_res['category_id']?>);">
           Add to Cart
          </a>
        

 </div> 
 <?}?>
      </div>
    </div>

  </div>
</li>
<?}?>


            
          </ul>
          
          </div>
            
<?php }else{?>
  <div class="col-md-12">
   <h2  style="color:red; text-align: center; padding-bottom:50px;">
    Product Not Available!

  </h2>
  </div>
<?php }?>
          
      
          
            
        </div>
        <?php
        if($_REQUEST['brand_check']=="" && $_REQUEST['area_check']=="" && $_REQUEST['design_check']=="" && $_REQUEST['qualityORtype_check']=="" && $_REQUEST['finish_check']=="" )
        {?>
        
        <?php if($pager->total_records>0) { 
           $pager->show_pager();
              }?>
 <?}?>
      </div>




    </div>
     


    
</div>

</div>   
    <div class="dt-sc-hr-invisible-large"></div>
		          
        </div>          
        
      </div>
      
      
       <div class="dt-sc-hr-invisible-large"></div>
    </main>  
    
    
      <script>
           function add_to_cart_pro_ajax(pro_cart_id)
    {

/*swal(""+pro_cart_id+"");*/
        
           $.ajax({
            url:"<?=$site_url?>/add_to_cart.php",
            type:"POST",
            data:{pro_cart_id:pro_cart_id},
            success:function(data){
                 if(data=="quantity error")
                {
                    swal("Quantity not available !", "", "error");
                    
                }else if(data=="Item added in your cart.")
                {
 //         swal("Added !", "Item added in your cart", "success");
swal({title: "Added", text: "Item added in your cart", showConfirmButton: true, allowEscapeKey : false, allowOutsideClick: false, type: "success"},
   function(){ 
       location.reload();
   }
);
                }else{
                     swal("Item already added in your cart!", "", "error");
                     
                }

            }
        });
        

    }
    </script>
    
    
   <?php include("site-footer.php"); ?>

MMCT - 2023