/
bug_actiongroup_page.php
175 lines (137 loc) · 4.01 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000, 2001 Kenzaburo Ito - kenito@300baud.org
# 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 include( 'core_API.php' ) ?>
<? login_cookie_check() ?>
<?php
# the pencil shortcut, to directly edit bugs
if ( $QUERY_STRING!='' ) {
$f_qsValues=split('&', $QUERY_STRING);
foreach($f_qsValues as $value) {
$val=split('=', $value);
if ( substr($val[0], 0, 6)=='update' ) {
print_meta_redirect( 'bug_update_advanced_page.php?f_id='.substr($val[0], 7, strlen($val[0])-9), 0 );
}
}
}
# redirects to all_bug_page if nothing is selected
if (( $f_action=='') or count($f_bug_arr)==0 ) {
print_meta_redirect( 'view_all_bug_page.php',0);
exit;
}
switch ($f_action) {
case 'CLOSE' :
# Use a simple confirmation page, if close or delete...
$t_finished = 1 ;
$t_question_title = $s_close_bugs_conf_msg ;
$t_button_title = $s_close_group_bugs_button ;
break ;
case 'DELETE' :
$t_finished = 1;
$t_question_title = $s_delete_bugs_conf_msg ;
$t_button_title = $s_delete_group_bugs_button ;
break ;
# ...else we define the variables used in the form
case 'MOVE' :
$t_question_title = $s_move_bugs_conf_msg ;
$t_button_title = $s_move_group_bugs_button ;
$t_form='f_project_id' ;
break ;
case 'ASSIGN' :
$t_question_title = $s_assign_bugs_conf_msg ;
$t_button_title = $s_assign_group_bugs_button ;
$t_form = 'f_assign' ;
break ;
case 'RESOLVE' :
$t_question_title = $s_resolve_bugs_conf_msg ;
$t_button_title = $s_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 = $s_priority_bugs_conf_msg ;
$t_button_title = $s_priority_group_bugs_button ;
$t_request = 'priority';
$t_form = 'f_priority' ;
break ;
case 'UP_STATUS' :
$t_question_title = $s_status_bugs_conf_msg ;
$t_button_title = $s_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 ($t_finished != 1) {
?>
<p>
<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) {
print "<input type=\"hidden\" name=\"f_bug_arr[]\" value=\"$value\">"; }
?>
<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, asks for a simple confirmation to close or delete
else {
?>
<p>
<div align="center">
<?php print_hr( $g_hr_size, $g_hr_width ) ?>
<?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)
print "<input type=\"hidden\" name=\"f_bug_arr[]\" value=\"$value\">";
?>
<input type="submit" value="<?php echo $t_button_title ?>">
</form>
<?php print_hr( $g_hr_size, $g_hr_width ) ?>
</div>
<?php
}
?>
<?php print_page_bot1( __FILE__ ) ?>