]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - index.php3
added diff feature - diff code by Geoffrey T. Dairiki
[SourceForge/phpwiki.git] / index.php3
1 <!-- $Id: index.php3,v 1.5 2000-06-29 16:12:00 ahollosi Exp $ -->
2 <?
3    /*
4       The main page, i.e. the main loop.
5       This file is always called first.
6    */
7
8    include "wiki_config.php3";
9    include "wiki_stdlib.php3";
10
11    // All requests require the database
12    if ($copy) {
13       // we are editing a copy and want the archive
14       $dbi = OpenDataBase($ArchiveDataBase);
15       include "wiki_editpage.php3";
16       CloseDataBase($dbi);
17       exit();
18    } else {
19       // live database
20       $dbi = OpenDataBase($WikiDataBase);
21    }
22
23
24    if ($edit) {
25       include "wiki_editpage.php3";
26    } elseif ($links) {
27       include "wiki_editlinks.php3";
28    } elseif ($search) {
29       include "wiki_search.php3";
30    } elseif ($full) {
31       include "wiki_fullsearch.php3";
32    } elseif ($post) {
33       include "wiki_savepage.php3";
34    } elseif ($info) {
35       include "wiki_pageinfo.php3";
36    } elseif ($diff) {
37       include "wiki_diff.php3";
38    } else {
39       include "wiki_display.php3"; // defaults to FrontPage
40    }
41
42    CloseDataBase($dbi);
43
44 ?>