|
|
|
@ -1,31 +1,16 @@
|
|
|
|
|
<?php
|
|
|
|
|
// Funktionen gibt es nicht auf allen Rechnern
|
|
|
|
|
if(!function_exists("bcdiv")) {
|
|
|
|
|
function bcdiv( $param1, $param2) {
|
|
|
|
|
return floor( $param1 / $param2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!function_exists("bcmod")) {
|
|
|
|
|
function bcmod( $param1, $param2) {
|
|
|
|
|
return $param1 - ( $param2 * bcdiv( $param1, $param2));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "<h4 class=\"menu\">Engel online</h4>";
|
|
|
|
|
// Funktionen gibt es nicht auf allen Rechnern
|
|
|
|
|
echo "<h4>Engel online</h4>";
|
|
|
|
|
|
|
|
|
|
$SQL = "SELECT UID, Nick, lastLogIn " .
|
|
|
|
|
"FROM User " .
|
|
|
|
|
"WHERE (`lastLogIn` > '" . gmdate("YmdHis", time() - (60 * 60)) . "' AND NOT (UID=" . $_SESSION['UID'] . ")) " .
|
|
|
|
|
"WHERE (`lastLogIn` > '" . (time() - 60 * 60) . "' AND NOT (UID=" . $_SESSION['UID'] . ")) " .
|
|
|
|
|
"ORDER BY lastLogIn DESC;";
|
|
|
|
|
|
|
|
|
|
$Erg = mysql_query($SQL, $con);
|
|
|
|
|
|
|
|
|
|
$Tist = (gmdate("d", time()) * 60 * 60 * 24) + // Tag
|
|
|
|
|
(gmdate("H", time()) * 60 * 60) + // Stunde
|
|
|
|
|
(gmdate("i", time()) * 60) + // Minute
|
|
|
|
|
(gmdate("s", time()) ); // Sekunde
|
|
|
|
|
|
|
|
|
|
echo "<ul>";
|
|
|
|
|
|
|
|
|
|
for ($i = 0; $i < mysql_num_rows($Erg); $i++) {
|
|
|
|
@ -37,19 +22,11 @@
|
|
|
|
|
// Show Admin Page
|
|
|
|
|
echo funktion_isLinkAllowed_addLink_OrLinkText("admin/userChangeNormal.php?enterUID=" . mysql_result($Erg, $i, "UID") . "&Type=Normal", mysql_result($Erg, $i, "Nick"));
|
|
|
|
|
|
|
|
|
|
$Tlog = (substr(mysql_result($Erg, $i, "lastLogIn"), 8, 2) * 60 * 60 * 24) + // Tag
|
|
|
|
|
(substr(mysql_result($Erg, $i, "lastLogIn"), 11, 2) * 60 * 60) + // Stunde
|
|
|
|
|
(substr(mysql_result($Erg, $i, "lastLogIn"), 14, 2) * 60) + // Minute
|
|
|
|
|
(substr(mysql_result($Erg, $i, "lastLogIn"), 17, 2) ); // Sekunde
|
|
|
|
|
|
|
|
|
|
$Tlog = $Tist - $Tlog;
|
|
|
|
|
|
|
|
|
|
echo " " . bcdiv($Tlog, 60) . ":";
|
|
|
|
|
$timestamp = mktime($hour, $minute, $second, $month, $day, $year);
|
|
|
|
|
|
|
|
|
|
if(strlen(bcmod($Tlog, 60)) == 1)
|
|
|
|
|
echo "0";
|
|
|
|
|
$Tlog = time() - mysql_result($Erg, $i, "lastLogIn");
|
|
|
|
|
|
|
|
|
|
echo bcmod($Tlog, 60);
|
|
|
|
|
echo " " . date("i:s", $Tlog);
|
|
|
|
|
echo "</li>\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|