summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2005-11-09 20:34:56 +0000
committercookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2005-11-09 20:34:56 +0000
commitf153bd996a8e99d06825b0467b58ce3ce8666bc0 (patch)
treec31fdd12d2aa512b9e58cad3967acd431e0cc167
parent4a546f6d95a853e687cc9e990aaaf7170965202d (diff)
auf einigen sytemen gibt es kein bsmod, in funtion eingebaut
git-svn-id: svn://svn.cccv.de/engel-system@34 29ba0400-6e00-0410-a75a-ca02368028f8
-rwxr-xr-xwww-ssl/inc/funktion_activeUser.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/www-ssl/inc/funktion_activeUser.php b/www-ssl/inc/funktion_activeUser.php
index 020302b1..b5d66d8a 100755
--- a/www-ssl/inc/funktion_activeUser.php
+++ b/www-ssl/inc/funktion_activeUser.php
@@ -1,5 +1,23 @@
<?PHP
+// Functionen gibt es nicht auf ellen rechern
+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\">Engels Online</h4>";
$SQL = "SELECT Nick, lastLogIn ".
@@ -15,7 +33,6 @@ $Tist = (gmdate("d", time()) * 60 * 60 * 24) + // Tag
(gmdate("i", time()) * 60) + // Minute
(gmdate("s", time()) ); // Sekunde
-
for( $i=0; $i<mysql_num_rows($Erg); $i++)
{
echo "\t\t\t<li>";
@@ -26,7 +43,7 @@ for( $i=0; $i<mysql_num_rows($Erg); $i++)
(substr( mysql_result( $Erg, $i, "lastLogIn"), 17, 2) ); // Sekunde
$Tlog = $Tist-$Tlog;
- echo " ". bcmod( $Tlog/60, 60). ":";
+ echo " ". bcdiv( $Tlog, 60). ":";
if( strlen(bcmod( $Tlog, 60))==1)
echo "0";
echo bcmod( $Tlog, 60);