added lastLogins-Logging

This commit is contained in:
marko
2021-12-20 15:42:21 +01:00
parent 4cb5e3ee47
commit 1a3f81bd33
4 changed files with 64 additions and 13 deletions

View File

@@ -5,9 +5,6 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
require_once("config/participo.php");
require_once("./local/dbConf.php");
// require_once("./local/achievementsConf.php");
// require_once("./lib/achievementsLib.php");
$basePath = $config['basePath'];
require_once($basePath."/config/phpcount.config.php");
@@ -37,7 +34,17 @@ function checkCredentials($username, $password, $db_server, $db_user, $db_passwo
),
);
$message['success'] = 'Anmeldung erfolgreich, <a href="index.php">weiter zum Inhalt</a>.';
PHPCount::AddHit("participo-Login ".$_POST['f']['username']);
PHPCount::AddHit("participo-Login-".$_POST['f']['username']);
$lastLogins=file("logins.txt");
$file = fopen("logins.txt", "w");
fwrite($file, $_POST['f']['username']."\n");
for ( $i=0;i<30;++$i)
{
fwrite($file, $lastLoggins."\n");
}
fclose($file);
header('Location: http://' . $_SERVER['HTTP_HOST'] . '/participo?user=' . $_POST['f']['username']);
} else {
sleep(5);