<?php
$path="../../";
include("../../map.php");
?>
<style>
	.userName{padding:10px 5px; background:#c08930; border-radius:50%; width:45px; height:45px; text-align:center; font-size:25px;}
	.userName:hover{background:#47a447;}	
	.contact {padding:0px; margin:0px; height:55px;}
</style>
<ul>
	<?php $sqlc=mysqli_query($conn, "select id from t2 where ne='chat' and s1=0 and s3=0 and t2='' order by id asc"); $rsc=mysqli_fetch_assoc($sqlc);?>
	<li class="contact <?php if($_GET["id"]=="0"){?>active<?php }?>" onclick="location.href='?id=0'" <?php if($_SESSION["user_id"]==0){?>style="display:none;"><?php }?>>
		<div class="wrap">
			<span class="contact-status <?php if(mysqli_num_rows($sqlc)>0){?>online<?php }else{?>offline<?php }?>"></span>
			<img src="<?php if($t49<>""){?>../../../deppo/image/<?php echo $t49?><?php }else{?>//cdn.<?php echo $cdnurl?>/wpanel/img/crm.png<?php }?>" title="Admin" />
			<div class="meta">
				<p class="name">Admin</p>
				<p class="preview">...</p>
			</div>
		</div>
	</li>
	<?php $sql=mysqli_query($conn, "select id,t1 from t5 where s1=1"); while($rsu=mysqli_fetch_assoc($sql)){?>
		<?php $sqlc=mysqli_query($conn, "select id from t2 where ne='chat' and s1=".$rsu["id"]." and s3=0 and t2='' order by id asc"); $rsc=mysqli_fetch_assoc($sqlc);?>
		<li class="contact <?php if($_GET["id"]==$rsu["id"]){?>active<?php }?>" onclick="location.href='?id=<?php echo $rsu["id"];?>'" <?php if($_SESSION["user_id"]==$rsu["id"]){?>style="display:none;"><?php }?>>
			<div class="wrap">
				<span class="contact-status <?php if(mysqli_num_rows($sqlc)>0){?>online<?php }else{?>offline<?php }?>"></span>
				<div class="userName" title="<?php echo $rsu["t1"];?>">
					<?php $name = explode(" ",$rsu["t1"]); echo $name[0][0]."".$name[1][0];?>
				</div>
				<div class="meta">
					<p class="name"><?php echo $rsu["t1"]?></p>
					<p class="preview">Editor</p>
				</div>
			</div>
		</li>
	<?php }?>
</ul>