From fb9d82a71fba1ce50bdc98ca007cda6636343c9d Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 14 Oct 2007 20:28:09 +0000 Subject: [PATCH] - added check if event available git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@52 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- www/inc/event_listing.php | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/www/inc/event_listing.php b/www/inc/event_listing.php index a85daa2..22b306c 100644 --- a/www/inc/event_listing.php +++ b/www/inc/event_listing.php @@ -42,13 +42,21 @@ function createEventDetails() $p = new Parser("eventdetails.html"); $eventTmpl = $p->getVar("EVENT"); - // set event details + // check if event exists $event = new Event($eventID); + if (!$event->exists()) + { + header("Location:index.php"); + } + + // set event details $p->setVars($event->getParserData()); $details = $p->parse($eventTmpl); $p->setVar("EVENTDETAILS",$details); $p->setVar("fieldAMOUNT", ""); $p->setVar("buttonSAVE", "ms_save"); + + // create page $parser->setVAR("PAGE", $p->parseFile("eventdetails.html")); } -- 1.7.2.5