echo '<div class="actions">';
echo Display::url(Display::return_icon('view_more_stats.gif', get_lang('AddUserGroupToURL'), ''), api_get_path(WEB_CODE_PATH) . 'admin/access_url_add_usergroup_to_url.php');
echo '</div>';
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::get_url_rel_usergroup_data($access_url_id);
    foreach ($userGroups as $item) {
        $userGroupList[$item['id']] = $item;
    }
} else {
    $userGroups = UrlManager::get_url_rel_usergroup_data();
    foreach ($userGroups as $item) {
        if ($item['access_url_id'] == $access_url_id) {
            $userGroupList[$item['id']] = $item;
        }
    }
    $noUserGroupList = $userGroup->getUserGroupNotInList(array_keys($userGroupList));
}
if ($add_type == 'multiple') {
    $link_add_type_unique = '<a href="' . api_get_self() . '?add_type=unique&access_url_id=' . $access_url_id . '">' . get_lang('SessionAddTypeUnique') . '</a>';
    $link_add_type_multiple = get_lang('SessionAddTypeMultiple');
} else {
    $link_add_type_unique = get_lang('SessionAddTypeUnique');
    $link_add_type_multiple = '<a href="' . api_get_self() . '?add_type=multiple&access_url_id=' . $access_url_id . '">' . get_lang('SessionAddTypeMultiple') . '</a>';
}
$url_list = UrlManager::get_url_data();