]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - index.php
set_magic_quotes_runtime(0) added (bug reported by Hawk Newton)
[SourceForge/phpwiki.git] / index.php
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <!-- $Id: index.php,v 1.3 2000-10-25 09:58:53 ahollosi Exp $ -->
3 <?php
4    /*
5       The main page, i.e. the main loop.
6       This file is always called first.
7    */
8
9    set_magic_quotes_runtime(0);
10
11    include "lib/config.php";
12    include "lib/stdlib.php";
13
14    // All requests require the database
15    $dbi = OpenDataBase($WikiPageStore);
16
17
18    // Allow choice of submit buttons to determine type of search:
19    if ($searchtype == 'full')
20       $full = $searchstring;
21    elseif ($searchstring)       // default to title search
22       $search = $searchstring;
23
24    if ($edit) {
25       $admin_edit = 0;
26       include "lib/editpage.php";
27    } elseif ($links) {
28       include "lib/editlinks.php";
29    } elseif ($copy) {
30       include "lib/editpage.php";
31    } elseif ($search) {
32       include "lib/search.php";
33    } elseif ($full) {
34       include "lib/fullsearch.php";
35    } elseif ($post) {
36       include "lib/savepage.php";
37    } elseif ($info) {
38       include "lib/pageinfo.php";
39    } elseif ($diff) {
40       include "lib/diff.php";
41    } else {
42       include "lib/display.php"; // defaults to FrontPage
43    }
44
45    CloseDataBase($dbi);
46
47 ?>