Subversion Repositories taios

Rev

Rev 230 | Rev 361 | 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();
13
$page->drawMiddle();
14
 
305 tom 15
write('<p><i>The wiki is still under construction.</i></p>');
16
 
228 tom 17
if ($page->isUserGM($page->getLoggedInUser()))
18
{
19
    write('<p><a href="edit.php?page=' . $pageName . '">Edit Page</a></p><br />');
20
}
21
 
225 tom 22
$filename = 'pages/' . $pageName . '.txt';
23
 
230 tom 24
$fp = @fopen($filename, 'r');
221 tom 25
if ($fp)
26
{
226 tom 27
    write('<p>' . $page->replaceBBCode(fread($fp, filesize($filename))) . '</p>');
221 tom 28
    fclose($fp);
29
}
30
else
31
{
32
    write('<p>This page is empty.</p>');
33
}
34
 
169 tom 35
$page->drawFooter();
36
 
37
?>
38