gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/www/include html.php,1.36,1.37


From: tperdue
Subject: [Gforge-commits] gforge/www/include html.php,1.36,1.37
Date: Thu, 07 Oct 2004 14:30:53 -0500

Update of /cvsroot/gforge/gforge/www/include
In directory db.perdue.net:/home/tperdue/share/dev.gforge.org/www/include

Modified Files:
        html.php 
Log Message:
Massive tracker reorg and cleanup

Index: html.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/include/html.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- html.php    6 Oct 2004 16:27:12 -0000       1.36
+++ html.php    7 Oct 2004 19:30:49 -0000       1.37
@@ -372,8 +372,7 @@
 }
 
 /**
- * html_build_multiple_select_box_from_arrays() - Takes a result set, with the 
first column being the "id" or value
- * and the second column being the text you want displayed.
+ * html_build_multiple_select_box_from_arrays() - Takes two arrays and builds 
a multi-select box
  *
  * @param              array   id of the field  
  * @param              array   Text to be displayed
@@ -382,11 +381,11 @@
  * @param              int             The size of this box
  * @param              bool    Whether or not to show the '100 row'
  */
-function 
html_build_multiple_select_box_from_arrays($result,$name,$fieldid,$field,$select,$checked_array,$size='8',$show_100=true)
 {
+function 
html_build_multiple_select_box_from_arrays($ids,$texts,$name,$checked_array,$size='8',$show_100=true)
 {
        global $Language;
        $checked_count=count($checked_array);
        $return .='
-               <select name="'.$select.'" multiple="multiple" 
size="'.$size.'">';
+               <select name="'.$name.'" multiple="multiple" size="'.$size.'">';
        if ($show_100) {
                /*
                        Put in the default NONE box
@@ -401,21 +400,21 @@
                $return .= 
'>'.$Language->getText('include_html','none').'</option>';
        }
 
-       $rows=count($result);
+       $rows=count($ids);
        for ($i=0; $i<$rows; $i++) {
-               if (( $result[$i] != '100') || ($result[$i] == '100' && 
!$show_100)) {
+               if (( $ids[$i] != '100') || ($ids[$i] == '100' && !$show_100)) {
                        $return .=' 
-                               <option value="'.$fieldid[$i].'"';
+                               <option value="'.$ids[$i].'"';
                        /*
                                Determine if it's checked
                        */
-                       $val=$result[$i];
+                       $val=$ids[$i];
                        for ($j=0; $j<$checked_count; $j++) {
                                if ($val == $checked_array[$j]) {
                                        $return .= ' selected="selected"';
                                }
                        }
-                       $return .= '>'.$result[$i].'-'. $name[$i].': '. 
$fieldid[$i].'-'.$field[$i].' </option>';
+                       $return .= '>'.$ids[$i].'-'.$texts[$i].' </option>';
                }
        }
        $return .= '





reply via email to

[Prev in Thread] Current Thread [Next in Thread]