2 /*=====================================================================*\
3 || ################################################################### ||
4 || # Bugdar [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
7 || # This file may not be reproduced in any way without permission. # ||
8 || # --------------------------------------------------------------- # ||
9 || # User License Agreement at http://www.iris-studios.com/license/ # ||
10 || ################################################################### ||
11 \*=====================================================================*/
13 $fetchtemplates = array(
19 define('SVN', '$Id$');
21 $focus['showreport'] = 'focus';
23 require_once('./global.php');
25 // ###################################################################
27 if (empty($_REQUEST['do']))
29 $_REQUEST['do'] = 'products';
32 // ###################################################################
34 if ($_REQUEST['do'] == 'products')
36 foreach ($bugsys->datastore
['product'] AS $product)
38 if ($product['componentmother'])
40 $components["$product[componentmother]"]["$product[productid]"] = $product;
44 $products["$product[productid]"] = $product;
48 foreach ($bugsys->datastore
['version'] AS $version)
50 $versions["$version[productid]"]["$version[versionid]"] = $version;
54 foreach ($versions['0'] AS $version)
56 $left = $version['version'];
58 eval('$globalversions .= "' . $template->fetch('explain_row') . '";');
61 foreach ($products AS $product)
63 $left = $product['title'];
64 $right = $product['description'];
65 $trextra = ' style="background-color: ' . $stylevar['alt_colour'] . '"';
66 eval('$productlist .= "' . $template->fetch('explain_row') . '";');
68 foreach ($components["$product[productid]"] AS $component)
70 $left = ' › ' . $component['title'];
71 $right = $component['description'];
73 eval('$productlist .= "' . $template->fetch('explain_row') . '";');
77 eval('$template->flush("' . $template->fetch('explain_product') . '");');
80 // ###################################################################
82 if ($_REQUEST['do'] == 'autoactions')
84 $fields_fetch = $bugsys->db
->query("
85 SELECT bugfield.*, permission.mask
86 FROM " . TABLE_PREFIX
. "bugfield AS bugfield
87 LEFT JOIN " . TABLE_PREFIX
. "bugfieldpermission AS permission
88 ON (bugfield.fieldid = permission.fieldid)
89 WHERE (permission.mask = 2 OR permission.mask = 1)
90 AND permission.usergroupid = {$bugsys->userinfo['usergroupid']}"
92 while ($field = $bugsys->db
->fetch_array($fields_fetch))
94 $fields["$field[fieldid]"] = $field;
97 foreach ($bugsys->datastore
['autoaction'] AS $autoaction)
99 $autoaction['fieldchanges'] = unserialize($autoaction['fieldchanges']);
101 $left = $autoaction['name'];
102 $right = $autoaction['description'];
103 $trextra = ' class="listinghead"';
105 eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
107 if ($autoaction['comment'])
109 $left = $lang->string('Add Comment');
110 $right = $autoaction['comment'];
111 $trextra = ' style="background-color: ' . $stylevar['alt_colour'] . '"';
113 eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
118 foreach ($autoaction['fieldchanges']['builtin'] AS $name => $value)
121 $right = $bugsys->datastore
["$left"]["$value"]["$left"];
122 eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
125 foreach ($autoaction['fieldchanges']['custom'] AS $id => $value)
132 $left = $fields["$id"]['name'] . ' ' . sprintf($lang->string('(Custom #%1$d, type: %2$s)'), $id, $fields["$id"]['type']);
134 eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
138 eval('$template->flush("' . $template->fetch('explain_autoaction') . '");');
141 /*=====================================================================*\
142 || ###################################################################
145 || ###################################################################
146 \*=====================================================================*/