Rev 277 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 277 | tom | 1 | <?php |
| 2 | |||
| 3 | require '../_taios.php'; |
||
| 4 | |||
| 280 | tom | 5 | $page = new Taios_Page('Edit Category', '../'); |
| 277 | tom | 6 | $page->drawHeader(); |
| 7 | $page->drawMiddle(); |
||
| 8 | |||
| 9 | $page->checkLoggedIn(); |
||
| 10 | |||
| 11 | $id = $page->getGetID(); |
||
| 12 | $cat = $page->getForumCategory($id); |
||
| 13 | |||
| 14 | if ($page->isUserAdmin($page->getLoggedInUser()) && $cat) |
||
| 15 | { |
||
| 16 | |||
| 17 | if (isset($_GET['error'])) |
||
| 18 | { |
||
| 19 | $page->drawError($_GET['error'], false); |
||
| 20 | } |
||
| 21 | |||
| 22 | ?> |
||
| 23 | |||
| 24 | <form action="edit-category-do.php" method="POST"> |
||
| 25 | <input type="hidden" name="id" value="<?php echo $id; ?>" /> |
||
| 26 | <table> |
||
| 27 | <tr> |
||
| 28 | <td class="bold">Title: </td> |
||
| 29 | <td><input type="text" name="title" value="<?php echo $cat->title; ?>" /></td> |
||
| 30 | </tr> |
||
| 31 | <tr> |
||
| 32 | <td class="bold">Description: </td> |
||
| 33 | <td><input type="text" name="description" value="<?php echo $cat->description; ?>" /></td> |
||
| 34 | </tr> |
||
| 35 | <tr> |
||
| 36 | <td></td> |
||
| 37 | <td><input type="submit" value="Edit" /></td> |
||
| 38 | </tr> |
||
| 39 | </table> |
||
| 40 | </form> |
||
| 41 | |||
| 42 | <?php |
||
| 43 | } |
||
| 44 | else |
||
| 45 | { |
||
| 46 | if (!$cat) |
||
| 47 | { |
||
| 48 | $page->drawError('No such Forum Category, #' . $id); |
||
| 49 | } |
||
| 50 | else |
||
| 51 | { |
||
| 52 | $page->drawError('You do not have permission to access this page.'); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | $page->drawFooter(); |
||
| 57 | |||
| 58 | ?> |
||
| 59 |