Subversion Repositories taios

Rev

Rev 363 | Rev 365 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
169 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
224 tom 5
$pageName = $_GET['page'];
225 tom 6
if (empty($pageName))
221 tom 7
{
224 tom 8
    $pageName = 'Index';
221 tom 9
}
169 tom 10
 
227 tom 11
$page = new Taios_Page('Wiki - ' . $pageName, '../');
12
$page->drawHeader();
361 tom 13
write('<h3>Wiki</h3>');
364 tom 14
$page->drawMenuItem('Index', 'wiki/index.php');
15
$page->drawMenuItem('Random Page', 'wiki/index.php?random');
227 tom 16
$page->drawMiddle();
17
 
305 tom 18
write('<p><i>The wiki is still under construction.</i></p>');
19
 
228 tom 20
if ($page->isUserGM($page->getLoggedInUser()))
21
{
22
    write('<p><a href="edit.php?page=' . $pageName . '">Edit Page</a></p><br />');
23
}
24
 
225 tom 25
$filename = 'pages/' . $pageName . '.txt';
26
 
230 tom 27
$fp = @fopen($filename, 'r');
221 tom 28
if ($fp)
29
{
226 tom 30
    write('<p>' . $page->replaceBBCode(fread($fp, filesize($filename))) . '</p>');
221 tom 31
    fclose($fp);
32
}
33
else
34
{
35
    write('<p>This page is empty.</p>');
36
}
37
 
169 tom 38
$page->drawFooter();
39
 
40
?>
41