Subversion Repositories taios

Rev

Rev 224 | Rev 226 | 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
 
5
$page = new Taios_Page('Wiki', '../');
6
$page->drawHeader();
7
$page->drawMiddle();
8
 
224 tom 9
$pageName = $_GET['page'];
225 tom 10
if (empty($pageName))
221 tom 11
{
224 tom 12
    $pageName = 'Index';
221 tom 13
}
169 tom 14
 
225 tom 15
$filename = 'pages/' . $pageName . '.txt';
16
 
17
$fp = fopen($filename, 'r');
221 tom 18
if ($fp)
19
{
225 tom 20
    write($page->replaceBBCode(fread($fp, filesize($filename))));
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