📄 activeusers.php
字号:
<?
/**
* activeusers.php
* Active Users Mod
* Musicbox Version 2.1
* TeaM SCRiPTMAFiA 2005
*
* This file displays a bar showing the active users
*
* Note: You will need to edit this file so that the session include points to the real location of session.php.
* Alternatively, add a constant to sources/constants.php and use it for the path.
*
*/
include_once("../sources/session.php");
$q = "SELECT username FROM ".TBL_ACTIVE_USERS
." ORDER BY timestamp DESC,username";
$result = $database->query($q);
/* Error occurred, return given name by default */
$num_rows = mysql_numrows($result);
?>
<body bgcolor="#FDF1FB">
<table width="100%" border="0" cellpadding="4" cellspacing="2">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php
/* Display active users, with link to their info */
for($i=0; $i<$num_rows; $i++){
$uname = mysql_result($result,$i,"username");
$query = "SELECT avatar FROM ".TBL_USERS ." WHERE username = '$uname' LIMIT 1";
$result_2 = $database->query($query);
$avatar = mysql_result($result_2,0,"avatar");
echo "<br><a href=\"../userinfo.php?user=$uname\" target='_blank'><img src=\"".AVATARS_URL.$avatar."\" width=\"30\" height=\"30\" align=\"middle\" border='0'></a> <a href=\"../userinfo.php?user=$uname\" target='_blank'>$uname</a> <a href=\"../index.php?action=showUsersplaylists&username=$uname\" target='_blank'><img src=\"../template/images/userplaylist.gif\" width=\"23\" height=\"17\" alt=\"My Playlist\" border=\"0\" align=\"top\"></a> <br>";
}
?>
</td></tr>
<td align="center">
<b><?=$database->num_active_guests?></b> guest online
</td>
</tr>
</table>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -