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 Update Page 10# I think we can remove this page 11# 12# $RCSfile: requirement_update.php,v $ $Revision: 1.2 $ 13# --------------------------------------------------------------------- 14 15include"./api/include_api.php"; 16 17 18$page = basename(__FILE__); 19#### Change to page that form is submitted to or hyperlinks link to #### 20$action_page = 'requirement_action.php'; 21$num = 0; 22$project_properties = session_get_project_properties(); 23$project_name = $project_properties['project_name']; 24 25auth_authenticate_user(); 26 27$tbl_req = REQ_TBL; 28$f_req_id = REQ_ID; 29$f_req_filename = REQ_FILENAME; 30$f_req_area_covered = REQ_AREA_COVERED; 31$f_req_type = REQ_TYPE; 32 33$tbl_req_ver = REQ_VERS_TBL; 34$f_req_ver_req_id = REQ_VERS_REQ_ID; 35$f_req_ver_version = REQ_VERS_VERSION; 36$f_req_ver_timestamp = REQ_VERS_TIMESTAMP; 37$f_req_ver_uploaded_by = REQ_VERS_UPLOADED_BY; 38$f_req_ver_status = REQ_VERS_STATUS; 39$f_req_ver_shed_release = REQ_VERS_SCHEDULED_RELEASE_IMP; 40$f_req_ver_detail = REQ_VERS_DETAIL; 41 42$query_updateReqs = "UPDATE $tbl_req SET $f_req_filename = '$reqfilename', $f_req_area_covered = '$areacoverage', $f_req_type = '$reqdoctype' WHERE $f_req_id = '$reqID'"; 43$db->Execute($query_updateReqs); 44 45 46if($revision_type == "Major"){ 47 $version = floor($version) + 1; 48} 49else{ 50 $x = explode(".", $version); 51 $m = $x[1] + 1; 52 53 $version = $x[0] . "." . $m; 54 55} 56 57$current_date = date("Y-m-d H:i:s"); 58$arr_user = user_get_current_user_name(); 59$username = $arr_user[0]; 60 61$query_version = "INSERT INTO $tbl_req_ver ($f_req_ver_req_id, $f_req_ver_version, $f_req_ver_uploaded_by, $f_req_ver_timestamp, $f_req_ver_detail, $f_req_ver_status, $f_req_ver_shed_release) VALUES ('$reqID', '$version', '$username', '$current_date', '$HTTP_POST_VARS[EditorDefault]', '$reqstatus', '$release')"; 62$db->Execute($query_version); 63 64header("Location: requirement_detail.php?reqID=$reqID"); 65#PRINT "<meta http-equiv=\"Refresh\" content=\"1;URL=requirement_detail.php?reqID=$reqID\">"; 66exit(); 67 68# --------------------------------------------------------------------- 69# $Log: requirement_update.php,v $ 70# Revision 1.2 2006/02/24 11:33:32 gth2 71# minor bug fixes and enhancements for 1.5.1 release - gth 72# 73# Revision 1.1.1.1 2005/11/30 23:00:58 gth2 74# importing initial version - gth 75# 76# --------------------------------------------------------------------- 77?>