-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuser_group_member.inc.php
54 lines (44 loc) · 1.77 KB
/
user_group_member.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<div id="friends" style="display: inline-block;vertical-align: top; width: 200px;background-color: #eee;">
<?php
$image = "images/user_male.jpg";
if($FRIEND_ROW['gender'] == "Female")
{
$image = "images/user_female.jpg";
}
if(file_exists($FRIEND_ROW['profile_image']))
{
$image = $image_class->get_thumb_profile($FRIEND_ROW['profile_image']);
}
?>
<a href="<?=ROOT?>profile/<?php echo $FRIEND_ROW['userid']; ?>">
<img id="friends_img" src="<?php echo ROOT . $image ?>">
<br>
<?php echo $FRIEND_ROW['first_name'] . " " . $FRIEND_ROW['last_name'] ?>
<br>
<?php
$online = "Last seen: <br> Unknown";
if($FRIEND_ROW['online'] > 0){
$online = $FRIEND_ROW['online'];
$current_time = time();
$threshold = 60 * 2;//2 minutes
if(($current_time - $online) < $threshold){
$online = "<span style='color:green;'>Online</span>";
}else{
$online = "Last seen: <br>" . Time::get_time(date("Y-m-d H:i:s",$online));
}
}
?>
<span style="color: grey;font-size: 11px;font-weight: normal;"><?php echo $online ?></span>
<br>
<span style="display: inline-block;margin: 6px;"><?=$member['role']?></span>
<?php if(group_access($_SESSION['readbook_userid'],$group_data,'admin')):?>
<br style="clear: both;">
<a href="<?=ROOT?>group/<?=$group_data['userid']?>/members?remove=<?=$FRIEND_ROW['userid']?>">
<input id="post_button" type="button" value="Remove" style="font-size:11px;margin-right:10px;background-color: #916e1b;width:auto;">
</a>
<a href="<?=ROOT?>group/<?=$group_data['userid']?>/members?edit_access=<?=$FRIEND_ROW['userid']?>">
<input id="post_button" type="button" value="Edit Access" style="font-size:11px;margin-right:10px;background-color: #1b9186;width:auto;">
</a>
<?php endif;?>
</a>
</div>