Subversion Repositories taios

Rev

Rev 229 | Rev 290 | Go to most recent revision | Details | Compare with Previous | 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">
232 tom 31
<input type="hidden" name="page" value="<?php echo $pageName; ?>" />
229 tom 32
<table>
33
<tr>
34
<td><textarea name="content"><?php echo $content; ?></textarea></td>
35
</tr>
36
<tr>
37
<td><input type="submit" value="Edit" /></td>
38
</tr>
39
</table>
40
</form>
41
 
42
<?php
43
}
44
else
45
{
46
    $page->drawError('You do not have permission to access this page.');
47
}
48
 
49
$page->drawFooter();
50
 
51
?>
52