#----------------------------------------------------------------------
# ------------------------------------
# Screen page
#
# $RCSfile: screen_page.php,v $
# $Revision: 1.2 $
# ------------------------------------
include "./api/include_api.php";
auth_authenticate_user();
$page = basename(__FILE__);
$delete_page = 'delete_page.php';
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$row_style = '';
$display_options = session_set_display_options("screen", $_POST);
$order_by = $display_options['order_by'];
$order_dir = $display_options['order_dir'];
$page_number = 1;
html_window_title();
html_print_body('add_screen', 'screen_name_required');
html_page_title($project_name . " - " . lang_get('screen_page'));
html_page_header($db, $project_name);
html_print_menu();
test_menu_print($page);
print "<br>";
error_report_check($_GET);
print "<div align='center'>" . NEWLINE;
print "<span class='required'>*</span> <span class='print'>" . lang_get('must_complete_field') . "</span>" . NEWLINE;
print "<table class=width60>" . NEWLINE;
print "<tr>" . NEWLINE;
$action_page = 'testset_add_action.php';
$testset_edit_page = 'testset_edit_page.php';
$testset_add_tests_page = 'testset_add_tests_page.php';
$delete_page = 'delete_page.php';
$testset_copy_page = 'testset_copy_page.php';
$testset_edit_description_page = 'testset_edit_description_page.php';
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$row_style = '';
$s_release_properties = session_set_properties("release", $_GET);
$release_id = $s_release_properties['release_id'];
$release_name = admin_get_release_name($release_id);
$build_id = $s_release_properties['build_id'];
$build_name = admin_get_build_name($build_id);
$s_table_display_options = session_set_display_options("testset", $_GET);
$order_by = $s_table_display_options['order_by'];
$order_dir = $s_table_display_options['order_dir'];
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('release_page'));
html_page_header($db, $project_name);
html_print_menu();
html_release_map(array("release_link", "build_link", "<a href=testset_page.php>" . lang_get("testsets") . "</a>", lang_get('test_plan_history')));
$rows = testset_get_test_plan_log($_GET['test_plan_id']);
if (!empty($rows)) {
    print "<br><br>";
    print "<table class=width100 rules=cols>" . NEWLINE;
    print "<tr>" . NEWLINE;
    html_tbl_print_header(lang_get("file_name"));
    html_tbl_print_header(lang_get("view"));
# $RCSfile: testset_viewlast_page.php,v $ $Revision: 1.3 $
# --------------------------------------------------
include_once './api/include_api.php';
auth_authenticate_user();
$page = basename(__FILE__);
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$row_style = '';
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$test_detail_page = 'test_detail_page.php';
$req_detail_page = 'requirement_detail_page.php';
$results_page = 'results_page.php';
$testsets_page = 'testset_viewlast_page.php';
$s_display_options = session_set_display_options("testset", $_POST);
$order_by = $s_display_options['order_by'];
$order_dir = $s_display_options['order_dir'];
$page_number = $s_display_options['page_number'];
$build_name = $s_display_options['filter']['build_name'];
$release_name = $s_display_options['filter']['release_name'];
$per_page = $s_display_options['filter']['per_page'];
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('testsets_status_page'));
html_page_header($db, $project_name);
html_print_menu();
error_report_check($_GET);
print "<br>";
print "<form method='post' action='{$page}' name='testset_form' id='form_order'>" . NEWLINE;
print "<div align=center>" . NEWLINE;
# ---------------------------------------------------------------------
if (isset($_POST['mass_req_update'])) {
    require_once "requirement_group_action_page.php";
    exit;
}
include "./api/include_api.php";
auth_authenticate_user();
$page = basename(__FILE__);
$action_page = 'requirement_action.php';
$num = 0;
$bg_color = '';
$project_properties = session_get_project_properties();
$project_name = $project_properties['project_name'];
$project_id = $project_properties['project_id'];
$row_style = '';
$display_options = session_set_display_options("requirements", $_POST);
$order_by = $display_options['order_by'];
$order_dir = $display_options['order_dir'];
$page_number = $display_options['page_number'];
$filter_doc_type = $display_options['filter']['doc_type'];
$filter_status = $display_options['filter']['status'];
$filter_area_covered = $display_options['filter']['area_covered'];
$filter_functionality = $display_options['filter']['functionality'];
$filter_assign_release = $display_options['filter']['assign_release'];
$filter_per_page = $display_options['filter']['per_page'];
$filter_show_versions = $display_options['filter']['show_versions'];
$filter_search = $display_options['filter']['requirement_search'];
$filter_priority = $display_options['filter']['priority'];
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('req_page'));
# $RCSfile: testset_copy_page.php,v $  $Revision: 1.5 $
# ---------------------------------------------------------------------
if (isset($_POST['submit_button'])) {
    require_once "testset_copy_action.php";
    exit;
}
include "./api/include_api.php";
auth_authenticate_user();
# Session variables
$project_properties = session_get_project_properties();
$project_name = $project_properties['project_name'];
$project_id = $project_properties['project_id'];
$s_copy_properties = array();
$release_properties = session_set_properties("release", $_GET);
session_records("testset_copy");
$s_table_display_options = session_set_display_options("testset_copy", $_POST);
$order_by = $s_table_display_options['order_by'];
$order_dir = $s_table_display_options['order_dir'];
$page_number = $s_table_display_options['page_number'];
$filter_manual_auto = $s_table_display_options['filter']['manual_auto'];
$filter_test_type = $s_table_display_options['filter']['test_type'];
$filter_ba_owner = $s_table_display_options['filter']['ba_owner'];
$filter_qa_owner = $s_table_display_options['filter']['qa_owner'];
$filter_tester = $s_table_display_options['filter']['tester'];
$filter_area_tested = $s_table_display_options['filter']['area_tested'];
$filter_priority = $s_table_display_options['filter']['priority'];
$filter_per_page = $s_table_display_options['filter']['per_page'];
$filter_search = $s_table_display_options['filter']['test_search'];
# Links to pages
$page = basename(__FILE__);
$test_page = "test_manual_test.php";
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Requirement Edit Page
#
# $RCSfile: requirement_edit_page.php,v $  $Revision: 1.9 $
# ---------------------------------------------------------------------
include "./api/include_api.php";
auth_authenticate_user();
$page = basename(__FILE__);
$project_properties = session_get_project_properties();
$project_id = $project_properties['project_id'];
$project_name = $project_properties['project_name'];
$username = session_get_username();
$display_options = session_set_display_options("requirements", array_merge($_POST, $_GET));
$s_tab = $display_options['tab'];
$s_properties = session_set_properties("requirements", $_GET);
$s_req_id = $s_properties['req_id'];
$s_req_version_id = $s_properties['req_version_id'];
html_window_title();
html_print_body();
html_page_title($project_name . " - REQUIREMENT DETAIL");
html_page_header($db, $project_name);
html_print_menu();
requirement_menu_print($page);
error_report_check($_GET);
$rows_requirement = requirement_get_detail($project_id, $s_req_id, $s_req_version_id);
$row_requirement = $rows_requirement[0];
$req_version_id = $row_requirement[REQ_VERS_UNIQUE_ID];
$req_rec_or_file = $row_requirement[REQ_REC_FILE];
#
# $RCSfile: test_workflow_page.php,v $  $Revision: 1.8 $
# ---------------------------------------------------------------------
if (isset($_POST['submit_button'])) {
    require_once "test_workflow_group_action.php";
    exit;
}
include "./api/include_api.php";
auth_authenticate_user();
$page = basename(__FILE__);
$num = 0;
$bg_color = '';
$project_properties = session_get_project_properties();
$project_name = $project_properties['project_name'];
$project_id = $project_properties['project_id'];
$s_display_options = session_set_display_options("test_workflow", $_POST);
$order_by = $s_display_options['order_by'];
$order_dir = $s_display_options['order_dir'];
$page_number = $s_display_options['page_number'];
$filter_per_page = $s_display_options['filter']['per_page'];
$filter_manual_auto = $s_display_options['filter']['manual_auto'];
$filter_test_type = $s_display_options['filter']['test_type'];
$filter_ba_owner = $s_display_options['filter']['ba_owner'];
$filter_qa_owner = $s_display_options['filter']['qa_owner'];
$filter_tester = $s_display_options['filter']['tester'];
$filter_area_tested = $s_display_options['filter']['area_tested'];
$filter_test_status = $s_display_options['filter']['test_status'];
$filter_priority = $s_display_options['filter']['priority'];
$filter_test_search = $s_display_options['filter']['test_search'];
html_window_title();
html_print_body();
$filter_assign_release = "";
$filter_show_versions = "latest";
$filter_search = "";
$filter_priority = "";
#$order_by 		= REQ_FILENAME;
#$order_dir		= "ASC";
#$page_number	= 1;
#util_set_filter('per_page', $filter_per_page, $_POST);
#util_set_filter('doc_type', $filter_doc_type, $_POST);
#util_set_filter('status', $filter_status, $_POST);
#util_set_filter('area_covered', $filter_area_covered, $_POST);
#util_set_filter('functionality', $filter_functionality, $_POST);
#util_set_filter('assign_release', $filter_assign_release, $_POST);
#util_set_filter('requirement_search', $filter_search, $_POST);
#util_set_filter('priority', $filter_priority, $_POST);
$s_display_options = session_set_display_options("requirement_assoc", $_POST);
#util_set_order_by($order_by, $_POST);
#util_set_order_dir($order_dir, $_POST);
#util_set_page_number($page_number, $_POST);
$order_by = $s_display_options['order_by'];
$order_dir = $s_display_options['order_dir'];
$page_number = $s_display_options['page_number'];
$filter_per_page = $s_display_options['filter']['per_page'];
$filter_doc_type = $s_display_options['filter']['doc_type'];
$filter_status = $s_display_options['filter']['status'];
$filter_area_covered = $s_display_options['filter']['area_covered'];
$filter_functionality = $s_display_options['filter']['functionality'];
$filter_assign_release = $s_display_options['filter']['assign_release'];
$filter_search = $s_display_options['filter']['requirement_search'];
$filter_priority = $s_display_options['filter']['priority'];
# Set or Reset the % covered session vars
    exit;
}
include "./api/include_api.php";
auth_authenticate_user();
# Session variables
$project_properties = session_get_project_properties();
$project_name = $project_properties['project_name'];
$project_id = $project_properties['project_id'];
$s_release_properties = session_set_properties("release", $_GET);
$release_id = $s_release_properties['release_id'];
$release_name = admin_get_release_name($release_id);
$build_id = $s_release_properties['build_id'];
$build_name = admin_get_build_name($build_id);
$testset_id = $s_release_properties['testset_id'];
$testset_name = admin_get_testset_name($testset_id);
$s_table_display_options = session_set_display_options("testset_add_tests", $_POST);
$order_by = $s_table_display_options['order_by'];
$order_dir = $s_table_display_options['order_dir'];
$page_number = $s_table_display_options['page_number'];
$filter_manual_auto = $s_table_display_options['filter']['manual_auto'];
$filter_test_type = $s_table_display_options['filter']['test_type'];
$filter_ba_owner = $s_table_display_options['filter']['ba_owner'];
$filter_qa_owner = $s_table_display_options['filter']['qa_owner'];
$filter_tester = $s_table_display_options['filter']['tester'];
$filter_area_tested = $s_table_display_options['filter']['area_tested'];
$filter_priority = $s_table_display_options['filter']['priority'];
$filter_per_page = $s_table_display_options['filter']['per_page'];
$filter_search = $s_table_display_options['filter']['test_search'];
session_records("testset_edit");
# Page variables
$test_name = TEST_TBL . "." . TEST_NAME;
$delete_page = 'delete_page.php';
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
session_set_properties("project_manage", $_GET);
$selected_project_properties = session_get_properties("project_manage");
$selected_project_id = $selected_project_properties['project_id'];
$project_manager = user_has_rights($selected_project_id, $user_id, MANAGER);
$redirect_url = $page . "?project_id=" . $selected_project_id;
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$row_style = '';
if (isset($_GET['table'])) {
    session_set_display_options($_GET['table'], $_POST);
}
$s_users_display_options = session_get_display_options("project_manage_users");
$s_users_order_by = $s_users_display_options['order_by'];
$s_users_order_dir = $s_users_display_options['order_dir'];
$s_users_page_number = $s_users_display_options['page_number'];
$s_areas_display_options = session_get_display_options("project_manage_areas");
$s_areas_order_by = $s_areas_display_options['order_by'];
$s_areas_order_dir = $s_areas_display_options['order_dir'];
$s_areas_page_number = $s_areas_display_options['page_number'];
$s_machines_display_options = session_get_display_options("project_manage_machines");
$s_machines_order_by = $s_machines_display_options['order_by'];
$s_machines_order_dir = $s_machines_display_options['order_dir'];
$s_machines_page_number = $s_machines_display_options['page_number'];
$s_testtype_display_options = session_get_display_options("project_manage_testtype");
$s_testtype_order_by = $s_testtype_display_options['order_by'];
<?php

# ---------------------------------------------------------------------
# rth is a requirement, test, and bugtracking system
# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------
# ---------------------------------------------------------------------
# User Edit Page
#
# $RCSfile: user_edit_page.php,v $  $Revision: 1.5 $
# ---------------------------------------------------------------------
$display_options = session_set_display_options("user_edit", $_POST);
$order_by = $display_options['order_by'];
$order_dir = $display_options['order_dir'];
$page_number = $display_options['page_number'];
$row_style = '';
$user_assoc_project_names = array();
$rows_user_projects = user_get_projects_info($selected_user_id, $order_by, $order_dir);
$user_info = user_get_info($selected_user_id);
$selected_username = $user_info[USER_UNAME];
$selected_firstname = $user_info[USER_FNAME];
$selected_lastname = $user_info[USER_LNAME];
$selected_email = $user_info[USER_EMAIL];
$selected_phone = $user_info[USER_PHONE];
$selected_email = $user_info[USER_EMAIL];
$selected_admin = $user_info[USER_ADMIN];
$tempest_admin = user_has_rights($project_id, $user_id, ADMIN);
$selected_user_tempest_admin = user_has_rights($project_id, $selected_user_id, ADMIN);
$user_associated_project_names = array();
$testset_signoff_page = "testset_signoff_page.php";
$testset_lock_page = "testset_lock_page.php";
# Initialize vars
$i = 0;
$num = 0;
$row_style = '';
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('test_results_page'));
html_page_header($db, $project_name);
# --------------------------------------------------
# Maybe make a get_session_test_results_option function with each of the functions below
# It would then set the release_id, build_id, and testset_id each time the page is called
#----------------------------------------------------
# set the filter session variables if the user submits the filter form
$table_options = session_set_display_options("results", $_POST);
$s_properties = session_set_properties("results", $_GET);
html_print_menu();
html_test_results_menu($db, $page, $project_id, $s_properties, $table_options);
print "<br>" . NEWLINE;
if (!empty($s_properties['testset_id']) && $s_properties['testset_id'] != 'all') {
    $testset_id = $s_properties['testset_id'];
    // ------------------------------------------------------------
    // run query to make sure there are tests in the testset.
    // if not, dont show all the forms and filters below
    //--------------------------------------------------------------
    $locked = testset_get_lock_status($testset_id);
    print "<table class='hide100'>" . NEWLINE;
    print "<tr>" . NEWLINE;
    print "<td width='50%'>&nbsp;</td>" . NEWLINE;
    print "<td width='25%' align='right'><a href='results_run_autopass.php?testset_id={$testset_id}' target='_blank'>" . lang_get('run_autopass') . "</td>" . NEWLINE;
# User Manage Page
#
# $RCSfile: user_manage_page.php,v $  $Revision: 1.6 $
# ---------------------------------------------------------------------
include "./api/include_api.php";
auth_authenticate_user();
$page = basename(__FILE__);
$delete_page = 'delete_page.php';
$redirect_url = $page;
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$row_style = '';
$s_user_manage_display_options = session_set_display_options("user_manage", $_POST);
$order_by = $s_user_manage_display_options['order_by'];
$order_dir = $s_user_manage_display_options['order_dir'];
$page_number = $s_user_manage_display_options['page_number'];
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('user_manage_page'));
html_page_header($db, $project_name);
html_print_menu();
admin_user_print($page, $project_id, $user_id);
print "<br>" . NEWLINE;
print "<div align=center>" . NEWLINE;
print "<form method=post action='{$page}'>" . NEWLINE;
print "<table class=hide80>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
# ------------------------------------
include "./api/include_api.php";
auth_authenticate_user();
$page = basename(__FILE__);
$form_name = 'add_release';
$action_page = 'release_add_action.php';
$release_edit_page = 'release_edit_page.php';
$release_signoff_page = 'release_signoff_page.php';
$build_page = 'build_page.php';
$delete_page = 'delete_page.php';
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$row_style = '';
session_set_properties("release", $_GET);
$display_options = session_set_display_options("release", $_POST);
$order_by = $display_options['order_by'];
$order_dir = $display_options['order_dir'];
html_window_title();
html_print_body($form_name, 'rel_name_required');
html_page_title($project_name . " - " . lang_get('release_page'));
html_page_header($db, $project_name);
html_print_menu();
error_report_check($_GET);
print "<div align='center'>" . NEWLINE;
print "<span class='required'>*</span> <span class='print'>" . lang_get('must_complete_field') . "</span>" . NEWLINE;
print "<table class=width60>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
print "<form method=post name={$form_name} action={$action_page}>" . NEWLINE;
print "<table class=inner>" . NEWLINE;
$page = basename(__FILE__);
$form_name = 'add_build';
$action_page = 'build_add_action.php';
$build_edit_page = 'build_edit_page.php';
$testset_page = 'testset_page.php';
$delete_page = 'delete_page.php';
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$row_style = '';
# Set release build properties in session and assign all values to variable
$s_release_properties = session_set_properties("release", $_GET);
$release_id = $s_release_properties['release_id'];
$release_name = admin_get_release_name($release_id);
$redirect_url = $page . "?release_id=" . $release_id;
$display_options = session_set_display_options("build", $_POST);
$order_by = $display_options['order_by'];
$order_dir = $display_options['order_dir'];
html_window_title();
html_print_body($form_name, 'build_name_required');
html_page_title($project_name . " - " . lang_get('build_page'));
html_page_header($db, $project_name);
html_print_menu();
html_release_map(array("release_link", lang_get("builds")));
error_report_check($_GET);
print "<div align=center>" . NEWLINE;
print "<span class='required'>*</span> <span class='print'>" . lang_get('must_complete_field') . "</span>" . NEWLINE;
print "<table class=width60>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
print "<form method=post name={$form_name} action={$action_page}>" . NEWLINE;
$s_username = $s_user_properties['username'];
$s_tempest_admin = $s_user_properties['tempest_admin'];
$s_project_rights = $s_user_properties['project_rights'];
$s_delete_rights = $s_user_properties['delete_rights'];
$s_email = $s_user_properties['email'];
$order_by = $teststep_display_options['order_by'];
$order_dir = $teststep_display_options['order_dir'];
#$project_name           = $s_project_properties['project_name'];
#$project_id				= $s_project_properties['project_id'];
$show_priority = $s_show_options['show_priority'];
$test_id = $s_test_details['test_id'];
//$test_version_id		= $s_test_details['test_version_id'];
$redirect_url = $page . "?test_id=" . $test_id . "&project_id=" . $project_id;
$test_name = test_get_name($test_id);
session_set_display_options('test_detail', $_POST);
$s_test_detail_options = session_set_display_options('test_detail', $_GET);
$s_tab = $s_test_detail_options['tab'];
$s_page_number = $s_test_detail_options['page_number'];
if (isset($_GET['test_id'])) {
    //$s_page_number = 1;
}
if (isset($_GET['failed'])) {
    $is_validation_failure = $_GET['failed'];
} else {
    $is_validation_failure = false;
}
$project_manager = user_has_rights($project_id, $s_user_id, MANAGER);
$user_has_delete_rights = $s_delete_rights === "Y" || $project_manager;
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('test_detail_page'));
Esempio n. 17
0
function html_dynamic_tree($session_variable, $tree_array, $root_node, $highlighted = null, $column_map = array())
{
    # Get the expanded tree array from the session
    $s_display_options = session_get_display_options($session_variable);
    $expanded = $s_display_options["filter"]["tree"];
    # Add expanded node (if there is one)
    if (isset($_GET['expand'])) {
        $expanded[] = $_GET['expand'];
    }
    # Remove collapsed node (if there is one)
    if (isset($_GET['collapse'])) {
        $expanded = array_diff($expanded, array($_GET['collapse']));
    }
    # Create variable to update the session
    $update_expanded = array("tree" => $expanded);
    # Update the tree variable in the session and get the returned value
    $s_display_options = session_set_display_options($session_variable, $update_expanded);
    $expanded = $s_display_options["filter"]["tree"];
    global $db;
    # images html
    $img_tree_T = "<img align='absmiddle' border=0 src='" . IMG_SRC . "tree_dots_T.gif' alt=''>";
    $img_tree_L = "<img align='absmiddle' border=0 src='" . IMG_SRC . "tree_dots_L.gif' alt=''>";
    $img_tree_column = "<img align='absmiddle' border=0 src='" . IMG_SRC . "tree_dots_column.gif' alt=''>";
    $img_tree_plus = "<img align='absmiddle' border=0 src='" . IMG_SRC . "tree_dots_plus.gif' alt=''>";
    $img_tree_plus_b = "<img align='absmiddle' border=0 src='" . IMG_SRC . "tree_dots_plus_b.gif' alt=''>";
    $img_tree_minus = "<img align='absmiddle' border=0 src='" . IMG_SRC . "tree_dots_minus.gif' alt=''>";
    $img_tree_minus_b = "<img align='absmiddle' border=0 src='" . IMG_SRC . "tree_dots_minus_b.gif' alt=''>";
    $img_tree_folder = "<img align='absmiddle' border=0 src='" . IMG_SRC . "tree_folder.gif' alt=''>";
    $img_tree_folder_b = "<img align='absmiddle' border=0 src='" . IMG_SRC . "tree_folder_b.gif' alt=''>";
    $img_spacer = "<img align='absmiddle' border=0 src='" . IMG_SRC . "1px_transparent.gif' width=15 height=1 alt=''>";
    $column = $img_tree_column . $img_spacer;
    # display each child node
    for ($i = 0; $i < sizeof($tree_array); $i++) {
        $req_id = $tree_array[$i]['uid'];
        $req_version_id = requirement_get_latest_version($req_id);
        echo $img_spacer;
        foreach ($column_map as $column_type) {
            if ($column_type == "|") {
                echo $column;
            } elseif ($column_type == " ") {
                echo $img_spacer;
            }
        }
        # if the last node
        if ($i == sizeof($tree_array) - 1) {
            # if the last node has no children
            if (empty($tree_array[$i]["children"])) {
                echo $img_tree_L;
                # if the last node has children
            } else {
                # if last node has children and the node is in the expanded array
                if (util_array_value_search($req_id, $expanded)) {
                    echo "<a href='?collapse={$req_id}#{$req_id}'>" . $img_tree_minus_b . $img_tree_folder_b . "</a>";
                    # if last node has children and the node is not in the expanded array
                } else {
                    echo "<a href='?expand={$req_id}#{$req_id}'>" . $img_tree_plus_b . $img_tree_folder . "</a>";
                }
            }
            $column_type = array(" ");
            # if not the last node
        } else {
            # if not the last node and the node has no children
            if (empty($tree_array[$i]["children"])) {
                echo $img_tree_T;
            } else {
                # if not the last node and the node is in the expanded array
                if (util_array_value_search($req_id, $expanded)) {
                    echo "<a href='?collapse={$req_id}#{$req_id}'>" . $img_tree_minus . $img_tree_folder_b . "</a>";
                    # if not the last node and the node is not in the expanded array
                } else {
                    echo "<a href='?expand={$req_id}#{$req_id}'>" . $img_tree_plus . $img_tree_folder . "</a>";
                }
            }
            $column_type = array("|");
        }
        # prints a closed folder if node has no children and $root_node is set to true
        if (empty($tree_array[$i]["children"]) && $root_node) {
            echo $img_tree_folder;
        }
        # formatting for highlighted node
        $style = "";
        if ($req_id == $highlighted) {
            $style = "style='font-weight: bold; font-size: 120%;'";
        }
        # print the node name
        echo " <a {$style} name={$req_id} href='requirement_detail_page.php?req_id={$req_id}&req_version_id={$req_version_id}'>" . $tree_array[$i]['name'] . "</a>";
        echo "<br>" . NEWLINE;
        # display this nodes children
        if (util_array_value_search($req_id, $expanded)) {
            html_dynamic_tree($session_variable, $tree_array[$i]['children'], false, $highlighted, array_merge($column_map, $column_type));
        }
    }
}
    exit;
}
include "./api/include_api.php";
auth_authenticate_user();
$page = basename(__FILE__);
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$row_style = '';
$records = '';
session_set_properties("project_manage", $_GET);
$selected_project_properties = session_get_properties("project_manage");
$selected_project_id = $selected_project_properties['project_id'];
$selected_project_properties = session_set_display_options("project_archive_tests", $_POST);
$order_by = $selected_project_properties['order_by'];
$order_dir = $selected_project_properties['order_dir'];
$page_number = $selected_project_properties['page_number'];
session_records("archive_tests", admin_get_archived_tests($project_id));
html_window_title();
html_print_body();
html_page_title(project_get_name($selected_project_id) . " - " . lang_get('archive_tests_page'));
html_page_header($db, $project_name);
html_print_menu();
admin_menu_print($page, $project_id, $user_id);
html_project_manage_menu();
html_project_manage_tests_menu();
if (!user_has_rights($selected_project_id, $user_id, MANAGER)) {
    print "<div align=center>";
    error_report_display_msg(NO_RIGHTS_TO_VIEW_PAGE);
Esempio n. 19
0
auth_authenticate_user();
$page = basename(__FILE__);
$action_page = 'test_action.php';
$detail_page = 'bug_detail_page.php';
$bug_update_url = 'bug_detail_update_page.php';
$num = 0;
$bg_color = '';
$project_properties = session_get_project_properties();
$project_name = $project_properties['project_name'];
$project_id = $project_properties['project_id'];
if (isset($_POST['filter_jump']) && $_POST['filter_jump'] != '') {
    html_redirect("{$detail_page}?bug_id={$_POST['filter_jump']}");
} else {
    $filter_jump = "";
}
$s_display_options = session_set_display_options("bug", $_POST);
$order_by = $s_display_options['order_by'];
$order_dir = $s_display_options['order_dir'];
$page_number = $s_display_options['page_number'];
$filter_per_page = $s_display_options['filter']['per_page'];
$filter_bug_status = $s_display_options['filter']['status'];
$filter_bug_category = $s_display_options['filter']['category'];
$filter_bug_component = $s_display_options['filter']['component'];
$filter_reported_by = $s_display_options['filter']['reported_by'];
$filter_assigned_to = $s_display_options['filter']['assigned_to'];
$filter_assigned_to_dev = $s_display_options['filter']['assigned_to_developer'];
$filter_found_in_rel = $s_display_options['filter']['found_in_release'];
$filter_assigned_to_rel = $s_display_options['filter']['assigned_to_release'];
$filter_view_closed = $s_display_options['filter']['view_closed'];
$filter_search = $s_display_options['filter']['bug_search'];
/*
$delete_page = 'delete_page.php';
$redirect_url = $page;
$s_project_properties = session_get_project_properties();
$project_name = $s_project_properties['project_name'];
$project_id = $s_project_properties['project_id'];
$s_user_properties = session_get_user_properties();
$user_id = $s_user_properties['user_id'];
$row_style = '';
session_validate_form_reset();
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get("manage_projects_page"));
html_page_header($db, $project_name);
html_print_menu();
admin_menu_print($page, $project_id, $user_id);
$s_table_options = session_set_display_options("admin", $_POST);
$order_by = $s_table_options['order_by'];
$order_dir = $s_table_options['order_dir'];
$rows_project_details = project_get_all_projects_details($order_by, $order_dir);
print "<br>";
print "<div align=center>" . NEWLINE;
if (!empty($rows_project_details)) {
    print "<table id='sortabletable' class='sortable' rules=cols>" . NEWLINE;
    print "<thead>" . NEWLINE;
    print "<tr class=tbl_header>" . NEWLINE;
    #html_tbl_print_header( lang_get('project_name'), PROJ_NAME, $order_by, $order_dir, $page );
    #html_tbl_print_header( lang_get('status'), PROJ_STATUS,	$order_by, $order_dir, $page );
    #html_tbl_print_header( lang_get('date_created'), PROJ_DATE_CREATED, $order_by, $order_dir, $page );
    #html_tbl_print_header( lang_get('description') );
    #html_tbl_print_header( lang_get('delete') );
    html_tbl_print_header(lang_get('project_name'));