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