1<?php
2# ---------------------------------------------------------------------
3# rth is a requirement, test, and bugtracking system
4# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
5# This program is distributed under the terms and conditions of the GPL
6# See the README and LICENSE files for details
7#----------------------------------------------------------------------
8# ------------------------------------
9# testset lock page
10#
11# $RCSfile: testset_lock_page.php,v $ $Revision: 1.1 $
12# ------------------------------------
13
14include"./api/include_api.php";
15
16$page                   = basename(__FILE__);
17$action_page            = 'testset_lock_action.php';
18$num                    = 0;
19$bg_color               = '';
20$project_properties     = session_get_project_properties();
21$project_name           = $project_properties['project_name'];
22
23
24if (isset($_GET['failed'])) {
25    $is_validation_failure = $_GET['failed'];
26}
27else
28    $is_validation_failure = false;
29
30if (isset($_GET['testset_id'])) {
31
32    $testset_id = $_GET['testset_id'];
33}
34
35if (isset($_GET['build_id'])) {
36
37    $build_id = $_GET['build_id'];
38}
39$locked	= testset_get_lock_status($testset_id);
40if($locked){
41	$page_title = 'testset_unlock_page';
42	$submit_btn = lang_get('unlock');
43}else{
44	$page_title = 'testset_lock_page';
45	$submit_btn = lang_get('lock');
46}
47
48html_window_title();
49
50auth_authenticate_user();
51
52html_page_title($project_name ." - ". lang_get($page_title) );
53html_page_header( $db, $project_name );
54
55html_print_menu();
56html_print_body();
57print"<br><br>";
58
59error_report_check( $_GET );
60
61
62$row = testset_get( $testset_id, $build_id );
63
64
65if (!empty($row)) {
66
67	extract( $row, EXTR_PREFIX_ALL, 'v' );
68
69//	$testset_id			= ${'v_' . TS_ID};
70	$testset_name       = ${'v_' . TS_NAME};
71	$date_created       = ${'v_' . TS_DATE_CREATED};
72	$description        = ${'v_' . TS_DESCRIPTION};
73	$status		        = ${'v_' . TS_STATUS};
74	$comments			= ${'v_' . TS_SIGNOFF_COMMENTS};
75
76
77//	print"<div align=center>";
78//	print "<span class='required'>*</span><span class='print'>" . lang_get('must_complete_field') . "</span><br/>";
79	print"<div align='center'>";
80	print"<table class=width65 rules='none' border='0'>";
81	print"<tr>";
82	print"<td>";
83	    print"<table class=inner rules='none' border='0'>";
84    	print"<form method=post action=$action_page>";
85
86    	print"<tr class=left>";
87    	print"<td class=print-category colspan=2>".lang_get('testset_signoff')."</td>";
88    	print"</tr>";
89
90    	print"<tr class=left>";
91		    print"<td class=right>". lang_get('testset_name') .":</td>";
92	    	print"<td class=left>$testset_name</td>";
93    	print"</tr>";
94
95    	print"<tr class=left>";
96			print"<td class=right>". lang_get('date_created') .":</td>";
97			print"<td class=left>$date_created</td>";
98    	print"</tr>";
99
100    	print"<tr class=left>";
101			print"<td class=right>". lang_get('description') .":</td>";
102			print"<td class=left>$description</td>";
103    	print"</tr>";
104
105
106    	print"<tr class=left>";
107			print"<td class='right'>". lang_get('comments') .":</td>";
108			print"<td class='left'><textarea rows='5' cols='50' name='lock_comment'></textarea></td>";
109    	print"</tr>";
110
111    	print"<tr><td><input type='hidden' name='testset_id' value='$testset_id'></td></tr>";
112		print"<tr><td><input type='hidden' name='build_id' value='$build_id'></td></tr>";
113		print"<tr><td class=center colspan=2><input type=submit name='save' value='$submit_btn'><br/><br/></td>";
114
115		print"</form>";
116		print"</table>";
117
118	print"</td>";
119	print"</tr>";
120	print"</table>";
121	print"<br>";
122	print"</div>";
123	print"</div>";
124}
125html_print_footer();
126
127
128
129
130
131# ------------------------------------
132# $Log: testset_lock_page.php,v $
133# Revision 1.1  2008/07/25 09:50:02  peter_thal
134# added lock testset feature
135# disabled detail column in test result, because functionality is not implemented yet
136#
137# ------------------------------------
138?>
139