Annotation of cdn/www/bug.html, revision 1.22

1.1       cdn         1: <h5 class="page-header">Bugs</h5>
                      2: 
                      3: <ul>
                      4: <li>Enter a 
                      5: <a href="http://www.mozdev.org/bugs/enter_bug.cgi?product=cdn">new bug</a>
                      6:  for cdn
                      7: </li>
1.6       cdn         8: <li>View <a href="http://mozdev.org/bugs/buglist.cgi?email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;product=cdn&amp;short_desc=&amp;short_desc_type=allwordssubstr&amp;long_desc=&amp;long_desc_type=allwordssubstr&amp;bug_file_loc=&amp;bug_file_loc_type=allwordssubstr&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=&amp;cmdtype=doit&amp;order=Bug+Number">all bugs</a> 
                      9: <li>See all <a href="http://mozdev.org/bugs/buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;product=cdn&amp;short_desc=&amp;short_desc_type=allwordssubstr&amp;long_desc=&amp;long_desc_type=allwordssubstr&amp;bug_file_loc=&amp;bug_file_loc_type=allwordssubstr&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=&amp;cmdtype=doit&amp;order=Bug+Number">open bugs</a></li>
1.1       cdn        10: <li>Search by Bug Number<br><br>
1.6       cdn        11: <form action="http://mozdev.org/bugs/show_bug.cgi" method="get"><input type="submit" value="Find">
                     12: <input size="6" name="id"></form>
1.1       cdn        13: </li>
1.18      cdn        14: </ul><?php $doNotCapitalise = 01; $project='mozdev'; $project = 'optimoz'; 
                     15: 
1.20      cdn        16: $bug_component = array('gesture', 'radial');
1.22    ! cdn        17: $comp_desc = array('Mouse Gestures', 'Radial Context');
1.18      cdn        18: 
                     19: ?>
1.1       cdn        20: 
                     21: <?php
                     22: 
1.22    ! cdn        23: // $Id: bug.html,v 1.21 2003/03/02 18:49:09 cdn Exp $
1.1       cdn        24: 
                     25:   require(PHP_INC.CONNECT);
                     26: 
1.21      cdn        27:   $product        = ucwords($project);
                     28: 
                     29:   if ( $doNotCapitalise )
                     30:     $product = $project;
                     31:   
                     32:   print '<h4 id="BZ-h4">Latest bugs filed for ' . $product . "</h4>\n\n";
                     33: 
1.1       cdn        34:   $id             = "bug_id";
                     35:   $desc           = "short_desc";
                     36:   $res            = "resolution";
                     37:   $table          = "bugs";
                     38:   $target         = "product";
                     39: 
1.21      cdn        40:   if (!isset($amount))
                     41:     $amount         = 10;
                     42: 
                     43:   $bug_url        = "http://" . HOST . "/bugs/show_bug.cgi?id=";
                     44: 
                     45:   $component      = 'component';
1.1       cdn        46: 
1.21      cdn        47:   if ( !isset($bug_component) )
                     48:     $bug_component[0] = '';
1.22    ! cdn        49: 
        !            50:   $k = count($bug_component);
        !            51: 
        !            52:  for ($j=0; $j < $k; ++$j)
1.21      cdn        53:  {
1.6       cdn        54:   $query          = " SELECT $id, $desc, $component, $res
1.1       cdn        55:                       FROM $table
1.6       cdn        56:                       WHERE $target='$product'
1.21      cdn        57:                       AND $component LIKE '%" . $bug_component[$j] . "%'
1.16      cdn        58:                       ORDER BY $id DESC
1.6       cdn        59:                       LIMIT $amount
1.1       cdn        60:                     ";
                     61: 
                     62:   $my_result      = mysql_query($query, $connect);
                     63: 
                     64:   $e              = mysql_error();
                     65:   if($e)
                     66:     print  "ERROR:latest_bugs: $e"; 
                     67: 
                     68:   $row            = mysql_num_rows($my_result);
                     69: 
1.22    ! cdn        70:   if ( $k > 1 )
        !            71:     if ( empty($comp_desc[$j]) )
        !            72:       print '<h4 class="BZ-component-h4">' . mysql_result($my_result, 0, $component) . "</h4>\n";
        !            73:     else
        !            74:       print '<h4 class="BZ-component-h4">' . $comp_desc[$j] . "</h4>\n";
1.20      cdn        75: 
                     76:   print '<table class="BZ-table" cellspacing="2" cellpadding="2" border="0">' . "\n";
1.6       cdn        77: 
1.1       cdn        78:   print "<thead>\n<tr>\n";
1.20      cdn        79:   print '<th class="BZ-th-bug">Bug #</th>';
                     80: //  print '<th bgcolor="#FF9900">Component</th>' . "\n\n";
                     81:   print '<th class="BZ-th-desc">Description</th>' . "\n\n";
1.1       cdn        82:   print "</tr>\n</thead>\n";
1.2       cdn        83: 
1.1       cdn        84:   print "<tbody>\n";
                     85:   for($i=0; $i<$row; $i++) {
                     86:     $printstrike = false;
                     87:     print "<tr>\n<td>\n";
                     88:     $bug_id =  mysql_result($my_result, $i, $id);
                     89:     $strike =  mysql_result($my_result, $i, $res);
                     90:     if ($strike == "FIXED" || $strike == "INVALID" || $strike=="DUPLICATE")
                     91:       $printstrike = true;
                     92:     if ($printstrike)
                     93:       print "<strike>";
                     94:     print "<a href=\"$bug_url$bug_id\">";
                     95:     print $bug_id;
                     96:     print "</a>";
                     97:     if ($printstrike)
                     98:       print "</strike>";
1.3       cdn        99:     print "\n</td>\n<td>\n";
1.5       cdn       100: //    print htmlspecialchars (  mysql_result($my_result, $i, $component),ENT_QUOTES);
1.20      cdn       101: //    print mysql_result($my_result, $i, $component);
                    102: //    print "\n</td>\n<td>\n";
1.1       cdn       103:     print htmlspecialchars (  mysql_result($my_result, $i, $desc),ENT_QUOTES);
                    104:     print "</td>\n</tr>\n";
                    105:   }
                    106:   print "</tbody>\n";
1.20      cdn       107:   print "</table>\n";
1.21      cdn       108:  }
1.1       cdn       109: 
1.22    ! cdn       110: ?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>