1
0
www.mikescher.com/www/pages/projectlawful_download.php
Mike Schwörer 300992b49f
All checks were successful
Build Docker and Deploy / Build Docker (push) Successful in 1m18s
Build Docker and Deploy / Deploy to Server (push) Successful in 27s
Added ProjectLawful-ebook downloads (blog::29)
2023-09-11 19:59:07 +02:00

19 lines
546 B
PHP

<?php
require_once (__DIR__ . '/../internals/website.php');
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
$variant = $ROUTE->parameter['variant'];
if (!$SITE->modules->ProjectLawful()->variantExists($variant))
{
$FRAME_OPTIONS->setForced404('epub file not found');
return;
}
$SITE->modules->ProjectLawful()->insertDownload($variant);
$FRAME_OPTIONS->setForcedRedirect('/data/projectlawful/project-lawful-' . $variant . '.epub');