Commit d53773fe authored by Nico Schallehn's avatar Nico Schallehn

Cronjob für Userlogout hinzugefügt

parent dba1a597
<?php include("config.php");
$result = mysql_query("SELECT id, name FROM user WHERE refresh_time < '".(time()-60)."' AND online = '1'");
$text = offtimeout();
$counter = 0;
while($user = mysql_fetch_array($result)){ $counter++;}
echo"
--------------------------------------
".date("H:i:s d.m.Y",time())."
--------------------------------------
Alle Timeout User ausgeloggt!
--------------------------------------
".$text."
--------------------------------------
Es wurden ".$counter." ausgeloggt!
--------------------------------------
Es sind schon ".$Useranzahl." an Bord!
Es sind ".$Useronline." Online!
--------------------------------------\r\n";
$inhalt = date("H:i:s d.m.Y",time())." - Useranzahl:".$Useranzahl." - Useronline:".$Useronline." - Userlogout:".$counter."\r\n";
echo $inhalt;
$text = file_get_contents("log.txt");
$handle = fopen ("log.txt", "r+");
fwrite ($handle, $inhalt.$text);
fclose ($handle);
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment