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# Requirement Search Results Page 10# 11# $RCSfile: requirement_search_results.php,v $ $Revision: 1.2 $ 12# --------------------------------------------------------------------- 13 14include"./api/include_api.php"; 15 16 17$page = basename(__FILE__); 18#### Change to page that form is submitted to or hyperlinks link to #### 19$action_page = 'requirement_action.php'; 20$num = 0; 21$project_properties = session_get_project_properties(); 22$project_name = $project_properties['project_name']; 23 24html_window_title(); 25 26auth_authenticate_user(); 27 28#### Change to title of page #### 29html_page_title($project_name ." - REQUIREMENTS"); 30html_page_header( $db, $project_name ); 31 32html_print_menu(); 33 34#### Change to api submenu function for this page type #### 35requirement_menu_print ($page); 36html_print_body(); 37 38error_report_check( $_GET ); 39 40print"<br>"; 41 42print"<form>"; 43 44// print column headers 45print"<TABLE BORDER=1 WIDTH=100% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>"; 46print"<TR BGCOLOR=#99CCFF ALIGN=CENTER VALIGN=TOP>"; 47print"<TH ALIGN=center VALIGN=top></TH>"; 48print"<TH ALIGN=center VALIGN=top>Name</TH>"; 49print"<TH ALIGN=center VALIGN=top>Path</TH>"; 50print"<TH ALIGN=center VALIGN=top>ReqID</TH>"; 51print"<TH ALIGN=center VALIGN=top>Type</TH>"; 52print"<TH ALIGN=center VALIGN=top>Area Covered</TH>"; 53print"<TH ALIGN=center VALIGN=top>Status</TH>"; 54print"<TH ALIGN=center VALIGN=top>Version</TH>"; 55print"<TH ALIGN=center VALIGN=top>Locked</TH>"; 56print"<TH ALIGN=center VALIGN=top>Assigned To Release</TH>"; 57print"<TH ALIGN=center VALIGN=top>Detail</TH>"; 58print("</TR>"); 59 60 61$query = "SELECT ReqID, ReqFileName, AreaSpecd, Type, Locked_By, Req_Folder_ID FROM Requirement"; 62$recordSet = $db->Execute($query); 63$num = $recordSet->NumRows(); 64 65$query_count = $num; 66 67if($num){ 68 69 while($row = $recordSet->FetchRow()) 70 { 71 //get latest version 72 $query_version = "SELECT Version, UID, Detail, Status, Assign_Release FROM requirementversion WHERE ReqID = '$row[ReqID]' ORDER BY UID DESC LIMIT 1"; 73 $recordSet_version = $db->Execute($query_version); 74 $num_version = $recordSet_version->NumRows(); 75 76 if($num_version) 77 { 78 while($row_version = $recordSet_version->FetchRow()) 79 { 80 $latest_version = $row_version['Version']; 81 $Detail = $row_version['Detail']; 82 $Status = $row_version['Status']; 83 $Assign_Release = $row_version['Assign_Release']; 84 } 85 } 86 87 // code to left pad the TestID with 0s. 88 $DisplayTestID = sprintf("%05s",trim($row['ReqID'])); 89 90 #if($rowcolor=='1'){ 91 # $rowcolor='0'; 92 # print"<TR BGCOLOR=#FFFFFF ALIGN=LEFT VALIGN=TOP>"; 93 #} 94 #else{ 95 # $rowcolor='1'; 96 # print"<TR BGCOLOR=#FFFFCC ALIGN=LEFT VALIGN=TOP>"; 97 #} 98 99 100 //print("<TR>"); 101 print("<TD><input type=checkbox></TD>"); 102 print("<TD><img src='./images/icons/file.gif'><A HREF= 'requirement_detail.php?reqID=$row[ReqID]'> $row[ReqFileName]</A></TD>"); 103 104 105 print("<TD>"); 106 107 build_path($row['Req_Folder_ID'], "", $db); 108 109 print("</TD>"); 110 print("<TD><A HREF= 'requirement_detail.php?reqID=$row[ReqID]'>$DisplayTestID</A></TD>"); 111 print("<TD>$row[Type]</TD>"); 112 print("<TD>$row[AreaSpecd]</TD>"); 113 print("<TD>$Status  </TD>"); 114 print("<TD>$latest_version</TD>"); 115 116 if($row['Locked_By']){ 117 print("<TD><img src='./icons/lock.gif'>$row[Locked_By]</TD>"); 118 } 119 else{ 120 print("<TD> </TD>"); 121 } 122 123 print("<TD>$Assign_Release  </TD>"); 124 print("<TD>$Detail  </TD>"); 125 print("</TR>"); 126 } 127} 128else 129{ 130 131} 132print"</TABLE>"; 133 134 print"<SELECT NAME='secondary_UID' SIZE=1>"; 135 print"<OPTION VALUE='Assign_To_Release'>Assign To Release</OPTION>"; 136 print"<OPTION VALUE='Lock'>Lock</OPTION>"; 137 print"<OPTION VALUE='Unlock'>Unlock</OPTION>"; 138 print"<OPTION VALUE='Change_Status'>Change Status</OPTION>"; 139 print"<OPTION VALUE='Move'>Move</OPTION>"; 140 print"<OPTION VALUE='Delete'>Delete</OPTION>"; 141 print"</SELECT>"; 142 143 print"<input type=submit value=OK></TD>"; 144 145 print "     export to"; 146 print"<SELECT NAME='req_export' SIZE=1>"; 147 print"<OPTION VALUE='CSV'>CSV</OPTION>"; 148 print"<OPTION VALUE='RTF'>Rich Text Format</OPTION>"; 149 print"<OPTION VALUE='PDF'>PDF</OPTION>"; 150 print"<OPTION VALUE='HTML'>HTML</OPTION>"; 151 print"<OPTION VALUE='XML'>XML</OPTION>"; 152 print"<OPTION VALUE='TXT'>TXT</OPTION>"; 153 print"</SELECT>"; 154 155 print"<input type=submit value=OK></TD>"; 156 157 158?> 159<P> 160<div align="center"> 161 162</FORM> 163<?php 164print"</div>"; 165html_print_footer(); 166 167 168# --------------------------------------------------------------------- 169# $Log: requirement_search_results.php,v $ 170# Revision 1.2 2006/06/10 01:55:06 gth2 171# no message 172# 173# Revision 1.1.1.1 2005/11/30 23:00:58 gth2 174# importing initial version - gth 175# 176# --------------------------------------------------------------------- 177?>