1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <!-- $Id: index.php,v 1.5.2.1 2001-08-18 00:35:10 dairiki Exp $ -->
5 The main page, i.e. the main loop.
6 This file is always called first.
9 if (!defined('WIKI_ADMIN')) { // index.php not included by admin.php?
10 include "lib/config.php";
11 include "lib/stdlib.php";
13 // All requests require the database
14 $dbi = OpenDataBase($WikiPageStore);
17 // Allow choice of submit buttons to determine type of search:
18 if (isset($searchtype) && ($searchtype == 'full'))
19 $full = $searchstring;
20 elseif (isset($searchstring)) // default to title search
21 $search = $searchstring;
24 include "lib/editpage.php";
25 } elseif (isset($links)) {
26 include "lib/editlinks.php";
27 } elseif (isset($copy)) {
28 include "lib/editpage.php";
29 } elseif (isset($search)) {
30 include "lib/search.php";
31 } elseif (isset($full)) {
32 include "lib/fullsearch.php";
33 } elseif (isset($refs)) {
34 if (function_exists('InitBackLinkSearch')) {
35 include "lib/backlinks.php";
39 include "lib/fullsearch.php";
41 } elseif (isset($post)) {
42 include "lib/savepage.php";
43 } elseif (isset($info)) {
44 include "lib/pageinfo.php";
45 } elseif (isset($diff)) {
46 include "lib/diff.php";
48 include "lib/display.php"; // defaults to FrontPage