2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2010 */
\r
6 /* Inclusive Design Institute */
\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
13 define('TR_INCLUDE_PATH', '../include/');
\r
15 require (TR_INCLUDE_PATH.'vitals.inc.php');
\r
16 require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');
\r
18 if (isset($_POST['remove'], $_POST['myown_patch_id']))
\r
20 header('Location: patch_delete.php?myown_patch_id='.$_POST['myown_patch_id']);
\r
23 else if (isset($_POST['edit'], $_POST['myown_patch_id']))
\r
25 header('Location: patch_edit.php?myown_patch_id='.$_POST['myown_patch_id']);
\r
28 else if (!empty($_POST) && !isset($_POST['myown_patch_id'])) {
\r
29 $msg->addError('NO_ITEM_SELECTED');
\r
32 $myownPatchesDAO = new MyownPatchesDAO();
\r
33 $patch_rows = $myownPatchesDAO->getAll();
\r
35 $savant->assign('patch_rows', $patch_rows);
\r
37 $savant->display('updater/myown_patches.tmpl.php');
\r