Subversion Repositories taios

Rev

Rev 290 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
229 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$pageName = $_GET['page'];
6
if (empty($pageName))
7
{
8
    $pageName = 'Index';
9
}
10
 
11
$page = new Taios_Page('Edit Page - ' . $pageName, '../');
12
$page->drawHeader();
13
$page->drawMiddle();
14
 
15
if ($page->isUserGM($page->getLoggedInUser()))
16
{
17
    $filename = 'pages/' . $pageName . '.txt';
18
 
19
    $content = "";
20
 
21
    $fp = @fopen($filename, 'r');
22
    if ($fp)
23
    {
24
        $content = fread($fp, filesize($filename));
25
        fclose($fp);
26
    }
27
 
28
?>
29
 
30
<form action="edit-do.php" method="POST">
31
<table>
32
<tr>
33
<td><textarea name="content"><?php echo $content; ?></textarea></td>
34
</tr>
35
<tr>
36
<td><input type="submit" value="Edit" /></td>
37
</tr>
38
</table>
39
</form>
40
 
41
<?php
42
}
43
else
44
{
45
    $page->drawError('You do not have permission to access this page.');
46
}
47
 
48
$page->drawFooter();
49
 
50
?>
51