Add public domain day banner

This commit is contained in:
Alex Cabal 2024-11-27 12:42:18 -06:00
parent 1b604ca97f
commit c65035630f
16 changed files with 293 additions and 105 deletions

View file

@ -4,7 +4,7 @@ use Safe\DateTimeImmutable;
// If the user is not logged in, or has less than some amount of downloads, show a thank-you page.
$ebook = null;
$downloadCount = $_COOKIE['download-count'] ?? 0;
$downloadCount = HttpInput::Int(COOKIE, 'download-count') ?? 0;
$showThankYouPage = Session::$User === null && $downloadCount < 5;
$downloadUrl = null;