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:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
|
/* ####################### */
/* ### USER VISITED START */
/* ####################### */
if ($showuservisited == 1) {
$membercount = 0;
$invisiblecount = 0;
$curdate = strftime("%m %d %Y",time());
$date = explode(" ", $curdate);
$timestamp = mktime(0,0,0,$date[0],$date[1],$date[2]);
unset($online);
$online = &new useronline($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']);
$result = $db->unbuffered_query("SELECT u.userid, u.username, u.invisible, u.useronlinegroupid, u.lastactivity, g.useronlinemarking FROM bb".$n."_users u, bb".$n."_groups g WHERE u.useronlinegroupid=g.groupid AND u.lastactivity>=".$timestamp." ORDER BY u.username ASC");
while ($row = $db->fetch_array($result)) {
if ($row['userid'] == 0) continue;
$membercount++;
if ($row['invisible'] == 1) $invisiblecount++;
$online->user($row['userid'], htmlconverter($row['username']), $row['useronlinemarking'], $row['invisible'], true);
}
$uservisited = $online->useronlinebit;
$totaluservisited = $membercount;
if ($totaluservisited > $rekord_visited) {
$rekord_visited = $totaluservisited;
$rekordtime_visited = time();
$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekord_visited' WHERE varname='rekord_visited'", 1);
$db->unbuffered_query("UPDATE bb".$n."_options SET value='$rekordtime_visited' WHERE varname='rekordtime_visited'", 1);
require("./acp/lib/class_options.php");
$option = &new options("acp/lib");
$option->write();
}
$rekorddate_visited = formatdate($wbbuserdata['dateformat'], $rekordtime_visited);
$rekordtime_visited = formatdate($wbbuserdata['timeformat'], $rekordtime_visited);
// format figures
if ($totaluservisited >= 1000) $totaluservisited = number_format($totaluservisited, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
if ($invisiblecount >= 1000) $invisiblecount = number_format($invisiblecount, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
if ($rekord_visited >= 1000) $rekord_visited = number_format($rekord_visited, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
if ($totaluservisited == 1) {
$uservisited_BE = $lang->items['LANG_START_USERVISITED_BE_ONE'];
$uservisited_USER = $lang->items['LANG_START_USERVISITED_MEMBERS_ONE'];
}
else {
$uservisited_BE = $lang->items['LANG_START_USERVISITED_BE'];
$uservisited_USER = $lang->items['LANG_START_USERVISITED_MEMBERS'];
}
if ($rekord_visited == 1) {
$userrekordvisited_USER = $lang->items['LANG_START_USERVISITED_MEMBERS_ONE'];
}
else {
$userrekordvisited_USER = $lang->items['LANG_START_USERVISITED_MEMBERS'];
}
if ($membercount == 1) $uservisited_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS_ONE'];
elseif ($membercount > 1) $uservisited_MEMBERS = $lang->items['LANG_START_USERONLINE_MEMBERS'];
else {
$uservisited_MEMBERS = $lang->items['LANG_START_USERVISITED_MEMBERS'];
$membercount = 0;
}
if ($invisiblecount == 1) $uservisited_GHOSTS = $lang->items['LANG_START_USERONLINE_GHOSTS_ONE'];
elseif ($invisiblecount > 1) $uservisited_GHOSTS = $lang->get("LANG_START_USERONLINE_GHOSTS", array('$invisiblecount' => $invisiblecount));
else $uservisited_GHOSTS = '';
$lang->items['LANG_START_USERVISITED'] = $lang->get("LANG_START_USERVISITED", array('$uservisited_BE' => $uservisited_BE, '$membercount_visited' => $membercount, '$uservisited_MEMBERS' => $uservisited_MEMBERS, '$uservisited_GHOSTS' => $uservisited_GHOSTS, '$uservisited_AND' => $uservisited_AND, '$rekord_visited' => $rekord_visited, '$userrekordvisited_USER' => $userrekordvisited_USER, '$rekorddate_visited' => $rekorddate_visited, '$rekordtime_visited' => $rekordtime_visited));
$lang->items['LANG_START_SHOWUSERVISITED'] = $lang->get("LANG_START_SHOWUSERVISITED", array('$uservisited_BE' => $uservisited_BE, '$totaluservisited' => $totaluservisited, '$uservisited_USER' => $uservisited_USER));
}
/* ###################### */
/* ### USER VISITED ENDE */
/* ###################### */ |