Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
42 righe
1.1 KiB
42 righe
1.1 KiB
<?php |
|
$configPath = substr(__DIR__, 0, strpos(__DIR__, "public_html/")) . "config.php"; |
|
include_once $configPath; |
|
|
|
if (empty($_SESSION["utente"])) { |
|
http_response_code(403); |
|
die(); |
|
} |
|
|
|
const PAGE_SIZE = 15; |
|
|
|
|
|
//render changelogs pages |
|
if ((empty($_GET) && empty($_POST)) || isset($_GET["page"]) || ($_GET["command"] ?? null) == "page") { |
|
include "./functions/renderPage.php"; |
|
die(); |
|
} |
|
//mark changelog as read |
|
if (!empty($_POST) && $_POST["command"] == "MARK_AS_READ") { |
|
include "./functions/markAsRead.php"; |
|
die(); |
|
} |
|
//load only last changelog |
|
if (!empty($_POST) && $_POST["command"] == "SHOW_LAST") { |
|
include "./functions/showLast.php"; |
|
die(); |
|
} |
|
//count unread changelogs |
|
if (!empty($_POST) && $_POST["command"] == "COUNT_UNREAD") { |
|
include "./functions/countUnread.php"; |
|
die(); |
|
} |
|
//render single changelog |
|
if (!empty($_GET) && !empty($_GET["changelog"])) { |
|
include "./functions/renderChangelog.php"; |
|
die(); |
|
} |
|
//render multiple changelogs at once |
|
if (!empty($_GET) && !empty($_GET["changelogs"])) { |
|
include "./functions/renderChangelogs.php"; |
|
die(); |
|
}
|
|
|