]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - index.php
Added PhpWikiAdministration to RecentChanges... this list should be
[SourceForge/phpwiki.git] / index.php
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 $ -->
3 <?php
4    /*
5       The main page, i.e. the main loop.
6       This file is always called first.
7    */
8
9    if (!defined('WIKI_ADMIN')) { // index.php not included by admin.php?
10       include "lib/config.php";
11       include "lib/stdlib.php";
12
13       // All requests require the database
14       $dbi = OpenDataBase($WikiPageStore);
15    }
16
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;
22
23    if (isset($edit)) {
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";
36       }
37       else {
38          $full = $refs;
39          include "lib/fullsearch.php";
40       }
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";
47    } else {
48       include "lib/display.php"; // defaults to FrontPage
49    }
50
51    CloseDataBase($dbi);
52
53 ?>