cvs: php-bugs-web / bugstats.php

From: Date: Thu, 20 May 2004 21:31:34 +0000
Subject: cvs: php-bugs-web / bugstats.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-24678@lists.php.net to get a copy of this message
pollita Thu May 20 17:31:34 2004 EDT Modified files: /php-bugs-web bugstats.php Log: Throw in an extra header row every 40 lines to ease readability. http://cvs.php.net/diff.php/php-bugs-web/bugstats.php?r1=1.23&r2=1.24&ty=u Index: php-bugs-web/bugstats.php diff -u php-bugs-web/bugstats.php:1.23 php-bugs-web/bugstats.php:1.24 --- php-bugs-web/bugstats.php:1.23 Mon Feb 9 11:28:21 2004 +++ php-bugs-web/bugstats.php Thu May 20 17:31:34 2004 @@ -95,19 +95,27 @@ return '<A href="./bugstats.php?'.$ver.'sort_by='.urlencode($type).'&amp;rev='.$reve.'">'.ucfirst($type).'</a>'; } -echo "<tr bgcolor=#aabbcc><th align=right>Total bug entries in system:</th><td>$total</td>"; -echo "<th>",sort_url('closed'),"</th>"; -echo "<th>",sort_url('open'),"</th>"; -echo "<th>",sort_url('critical'),"</th>"; -echo "<th>",sort_url('verified'),"</th>"; -echo "<th>",sort_url('analyzed'),"</th>"; -echo "<th>",sort_url('assigned'),"</th>"; -echo "<th>",sort_url('suspended'),"</th>"; -echo "<th>",sort_url('duplicate'),"</th>"; -echo "<th>",sort_url('feedback'),"</th>"; -echo "<th nowrap>",sort_url('no feedback'),"</th>"; -echo "<th>",sort_url('bogus'),"</th>"; -echo "</tr>\n"; +function display_stat_header($total, $grandtotal = true) { + if ($grandtotal) { + echo "<tr bgcolor=#aabbcc><th align=right>Total bug entries in system:</th><td>$total</td>"; + } else { + echo "<tr bgcolor=#aabbcc><th align=right>&nbsp;</th><td>&nbsp;</td>"; + } + echo "<th>",sort_url('closed'),"</th>"; + echo "<th>",sort_url('open'),"</th>"; + echo "<th>",sort_url('critical'),"</th>"; + echo "<th>",sort_url('verified'),"</th>"; + echo "<th>",sort_url('analyzed'),"</th>"; + echo "<th>",sort_url('assigned'),"</th>"; + echo "<th>",sort_url('suspended'),"</th>"; + echo "<th>",sort_url('duplicate'),"</th>"; + echo "<th>",sort_url('feedback'),"</th>"; + echo "<th nowrap>",sort_url('no feedback'),"</th>"; + echo "<th>",sort_url('bogus'),"</th>"; + echo "</tr>\n"; +} + +display_stat_header($total, true); echo "<tr><th align=right bgcolor=#aabbcc>All:</th>", "<td align=center bgcolor=#ccddee>$total</td>", @@ -124,6 +132,7 @@ "<td align=center bgcolor=#ccddee>".bugstats('bogus', 'all')."&nbsp;</td>", "</tr>\n"; +$stat_row = 1; foreach ($bug_type[$sort_by] as $type => $value) { if(($bug_type['open'][$type] > 0 || $bug_type['critical'][$type] > 0 || @@ -134,6 +143,9 @@ $bug_type['assigned'][$type] > 0 || $bug_type['feedback'][$type] > 0 ) && $type != 'all') { + /* Output a new header row every 40 lines */ + if (($stat_row++ % 40) == 0) display_stat_header($total, false); + echo "<tr><th align=right bgcolor=#aabbcc>$type:</th>", "<td align=center bgcolor=#ccddee>".$bug_type['all'][$type]."</td>", "<td align=center bgcolor=#ddeeff>".bugstats('closed', $type)."&nbsp;</td>",

« previous php.mirrors (#24678) next »