--- libHtmlForm-1.0.3.php.asc	Fri Feb  1 16:15:08 2002
+++ ../libHtmlForm-1.2.0.php.asc	Mon Apr  1 22:30:15 2002
@@ -2,13 +2,17 @@
 
 /** 
     HTML Form function library for PHP
-    Copyright 2000 Jeremy Brand  <jeremy@nirvani.net>
+    Copyright 2000, 2001, 2002 Jeremy Brand <jeremy@nirvani.net>
     http://www.jeremybrand.com/Jeremy/Brand/Jeremy_Brand.html
 
     libHtmlForm for PHP.
-    Release 1.0.3
+    Release 1.2.0-test1
     http://www.nirvani.net/software/
 
+    "It is a continuous aim of this software to provide compatibility 
+    with even the oldest web browsers up through the most current."
+               -- Jeremy Brand <jeremy@nirvani.net>, February 2002.
+
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License, Version 2 as 
     published by the Free Software Foundation.
@@ -23,13 +27,28 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
     ChangeLog:
-    1.0.1 -> Brian Wood <brian@earth.care2.com> change in html_input_text().
-    1.0.2 -> Paul Barton <paul@moonkhan.org> support for multiple selects.
+
+    1.2.0 -> Jeremy Brand <jeremy@nirvani.net>
+             New functions: 
+               html_input_checkbox_table(),
+               html_input_radio_table(),
+             These 2 new functions are nice alternatives for multiple or single
+             <select>s especially, when on Microsoft Windows (TM), multiple <select>s
+             require the use of the [CRTL] key plus mouse clicks and who knows 
+             off-hand {not me} what key+mouse combination is used on a Macintosh (TM) 
+             or other random environments when using multiple <select>s.
+
+             Updated a few comments.
+
     1.0.3 -> Jeremy Brand <jeremy@nirvani.net> change in license, multiple
                selects deemed stable.
+    1.0.2 -> Paul Barton <paul@moonkhan.org> support for multiple selects.
+    1.0.1 -> Brian Wood <brian@earth.care2.com> change in html_input_text().
+    1.0.0 -> Jeremy Brand <jeremy@nirvani.net> Original release.
              
     
     Prototypes:
+    ('+' indicates new functions)
     
     html_textarea($name, $value='', $cols=40, $rows=5)
     html_input_hidden($name, $value)
@@ -41,37 +60,43 @@
     html_input_reset($value=' CANCEL ')
     html_select($name, $value_description_array, $value_selected='', 
           $size=1, $multiple=FALSE)
+  + html_input_radio_table($name, $value_description_array, 
+          $value_selected, $columns=3, $table_border=0,
+          $cellspacing=0, $cellpadding=2, $other_table_string='')
+  + html_input_checkbox_table($name, $value_description_array, 
+          $value_selected_array, $columns=3, $table_border=0,
+          $cellspacing=0, $cellpadding=2, $other_table_string='')
 
     See each individual function for full usage!!!
-    
 
 **/
 
-      function html_textarea($name, $value='', $cols=40, $rows=5)
+      function html_textarea($name, $value='', $cols=40, $rows=5)/*{{{*/
       {
         /**  wrap="virtual" is not part of any W3C HTML standard; at least 
          **  up to 4.01, but nearly any decent browser knows it, and if 
-         **  it doesn't oh well.   It is too nice to not include here. **/
+         **  it doesn't oh well.   It is too nice to not include here and does
+         **  not seem to break anywhere. **/
         $buf = '<textarea wrap="virtual" name="' .htmlspecialchars($name). '" rows="' .$rows. '" cols="' .$cols. '">'
              . htmlspecialchars($value)
              . '</textarea>';
         return $buf;
-      }
+      }/*}}}*/
 
-      function html_input_hidden($name, $value)
+      function html_input_hidden($name, $value)/*{{{*/
       {
         $buf = '<input type="hidden" name="' .htmlspecialchars($name). '" value="' .htmlspecialchars($value). '">';
         return $buf;
-      }
+      }/*}}}*/
 
-      function html_input_radio($name, $value, $checked=FALSE)
+      function html_input_radio($name, $value, $checked=FALSE)/*{{{*/
       {
         /**  The following allows for making sure that no two radio buttons
          **  of the same name can ever be checked.  Once one is checked, no
          **  subsequent ones will be allowed to be checked.  I used md5 just because it
-         **  produces a unique hash where all characters are valid for a variable
-         **  name in PHP and which is then made into the static variable
-         **  which is where the state is saved.  
+         **  produces a unique hash where all characters are valid for this specific 
+         **  variable name in PHP and which is then made into a global variable
+         **  which is where the state gets saved.  
          **  ChangeLog.  
          **  Had to use 'global' instead of static.  Static was erroring out 
          **  for some reason.  **/
@@ -87,18 +112,18 @@
         $buf = '<input type="radio" name="' .htmlspecialchars($name). '" value="' .htmlspecialchars($value). '"' .$tmp. '>';
         unset($tmp); unset($state);
         return $buf;
-      }
+      }/*}}}*/
 
-      function html_input_checkbox($name, $value, $checked=FALSE)
+      function html_input_checkbox($name, $value, $checked=FALSE)/*{{{*/
       {
         $tmp = '';
         if ($checked)
           $tmp = ' checked';
         $buf = '<input type="checkbox" name="' .htmlspecialchars($name). '" value="' .htmlspecialchars($value). '"' .$tmp. '>';
         return $buf;
-      }
+      }/*}}}*/
 
-      function html_input_text($name, $value='', $size=20, $maxlength=100)
+      function html_input_text($name, $value='', $size=20, $maxlength=100)/*{{{*/
       {
         if ($size > $maxlength)
           ($maxlength <=0) ? $maxlength = $size : $size = $maxlength;
@@ -106,9 +131,9 @@
           $value = substr($value, 0, $maxlength);
         $buf = '<input type="text" name="' .htmlspecialchars($name). '" value="' .htmlspecialchars($value). '" size="' .$size. '" maxlength="' .$maxlength. '">';
         return $buf;
-      }
+      }/*}}}*/
 
-      function html_input_password($name, $value='', $size=20, $maxlength=100)
+      function html_input_password($name, $value='', $size=20, $maxlength=100)/*{{{*/
       {
         if ($size > $maxlength)
           $size = $maxlength;
@@ -116,21 +141,21 @@
           $value = substr($value, 0, $maxlength);
         $buf = '<input type="password" name="' .htmlspecialchars($name). '" value="' .htmlspecialchars($value). '" size="' .$size. '" maxlength="' .$maxlength. '">';
         return $buf;
-      }
+      }/*}}}*/
 
-      function html_input_submit($name='button', $value=' GO ')
+      function html_input_submit($name='button', $value=' GO ')/*{{{*/
       {
         $buf = '<input type="submit" name="' .htmlspecialchars($name). '" value="' .htmlspecialchars($value). '">';
         return $buf;
-      }
+      }/*}}}*/
 
-      function html_input_reset($value=' CANCEL ')
+      function html_input_reset($value=' CANCEL ')/*{{{*/
       {
         $buf = '<input type="reset" value="' .htmlspecialchars($value). '">';
         return $buf;
-      }
+      }/*}}}*/
 
-      function html_select($name, $value_description_array, $value_selected='', $size=1, $multiple=FALSE)
+      function html_select($name, $value_description_array, $value_selected='', $size=1, $multiple=FALSE)/*{{{*/
       {
         $num_elements = count($value_description_array);
         if ($size > $num_elements)
@@ -160,7 +185,93 @@
         unset($tmp); unset($orig_error); unset($mul);
         $buf .= '</select>';
         return $buf;
-      }
+      }/*}}}*/
 
+      function html_input_radio_table($name, $value_description_array, $value_selected, $columns=3, $table_border=0, $cellspacing=0, $cellpadding=2, $other_table_string='')/*{{{*/
+      {
+        $num_records = count($value_description_array);
+        if (!$num_records)
+          return '';
+      
+        $height = ceil($num_records / $columns);
+
+        if (strlen($other_table_string))
+          $other_table_string = ' '.trim($other_table_string);
+      
+        $buf = '<table cellspacing="'.$cellspacing.'" cellpadding="'.$cellpadding.'" border="'.$table_border.'"'.$other_table_string.'>'."\n";
+      
+        for ($y=1; $y<=$height; $y++)
+        {
+          $buf .= '<tr>';
+          for ($x=1; $x<=$columns; $x++)
+          {
+            $count++;
+      
+            list($key, $val) = each($value_description_array); 
+       
+            if (strlen($key)) 
+            {
+              $er = error_reporting(0);
+      
+              $checked = FALSE;
+              if ($value_selected == $key)
+                $checked = TRUE;
+      
+
+              $buf .= '<td valign="top">'.html_input_radio($name, $key, $checked).'&nbsp;</td><td valign="top">'.$val.'&nbsp;&nbsp;&nbsp;</td>';
+      
+              error_reporting($er);
+            }
+            else
+              $buf .= '<td colspan="2">&nbsp;</td>';
+          }
+          $buf .= '</tr>'."\n";
+        }
+        $buf .= '</table>';
+        return $buf;
+      }/*}}}*/
+
+      function html_input_checkbox_table($name, $value_description_array, $value_selected_array, $columns=3, $table_border=0, $cellspacing=0, $cellpadding=2, $other_table_string='')/*{{{*/
+      {
+        $num_records = count($value_description_array);
+        if (!$num_records)
+          return '';
+      
+        $height = ceil($num_records / $columns);
+      
+        if (strlen($other_table_string))
+          $other_table_string = ' '.trim($other_table_string);
+      
+        $buf = '<table cellspacing="'.$cellspacing.'" cellpadding="'.$cellpadding.'" border="'.$table_border.'"'.$other_table_string.'>'."\n";
+      
+        for ($y=1; $y<=$height; $y++)
+        {
+          $buf .= '<tr>';
+          for ($x=1; $x<=$columns; $x++)
+          {
+            $count++;
+      
+            list($key, $val) = each($value_description_array); 
+       
+            if (strlen($key)) 
+            {
+              $er = error_reporting(0);
+      
+              $checked = FALSE;
+              if (in_array($key, $value_selected_array))
+                $checked = TRUE;
+      
+              $buf .= '<td valign="top">'.html_input_checkbox($name, $key, $checked).'&nbsp;</td><td valign="top">'.$val.'&nbsp;&nbsp;&nbsp;</td>';
+      
+              error_reporting($er);
+            }
+            else
+              $buf .= '<td colspan="2">&nbsp;</td>';
+          }
+          $buf .= '</tr>'."\n";
+        }
+        $buf .= '</table>';
+        return $buf;
+      }/*}}}*/
 
 ?>
