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 Add Folder 10# 11# $RCSfile: requirement_add_folder.php,v $ $Revision: 1.1.1.1 $ 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 42if(isset($req_folder_id)){ 43 $parent = $req_folder_id; 44} 45else{ 46 $parent = '0'; 47} 48 49?> 50 51</head> 52 53<?php 54 55 print"<BR>"; 56 57if( !isset( $submit ) ) 58{ 59 print"<DIV ALIGN=center>"; 60 print"<TABLE BORDER=1 WIDTH=75% BGCOLOR= #666666 ALIGN=CENTER >"; 61 print"<TR>"; 62 print"<TD BGCOLOR=#99CCFF>"; 63 print"<TABLE WIDTH=100%>"; 64 print"<FORM METHOD=post name=req_add_folder ACTION=requirement_add_folder.php>"; 65 66 // Title 67 print"<TR>"; 68 print"<TD COLSPAN=2 ALIGN=left><B>Add A New Requirements Folder</B></TD>"; 69 print"</TR>"; 70 71 // Requirement File Name 72 print"<TR>"; 73 print"<TD ALIGN=right>Folder Name</TD>"; 74 print"<TD ALIGN=left><INPUT TYPE=text SIZE=60 NAME=req_foldername></TD>"; 75 print"</TR>"; 76 77 //Formatting 78 print"<TR>"; 79 print"<TD></TD>"; 80 print"</TR>"; 81 82 print"<TR>"; 83 print"<TD><INPUT TYPE=hidden NAME=req_folder VALUE=$parent></TD>"; 84 print"</TR>"; 85 86 print"<TR>"; 87 print"<TD COLSPAN=2 ALIGN=center><INPUT TYPE=submit NAME=submit VALUE=Save></TD>"; 88 print"</TR>"; 89 90 print"</FORM>"; 91 print"</TABLE>"; 92 print"</TD>"; 93 print"</TR>"; 94 print"</TABLE>"; 95 96 print"<BR>"; 97} 98 99else 100{ 101 102 $query = "INSERT INTO req_folders (name, parent) VALUES ('$req_foldername', '$req_folder')"; 103 $db->Execute($query); 104 105 106 //header("Location: req.php"); 107 print"<meta http-equiv=\"Refresh\" content=\"1;URL=requirement_page.php?req_folder_id=$req_folder\">"; 108 exit(); 109} 110?> 111<?php 112print"</div>"; 113html_print_footer(); 114 115# --------------------------------------------------------------------- 116# $Log: requirement_add_folder.php,v $ 117# Revision 1.1.1.1 2005/11/30 23:00:57 gth2 118# importing initial version - gth 119# 120# --------------------------------------------------------------------- 121 122?> 123