-
Notifications
You must be signed in to change notification settings - Fork 3
/
userliste.php
70 lines (62 loc) · 1.8 KB
/
userliste.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
require("functions.php");
// User die gerade Online sind als Liste ausgeben
// Diese Liste kann webchat.de einlesen und damit die Liste unserer User ausgeben
if (preg_match("/hilfe/", $REQUEST_URI)) {
echo "optionale Parameter:<br>";
echo "userliste2.php?zeit=j&klammer=j&datenbank=j&raum=j";
exit;
}
if ($keinbr == "j")
$br = "\n";
else $br = "<br>\n";
$query = "SELECT o_name,r_name,UNIX_TIMESTAMP(o_aktiv) as login FROM raum,online "
. "WHERE o_raum=r_id "
. "AND (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(o_aktiv)) <= $timeout "
. "ORDER BY r_name,o_user ";
$result = @mysql_query($query, $conn);
$rows = @mysql_Num_Rows($result);
if ($rows > 0) {
$i = 0;
$r_name_alt = "";
while ($i < $rows) {
if ($datenbank == "j") {
if ($klammer == "j")
echo "(";
print "$dbase";
if ($klammer == "j")
echo ") ";
}
$row = @mysql_fetch_array($result);
if ($klammer == "j")
echo "(";
echo $row[o_name];
if ($klammer == "j")
echo ")";
echo " ";
if ($zeit != "n") {
if ($klammer == "j")
echo "(";
echo $row[login];
if ($klammer == "j")
echo ")";
}
if ($raum != "n" && $webchatraumausgabe == 1) {
$room = $webchatprivatraum;
for ($j = 0; $j < count($webchatpredef); $j++) {
if ($webchatpredef[$j] == $row[r_name])
$room = $row[r_name];
}
echo " ";
if ($klammer == "j")
echo "(";
echo "$room";
if ($klammer == "j")
echo ")";
}
echo "$br";
$i++;
}
mysql_free_result($result);
}
?>