Newer
Older
$permission = "html";
Denis Walker
committed
// Only html group members can use this page - horrible emergency bodge
if (isset($session->groups[$permission])) {
$smarty->assign("html", TRUE);
if (isset($_REQUEST['mapid'])) {
$id = (int)$_REQUEST['mapid'];
$res = $DB->GetAll("SELECT * FROM pagemap where id=?", array($id));
if ($res && count($res) > 0) {
$smarty->assign("oldmap", $res[0]);
$output = $smarty->fetch($base . "templates/pagemap_edit.tpl");
} else {
header("Location: /Admin/Pagemap");
exit;
}
} else {
header("Location: /Admin/Pagemap");
exit;
}
}
$smarty->assign("map", $DB->GetAll("SELECT * FROM pagemap ORDER BY depth, path"));
$output = $smarty->fetch($base . "templates/pagemap.tpl");
}
$smarty->assign("title", "Page Map");
$smarty->assign("body", $output);
?>