<div class="content-area"> 
    
    <!-- PAGE CONTACT -->
    <section class="page-section with-sidebar sidebar-left">
      <div class="container">
        <div class="row"> 
          
          <!-- Sidebar -->
          <aside id="sidebar" class="sidebar col-sm-4 col-md-3">
            <div class="widget categories">
              <h4 class="widget-title">Categories</h4>
              <div class="widget-inner">
                <ul class="widget-menu">
                <?php
                	$sql = 'SELECT * FROM '.$DB->pre.'category WHERE status="1"';
						$DB->dbRows($sql);
						if($DB->numRows > 0){
							foreach($DB->rows as $D){
								?>
                                <li><a href="<?php echo SITEURL?>/product/?category=<?php echo base64_encode(intval($D['categoryID']))?>"><i class="fa fa-angle-right"></i><?php echo $D['categoryTitle']?></a></li>
                                <?php
								
							}
						}
				
				?>
                </ul>
              </div>
            </div>
            <!--<div class="widget">
              <h4 class="widget-title">Refine Search</h4>
              <div class="widget-inner">
                <ul class="box-filter">
                  <li> <span id="filter-group1">Type:</span>
                    <ul>
                      <li>
                        <input id="filter1" class="" type="checkbox" value="1">
                        <label for="filter1">Silver</label>
                      </li>
                    </ul>
                  </li>
                  <li> <span id="filter-group2">Price</span>
                    <ul>
                      <li>
                        <input id="filter4" class="" type="checkbox" value="2">
                        <label for="filter4">$100-$499</label>
                      </li>
                      <li>
                        <input id="filter5" class="" type="checkbox" value="6">
                        <label for="filter5">$500-$999</label>
                      </li>
                    </ul>
                  </li>
                </ul>
                <a class="btn btn-theme">Refine Search</a> </div>
            </div>-->
            <div class="widget">
              <h4 class="widget-title">Latest</h4>
              <div class="widget-inner">
              	<?php
                	$sql = 'SELECT * FROM '.$DB->pre.'product WHERE status="1" order by productID desc limit 0,5';
					$DB->dbRows($sql);
					if($DB->numRows > 0){
						foreach($DB->rows as $D){
							?>
                            <div class="latest-product"> <img src="<?php echo SITEURL?>/core/image.inc.php?path=product/<?php echo $D['prodImg1']?>&w=190&h=190&type=crop" class="img-responsive" />
                  <div class="latest-product-info"> <a href="<?php echo SITEURL?>/product/<?php echo $D['seoUri']?>/<?php echo $D['productID']?>"><?php echo $D['prodTitle']?></a>
                    <div class="price"><span>Rs<?php echo intval($D['prodPrice']);?></span>Rs &nbsp;<?php echo intval($D['prodDistPrice']);?></div>
                    <a class="btn btn-theme cls-cart" href="javascript:void(0)" attr="<?php echo htmlentities(json_encode(array('productID'=>$D['productID'],'qty'=>$D['prodQnt'])))?>">Add To Cart</a> </div>
                </div>
                
                
                            <?php
						}
					}else{
						echo "No Records Found...";
					}
				?>
                
              </div>
            </div>
          </aside>
          <hr class="page-divider transparent visible-xs"/>
          <section id="content" class="content col-sm-8 col-md-9">
            <section class="breadcrumbs">
              <ul class="breadcrumb">
                <li> <a href="<?php echo SITEURL?>">Home</a> </li>
                <li class="active">Shop Page</li>
              </ul>
              
            </section>
            
            
            <hr class="transparent" />
            <div class="row">
            <?php
				$catID =  base64_decode($_REQUEST['category']);
				$where = ($catID?' AND categoryID="'.$catID.'"':'');
            	$sql = 'SELECT * FROM '.$DB->pre.'product WHERE status="1" '.$where.' order by productID desc';
				$DB->dbRows($sql);
				if($DB->numRows > 0 ){
					foreach($DB->rows as $D){
						?>
                        <div class="col-sm-6 col-md-3 col-xsp-6">
                <div class="product-wrapper">
                  <div class="product-image"> <a href="<?php echo SITEURL?>/product/<?php echo $D['seoUri']?>/<?php echo $D['productID']?>"> <img src="<?php echo SITEURL?>/core/image.inc.php?path=product/<?php echo $D['prodImg1']?>&w=190&h=190&type=crop" class="img-responsive" /> </a> </div>
                  <div class="product-info"> <a href="<?php echo SITEURL?>/product/<?php echo $D['seoUri']?>/<?php echo $D['productID']?>"><?php echo $D['prodTitle']?></a>
                    <div class="price"> <span>Rs<?php echo intval($D['prodPrice']);?></span>Rs &nbsp;<?php echo intval($D['prodDistPrice']);?></div>
                    <a class="btn btn-theme cls-cart" href="javascript:void(0)" attr="<?php echo htmlentities(json_encode(array('productID'=>$D['productID'],'qty'=>$D['prodQnt'])))?>">Add To Cart</a> </div>
                </div>
              </div>
                        <?php
					}
				}else{
					echo "No Recods Found...";
				}
			?>
              
              
            </div>
          </section>
        </div>
      </div>
    </section>
    <!-- /PAGE CONTACT --> 
    
  </div>