From: peter Date: Sun, 14 Oct 2007 20:28:09 +0000 (+0000) Subject: - added check if event available X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=fb9d82a71fba1ce50bdc98ca007cda6636343c9d;p=web%2Fkonrad%2Fsmoke.git - added check if event available git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@52 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- 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")); }