<div class="full_width">
    <div class="content_area">
	
	<div class=" col-xs-12">
	<div class="brd-crms">
		<ul>
			<li><a href="<?php echo BASE_URL;?>">Home</a> </li>
			<?php 
			if($this->catName != '')
				echo '<li><a href="'.BASE_URL.'index/listing/'.$this->catId .'">'.$this->catName.'</a> </li>';
			if($this->subCatName != '')
				echo '<li><a href="'.BASE_URL.'index/listing/'.$this->catId.'/'.$this->subCatId.'">'.$this->subCatName.'</a> </li>';
			?>
		</ul>
		<div class="clear"></div>
	</div>
	</div>
	
	 
	
	
	<div class="content_area">
	<?php	
	if(is_array($this->resProducts))
	{
	if(count($this->resProducts)>0)
	{
	foreach($this->resProducts as $product)
	{
            //echopre($product);
	$imageUpParts = pathinfo(ConfigUrl::uploadimageroot().$product->Image);
	$imageVal   = explode("_",$product->Image);
        if(is_array($imageUpParts) && array_key_exists('extension', $imageUpParts)){
            $imageVal[2] = '151x151.'.$imageUpParts['extension'];
        }else{
            $imageVal[2] = '151x151.jpg';
        }
	$imageVal   = implode("_",$imageVal);
	
	$imageLoc   = ConfigUrl::root().'uploads/image/'.$imageVal;
	$imgPath=BASE_PATH.'uploads/image/'.$imageVal;
	if($product->Image=="")
	{
		$imageVal ='noimage.png';
		$dimensions ='height=" " width=" "';
	}
	else
	{
		if(file_exists($imgPath))
		{
			 $dimensions ='';
		}
		else
		{
			$imageVal ='noimage.png';
			$dimensions ='height=" " width=" "';
	
		}
	}
	
	$imageLoc   = ConfigUrl::root().'uploads/image/'.$imageVal;
	
	?>
	<div class="col-xs-12 col-md-6 col-lg-4">
	<div class="cotegory_list_box">
	<div class="cotegory_list_box_img">
		<a href="<?php echo ConfigUrl::base()?>index/pagelisting/<?php echo $product->alias; ?>/"><img  <?php echo $dimensions;?> src="<?php echo $imageLoc; ?>" alt="CamLence"></a>
	</div>
	
	<div class="cotegory_list_box_txt">
	<h1><a href="<?php echo ConfigUrl::base()?>index/pagelisting/<?php echo $product->alias;?>"><?php echo $product->Title; ?></a></h1>
	<p><?php
	if(strlen($product->Description)>130)
		echo substr($product->Description,0,130).'...';
	else
		echo $product->Description;
	
	?></p>
	
	<div class="category_controlls">
	<div class="comment_ratng_div">
	
	
	</div>
	<!--<div class="readmore_mrdiv">
	<a href="<?php echo ConfigUrl::base()?>index/pagelisting/<?php echo $product    ->alias;?>" class="read_more btn_styles1">View Details</a>
	</div>-->
	<div class="clear"></div>
	</div>
	
	
	<div class="clear"></div>
	</div>
	
	<div class="clear"></div>
	</div>
	</div>
	<?php }
	}
	else
	{
		echo '<br /><center><b>Sorry No Record Found !!!</b><center>';
	}
	}
	else
	{
		echo '<br /><center><b>Sorry No Record Found !!!</b><center>';
	}
	?>
	
	
	 
	
	
	<div class="clear"></div>

</div>


<!--  start paging..................................................... -->
         <?php if($this->pageCount > 1){  ?>

		 <div class="pagination">
           <ul>
       		<li><a href="<?php echo ConfigUrl::base()?>index/listing/<?php echo $this->productId; ?>/<?php echo  $this->subCatId;?>/1/" class="page_first" >First</a></li>
           	<li><a class="page_prev" href="<?php echo ConfigUrl::base()?>index/listing/<?php echo $this->productId; ?>/<?php echo  $this->subCatId;?>/<?php if($this->page != 1) echo $this->page - 1; else echo $this->page; ?>/" >Previous</a></li>
            <li class="pageinfo"><div id="page-info">Page <strong><?php echo $this->page; ?></strong> / <?php echo $this->pageCount; ?></div></li>
         	<li><a class="page_next" href="<?php echo ConfigUrl::base()?>index/listing/<?php echo $this->productId; ?>/<?php echo  $this->subCatId;?>/<?php if($this->pageCount != $this->page) echo  $this->page + 1; else echo $this->pageCount; ?>/" >Next</a></li>
            <li><a class="page_last" href="<?php echo ConfigUrl::base()?>index/listing/<?php echo $this->productId; ?>/<?php echo  $this->subCatId;?>/<?php echo $this->pageCount; ?>/" >Last</a></li>
            </ul>
		<div class="clear"></div>
		</div>
        <?php
        }
        
       ?>


<div class="clear"></div>
</div>



<div class="clear"></div>
</div>

</div>
</div>