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
14 require(TR_INCLUDE_PATH.'vitals.inc.php');
\r
15 require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');
\r
16 require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDependentDAO.class.php');
\r
17 require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesFilesDAO.class.php');
\r
19 $myownPatchesDAO = new MyownPatchesDAO();
\r
21 if (isset($_POST['submit_no'])) {
\r
22 $msg->addFeedback('CANCELLED');
\r
23 header('Location: myown_patches.php');
\r
25 } else if (isset($_POST['submit_yes'])) {
\r
26 /* delete has been confirmed, delete this category */
\r
27 $myown_patch_id = intval($_POST['myown_patch_id']);
\r
29 $myownPatchesDependentDAO = new MyownPatchesDependentDAO();
\r
30 $myownPatchesFilesDAO = new MyownPatchesFilesDAO();
\r
32 $myownPatchesDAO->Delete($myown_patch_id);
\r
33 $myownPatchesDependentDAO->DeleteByPatchID($myown_patch_id);
\r
34 $myownPatchesFilesDAO->DeleteByPatchID($myown_patch_id);
\r
36 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
\r
37 header('Location: myown_patches.php');
\r
41 //require('../../include/header.inc.php');
\r
42 require(TR_INCLUDE_PATH.'header.inc.php');
\r
44 $_GET['myown_patch_id'] = intval($_GET['myown_patch_id']);
\r
45 $row = $myownPatchesDAO->getByID($_GET[myown_patch_id]);
\r
48 $msg->printErrors('ITEM_NOT_FOUND');
\r
50 $hidden_vars['system_patch_id']= $row['system_patch_id'];
\r
51 $hidden_vars['myown_patch_id'] = $row['myown_patch_id'];
\r
53 $confirm = array('DELETE_MYOWN_UPDATE', $row['system_patch_id']);
\r
54 $msg->addConfirm($confirm, $hidden_vars);
\r
56 $msg->printConfirm();
\r
59 require(TR_INCLUDE_PATH.'footer.inc.php');
\r