0,0 → 1,59 |
<?php |
|
require '../_taios.php'; |
|
$page = new Taios_Page('Add Category', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
|
$page->checkLoggedIn(); |
|
$id = $page->getGetID(); |
$cat = $page->getForumCategory($id); |
|
if ($page->isUserAdmin($page->getLoggedInUser()) && $cat) |
{ |
|
if (isset($_GET['error'])) |
{ |
$page->drawError($_GET['error'], false); |
} |
|
?> |
|
<form action="edit-category-do.php" method="POST"> |
<input type="hidden" name="id" value="<?php echo $id; ?>" /> |
<table> |
<tr> |
<td class="bold">Title: </td> |
<td><input type="text" name="title" value="<?php echo $cat->title; ?>" /></td> |
</tr> |
<tr> |
<td class="bold">Description: </td> |
<td><input type="text" name="description" value="<?php echo $cat->description; ?>" /></td> |
</tr> |
<tr> |
<td></td> |
<td><input type="submit" value="Edit" /></td> |
</tr> |
</table> |
</form> |
|
<?php |
} |
else |
{ |
if (!$cat) |
{ |
$page->drawError('No such Forum Category, #' . $id); |
} |
else |
{ |
$page->drawError('You do not have permission to access this page.'); |
} |
} |
|
$page->drawFooter(); |
|
?> |
|