}
    $calendar_module = $GO_MODULES->get_module('calendar');
    if ($calendar_module) {
        if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $calendar_module['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $calendar_module['acl_write'])) {
            echo '<td class="ModuleIcons" nowrap>';
            echo '<a href="' . $calendar_module['url'] . 'event.php?contact_id=' . $contact_id . '&return_to=' . rawurlencode($link_back) . '"><img src="' . $GO_THEME->images['cal_compose'] . '" border="0" height="32" width="32" /><br />' . $ab_new_event . '</td>';
            echo '</td>';
            $tabtable->add_tab('calendar', $ab_events);
            $tabtable->add_tab('todos', $ab_todos);
        }
    }
    $templates_plugin = $GO_MODULES->get_plugin('templates');
    if ($templates_plugin) {
        require_once $templates_plugin['path'] . 'classes/templates.class.inc';
        $tp = new templates();
        if ($tp->has_oo_templates($GO_SECURITY->user_id)) {
            echo '<td class="ModuleIcons" nowrap>';
            echo '<a target="_blank" href="' . $GO_MODULES->url . 'templates/download_oo_template.php?contact_id=' . $contact_id . '"><img src="' . $GO_THEME->images['new_letter'] . '" border="0" height="32" width="32" /><br />' . $ab_oo_doc . '</td>';
            echo '</td>';
        }
    }
    $tabtable->add_tab('read_permissions', $strReadRights);
    $tabtable->add_tab('write_permissions', $strWriteRights);
}
echo '</tr></table>';
$active_tab = isset($_REQUEST['active_tab']) ? $_REQUEST['active_tab'] : null;
if (isset($active_tab)) {
    $tabtable->set_active_tab($active_tab);
}
$link_back = cleanup_url($link_back . '&' . $tabtable->get_link_back());
echo '<input type="hidden" name="link_back" value="' . $link_back . '" />';