1 <!-- $Id: wiki_pageinfo.php3,v 1.1 2000-06-21 19:32:33 ahollosi Exp $ -->
2 <!-- Display the internal structure of a page. Steve Wainstead, June 2000 -->
4 $encname = htmlspecialchars($info);
5 $html = "<form action=\"$ScriptUrl\" METHOD=GET>\n" .
6 "<input name=\"info\" value=\"$encname\">" .
7 " Enter a page name\n" .
8 "<input type=submit value=Go><br>\n" .
9 "<input type=checkbox name=showpagesource";
11 if ($showpagesource == "on") {
14 $html .= "> Show the page source and references\n</form>\n";
16 // don't bother unless we were asked
18 GeneratePage('MESSAGE', $html, "PageInfo", 0);
22 function ViewpageProps($name)
24 global $dbi, $showpagesource;
26 $pagehash = RetrievePage($dbi, $name);
27 if ($pagehash == -1) {
28 $table = "Page name '$name' is not in the database<br>\n";
31 $table = "<table border=1 bgcolor=white>\n";
33 while (list($key, $val) = each($pagehash)) {
34 if ((gettype($val) == "array") && ($showpagesource == "on")) {
35 $val = implode($val, "<br>\n");
37 $table .= "<tr><td>$key</td><td>$val</td></tr>\n";
45 $html .= "<P><B>Current version</B></p>";
46 // $dbi = OpenDataBase($WikiDataBase); --- done by index.php3
47 $html .= ViewPageProps($info);
49 $html .= "<P><B>Archived version</B></p>";
50 $dbi = OpenDataBase($ArchiveDataBase);
51 $html .= ViewPageProps($info);
53 GeneratePage('MESSAGE', $html, "PageInfo: '$info'", 0);