$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", "<input type='text' id='ms_textfield_amount' name='ms_amount' size='2' maxlength='2'/>");
$p->setVar("buttonSAVE", "ms_save");
+
+ // create page
$parser->setVAR("PAGE", $p->parseFile("eventdetails.html"));
}