<footer class="main-footer">
    <div class="pull-right hidden-xs">
      <b>Version</b> 2.0.1
    </div>
    <strong>Copyright &copy; <?php echo date('Y');?> 
    	<a href="http://digitalaptech.com">Digital Aptech Pvt Ltd</a>.
    </strong>

    <?php
if($this->session->userdata('user_id')){

	$where=array('user_id'=>$this->session->userdata('user_id')) ;
	$user_details1=get_users($where);
		 //print_r($user_details1) ;//die ;
}

$allFriends=get_users('');
  //print_r($allFriends); //exit;
?>

<script>
//var jQuery_chat = $.noConflict(true);
	var memberName={};
//current user

	<?php
if($this->session->userdata('user_id')){ ?>

	var currentUser= "<?php echo $user_details1[0]['user_id'] ?>" ;

	memberName['<?php echo $user_details1[0]['user_id'];?>']={};
	memberName['<?php echo $user_details1[0]['user_id']?>']['username']="<?php echo $user_details1[0]['username']?>";
	

	memberName['<?php echo $user_details1[0]['user_id']?>']['user_status']="1";
	memberName['<?php echo $user_details1[0]['user_id']?>']['chat_status']="<?php echo base_url();?>images/online.png";
	memberName['<?php echo $user_details1[0]['user_id']?>']['logo']="<img src='<?php echo base_url();?>assets/profile_image/thumb/<?php if(!empty($user_details1[0]['profile_image'])) { echo $user_details1[0]['profile_image']; } else { echo 'user.png';} ?>' height='25'>";
	<?php }  ?>
	
	// chat user
	//all chat user
	
	<?php
		if(!empty($allFriends))
		{
			foreach($allFriends as $value)
			{
				$wherea2=array('user_id'=>$value['user_id'],'is_default'=>1);

					if($this->session->userdata('user_id')!=$value['user_id'])
					{
						//print_r($value);
		
			?>
				if(!memberName['<?php echo $value['user_id']; ?>'])
				memberName['<?php echo $value['user_id']; ?>']={};
				memberName['<?php echo $value['user_id']; ?>']['username']="<?php echo $value['username']; ?>";
				memberName['<?php echo $value['user_id']; ?>']['user_status']="1";
				memberName['<?php echo $value['user_id']; ?>']['chat_status']="<?php echo base_url();?>images/online.png";
				memberName['<?php echo $value['user_id']?>']['logo']="<img src='<?php echo base_url();?>assets/profile_image/thumb/<?php if(!empty($value['profile_image'])) { echo $value['profile_image'];} else { echo 'user.png';} ?>' height='25'>";
				
			<?php
			
				}
			}
		}
	?>


</script>
  </footer>