Rev 232 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '../_taios.php';
$pageName = $_GET['page'];
if (empty($pageName))
{
$pageName = 'Index';
}
$page = new Taios_Page
('Edit Page - ' . $pageName, '../');
$page->drawHeader();
$page->drawMiddle();
if ($page->isUserGM($page->getLoggedInUser()))
{
$filename = 'pages/' . $pageName . '.txt';
$content = "";
$fp = @fopen($filename, 'r');
if ($fp)
{
$content = fread($fp, filesize($filename));
fclose($fp);
}
?>
<form action="edit-do.php" method="POST">
<table>
<tr>
<td><textarea name="content">
<?php echo $content; ?></textarea></td>
</tr>
<tr>
<td><input type="submit" value="Edit" /></td>
</tr>
</table>
</form>
<?php
}
else
{
$page->drawError('You do not have permission to access this page.');
}
$page->drawFooter();
?>