echo '</ul>';
    echo '<hr />' . K_NEWLINE;
    echo '</div>' . K_NEWLINE;
    echo '<div class="row">' . K_NEWLINE;
    // show buttons by case
    if (isset($test_id) and $test_id > 0 and isset($user_id) and $user_id > 0) {
        F_submit_button('delete', $l['w_delete'], $l['h_delete']);
        if ($testuser_status < 4) {
            // lock test button
            F_submit_button('lock', $l['w_lock'], $l['w_lock']);
        } else {
            // unlock test button
            F_submit_button('unlock', $l['w_unlock'], $l['w_unlock']);
        }
        echo '<br /><br />';
        echo '<a href="' . pdfLink(3, $test_id, 0, $user_id, '', 0) . '" class="xmlbutton" title="' . $l['h_pdf'] . '">' . $l['w_pdf'] . '</a> ';
        echo '<a href="tce_email_results.php?testid=' . $test_id . '&amp;userid=' . $user_id . '&amp;mode=1" class="xmlbutton" title="' . $l['h_email_result'] . '">' . $l['w_email_result'] . '</a> ';
        echo '<a href="tce_email_results.php?testid=' . $test_id . '&amp;userid=' . $user_id . '&amp;mode=0" class="xmlbutton" title="' . $l['h_email_result'] . ' + PDF">' . $l['w_email_result'] . ' + PDF</a> ';
    }
    // comma separated list of required fields
    echo '<input type="hidden" name="ff_required" id="ff_required" value="" />' . K_NEWLINE;
    echo '<input type="hidden" name="ff_required_labels" id="ff_required_labels" value="" />' . K_NEWLINE;
    echo '</div>' . K_NEWLINE;
}
// end "if (isset($usrtestdata))"
echo '</form>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo '<div class="pagehelp">' . $l['hp_result_user'] . '</div>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
require_once '../code/tce_page_footer.php';
//============================================================+
            echo '</td>' . K_NEWLINE;
            echo '</tr>';
        }
    }
    echo '</table>' . K_NEWLINE;
    echo '<br />' . K_NEWLINE;
}
echo '</div>' . K_NEWLINE;
echo '<div class="row">' . K_NEWLINE;
// show buttons by case
if (isset($test_id) and $test_id > 0) {
    echo '<a href="tce_csv_result_allusers.php?testid=' . $test_id . '&amp;groupid=' . $group_id . '&amp;order_field=' . urlencode($order_field) . '&amp;orderdir=' . $orderdir . '" class="xmlbutton" title="' . $l['h_csv_export'] . '">CSV</a> ';
    echo '<a href="' . pdfLink(1, $test_id, $group_id, '', $order_field, $orderdir) . '" class="xmlbutton" title="' . $l['h_pdf'] . '">' . $l['w_pdf'] . '</a> ';
    echo '<a href="' . pdfLink(4, $test_id, $group_id, '', $order_field, $orderdir) . '" class="xmlbutton" title="' . $l['h_pdf_all'] . '">' . $l['w_pdf_all'] . '</a> ';
    if (K_DISPLAY_PDFTEXT_BUTTON) {
        echo '<a href="' . pdfLink(5, $test_id, $group_id, '', $order_field, $orderdir) . '" class="xmlbutton" title="' . $l['h_pdf_all'] . ' - TEXT">' . $l['w_pdf'] . ' TEXT</a> ';
    }
    echo '<a href="tce_xml_results.php?testid=' . $test_id . '&amp;groupid=' . $group_id . '&amp;menu_mode=startlongprocess" class="xmlbutton" title="' . $l['h_xml_export'] . '">XML</a> ';
    echo '<a href="tce_email_results.php?testid=' . $test_id . '&amp;groupid=' . $group_id . '&amp;userid=0&amp;mode=1&amp;menu_mode=startlongprocess" class="xmlbutton" title="' . $l['h_email_all_results'] . '">' . $l['w_email_all_results'] . '</a> ';
    echo '<a href="tce_email_results.php?testid=' . $test_id . '&amp;groupid=' . $group_id . '&amp;userid=0&amp;mode=0&amp;menu_mode=startlongprocess" class="xmlbutton" title="' . $l['h_email_all_results'] . ' + PDF">' . $l['w_email_all_results'] . ' + PDF</a> ';
    $custom_export = K_ENABLE_CUSTOM_EXPORT;
    if (!empty($custom_export)) {
        echo '<a href="tce_export_custom.php?testid=' . $test_id . '&amp;groupid=' . $group_id . '&amp;menu_mode=startlongprocess" class="xmlbutton" title="' . $custom_export . '">' . $custom_export . '</a> ';
    }
}
echo '<input type="hidden" name="order_field" id="order_field" value="' . $order_field . '" />' . K_NEWLINE;
echo '<input type="hidden" name="orderdir" id="orderdir" value="' . $orderdir . '" />' . K_NEWLINE;
// comma separated list of required fields
echo '<input type="hidden" name="ff_required" id="ff_required" value="" />' . K_NEWLINE;
echo '<input type="hidden" name="ff_required_labels" id="ff_required_labels" value="" />' . K_NEWLINE;
echo '<input type="hidden" name="itemcount" id="itemcount" value="' . $itemcount . '>" />' . K_NEWLINE;
                echo '</tr>' . K_NEWLINE;
                $answcount++;
            }
        } else {
            F_display_db_error();
        }
    }
} else {
    F_display_db_error();
}
echo '</table>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo '<div class="row">' . K_NEWLINE;
// show buttons by case
if (isset($test_id) and $test_id > 0) {
    echo '<a href="' . pdfLink(2, $test_id, 0, '', $order_field, $orderdir) . '" class="xmlbutton" title="' . $l['h_pdf'] . '">' . $l['w_pdf'] . '</a> ';
    echo '<a href="tce_xml_question_stats.php?testid=' . $test_id . '&amp;menu_mode=startlongprocess" class="xmlbutton" title="' . $l['h_xml_export'] . '">XML</a> ';
}
echo '<input type="hidden" name="order_field" id="order_field" value="' . $order_field . '" />' . K_NEWLINE;
echo '<input type="hidden" name="orderdir" id="orderdir" value="' . $orderdir . '" />' . K_NEWLINE;
// comma separated list of required fields
echo '<input type="hidden" name="ff_required" id="ff_required" value="" />' . K_NEWLINE;
echo '<input type="hidden" name="ff_required_labels" id="ff_required_labels" value="" />' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo '</form>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo '<div class="pagehelp">' . $l['hp_result_questions'] . '</div>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
require_once '../code/tce_page_footer.php';
//============================================================+
// END OF FILE