Skip to content
Snippets Groups Projects
pagemap.php 1.02 KiB
Newer Older
  • Learn to ignore specific revisions
  • // Only html group members can use this page - horrible emergency bodge
    if (isset($session->groups[$permission])) {
        $smarty->assign("html", TRUE);
    
    
    
    Denis Walker's avatar
    Denis Walker committed
        unset($output);
    
    Denis Walker's avatar
    Denis Walker committed
        if (@$pathlist[3] == "Edit") {
    
            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;
            }
        }
    
    Denis Walker's avatar
    Denis Walker committed
    
    }
    
    
    if (!isset($output)) {
    
        $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);
    ?>