<?php
# ---------------------------------------------------------------------
# truc is a tool for requirement and use case tracking
# Copyright (C) 2006 ASDIS - http://sf.net/projects/truc
#
# (rth) Initial truc version based on rth
#       Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
#
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------

include"./api/include_api.php";
auth_authenticate_user();

#### Change to correct redirect page ####
$redirect_page = 'build_page.php';
$edit_page = 'build_edit_page.php';

session_validate_form_set($_POST, $edit_page);

#### Call api function to add/update database passing in form field values ####
admin_edit_build(	session_validate_form_get_field('build_id'),
					session_validate_form_get_field('build_edit_name_required'),
					session_validate_form_get_field('build_edit_date'),
					session_validate_form_get_field('build_edit_description') );

session_validate_form_reset();

html_print_operation_successful( 'build_page', $redirect_page );
?>