| @@ 88-100 (lines=13) @@ | ||
| 85 | $sessions=array(); |
|
| 86 | $usergroup = new UserGroup(); |
|
| 87 | $id = intval($_GET['id']); |
|
| 88 | if (isset($_POST['form_sent']) && $_POST['form_sent']) { |
|
| 89 | $form_sent = $_POST['form_sent']; |
|
| 90 | $elements_posted = $_POST['elements_in_name']; |
|
| 91 | if (!is_array($elements_posted)) { |
|
| 92 | $elements_posted = array(); |
|
| 93 | } |
|
| 94 | if ($form_sent == 1) { |
|
| 95 | //added a parameter to send emails when registering a user |
|
| 96 | $usergroup->subscribe_sessions_to_usergroup($id, $elements_posted); |
|
| 97 | header('Location: usergroups.php'); |
|
| 98 | exit; |
|
| 99 | } |
|
| 100 | } |
|
| 101 | $data = $usergroup->get($id); |
|
| 102 | $session_list_in = $usergroup->get_sessions_by_usergroup($id); |
|
| 103 | $session_list = SessionManager::get_sessions_list(array(), array('name')); |
|
| @@ 78-89 (lines=12) @@ | ||
| 75 | $usergroup = new UserGroup(); |
|
| 76 | $id = intval($_GET['id']); |
|
| 77 | ||
| 78 | if (isset($_POST['form_sent']) && $_POST['form_sent']) { |
|
| 79 | $form_sent = $_POST['form_sent']; |
|
| 80 | $elements_posted = $_POST['elements_in_name']; |
|
| 81 | if (!is_array($elements_posted)) { |
|
| 82 | $elements_posted = array(); |
|
| 83 | } |
|
| 84 | if ($form_sent == 1) { |
|
| 85 | $usergroup->subscribe_courses_to_usergroup($id, $elements_posted); |
|
| 86 | header('Location: usergroups.php'); |
|
| 87 | exit; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| 91 | ||
| 92 | // Filters |
|
| @@ 75-87 (lines=13) @@ | ||
| 72 | $users =$sessions=array(); |
|
| 73 | $promotion = new Promotion(); |
|
| 74 | $id = intval($_GET['id']); |
|
| 75 | if (isset($_POST['form_sent']) && $_POST['form_sent']) { |
|
| 76 | $form_sent = $_POST['form_sent']; |
|
| 77 | $session_in_promotion_posted = $_POST['session_in_promotion_name']; |
|
| 78 | if (!is_array($session_in_promotion_posted)) { |
|
| 79 | $session_in_promotion_posted=array(); |
|
| 80 | } |
|
| 81 | if ($form_sent == 1) { |
|
| 82 | // Added a parameter to send emails when registering a user |
|
| 83 | SessionManager::subscribe_sessions_to_promotion($id, $session_in_promotion_posted); |
|
| 84 | header('Location: promotions.php'); |
|
| 85 | exit; |
|
| 86 | } |
|
| 87 | } |
|
| 88 | ||
| 89 | $promotion_data = $promotion->get($id); |
|
| 90 | $session_list = SessionManager::get_sessions_list(array(), array('name')); |
|