Add donation drive scaffolding

This commit is contained in:
Alex Cabal 2022-02-15 20:43:19 -06:00
parent 60585024b1
commit bbe89b0baf
21 changed files with 472 additions and 85 deletions

View file

@ -9,7 +9,7 @@ use function Safe\apcu_fetch;
use function Safe\shuffle;
try{
$urlPath = trim(str_replace('.', '', HttpInput::GetString('url-path', true, '')), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
$urlPath = trim(str_replace('.', '', HttpInput::Str(GET, 'url-path', true, '')), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
$wwwFilesystemPath = EBOOKS_DIST_PATH . $urlPath; // Path to the deployed WWW files for this ebook
if($urlPath == '' || mb_stripos($wwwFilesystemPath, EBOOKS_DIST_PATH) !== 0){
@ -127,8 +127,8 @@ catch(InvalidEbookException $ex){
<section id="description">
<h2>Description</h2>
<? if(DONATION_HOLIDAY_ALERT_ON){ ?>
<?= Template::DonationAlert(['holidays' => true]) ?>
<? if(DONATION_DRIVE_ON){ ?>
<?= Template::DonationProgress() ?>
<? }elseif(DONATION_ALERT_ON){ ?>
<?= Template::DonationAlert() ?>
<? } ?>