1 <!-- $Id: display.php,v 1.3 2000-10-19 21:36:50 ahollosi Exp $ -->
4 display.php: render a page. This has all the display
5 logic in it, except for the search boxes.
8 // if we got GET data, the first item is always a page name
9 // if it wasn't this file would not have been included
12 $pagename = rawurldecode($argv[0]);
14 $pagename = gettext("FrontPage");
16 // if there is no FrontPage, create a basic set of Wiki pages
17 if (! IsWikiPage($dbi, $pagename)) {
18 include "lib/setupwiki.php";
23 $enc_name = rawurlencode($pagename);
24 $pagehash = RetrievePage($dbi, $pagename, $WikiPageStore);
26 if (is_array($pagehash)) {
27 // we render the page if it's a hash, else ask the user to write one.
28 // This file returns a variable $html containing all the HTML markup
29 include("lib/transform.php");
31 $html .= sprintf(gettext("Describe %s here."),
32 "$pagename<a href='$ScriptUrl?edit=$enc_name'>?</a>");
35 GeneratePage('BROWSE', $html, $pagename, $pagehash);
38 IncreaseHitCount($dbi, $pagename);