load(intval($_REQUEST["id"])); } else { redirect("dicesessionlist.php"); } $count = 0; $de = $ds->getDiceEvents(0, 0, $count, null, "round ASC, id ASC"); $path = dirname(__FILE__) . "/templates/"; $tpl = & new Template($path); $tpl->set("error", $error); $tpl->set("dicesession", $ds); $tpl->set("diceevents", $de); $tpl->set("dicestatistics", $ds->calcDiceStatistics($de)); $tpl->set('link_list', fetch_link_list("dicesessionlist.php")); $maintpl = & new Template($path); $maintpl->set("title", "Dice Roller"); $maintpl->set('body', $tpl->fetch('dicesessionview.tpl.php')); echo $maintpl->fetch('main.tpl.php'); ?>