Subversion Repositories taios

Rev

Rev 226 | Rev 228 | 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
 
225 tom 15
$filename = 'pages/' . $pageName . '.txt';
16
 
17
$fp = fopen($filename, 'r');
221 tom 18
if ($fp)
19
{
226 tom 20
    write('<p>' . $page->replaceBBCode(fread($fp, filesize($filename))) . '</p>');
221 tom 21
    fclose($fp);
22
}
23
else
24
{
25
    write('<p>This page is empty.</p>');
26
}
27
 
169 tom 28
$page->drawFooter();
29
 
30
?>
31