This commit is contained in:
Bruno Rybársky 2023-06-09 21:53:18 +02:00
parent a74835d2cb
commit 529839bfa8
No known key found for this signature in database
GPG Key ID: DFE2C061EF985CD4

@ -10,6 +10,10 @@ if (!empty($idcko)){
$contents = json_decode(file_get_contents("data/contents.json"), true); $contents = json_decode(file_get_contents("data/contents.json"), true);
$logs = json_decode(file_get_contents("data/logs.json"), true); $logs = json_decode(file_get_contents("data/logs.json"), true);
if(!file_exists("data/logs.json")){
file_put_contents("data/logs.json", "{}");
}
$alllog = "data/all.log"; $alllog = "data/all.log";
if(array_key_exists($idcko, $stranky)){ if(array_key_exists($idcko, $stranky)){
@ -17,7 +21,7 @@ if (!empty($idcko)){
$entry = $stranky[$idcko]; $entry = $stranky[$idcko];
$content = $contents[$entry["contentid"]]; $content = $contents[$entry["contentid"]];
$nickname = $entry["nickname"]; $nickname = $entry["nickname"];
$logmessage = "Success from $linkname, IP: $ipcka\n"; $logmessage = "Success from $nickname($idcko), IP: $ipcka\n";
if (!array_key_exists($idcko, $logs)){ if (!array_key_exists($idcko, $logs)){
$logs[$idcko] = []; $logs[$idcko] = [];
} }