Files
Testing/onlinemembers.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

153 lines
5.2 KiB
PHP

<?php
$page = "onlinemembers";
include "header.php";
function general()
{
global $user, $url, $_SESSION, $database;
if((time()-$user->user_info["user_signupdate"])<=(60*60*3)&&$user->user_info["verified"]==0){
echo "You do not have access to this page yet.<br>
<br>"; return;}
$message1="";
$message2="";
$message3="";
$message4="";
$numclicks=0;
?>
<style>.invite_1 {
cursor: pointer;
position: relative;
height: 30px;
float: left;
width: 170px!important;
padding: 3px;
margin: 4px;
background: #0A0A0A;
font-size: 11px;
line-height: 12px;
}</style>
<?php
$query=$database->database_query("SELECT * FROM arrowchat WHERE `from`='".$user->user_info["user_id"]."' ORDER BY sent DESC LIMIT 4");
while($row=$database->database_fetch_array($query)){
if(strlen($row["message"])>10)
{
if($message1==""){
$message1=$row["message"];
}
elseif($message2==""){
$message2=$row["message"];
}
elseif($message3==""){
$message3=$row["message"];
}
else
{
if($row["message"]==$message1&&$row["message"]==$message2&&$row["message"]==$message3){$numclicks=5;}
}
}
}
?>
<script>
function leo(val, owner, user){
<?php
if($user->user_info["user_signupdate"]>(time()-(60*60*24*3))){?>
jQuery.ajax({
url: "arrowmessagecheck.php?user="+user,
success: function(data) {
if(data <= 4){
numItems = jQuery('.arrowchat_closebox').length
if(numItems==17){alert('A lot of IMs being open can affect your experience. The limit is 20 IMs and you are close to that limit.'); jqac.arrowchat.chatWith(owner);}else if(numItems>=19){alert('A lot of IMs being open can affect your experience. Please close some IMs to message more people.'); }else{
jqac.arrowchat.chatWith(owner);
}
setTimeout(function(){jQuery('.arrowchat_textarea').bind('copy paste', function (e) {
e.preventDefault();
});}, 1000);
}
}
});
<?php }else{?>
numItems = jQuery('.arrowchat_closebox').length
if(numItems==17){alert('A lot of IMs being open can affect your experience. The limit is 20 IMs and you are close to that limit.'); jqac.arrowchat.chatWith(owner);}else if(numItems>=19){alert('A lot of IMs being open can affect your experience. Please close some IMs to message more people.'); }else{
jqac.arrowchat.chatWith(owner);
}
//jqac.arrowchat.chatWith(owner);
<?php }?>
}
</script>
<?php if($_GET["membersonline"]=="status"){$order="cometstatus ASC";}
elseif($_GET["membersonline"]=="lastonline"){$order="se_users.user_lastactive ASC";}
else{$order="se_users.user_username ASC";}
?>
<div class='page_header'><span style="font-size:20pt; font-weight:bold; text-transform:uppercase;">ONLINE MEMBERS</span></div>
<div>Click on a Member name to visit their profile. Click on "I'm Available" to open an Instant Message window.</div><br /><br />
<select onchange="document.location.href='onlinemembers.php?membersonline='+this.options[this.selectedIndex].value">
<option value="lastonline" <?php if($_GET["membersonline"]=="lastonline"||$_GET["membersonline"]==""){?>selected="selected"<?php }?>>Sort By Last Activity</option>
<option value="alphabetical" <?php if($_GET["membersonline"]=="alphabetical"){?>selected="selected"<?php }?>>Sort By Alphabetical</option>
<option value="status" <?php if($_GET["membersonline"]=="status"){?>selected="selected"<?php }?>>Sort By Status</option>
</select>
<?
$query=$database->database_query("SELECT DISTINCT se_users.*, se_users.user_id userid, se_users.user_username username, arrowchat_status.session_time lastactivity, arrowchat_status.status cometstatus, CONCAT(se_users.user_id ,CONCAT('/',se_users.user_photo)) avatar, se_users.user_username link, arrowchat_status.is_admin, arrowchat_status.status
FROM se_users
JOIN arrowchat_status
ON se_users.user_id = arrowchat_status.userid
WHERE ('".time()."' - arrowchat_status.session_time - 60 < '120')
ORDER BY ".$order);
?>
<div style="clear:both;padding-left:5px;padding-top:5px;padding-bottom:5px;">
<? while($row=$database->database_fetch_array($query)){
//$owner1=new SEUserlite(Array($row["userid"]));
?>
<div class="invite_1" style="height:75px;"><div class="invite_2"><a href="<?=$url->url_create('profile', $row["user_username"])?>" style="color:white;" target="_blank">
<?php
$profilepicture=user_photo2($row, "./images/nophoto.png", true);?><?php
echo userprofiledot($row, $profilepicture, "75px", "75px");?>
</a></div><div class="invite_3"><a href="<?=$url->url_create('profile', $row["user_username"])?>" target="_blank" ><?=$row["user_username"]?></a><br><a class="leoclick" href="javascript:;" onClick="leo('<? echo $user->user_info["user_id"]?>', '<? echo $row["user_id"]?>', '<? echo $row["user_username"]?>');"><span style="color:#999">
<?php if($row["cometstatus"]=="available"){?>I'm available<?php }elseif($row["cometstatus"]=="busy"){?>I'm Busy<?php }elseif($row["cometstatus"]=="away"){?>I'm Away<?php }?>
</span></a><br>
<?=substr(strip_tags($row["user_status"]),0, 20)?></div><div style="clear:both"></div></div>
<? }?>
</div>
<div style="clear: both; margin-top: 10px;">&nbsp;</div>
<div style="clear: both;"></div>
</div>
<? //<iframe src="http://bateworld.com/cometchat/list.php" height="550px" width="950px"></iframe>?>
<?
}
include "footer.php";
?>