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# $RCSfile: screen_add_action.php,v $
10# $Revision   $
11# ------------------------------------
12
13include"./api/include_api.php";
14auth_authenticate_user();
15
16$s_project_properties	= session_get_project_properties();
17$project_id				= $s_project_properties['project_id'];
18$redirect_page			= 'screen_page.php';
19$screen_id				= session_validate_form_get_field('screen_id');
20
21# Make sure user completed required fields
22session_validate_form_set($_POST, $redirect_page);
23
24# Make sure the screen name doesn't already exist for this project
25$num = test_screen_name_exists($project_id, session_validate_form_get_field('screen_name_required'));
26if( $num > 0 ) {
27
28	error_report_show($redirect_page, DUPLICATE_SCREEN_NAME );
29
30}
31
32test_add_screen(	$project_id,
33					session_validate_form_get_field('screen_name_required'),
34					session_validate_form_get_field('screen_desc'),
35					session_validate_form_get_field('screen_order') );
36
37session_validate_form_reset();
38
39html_print_operation_successful( 'screen_page', $redirect_page );
40
41# ------------------------------------
42# $Log: screen_add_action.php,v $
43# Revision 1.1  2006/05/03 20:24:01  gth2
44# no message
45#
46# ------------------------------------
47
48?>