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# Page name 10# 11# $RCSfile: build_edit_page.php,v $ $Revision: 1.4 $ 12# ------------------------------------ 13 14include"./api/include_api.php"; 15auth_authenticate_user(); 16 17$page = basename(__FILE__); 18$form_name = 'edit_build'; 19$action_page = 'build_edit_action.php'; 20$build_edit_page = 'build_edit_page.php'; 21$testset_page = 'testset_page.php'; 22$delete_page = 'delete_page.php'; 23$s_project_properties = session_get_project_properties(); 24$project_name = $s_project_properties['project_name']; 25$project_id = $s_project_properties['project_id']; 26$row_style = ''; 27 28$s_release_properties = session_set_properties( "release", $_GET ); 29$release_id = $s_release_properties['release_id']; 30$release_name = admin_get_release_name($release_id); 31$build_id = $s_release_properties['build_id']; 32$build_name = admin_get_build_name($build_id); 33 34html_window_title(); 35html_print_body( $form_name, 'build_edit_name_required'); 36html_page_title($project_name ." - ". lang_get('build_edit_page') ); 37html_page_header( $db, $project_name ); 38html_print_menu(); 39 40html_release_map( Array("release_link", "build_link", "Edit") ); 41 42print"<br>". NEWLINE; 43 44error_report_check( $_GET ); 45 46#################################################################################################### 47# Create the form allowing the user to edit the record 48 49$build_details = admin_get_build($project_id, $build_id); 50 51extract($build_details, EXTR_PREFIX_ALL, 'v'); 52$build_name = ${'v_' . BUILD_NAME}; 53$build_date_received = ${'v_' . BUILD_DATE_REC}; 54$build_description = ${'v_' . BUILD_DESCRIPTION}; 55 56print"<div align=center>". NEWLINE; 57print"<span class='required'>*</span> <span class='print'>" . lang_get('must_complete_field') . "</span>". NEWLINE; 58 59print"<table class=width60>". NEWLINE; 60print"<tr>". NEWLINE; 61print"<td>". NEWLINE; 62print"<table class=inner>". NEWLINE; 63 64print"<td class=center>". NEWLINE; 65print"<form method=post name=$form_name action=$action_page>". NEWLINE; 66print"<input type=hidden name=build_id value='$build_id'>". NEWLINE; 67 68 69# FORM TITLE 70print"<tr>". NEWLINE; 71print"<td class='form-header-l' colspan='2'>". lang_get('edit_build') ." - $build_name</td>". NEWLINE; 72print"</tr>". NEWLINE; 73 74# BUILD NAME 75print"<tr>". NEWLINE; 76print"<td class='form-lbl-r'>". lang_get('build_name') ."<span class='required'>*</span></td>". NEWLINE; 77print"<td class=left>". NEWLINE; 78print"<input type='text' maxlength='20' name='build_edit_name_required' size=30 value='". 79 session_validate_form_get_field('build_edit_name_required', $build_name). 80 "'>". NEWLINE; 81print"</td>". NEWLINE; 82print"</tr>". NEWLINE; 83 84# BUILD DATE 85print"<tr>". NEWLINE; 86print"<td class='form-lbl-r'>". lang_get('date_received') ."</td>". NEWLINE; 87print"<td class=left>". NEWLINE; 88print"<input type='text' maxlength='19' name='build_edit_date' size=30 value='". 89 session_validate_form_get_field("build_edit_date", $build_date_received). 90 "'>". NEWLINE; 91print"</td>". NEWLINE; 92print"</tr>". NEWLINE; 93 94# DESCRIPTION 95print"<tr>". NEWLINE; 96print"<td class='form-lbl-r'>". lang_get('description') ."</td>". NEWLINE; 97print"<td class=left>". NEWLINE; 98print"<textarea name='build_edit_description' rows=5 cols=30 >". 99 session_validate_form_get_field("build_edit_description", $build_description). 100 "</textarea>". NEWLINE; 101print"</td>". NEWLINE; 102print"</tr>". NEWLINE; 103 104# SUBMIT BUTTON 105print"<tr>". NEWLINE; 106print"<td colspan='2' class=center><input type='submit' value='". lang_get('submit_btn') ."'></td>". NEWLINE; 107print"</tr>". NEWLINE; 108 109 110print"</form>". NEWLINE; 111print"</td>". NEWLINE; 112print"</tr>". NEWLINE; 113print"</table>". NEWLINE; 114print"</td>". NEWLINE; 115print"</tr>". NEWLINE; 116print"</table>". NEWLINE; 117print"</div>". NEWLINE; 118 119html_print_footer(); 120 121# ------------------------------------ 122# $Log: build_edit_page.php,v $ 123# Revision 1.4 2006/08/05 22:07:59 gth2 124# adding NEWLINE constant to support multiple OS newline chars - gth 125# 126# Revision 1.3 2006/05/03 19:59:53 gth2 127# no message 128# 129# Revision 1.2 2006/02/24 11:38:20 gth2 130# update to div - class=div-c not working in firefox - gth 131# 132# Revision 1.1.1.1 2005/11/30 23:00:56 gth2 133# importing initial version - gth 134# 135# ------------------------------------ 136?>