Skip to content
Snippets Groups Projects
pagemap.php 870 B
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);
    
    
    
    unset($output);
    
    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;
    	}
    } 
    
    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);
    ?>