cvs: qaweb /build_tracker filter.php

From: Date: Wed, 04 Oct 2000 20:07:14 +0000
Subject: cvs: qaweb /build_tracker filter.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-1426@lists.php.net to get a copy of this message
zak Wed Oct 4 13:07:14 2000 EDT Modified files: /qaweb/build_tracker filter.php Log: Simplified form Index: qaweb/build_tracker/filter.php diff -u qaweb/build_tracker/filter.php:1.3 qaweb/build_tracker/filter.php:1.4 --- qaweb/build_tracker/filter.php:1.3 Tue Oct 3 12:21:56 2000 +++ qaweb/build_tracker/filter.php Wed Oct 4 13:07:14 2000 @@ -56,6 +56,52 @@ return "\n$output"; } +function file2cb_column ($field_name) +{ + $field[$field_name] = $GLOBALS[field][$field_name]; + + if(is_array ($field[$field_name])) + foreach ($field[$field_name] as $item) + $checked[$item] = ' checked'; + + $modules = file ($field_name.'_list.txt'); + $no_of_cells = count ($modules); + $row_length = ceil ($no_of_cells/3); + + + + for ($n=0, $col = 0, $row = 0; $n < $no_of_cells; ++$n) + { + $temp = trim ($modules[$n]) + or $temp = '&nbsp'; + + if (! $temp || $temp[0] == '#') continue; # ignore blanks and comments + + list ($value, $option) = explode ('::', $temp); + + $option + or $option = $value; + + $line = '<td><font face="Tahoma, Arial, Helvetica, sans-serif" SIZE="2">'; + $line .= sprintf ('<input type="checkbox" name="field[%s][]" value="%s" %s /> %s ', $field_name, $value, $checked[$value], $option); + $line .= '</font></td>'; + + $cell[$col][$row] = $line; + + ++$row; + if ($row == $row_length) + { + $row = 0; + ++$col; + } + } + + for ($row = 0; $cell[0][$row]; ++$row) + $out .= '<tr bgcolor="#F0F0F0">'.$cell[0][$row].$cell[1][$row].$cell[2][$row].'</tr>'; + + return '<table border="1" width="100%">'.$out.'</table>'; +} + # generate_row # Author: j.a.greant 2000/08/23 zak@php.net @@ -125,38 +171,10 @@ <table width="100%"> <?= generate_row (array ('&nbsp;<b>3.1</b> How did you get your copy of PHP?', file2select ('php_source'))) ?> <?= generate_row (array ('&nbsp;<b>3.2</b> What kind of operating system did you install PHP on?', file2select ('os_families'))) ?> - <?= generate_row (array ('&nbsp;<b>3.3</b> What Server API was PHP built with?', file2select ('sapi'))) ?> - <tr bgcolor="#F0F0F0"><td colspan="2"><font face="Tahoma, Arial, Helvetica, sans-serif">&nbsp;<b>3.4</b> What extensions was PHP built with? ( Check all that apply )</td></tr> - <tr bgcolor="#F0F0F0"><td colspan="2"><font face="Tahoma, Arial, Helvetica, sans-serif"> - <table border="1" width="100%"> - <? - $modules = file ('module_list.txt'); - $no_of_cells = count ($modules); - $row_length = ceil ($no_of_cells/3); - - for ($n=0, $col = 0, $row = 0; $n < $no_of_cells; ++$n) - { - $module = trim ($modules[$n]) - or $module = '&nbsp'; - $line = '<td><font face="Tahoma, Arial, Helvetica, sans-serif" SIZE="2">'; - $line .= sprintf ('<input type="checkbox" name="field[module][%s]" %s/> %s ', $module, ($field[module][$module] ? ' checked' : ''), $module); - $line .= '</font></td>'; - - $cell[$col][$row] = $line; - - ++$row; - if ($row == $row_length) - { - $row = 0; - ++$col; - } - } - - for ($row = 0; $cell[0][$row]; ++$row) - print '<tr bgcolor="#F0F0F0">'.$cell[0][$row].$cell[1][$row].$cell[2][$row].'</tr>'; - ?> - </table> - </td></tr> + <tr bgcolor="#F0F0F0"><td colspan="2"><font face="Tahoma, Arial, Helvetica, sans-serif">&nbsp;<b>3.3</b> What web server(s) do you use with this build of PHP?</font></td></tr> + <tr bgcolor="#F0F0F0"><td colspan="2"><?= file2cb_column ('server') ?></td></tr> + <?= generate_row (array ('&nbsp;<b>3.4 (a)</b> If you compiled PHP, please enter the configure line here:', '<textarea name="field[configure]" rows="2" cols="30">'.$field[configure].'</textarea>')) ?> + <?= generate_row (array ('&nbsp;<b>3.4 (b)</b> If you installed a binary, please enter the output of phpinfo() here:', '<textarea name="field[configure]" rows="2" cols="30">'.$field[phpinfo].'</textarea>')) ?> </table> </td>

« previous php.qa (#1426) next »