]>
src.bluestatic.org Git - bugdar.git/blob - productselect.php
2 /*=====================================================================*
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Blue Static
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 define('SVN', '$Id$');
24 require_once('./global.php
');
26 // ###################################################################
28 if ($_REQUEST['do'] == 'pcvselect
')
33 // ###################################################################
35 if ($_REQUEST['do'] == 'pcvajax
')
37 $bugsys->input_clean('product
', TYPE_UINT);
38 $bugsys->input_clean('component
', TYPE_UINT);
39 $bugsys->input_clean('version
', TYPE_UINT);
43 if ($bugsys->in['piece
'] == 'product
')
45 if ($bugsys->in['product
'] == 0)
48 $label = _('-- None
--');
49 $selected = (!$bugsys->in['component
']);
50 eval('$bits .= "' . $template->fetch('selectoption') . '";');
53 foreach ($bugsys->datastore['product
'] AS $value => $prod)
55 if ($prod['componentmother
'] == 0)
57 $label = $prod['title
'];
58 $selected = ($value == $bugsys->in['product
']);
59 eval('$bits .= "' . $template->fetch('selectoption') . '";');
63 else if ($bugsys->in['piece
'] == 'component
' AND $bugsys->in['product
'] != 0)
66 $label = _('-- None
--');
67 $selected = (!$bugsys->in['component
']);
68 eval('$bits .= "' . $template->fetch('selectoption') . '";');
70 foreach ($bugsys->datastore['product
'] AS $value => $prod)
72 if ($prod['componentmother
'] == $bugsys->in['product
'])
74 $label = $prod['title
'];
75 $selected = ($value == $bugsys->in['component
']);
76 eval('$bits .= "' . $template->fetch('selectoption') . '";');
80 else if ($bugsys->in['piece
'] == 'version
' AND $bugsys->in['product
'] != 0)
82 foreach ($bugsys->datastore['version
'] AS $value => $vers)
84 if ($vers['productid
'] == $bugsys->in['product
'] OR $vers['productid
'] == $bugsys->in['component
'] OR intval($vers['productid
']) == 0)
86 $label = $vers['version
'];
87 $selected = ($value == $bugsys->in['version
']);
88 eval('$bits .= "' . $template->fetch('selectoption') . '";');
96 /*=====================================================================*
97 || ###################################################################
100 || ###################################################################
101 \*=====================================================================*/