Pricing updates

This commit is contained in:
Chris Smith
2019-03-31 18:58:50 -05:00
parent 6f045b5180
commit 22605b96cc
5 changed files with 86 additions and 12 deletions

View File

@@ -13,7 +13,9 @@ require __DIR__ . '/src/functions.php';
$dotenv = \Dotenv\Dotenv::create(__DIR__ . '/src');
$dotenv->load();
$dotenv->required([
'EVENT_TICKET_PRICE',
'EVENT_TICKET_PRICE_1',
'EVENT_TICKET_PRICE_2',
'EVENT_TICKET_PRICE_3',
'ENHANCER_TICKET_PRICE',
'CHILDCARE_PRICE',
'CABANA_PRICE',
@@ -39,6 +41,9 @@ $router->set404(function () {
echo '404, route not found!';
});
// Get event pricing based on dates
list($_SERVER['EVENT_TICKET_PRICE'], $_SERVER['TABLE_TICKET_PRICE']) = getEventPricing(new DateTime('now', new DateTimeZone('America/Chicago')));
$router->before('GET|POST', '/admin/.*', function() {
session_start();