diff options
author | cookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8> | 2005-11-06 17:14:25 +0000 |
---|---|---|
committer | cookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8> | 2005-11-06 17:14:25 +0000 |
commit | 866c47ec603595e8fe67da5f0e5d162a70b1f7b4 (patch) | |
tree | ef2b85462576150f017ba6bd53ace13dc60dc510 /www-ssl/inc/funktion_activeUser.php | |
parent | fbc8e11b91b0565ae5d23472fc4e5bfc7d879939 (diff) |
move files
git-svn-id: svn://svn.cccv.de/engel-system@20 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'www-ssl/inc/funktion_activeUser.php')
-rwxr-xr-x | www-ssl/inc/funktion_activeUser.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/www-ssl/inc/funktion_activeUser.php b/www-ssl/inc/funktion_activeUser.php new file mode 100755 index 00000000..020302b1 --- /dev/null +++ b/www-ssl/inc/funktion_activeUser.php @@ -0,0 +1,36 @@ +<?PHP + +echo "<h4 class=\"menu\">Engels Online</h4>"; + +$SQL = "SELECT Nick, lastLogIn ". + "FROM User ". + "WHERE (`lastLogIn` > '". gmdate("YmdHis", 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 + + +for( $i=0; $i<mysql_num_rows($Erg); $i++) +{ + echo "\t\t\t<li>"; + echo 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 " ". bcmod( $Tlog/60, 60). ":"; + if( strlen(bcmod( $Tlog, 60))==1) + echo "0"; + echo bcmod( $Tlog, 60); + echo "</li>\n"; +} + +?> |