<div class="row">
    <div class="span12">
    <ul class="breadcrumb">
  <li><a href="<?php echo base_url();?>">Home</a> <span class="divider">/</span></li>
  <?php if(isset($search)){?>
  <li>Search<span class="divider">/</span></li>
  <li><?php echo $search;?></li>
  <?php }else{ ?>
  <li><a href="<?php echo base_url();?>categories">Categories</a> <span class="divider">/</span></li>
  <?php if(isset($pCategory)){ ?>
	<li><a href="<?php echo base_url();?>categories/<?php echo formatText($pCategory).'/'.$pCategoryId;?>"><?php echo $pCategory;?></a> <span class="divider">/</span></li>
  <?php } ?>
  <li class="active"><?php echo $cCategory;?></li>
  <?php } ?>
  
</ul></div>
    <div class="span3"></div>
<div class="span9">
    <?php if(count($listings)>0){?>
    <table class="table table-bordered table-hover">
              <thead>
                <tr>
                  <th></th>
                  <th width="15%">Price</th>
                  <th width="15%">Date</th>
                </tr>
              </thead>
              <tbody>
	<?php foreach($listings as $listing){ 
		$images=$this->postings_model->getPostingImages($listing->id);
		
		if(count($images)>0){
			$item_image=$images->image_url;
		}else{
			$item_image='default.png';
		}
		?>
                <tr>
                  <td>
                      <div class="span3"><a href="<?php echo base_url();?>details/<?php echo formatText($listing->title);?>/<?php echo $listing->id;?>"><?php echo show_thumb($item_image,150,150,'class="img-rounded"');?></a></div>
                      <div class="span12" style="vertical-align: top;" >
                          <h4><a href="<?php echo base_url();?>details/<?php echo formatText($listing->title);?>/<?php echo $listing->id;?>"><?php echo $listing->title;?></a></h4>
                          <p><?php echo count($listing->description) > 150 ? substr($listing->description,0,140) : $listing->description;?></p>
                        
                      </div>
                  </td>
                  
                  <td><?php echo ($listing->adtype==2 || empty($listing->price)) ? 'N/A' : 'Rs. '.$listing->price;?></td>
                  <td><?php echo formatDate($listing->dt_created);?></td>
                </tr>
              <?php } ?>
              </tbody>
            </table>
  <?php } if(isset($links)){?>
    <div class="pagination">
        
            <?php echo $links; ?>
          
        
      </div>
    <?php } ?>
</div>
    

</div>

