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

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.18      cdn        17: 
                     18: ?>
1.1       cdn        19: 
                     20: <?php
                     21: 
1.18      cdn        22: // $Id: bug.html,v 1.17 2003/03/02 15:03:55 cdn Exp $
1.1       cdn        23: 
                     24:   require(PHP_INC.CONNECT);
                     25: 
1.21    ! cdn        26:   $product        = ucwords($project);
        !            27: 
        !            28:   if ( $doNotCapitalise )
        !            29:     $product = $project;
        !            30:   
        !            31:   print '<h4 id="BZ-h4">Latest bugs filed for ' . $product . "</h4>\n\n";
        !            32: 
1.1       cdn        33:   $id             = "bug_id";
                     34:   $desc           = "short_desc";
                     35:   $res            = "resolution";
                     36:   $table          = "bugs";
                     37:   $target         = "product";
                     38: 
1.21    ! cdn        39:   if (!isset($amount))
        !            40:     $amount         = 10;
        !            41: 
        !            42:   $bug_url        = "http://" . HOST . "/bugs/show_bug.cgi?id=";
        !            43: 
        !            44:   $component      = 'component';
1.1       cdn        45: 
1.21    ! cdn        46:   if ( !isset($bug_component) )
        !            47:     $bug_component[0] = '';
        !            48:         
        !            49:  for ($j=0; $j < count($bug_component); ++$j)
        !            50:  {
1.6       cdn        51:   $query          = " SELECT $id, $desc, $component, $res
1.1       cdn        52:                       FROM $table
1.6       cdn        53:                       WHERE $target='$product'
1.21    ! cdn        54:                       AND $component LIKE '%" . $bug_component[$j] . "%'
1.16      cdn        55:                       ORDER BY $id DESC
1.6       cdn        56:                       LIMIT $amount
1.1       cdn        57:                     ";
                     58: 
                     59:   $my_result      = mysql_query($query, $connect);
                     60: 
                     61:   $e              = mysql_error();
                     62:   if($e)
                     63:     print  "ERROR:latest_bugs: $e"; 
                     64: 
                     65:   $row            = mysql_num_rows($my_result);
                     66: 
1.20      cdn        67:   print '<h4 class="BZ-component-h4">' . mysql_result($my_result, 0, $component) . "</h4>\n";
                     68: 
                     69:   print '<table class="BZ-table" cellspacing="2" cellpadding="2" border="0">' . "\n";
1.6       cdn        70: 
1.1       cdn        71:   print "<thead>\n<tr>\n";
1.20      cdn        72:   print '<th class="BZ-th-bug">Bug #</th>';
                     73: //  print '<th bgcolor="#FF9900">Component</th>' . "\n\n";
                     74:   print '<th class="BZ-th-desc">Description</th>' . "\n\n";
1.1       cdn        75:   print "</tr>\n</thead>\n";
1.2       cdn        76: 
1.1       cdn        77:   print "<tbody>\n";
                     78:   for($i=0; $i<$row; $i++) {
                     79:     $printstrike = false;
                     80:     print "<tr>\n<td>\n";
                     81:     $bug_id =  mysql_result($my_result, $i, $id);
                     82:     $strike =  mysql_result($my_result, $i, $res);
                     83:     if ($strike == "FIXED" || $strike == "INVALID" || $strike=="DUPLICATE")
                     84:       $printstrike = true;
                     85:     if ($printstrike)
                     86:       print "<strike>";
                     87:     print "<a href=\"$bug_url$bug_id\">";
                     88:     print $bug_id;
                     89:     print "</a>";
                     90:     if ($printstrike)
                     91:       print "</strike>";
1.3       cdn        92:     print "\n</td>\n<td>\n";
1.5       cdn        93: //    print htmlspecialchars (  mysql_result($my_result, $i, $component),ENT_QUOTES);
1.20      cdn        94: //    print mysql_result($my_result, $i, $component);
                     95: //    print "\n</td>\n<td>\n";
1.1       cdn        96:     print htmlspecialchars (  mysql_result($my_result, $i, $desc),ENT_QUOTES);
                     97:     print "</td>\n</tr>\n";
                     98:   }
                     99:   print "</tbody>\n";
1.20      cdn       100:   print "</table>\n";
1.21    ! cdn       101:  }
1.1       cdn       102: 
1.20      cdn       103: ?>

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