/
bug_actiongroup_page.php
138 lines (129 loc) · 4.02 KB
/
bug_actiongroup_page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 Mantis Team - mantisbt-dev@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# <SQLI>
# This page allows the close / suppress / others mass treatments, and display the adequate page
?>
<?php require_once( 'core.php' ) ?>
<? login_cookie_check() ?>
<?php
$f_action = gpc_get_string( 'f_action', '' );
$f_bug_arr = gpc_get_string_array( 'f_bug_arr', array() );
# redirects to all_bug_page if nothing is selected
if ( ( $f_action=='' ) || 0 == sizeof( $f_bug_arr ) ) {
print_meta_redirect( 'view_all_bug_page.php', 0 );
exit;
}
$t_finished = 0;
switch ( $f_action ) {
case 'CLOSE' :
# Use a simple confirmation page, if close or delete...
$t_finished = 1;
$t_question_title = lang_get( 'close_bugs_conf_msg' );
$t_button_title = lang_get( 'close_group_bugs_button' );
break;
case 'DELETE' :
$t_finished = 1;
$t_question_title = lang_get( 'delete_bugs_conf_msg' );
$t_button_title = lang_get( 'delete_group_bugs_button' );
break;
# ...else we define the variables used in the form
case 'MOVE' :
$t_question_title = lang_get( 'move_bugs_conf_msg' );
$t_button_title = lang_get( 'move_group_bugs_button' );
$t_form = 'f_project_id';
break;
case 'ASSIGN' :
$t_question_title = lang_get( 'assign_bugs_conf_msg' );
$t_button_title = lang_get( 'assign_group_bugs_button' );
$t_form = 'f_assign';
break;
case 'RESOLVE' :
$t_question_title = lang_get( 'resolve_bugs_conf_msg' );
$t_button_title = lang_get( 'resolve_group_bugs_button' );
$t_form = 'f_resolution';
$t_request = 'resolution'; # the "request" vars allow to display the adequate list
break;
case 'UP_PRIOR' :
$t_question_title = lang_get( 'priority_bugs_conf_msg' );
$t_button_title = lang_get( 'priority_group_bugs_button' );
$t_request = 'priority';
$t_form = 'f_priority';
break;
case 'UP_STATUS' :
$t_question_title = lang_get( 'status_bugs_conf_msg' );
$t_button_title = lang_get( 'status_group_bugs_button' );
$t_form = 'f_status';
$t_request = 'status';
break;
}
?>
<?php print_page_top1() ?>
<?php print_page_top2() ?>
<?php # displays the choices popup menus
if ( 1 != $t_finished ) {
?>
<br />
<div align="center">
<table class="width75" cellspacing="1">
<form method="POST" action="bug_actiongroup.php">
<input type="hidden" name="f_actionconfirmed" value="1" />
<input type="hidden" name="f_action" value="<?php echo $f_action ?>" />
<?php foreach( $f_bug_arr as $value ) { ?>
<input type="hidden" name="f_bug_arr[]" value="<?php echo $value ?>" />
<?php } ?>
<tr class="row-1">
<td class="category">
<?php echo $t_question_title ?>
</td>
<td>
<select name="<?php echo $t_form ?>">
<?php
switch ( $f_action ) {
case 'MOVE':
print_project_option_list();
break;
case 'ASSIGN':
print_assign_to_option_list();
break;
}
#other forms use the same function to display the list
print_enum_string_option_list( $t_request, FIXED );
?>
</select>
</td>
</tr>
<tr>
<td class="center" colspan="2">
<input type="submit" value="<?php echo $t_button_title ?>" />
</td>
</tr>
</form>
</table>
</div>
<?php # Choices Form END ?>
<?php
} else {
# else, asks for a simple confirmation to close or delete
?>
<br />
<div align="center">
<?php print_hr() ?>
<?php echo $t_question_title ?>
<form method="post" action="bug_actiongroup.php">
<input type="hidden" name="f_actionconfirmed" value="1" />
<input type="hidden" name="f_action" value="<?php echo $f_action ?>" />
<?php foreach( $f_bug_arr as $value ) { ?>
<input type="hidden" name="f_bug_arr[]" value="<?php echo $value ?>" />
<?php } ?>
<input type="submit" value="<?php echo $t_button_title ?>" />
</form>
<?php print_hr() ?>
</div>
<?php
}
?>
<?php print_page_bot1( __FILE__ ) ?>