(root)/wiki/edit-do.php - Rev 400
Rev 231 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '../_taios.php';
$pageName = $_POST['page'];
if (empty($pageName))
{
$pageName = 'Index';
}
$page = new Taios_Page
('Edit Page - ' . $pageName, '../');
$page->checkLoggedIn();
if ($page->isUserGM($page->getLoggedInUser()))
{
$filename = 'pages/' . $pageName . '.txt';
$fp = @fopen($filename, 'w');
if ($fp)
{
fwrite($fp, $_POST['content']);
fclose($fp);
$page->redirect('index.php?page=' . $pageName);
}
else
{
$page->drawError('Failed to write file.');
}
}
else
{
$page->drawError('You do not have permission to access this page.');
}
$page->drawFooter();
?>