gebruikers-online-script
Gesponsorde koppelingen
PHP script bestanden
Code (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
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
<?
$sql = "SELECT user,UID,status FROM leden WHERE DATE_SUB(NOW(),INTERVAL 5 MINUTE) <= last_online ORDER BY UID ASC";
$query = mysql_query($sql);
$tellen = mysql_num_rows($query);
?>
<link rel="stylesheet" type="text/css" href="style.css">
<html>
<head>
<title>Players online</title>
</head>
<body>
<div id='container'>
Players online in the past 5 minutes:<br><br>
<?
while($rij = mysql_fetch_array($query)) {
$user = $rij['user'];
$status = $rij['status'];
echo kleur_status($status,$user);
if($tellen != 1 OR $tellen == 1) {
echo " | ";
}
$i++;
}
echo ' Total: ' . $tellen . '<br><br>';
?>
</div>
</body>
</html>
$sql = "SELECT user,UID,status FROM leden WHERE DATE_SUB(NOW(),INTERVAL 5 MINUTE) <= last_online ORDER BY UID ASC";
$query = mysql_query($sql);
$tellen = mysql_num_rows($query);
?>
<link rel="stylesheet" type="text/css" href="style.css">
<html>
<head>
<title>Players online</title>
</head>
<body>
<div id='container'>
Players online in the past 5 minutes:<br><br>
<?
while($rij = mysql_fetch_array($query)) {
$user = $rij['user'];
$status = $rij['status'];
echo kleur_status($status,$user);
if($tellen != 1 OR $tellen == 1) {
echo " | ";
}
$i++;
}
echo ' Total: ' . $tellen . '<br><br>';
?>
</div>
</body>
</html>
De CSS zou je zelf even moeten schrijven.