moved code up one level to eliminate the docs subdirectory
[acontent.git] / updater / myown_patches.php
1 <?php\r
2 /************************************************************************/\r
3 /* AContent                                                             */\r
4 /************************************************************************/\r
5 /* Copyright (c) 2010                                                   */\r
6 /* Inclusive Design Institute                                           */\r
7 /*                                                                      */\r
8 /* This program is free software. You can redistribute it and/or        */\r
9 /* modify it under the terms of the GNU General Public License          */\r
10 /* as published by the Free Software Foundation.                        */\r
11 /************************************************************************/\r
12 \r
13 define('TR_INCLUDE_PATH', '../include/');\r
14 \r
15 require (TR_INCLUDE_PATH.'vitals.inc.php');\r
16 require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
17 \r
18 if (isset($_POST['remove'], $_POST['myown_patch_id'])) \r
19 {\r
20         header('Location: patch_delete.php?myown_patch_id='.$_POST['myown_patch_id']);\r
21         exit;\r
22\r
23 else if (isset($_POST['edit'], $_POST['myown_patch_id'])) \r
24 {\r
25         header('Location: patch_edit.php?myown_patch_id='.$_POST['myown_patch_id']);\r
26         exit;\r
27\r
28 else if (!empty($_POST) && !isset($_POST['myown_patch_id'])) {\r
29         $msg->addError('NO_ITEM_SELECTED');\r
30 }\r
31 \r
32 $myownPatchesDAO = new MyownPatchesDAO();\r
33 $patch_rows = $myownPatchesDAO->getAll();\r
34 \r
35 $savant->assign('patch_rows', $patch_rows);\r
36 \r
37 $savant->display('updater/myown_patches.tmpl.php');\r
38 ?>\r