r740: Product explainer is in place
[bugdar.git] / explain.php
1 <?php
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 \*=====================================================================*/
12
13 $fetchtemplates = array(
14 'explain_product'
15 );
16
17 define('SVN', '$Id$');
18
19 $focus['showreport'] = 'focus';
20
21 require_once('./global.php');
22
23 // ###################################################################
24
25 if (empty($_REQUEST['do']))
26 {
27 $_REQUEST['do'] = 'products';
28 }
29
30 // ###################################################################
31
32 if ($_REQUEST['do'] == 'products')
33 {
34 foreach ($bugsys->datastore['product'] AS $product)
35 {
36 if ($product['componentmother'])
37 {
38 $components["$product[componentmother]"]["$product[productid]"] = $product;
39 }
40 else
41 {
42 $products["$product[productid]"] = $product;
43 }
44 }
45
46 foreach ($bugsys->datastore['version'] AS $version)
47 {
48 $versions["$version[productid]"]["$version[versionid]"] = $version;
49 }
50
51 // global versions
52 foreach ($versions['0'] AS $version)
53 {
54 $left = $version['version'];
55 $right = null;
56 eval('$globalversions .= "' . $template->fetch('explain_row') . '";');
57 }
58
59 foreach ($products AS $product)
60 {
61 $left = $product['title'];
62 $right = $product['description'];
63 $trextra = ' style="background-color: ' . $stylevar['alt_colour'] . '"';
64 eval('$productlist .= "' . $template->fetch('explain_row') . '";');
65
66 foreach ($components["$product[productid]"] AS $component)
67 {
68 $left = '&nbsp; &rsaquo; &nbsp; ' . $component['title'];
69 $right = $component['description'];
70 $trextra = '';
71 eval('$productlist .= "' . $template->fetch('explain_row') . '";');
72 }
73 }
74
75 eval('$template->flush("' . $template->fetch('explain_product') . '");');
76 }
77
78 /*=====================================================================*\
79 || ###################################################################
80 || # $HeadURL$
81 || # $Id$
82 || ###################################################################
83 \*=====================================================================*/
84 ?>