Enhance API functionality: add token generation methods, implement entry management, and improve setup process with settings storage

This commit is contained in:
marc-go committed 2026-10-06 14:46:25 +02:00
1 parent 8ef5f7a941
commit 9316818753
9 files changed
+248 -25

No files matched your search

+18 -12
View File
@@ -18,20 +18,26 @@ $htmlLoader->setTemplate("entrys_frontend");
$url = "http://" . APP_DOMAIN . "/api/entrys/get.php";
$response = file_get_contents($url);
$entrys = json_decode($response, true);
$entrys = $entrys["entrys"];
$response = json_decode($response, true);
if ($response["data"]["empty"]) {
$html_block = "<p>There aren'n any entrys yet. Be the first one!</p>";
}else{
$entrys = $response["data"]["entrys"];
$html_block = "";
foreach($entrys as $entry) {
$name = $entry["name"];
$text = $entry["text"];
$html_block = "";
foreach($entrys as $entry) {
$name = $entry["name"];
$text = $entry["text"];
$date = $entry["date"];
$html_block .= '
<div class="entry">
<h3>' . $name . '</h3>
<p>' . $text . '</p>
</div>
';
$html_block .= '
<div class="entry">
<h3>' . $name . '</h3>
<p id="date">' . $date . '</p>
<p>' . $text . '</p>
</div>
';
}
}
$htmlLoader->show(["%entrys%" => $html_block]);