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

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.44      cdn        10: <li>Search by Bug Number<br>
1.45      cdn        11: <form action="http://mozdev.org/bugs/show_bug.cgi" method="get"><p><input type="submit" value="Find">
                     12: <input size="6" name="id"></p></form>
1.1       cdn        13: </li>
1.31      cdn        14: </ul><?php $doNotCapitalise = 1; // $project='mozdev';
                     15: 
1.40      cdn        16: //show_source(BUGS);
1.33      cdn        17: 
1.40      cdn        18: //$project = 'optimoz'; 
1.18      cdn        19: 
1.46      cdn        20: //$project = 'www';
1.42      cdn        21: 
1.40      cdn        22: //$hide_Latest_bugs_filed = 1;
1.36      cdn        23: //$hiding_BZ_h4 = 1;
1.33      cdn        24: //$bug_component = array('gesture', 'radial');
1.34      cdn        25: //$comp_desc = array('Mouse Gestures', 'Radial Context');
1.18      cdn        26: 
1.47    ! cdn        27: include(MEMBERS);
        !            28: 
1.18      cdn        29: ?>
1.1       cdn        30: 
                     31: <?php
                     32: 
1.47    ! cdn        33: // $Id: bug.html,v 1.46 2003/03/05 14:14:34 cdn Exp $
1.27      cdn        34: // $cvsId: bug.html,v 1.23 2003/03/03 10:29:59 cdn Exp svc$
1.1       cdn        35: 
                     36:   require(PHP_INC.CONNECT);
                     37: 
1.27      cdn        38:   $product   = ucwords($project);
1.21      cdn        39: 
                     40:   if ( $doNotCapitalise )
                     41:     $product = $project;
                     42:   
1.27      cdn        43:   if ( ! $hiding_BZ_h4 )
                     44:     print '<h4 id="BZ-h4">Latest bugs filed for ' . $product . "</h4>\n\n";
1.21      cdn        45: 
1.30      cdn        46:   $Latest_bugs_filed = 'Latest bugs filed on ';
                     47:   
                     48:   if ( $hide_Latest_bugs_filed )
                     49:     unset($Latest_bugs_filed);
                     50:     
1.1       cdn        51:   $id             = "bug_id";
                     52:   $desc           = "short_desc";
                     53:   $res            = "resolution";
                     54:   $table          = "bugs";
                     55:   $target         = "product";
1.39      cdn        56:   $stat           = "bug_status";
1.1       cdn        57: 
1.21      cdn        58:   if (!isset($amount))
1.27      cdn        59:     $amount       = 10;
1.21      cdn        60: 
                     61:   $bug_url        = "http://" . HOST . "/bugs/show_bug.cgi?id=";
                     62: 
                     63:   $component      = 'component';
1.1       cdn        64: 
1.21      cdn        65:   if ( !isset($bug_component) )
                     66:     $bug_component[0] = '';
1.22      cdn        67: 
                     68:   $k = count($bug_component);
                     69: 
                     70:  for ($j=0; $j < $k; ++$j)
1.21      cdn        71:  {
1.38      cdn        72:   $query          = " SELECT $id, $desc, $component, $res, $stat
1.1       cdn        73:                       FROM $table
1.6       cdn        74:                       WHERE $target='$product'
1.21      cdn        75:                       AND $component LIKE '%" . $bug_component[$j] . "%'
1.16      cdn        76:                       ORDER BY $id DESC
1.6       cdn        77:                       LIMIT $amount
1.1       cdn        78:                     ";
                     79: 
                     80:   $my_result      = mysql_query($query, $connect);
                     81: 
                     82:   $e              = mysql_error();
                     83:   if($e)
                     84:     print  "ERROR:latest_bugs: $e"; 
                     85: 
                     86:   $row            = mysql_num_rows($my_result);
                     87: 
1.27      cdn        88:   if ( $k > 1 || $hiding_BZ_h4 )
1.22      cdn        89:     if ( empty($comp_desc[$j]) )
1.30      cdn        90:       print '<h4 class="BZ-component-h4">' . $Latest_bugs_filed . mysql_result($my_result, 0, $component) . "</h4>\n";
1.22      cdn        91:     else
1.30      cdn        92:       print '<h4 class="BZ-component-h4">' . $Latest_bugs_filed . $comp_desc[$j] . "</h4>\n";
1.20      cdn        93: 
                     94:   print '<table class="BZ-table" cellspacing="2" cellpadding="2" border="0">' . "\n";
1.6       cdn        95: 
1.1       cdn        96:   print "<thead>\n<tr>\n";
1.20      cdn        97:   print '<th class="BZ-th-bug">Bug #</th>';
                     98:   print '<th class="BZ-th-desc">Description</th>' . "\n\n";
1.1       cdn        99:   print "</tr>\n</thead>\n";
1.2       cdn       100: 
1.43      cdn       101:   print "<tbody>\n";
1.1       cdn       102:   for($i=0; $i<$row; $i++) {
                    103:     $printstrike = false;
                    104:     print "<tr>\n<td>\n";
                    105:     $bug_id =  mysql_result($my_result, $i, $id);
1.38      cdn       106:     $status =  mysql_result($my_result, $i, $stat);
1.1       cdn       107:     $strike =  mysql_result($my_result, $i, $res);
1.41      cdn       108:     if ($status=="CLOSED" || $strike=="DUPLICATE" || $strike == "FIXED" || $strike == "INVALID")
1.1       cdn       109:       $printstrike = true;
                    110:     if ($printstrike)
1.43      cdn       111:       print '<span class="BZ-strike">';
1.1       cdn       112:     print "<a href=\"$bug_url$bug_id\">";
                    113:     print $bug_id;
                    114:     print "</a>";
                    115:     if ($printstrike)
1.43      cdn       116:       print "</span>";
1.3       cdn       117:     print "\n</td>\n<td>\n";
1.1       cdn       118:     print htmlspecialchars (  mysql_result($my_result, $i, $desc),ENT_QUOTES);
                    119:     print "</td>\n</tr>\n";
                    120:   }
1.44      cdn       121: 
                    122:   if ( ! $row )
                    123:     print "<tr><td></td><td></td></tr>\n";
                    124: 
1.43      cdn       125:   print "</tbody>\n";
1.20      cdn       126:   print "</table>\n";
1.21      cdn       127:  }
1.1       cdn       128: 
1.22      cdn       129: ?>

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