Subversion Repositories taios

Rev

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