onlinefriends.blade.php 4.51 KB
<?php 
use App\Models\User;

if(strstr($stage,"social"))
{
?>
<ul class="list-unstyled friends-list" id=networklistul>
<?php $uids=array(); ?>
<?php if(!empty($friends))foreach($friends as $friend){ $uids[]=$friend->id; ?>
	<li class="<?php if($friend->presence==1) echo 'onlinefriendlist'; ?>" style='margin-bottom:1px;'>
	  <a style="cursor:pointer;padding-top:0;padding-bottom:0;height:35px;overflow-y:hidden" data-toggle="image-preview" data-title="{!!$friend->dispname()!!}" data-content="<?php if($friend->presence==1) echo 'Online'; else echo ''; ?>"  data-image-preview="{!!$friend->fetchphotothumb()!!}" onclick='tchatbox("chatpop_{!!$friend->id!!}","{!!$friend->dispname()!!}");return false;'><i></i>
	  <img src="{!!$friend->fetchphotothumb()!!}" width="35" onclick='return false;'> {!!substr($friend->dispname(),0,25)!!}</a>
	</li>
<?php } ?>
<?php if(!empty($othernetwork))foreach($othernetwork as $friend){ $uids[]=$friend->id; ?>
	<li class="<?php if($friend->presence==1) echo 'onlinefriendlist'; ?>" style='margin-bottom:1px;'>
	  <a style="cursor:pointer;padding-top:0;padding-bottom:0;height:35px;overflow-y:hidden" data-toggle="image-preview" data-title="{!!$friend->dispname()!!}" data-content="<?php if($friend->presence==1) echo 'Online'; else echo ''; ?>"  data-image-preview="{!!$friend->fetchphotothumb()!!}" onclick='tchatbox("chatpop_{!!$friend->id!!}","{!!$friend->dispname()!!}");return false;'><i></i>
	  <img src="{!!$friend->fetchphotothumb()!!}" width="35" onclick='return false;'> {!!substr($friend->dispname(),0,25)!!}</a>
	</li>
<?php } ?>

	<?php $friend=User::whereIn('id',Config::get('app.app_support_ids'))->where('presence','=','1')->first();
	if(empty($friend))$friend=User::find(1);
	if(!in_array($friend->id,$uids)){ ?>
	<li class="<?php if($friend->presence==1) echo 'onlinefriendlist'; ?>" style='margin-bottom:1px;'>
	  <a style="cursor:pointer;padding-top:0;padding-bottom:0;height:35px;overflow-y:hidden" data-toggle="image-preview" data-title="{!!$friend->dispname()!!}" data-content="Help and Support"  data-image-preview="{!!$friend->fetchphotothumb()!!}" onclick='tchatbox("chatpop_{!!$friend->id!!}","{!!$friend->dispname()!!}");return false;'><i></i>
	  <img src="{!!$friend->fetchphotothumb()!!}" width="35" onclick='return false;'> {!!substr($friend->dispname(),0,25)!!}</a>
	</li>
	<?php } ?>
</ul>
<script>
$(document).ready(function(){ulfilter('networklistul','filtersearchfrnd');});
</script>
<?php 
}
else if(strstr($stage,"dashboard"))
{
  if(!empty($friends))foreach($friends as $friend)
  { 
    if($friend->presence==1)echo "<a data-toggle='image-preview' data-title='".$friend->dispname()."'  data-content='<small></small>' data-image-preview='".$friend->fetchphotothumb()."' width='100' href='#' class='innerAll half border-none' onclick='tchatbox(\"chatpop_".$friend->id."\",\"".$friend->dispname()."\");return false;' style='padding:0 !important'><img src='".$friend->fetchphotothumb()."' alt='photo' width='22'></a>";
  }
  if(!empty($othernetwork))foreach($othernetwork as $friend)
  {
    if($friend->presence==1)echo "<a data-toggle='image-preview' data-title='".$friend->dispname()."'  data-content='<small></small>' data-image-preview='".$friend->fetchphotothumb()."' width='100' href='#' class='innerAll half border-none' onclick='tchatbox(\"chatpop_".$friend->id."\",\"".$friend->dispname()."\");return false;' style='padding:0 !important'><img src='".$friend->fetchphotothumb()."' alt='photo' width='22'></a>";
  }
}
else if($stage=="topMenuOnlineNetwork")
{
  if(!empty($friends))foreach($friends as $friend)
  { 
    if($friend->presence==1)echo "<a style='float:left;' data-toggle='image-preview' data-title='".$friend->dispname()."'  data-content='<small></small>' data-image-preview='".$friend->fetchphotothumb()."' width='100' href='#' class='innerAll half border-none' onclick='tchatbox(\"chatpop_".$friend->id."\",\"".$friend->dispname()."\");return false;' style='padding:0 !important'><img src='".$friend->fetchphotothumb()."' alt='photo' width='35'></a>";
  }
  if(!empty($othernetwork))foreach($othernetwork as $friend)
  {
    if($friend->presence==1)echo "<a style='float:left;' data-toggle='image-preview' data-title='".$friend->dispname()."'  data-content='<small></small>' data-image-preview='".$friend->fetchphotothumb()."' width='100' href='#' class='innerAll half border-none' onclick='tchatbox(\"chatpop_".$friend->id."\",\"".$friend->dispname()."\");return false;' style='padding:0 !important'><img src='".$friend->fetchphotothumb()."' alt='photo' width='35'></a>";
  }
  echo "<div style='clear:both'></div>";
}
?>