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 include(TR_INCLUDE_PATH.'vitals.inc.php');
\r
16 include_once(TR_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');
\r
18 $userGroupsDAO = new UserGroupsDAO();
\r
20 $ids = explode(',', $_REQUEST['id']);
\r
22 if (isset($_POST['submit_no']))
\r
24 $msg->addFeedback('CANCELLED');
\r
25 header('Location: user_group.php');
\r
28 else if (isset($_POST['submit_yes']))
\r
30 foreach($ids as $id)
\r
32 $userGroupsDAO->Delete($id);
\r
35 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
\r
36 header('Location: user_group.php');
\r
40 require(TR_INCLUDE_PATH.'header.inc.php');
\r
42 unset($hidden_vars);
\r
44 foreach($ids as $id)
\r
46 $row = $userGroupsDAO->getUserGroupByID($id);
\r
47 $names[] = $row['title'];
\r
50 $names_html = '<ul>'.html_get_list($names).'</ul>';
\r
51 $hidden_vars['id'] = $_REQUEST['id'];
\r
53 $msg->addConfirm(array('DELETE_USER_GROUP', $names_html), $hidden_vars);
\r
54 $msg->printConfirm();
\r
56 require(TR_INCLUDE_PATH.'footer.inc.php');
\r