= 1) { // This is a link header("Location: " . $title); exit(); } if (substr($title, 0, 1) == ":") { // This is also a link header("Location: " . substr($title, 1)); exit(); } $title = str_replace(array("/", "\", ".."), "", $title); // Don't allow directory traversal // If it's history, display that // $hist = @$_GET['hist']; if ($hist) { $title = str_replace("TITLE", "$hist", $historyof); $node = ""; $history = getNodeHistoryList($hist); $revisions = array(); foreach ($history as $histe) { $cur = ""; $cur .= date("Y-m-d h:i:sA", $histe["datestamp"]); if ($histe["user"] !== false) { $cur .= " (" . $histe["user"] . ")"; } $cur .= "
\n"; $revisions[] = $cur; } rsort($revisions); foreach ($revisions as $rev) { $node .= $rev; } $bar=array("$index", "$current"); } else { // Read node data. // $bar=array("$index", "$all", "$edit", "$history"); $node = parse($title); if (@$_COOKIE['wikiticket']) $bar[]="$logout"; else $bar[]="$login"; } display($title, $node, $bar, $template); ?>