Rev 119 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
113 | freddie | 1 | <?php |
2 | |||
3 | require '../_taios.php'; |
||
4 | |||
120 | tom | 5 | $page = new Taios_Page('Delete Blog Post', '../'); |
113 | freddie | 6 | |
120 | tom | 7 | $id = $_GET['id']; |
8 | if ($id) |
||
119 | freddie | 9 | { |
120 | tom | 10 | if ($page->isUserAdmin($page->getLoggedInUser()) || $page->getLoggedInUser()->ID == $page->getBlogPost($id)->author->ID) |
11 | { |
||
12 | $page->delBlogPost($id); |
||
13 | } |
||
14 | else |
||
15 | { |
||
16 | $page->drawError('You do not have permission to access this page.'); |
||
17 | } |
||
119 | freddie | 18 | } |
120 | tom | 19 | else |
20 | { |
||
21 | $page->drawError('No ID Specified'); |
||
22 | } |
||
113 | freddie | 23 | |
120 | tom | 24 | $page->redirect('index.php'); |
25 | |||
113 | freddie | 26 | ?> |
120 | tom | 27 |