</script>'; $form_sent = 0; $errorMsg = ''; $UserList = $SessionList = array(); $users = $sessions = array(); if (isset($_POST['form_sent']) && $_POST['form_sent']) { $form_sent = $_POST['form_sent']; $list = $_POST['course_list']; if (!is_array($list)) { $list = array(); } if ($form_sent == 1) { if ($access_url_id == 0) { header('Location: access_url_edit_users_to_url.php?action=show_message&message=' . get_lang('SelectURL')); } elseif (is_array($list)) { UrlManager::updateUrlRelCourseCategory($list, $access_url_id); header('Location: access_urls.php?action=show_message&message=' . get_lang('Updated')); } exit; } } Display::display_header($tool_name); api_display_tool_title($tool_name); if ($_GET['action'] == 'show_message') { Display::display_normal_message(Security::remove_XSS(stripslashes($_GET['message']))); } $noUserGroupList = $userGroupList = array(); $ajax_search = $add_type == 'unique' ? true : false; if ($ajax_search) { $userGroups = UrlManager::getUrlRelCourseCategory($access_url_id); foreach ($userGroups as $item) {