function calculate_page_content()
{
    $specmanagement_database_api = new specmanagement_database_api();
    $specmanagement_print_api = new specmanagement_print_api();
    $types = array();
    $types_rows = $specmanagement_database_api->get_full_types();
    foreach ($types_rows as $types_row) {
        $types[] = $types_row[1];
    }
    html_page_top1(plugin_lang_get('select_doc_title'));
    echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
    html_page_top2();
    //   if ( plugin_is_installed( 'WhiteboardMenu' ) && file_exists ( config_get_global ( 'plugin_path' ) . 'WhiteboardMenu' ) )
    //   {
    //      require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
    //      $whiteboard_print_api = new whiteboard_print_api();
    //      $whiteboard_print_api->printWhiteboardMenu();
    //   }
    if (project_includes_user(helper_get_current_project(), auth_get_current_user_id()) || helper_get_current_project() == 0 || user_is_administrator(auth_get_current_user_id())) {
        echo '<div align="center">';
        echo '<hr size="1" width="50%" />';
        $specmanagement_print_api->printTableTop('50');
        $specmanagement_print_api->printFormTitle(2, 'menu_title');
        $specmanagement_print_api->printCategoryField(1, 1, 'select_type');
        echo '<td>';
        echo '<form method="post" name="form_set_source" action="' . plugin_page('editor') . '">';
        print_document_selection($types);
        $specmanagement_print_api->printRow();
        echo '<td class="center" colspan="2">';
        echo '<input type="submit" name="formSubmit" class="button" value="' . plugin_lang_get('select_confirm') . '"/>';
        echo '</td>';
        echo '</tr>';
        echo '</form>';
        echo '</td>';
        $specmanagement_print_api->printTableFoot();
    } else {
        echo '<table class="width60"><tr><td class="center">' . lang_get('access_denied') . '</td></tr></table>';
    }
    html_page_bottom1();
}
function print_tablehead()
{
    $specmanagement_print_api = new specmanagement_print_api();
    $col_width = 100 / COLS;
    echo '<thead>';
    $specmanagement_print_api->printFormTitle(COLS, 'mantypes_thead');
    echo '<tr class="row-category2">';
    echo '<th class="form-title" colspan="1" width="' . $col_width . '">' . plugin_lang_get('manversions_thdoctype') . '</th>';
    echo '<th class="form-title" colspan="1" width="' . $col_width . '">' . plugin_lang_get('mantypes_show_print_duration') . '</th>';
    echo '<th class="form-title" colspan="1" width="' . $col_width . '">' . plugin_lang_get('mantypes_show_expenses_overview') . '</th>';
    echo '<th class="form-title" colspan="1" width="' . $col_width . '">' . plugin_lang_get('mantypes_show_directory') . '</th>';
    echo '</tr>';
    echo '</thead>';
}
$specmanagement_print_api = new specmanagement_print_api();
auth_reauthenticate();
access_ensure_global_level(plugin_config_get('AccessLevel'));
html_page_top1(plugin_lang_get('config_title'));
html_page_top2();
print_manage_menu();
echo '<br/>';
echo '<form action="' . plugin_page('config_update') . '" method="post">';
echo form_security_field('plugin_SpecManagement_config_update');
if ($specmanagement_print_api->getMantisVersion() == '1.2.') {
    echo '<table align="center" class="width75" cellspacing="1">';
} else {
    echo '<div class="form-container">';
    echo '<table>';
}
$specmanagement_print_api->printFormTitle(2, 'config_caption');
$specmanagement_print_api->printRow();
echo '<td class="category" width="30%" colspan="1">';
echo '<span class="required">*</span>' . plugin_lang_get('config_accesslevel');
echo '</td>';
echo '<td width="200px" colspan="1">';
echo '<select name="AccessLevel">';
print_enum_string_option_list('access_levels', plugin_config_get('AccessLevel', PLUGINS_SPECMANAGEMENT_THRESHOLD_LEVEL_DEFAULT));
echo '</select>';
echo '</td>';
echo '</tr>';
$specmanagement_print_api->printRow();
echo '<td class="category" width="30%" colspan="1">';
echo '<span class="required">*</span>' . plugin_lang_get('config_readlevel');
echo '</td>';
echo '<td width="200px" colspan="1">';