  <script>
		$(document).ready(function(){
			$(".userchat").click(function(){
				$('.userchat').removeClass("active");
				$(this).addClass("active");
			});
			$(".userchat").click(function(e){e.preventDefault();
				var id=$(this).attr('href');
				//alert(id);
				$.ajax({
				 type: "POST",
				 url: '<?php echo base_url();?>admin/userchat',
				 data: {oid:id},
				 success: function(res){
				//alert(res);
				$(".firstli").html(res);
				}
				 }); 
			});
		});
	</script>
  <div class="modal-header">
                                            <h3><?php echo $ad->title;?></h3>
                                            <h4>DA <?php echo $ad->price;?></h4>
                                            <button class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                        </div>
                                        <div class="modal-body">
                                           <div class="row">
                                                <div class="col-md-6">
                                
                                    <ul class="chat-list-wrap">
                                        <li class="chat-list">
                                            <div class="chat-body">
                                                 <?php if(count((array)$users)>0){foreach($users as $u){?>
                                                <a class="userchat" href="<?php echo $u->oid;?>">
                                                    <div class="chat-data">
          <img class="user-img img-circle" src="<?php echo base_url();?>assets/images/author/img-08.jpg" alt="user">
                                                        <div class="user-data">
           <span class="name block capitalize-font"><?php echo $u->rname;?><br/> <i class="fa fa-phone"></i> <?php echo $u->rmob;?></span>
                                                            <span class="time block text-gray">8min</span>
                                                        </div>
                                                        <div class="status online"></div>
                                                        <div class="clearfix"></div>
                                                    </div>
                                                </a>
                                                <?php }}else{echo '<h2 class="text-warning">No User Offers for this ad.</h2>';}?>
                                            </div>
                                        </li>
                                    </ul>
                               
                            </div>
                            <div class="col-md-6">
                            <div class="chat-content">
                                        <ul>
                                            <li class="friend firstli">
                                                
                                            </li>
                                        </ul>
                                    </div>
                            </div>
                                                </div>
                                         
                                        </div>
                                        <div class="modal-footer">
                                            <button class="btn btn-default" data-dismiss="modal">Close</button>
                                        </div>
