]>
src.bluestatic.org Git - bugdar.git/blob - explain.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
22 $fetchtemplates = array(
28 define('SVN', '$Id$');
30 $focus['showreport
'] = 'focus
';
32 require_once('./global.php
');
34 // ###################################################################
36 if (empty($_REQUEST['do']))
38 $_REQUEST['do'] = 'products
';
41 // ###################################################################
43 if ($_REQUEST['do'] == 'products
')
45 foreach ($bugsys->datastore['product
'] AS $product)
47 if ($product['componentmother
'])
49 $components["$product[componentmother]"]["$product[productid]"] = $product;
53 $products["$product[productid]"] = $product;
57 foreach ($bugsys->datastore['version
'] AS $version)
59 $versions["$version[productid]"]["$version[versionid]"] = $version;
63 foreach ($versions['0'] AS $version)
65 $left = $version['version
'];
67 eval('$globalversions .= "' . $template->fetch('explain_row') . '";');
70 foreach ($products AS $product)
72 $left = $product['title
'];
73 $right = $product['description
'];
74 $trextra = ' style
="background-color: ' . $stylevar['alt_colour'] . '"';
75 eval('$productlist .= "' . $template->fetch('explain_row') . '";');
77 foreach ($components["$product[productid]"] AS $component)
79 $left = ' 
; &rsaquo
;  
; ' . $component['title
'];
80 $right = $component['description
'];
82 eval('$productlist .= "' . $template->fetch('explain_row') . '";');
86 eval('$template->flush("' . $template->fetch('explain_product') . '");');
89 // ###################################################################
91 if ($_REQUEST['do'] == 'autoactions
')
93 $fields_fetch = $bugsys->db->query("
94 SELECT bugfield.*, permission.mask
95 FROM " . TABLE_PREFIX . "bugfield AS bugfield
96 LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
97 ON (bugfield.fieldid = permission.fieldid)
98 WHERE (permission.mask = 2 OR permission.mask = 1)
99 AND permission.usergroupid = {$bugsys->userinfo['usergroupid']}"
101 while ($field = $bugsys->db->fetch_array($fields_fetch))
103 $fields["$field[fieldid]"] = $field;
106 foreach ($bugsys->datastore['autoaction
'] AS $autoaction)
108 $autoaction['fieldchanges
'] = unserialize($autoaction['fieldchanges
']);
110 $left = $autoaction['name
'];
111 $right = $autoaction['description
'];
112 $trextra = ' class="listinghead"';
114 eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
116 if ($autoaction['comment
'])
118 $left = $lang->string('Add Comment
');
119 $right = $autoaction['comment
'];
120 $trextra = ' style
="background-color: ' . $stylevar['alt_colour'] . '"';
122 eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
127 foreach ($autoaction['fieldchanges
']['builtin
'] AS $name => $value)
130 $right = $bugsys->datastore["$left"]["$value"]["$left"];
131 eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
134 foreach ($autoaction['fieldchanges
']['custom
'] AS $id => $value)
141 $left = $fields["$id"]['name
'] . ' ' . sprintf($lang->string('(Custom
#%1$d, type: %2$s)'), $id, $fields["$id"]['type']);
143 eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
147 eval('$template->flush("' . $template->fetch('explain_autoaction') . '");');
150 /*=====================================================================*\
151 || ###################################################################
154 || ###################################################################
155 \*=====================================================================*/