$filter_priority = $display_options['filter']['priority'];
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('req_page'));
html_page_header($db, $project_name);
html_print_menu();
requirement_menu_print($page);
error_report_check($_GET);
print "<br>" . NEWLINE;
print "<form action='{$page}' method=post id='form_order'>" . NEWLINE;
print "<div align=center>" . NEWLINE;
html_print_requirements_filter($project_id, $filter_doc_type, $filter_status, $filter_area_covered, $filter_functionality, $filter_assign_release, $filter_per_page, $filter_show_versions, $filter_search, $filter_priority);
print "<br>" . NEWLINE;
print "</div>" . NEWLINE;
$g_timer->mark_time("Get requirements");
$rows_requirement = requirement_get($project_id, $page_number, $order_by, $order_dir, $filter_doc_type, $filter_status, $filter_area_covered, $filter_functionality, $filter_assign_release, $filter_show_versions, $filter_per_page, $filter_search, $filter_priority, $csv_name = "requirements");
$g_timer->mark_time("Finished get requirements");
################################################################################
# Testset table
if ($rows_requirement) {
    print "<div align=center>" . NEWLINE;
    print "<table class=width100 rules=cols>" . NEWLINE;
    # Table headers
    print "<tr class=tbl_header>" . NEWLINE;
    print "<th></th>";
    html_tbl_print_sortable_header(lang_get('req_id'), REQ_ID, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('version'), REQ_VERS_VERSION, $order_by, $order_dir);
    html_tbl_print_sortable_header("");
    html_tbl_print_sortable_header(lang_get('req_name'), REQ_FILENAME, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('req_detail'), REQ_VERS_DETAIL, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('req_type'), REQ_DOC_TYPE_NAME, $order_by, $order_dir);
$row_style = '';
$order_by = REQ_FILENAME;
$order_dir = "ASC";
$page_number = 1;
util_set_order_by($order_by, $_POST);
util_set_order_dir($order_dir, $_POST);
util_set_page_number($page_number, $_POST);
html_window_title();
auth_authenticate_user();
html_print_body();
html_page_title($project_name . " - " . lang_get('report_requirements_page'));
html_page_header($db, $project_name);
html_print_menu();
error_report_check($_GET);
$table_body = "";
foreach (requirement_get($project_id) as $row_requirements) {
    $row_style = html_tbl_alternate_bgcolor($row_style);
    $rows_test_assoc = requirements_test_assoc($row_requirements[REQ_ID]);
    $rowspan = sizeof($rows_test_assoc) + 2;
    $table_body .= "<tbody>" . NEWLINE;
    $table_body .= "<tr class='{$row_style}'>" . NEWLINE;
    $table_body .= "<td class=tbl-l rowspan={$rowspan} colspan=1 valign=top>" . $row_requirements[REQ_FILENAME] . "</td>" . NEWLINE;
    $table_body .= "</tr>" . NEWLINE;
    $table_body .= "<tr class='{$row_style}'>" . NEWLINE;
    $table_body .= "<td>b</td>" . NEWLINE;
    $table_body .= "<td>c</td>" . NEWLINE;
    $table_body .= "<td>d</td>" . NEWLINE;
    $table_body .= "<td>e</td>" . NEWLINE;
    $table_body .= "</tr>" . NEWLINE;
    foreach ($rows_test_assoc as $row_test_assoc) {
        $table_body .= "<tr class='{$row_style}'>" . NEWLINE;
$order_dir = $display_options['order_dir'];
$page_number = $display_options['page_number'];
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('req_notifications'));
html_page_header($db, $project_name);
html_print_menu();
requirement_menu_print($page);
error_report_check($_GET);
print "<br>" . NEWLINE;
print "<form action='{$page}' method=post name=requirements id='form_order'>" . NEWLINE;
print "<div align=center>" . NEWLINE;
print "<table class=hide60>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
$rows_requirement = requirement_get($project_id, $page_number, $order_by, $order_dir, "", "", "", "", "", "latest", $per_page = RECORDS_PER_PAGE_REQUIREMENT_NOTIFICATIONS, "", "");
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "</div>" . NEWLINE;
################################################################################
# Testset table
if ($rows_requirement) {
    print "<div align=center>" . NEWLINE;
    print "<table class=width60 rules=cols>" . NEWLINE;
    # Table headers
    print "<tr class=tbl_header>" . NEWLINE;
    html_tbl_print_sortable_header("email");
    html_tbl_print_sortable_header(lang_get('req_id'), REQ_ID, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('req_name'), REQ_FILENAME, $order_by, $order_dir);
    print "</tr>" . NEWLINE;
}
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get("req_folder_view_page"));
html_page_header($db, $project_name);
html_print_menu();
requirement_menu_print($page);
error_report_check($_GET);
print "<br>" . NEWLINE;
print "<form action='{$page}' method=post>" . NEWLINE;
print "<div align=center>" . NEWLINE;
html_print_requirements_filter($project_id, $filter_doc_type, $filter_status, $filter_area_covered, $filter_functionality, $filter_assign_release, $filter_per_page = null, $filter_show_versions = null, $filter_search, $filter_priority);
print "<br>" . NEWLINE;
print "</div>";
print "</form>";
$rows_top_level_requirements = requirement_get($project_id, $page_number = 0, $order_by = REQ_FILENAME, $order_dir = "ASC", $filter_doc_type, $filter_status, $filter_area_covered, $filter_functionality, $filter_assign_release, $filter_show_versions = 'latest', $filter_per_page, $filter_search, $filter_priority, $csv_name = null, $root_node = true);
# tree array
$tree = array();
if ($rows_top_level_requirements) {
    # get the children of the top level requirements
    foreach ($rows_top_level_requirements as $row_req) {
        $root_node = $row_req[REQ_ID];
        $req_version = $row_req[REQ_VERS_VERSION];
        $root_node_name = $row_req[REQ_FILENAME];
        # build the tree array
        $tree[] = array("uid" => $root_node, "name" => $root_node_name, "children" => requirement_get_children($root_node));
    }
    # print the tree array as html
    html_dynamic_tree("requirements", $tree, $root_node = true);
} else {
    html_no_records_found_message(lang_get("no_requirements"));