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

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

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