From d504e65db02f26403a797a1088ad282bfa9f3bdb Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Thu, 19 Mar 2020 13:25:14 -0500 Subject: [PATCH] notification redirect --- src/functions.php | 2 ++ views/notify.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/functions.php b/src/functions.php index 192ab42..6fc541e 100644 --- a/src/functions.php +++ b/src/functions.php @@ -129,6 +129,8 @@ function shoppingCartTotal($price) function checkIfTicketsAreOnSale() { + header('Location: /notify'); + $todaysDate = new DateTime('now', new DateTimeZone('America/Chicago')); $dateOnSale = new DateTime('3/15/2020 8:00am', new DateTimeZone('America/Chicago')); $interval = $todaysDate->diff($dateOnSale); diff --git a/views/notify.php b/views/notify.php index 425581c..29ffeac 100644 --- a/views/notify.php +++ b/views/notify.php @@ -2,11 +2,12 @@


-

Sorry - tickets are not on sale to the public yet.

+

Sorry - this event is postponed at the moment.

VIP tickets go on sale ' . $date->format('F jS, Y \a\t h:ia') . ''; + echo '
You will be notified when the tickets are on sale.
'; + //echo '
VIP tickets go on sale ' . $date->format('F jS, Y \a\t h:ia') . '
'; } ?>
Early bird tickets will go on sale April 1st, 2020 at 8:00am