fix
This commit is contained in:
parent
a74835d2cb
commit
529839bfa8
@ -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] = [];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user