<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($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><a href="<?php echo base_url();?>categories/<?php echo formatText($itemCategory).'/'.$itemCategoryId;?>"><?php echo $itemCategory;?></a> <span class="divider">/</span></li>
  <li class="active"><?php echo $details->title; ?></li>
</ul></div>
   
<div class="span8">
<div class="span3">
<?php

$images=$this->postings_model->getPostingImages($details->id);
	if(count($images)>0 && file_exists(dirname($_SERVER['SCRIPT_FILENAME']).'/assets/adimages/'.$images->image_url)){
		$item_image=$images->image_url;
	}else{
		$item_image='default.png';
	}
echo show_thumb($item_image,250,250,'class="img-rounded"').'<hr>';
$extraImages=$this->postings_model->getPostingImages($details->id,false);
if(count($extraImages)>0){
    echo '<p>';
    foreach($extraImages as $eximage){
        if(file_exists(dirname($_SERVER['SCRIPT_FILENAME']).'/assets/adimages/'.$eximage->image_url)){
        echo '<a class="alladimages" href="'.base_url().'assets/adimages/'.$eximage->image_url.'">'.show_thumb($eximage->image_url,75,75,'class="img-rounded"').'</a>';
        }
    }
    echo '</p>';
}
?></div><div class="span4">
<h3><?php echo $details->title; ?></h3>
<strong>
    <?php if($details->adtype == 1 && !empty($details->price) && $details->price > 0){?>
<div class="alert alert-info">Price : <?php echo 'Rs. '.$details->price; ?> </div>
<?php } ?>
<div class="alert alert-info">Post Date : <?php echo formatDate($details->dt_created);?></div>
Details:</strong>
<hr>
<?php echo $details->description; ?>
</div>
</div>
 <div class="span4">
     <h4> By:<?php echo $user->name;?></h4>
      <address>
              <abbr title="Phone">P:</abbr> <?php if(!empty($details->phone)){echo $details->phone;}else{echo 'N/A';};?>
      </address>
      <?php if($this->session->userdata('user_id')==$details->user_id){ ?>	
	Views : <?php echo $details->views;?> <br>
	Replies : <?php echo $this->inquiries_model->getInquiriesCount($details->id);?> <br>
	Published : <?php echo $details->published==1?'Yes':'No';?> <br>
	<a href="<?php echo base_url();?>account/editad/<?php echo $details->id;?>" id="editad">Edit</a> | <a href="#" id="deletead" onclick="return deleteItem(<?php echo $details->id;?>);" >Delete</a>
      <?php }else{ ?>
      	<a class="btn btn-warning center" href="#" id="replyad">Reply to this ad</a>
      <?php } ?>
      <!--<address>
        <strong>Full Name</strong><br>
        <a href="mailto:#">first.last@gmail.com</a>
      </address>-->
    </div>   

</div>
<input type="hidden" name="listid" id="listid" value="<?php echo $details->id;?>">  
