getConfig(); $dbh = &$site->getDatabase(); $common = new HTMLPage($config, "common", "templates"); $common->setHomePage(); $page = new HTMLPage($config, "section", "templates"); $sections = Gallery::getSectionList(); $galleries = Gallery::fetch($dbh, "sectionID", $_GET['sectionID'], 'id', 'ASC'); $common->displayParsedTemplate("header"); $page->addVar('main', 'ID', $_GET['sectionID']); $page->addVar('main', 'NAME', $sections[$_GET['sectionID']]); foreach($galleries as $gallery) { $page->addVars('gallery', $gallery->getValueArray()); $page->parseTemplate('gallery', 'a'); } $page->displayParsedTemplate("main"); $common->displayParsedTemplate("footer"); ?>