fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17636]


From: nelson . guerra
Subject: [Fmsystem-commits] [17636]
Date: Thu, 18 Jan 2018 18:52:24 -0500 (EST)

Revision: 17636
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17636
Author:   nelson224
Date:     2018-01-18 18:52:24 -0500 (Thu, 18 Jan 2018)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/admin/inc/class.html.inc.php

Modified: branches/dev-syncromind/admin/inc/class.html.inc.php
===================================================================
--- branches/dev-syncromind/admin/inc/class.html.inc.php        2018-01-18 
23:52:07 UTC (rev 17635)
+++ branches/dev-syncromind/admin/inc/class.html.inc.php        2018-01-18 
23:52:24 UTC (rev 17636)
@@ -62,10 +62,14 @@
                        {
                                $frow = $rows[0];
                                $cnam = $this->arr_keys($frow);
-                               while(list(,$fn)=each($cnam))
-                               {
+                               //while(list(,$fn)=each($cnam))
+                                if (is_array($cnam))
+                                {
+                                    foreach($cnam as $key => $fn)
+                                    {
                                        $head[$fn] = array();
-                               }
+                                    }
+                                }
                        }
 
                        if ( gettype($head['_cols'])=="NULL")
@@ -109,20 +113,28 @@
                                {
                                        $gkey = '';
                                        reset($groupby);
-                                       while (list($gname,)=each($groupby))
-                                       {
+                                       //while (list($gname,)=each($groupby))
+                                        if (is_array($groupby))
+                                        {
+                                            foreach($groupby as $gname => 
$value)
+                                            {
                                                $gkey .= 
$rows[$rno][$gname]['value'];
-                                       }
+                                            }
+                                        }
                                        $rows[$rno]['#gkey'] = $gkey;
                                }
 
                                reset($printlist);
-                               while(list($pc,$pcol)=each($printlist))
-                               {
+                               //while(list($pc,$pcol)=each($printlist))
+                                if (is_array($printlist))
+                                {
+                                    foreach($printlist as $pc => $pcol)
+                                    {
                                        $cname = $pcol['#name'];
                                        $cparms = 
$this->arr_merge($head[$cname],$pcol,array('bgcolor'=>'FFFFFF'),$rows[$rno][$cname]);
                                        $rows[$rno][$cname] = $cparms;
-                               }
+                                    }
+                                }
                        }
 
                        // Grouping Suppression
@@ -185,8 +197,11 @@
        //                      $html .= "\t<tr $rp> <comment $gkey>\n";
                                $html .= "\t<tr $rp> \n";
                                reset($printlist);
-                               while(list($pc,$pcol)=each($printlist))
-                               {
+                               //while(list($pc,$pcol)=each($printlist))
+                                if (is_array($printlist))
+                                {
+                                    foreach($printlist as $pc => $pcol)
+                                    {
                                        $cname = $pcol['#name'];
 
                                        $cp = $this->makeparms($row[$cname]);
@@ -198,7 +213,8 @@
                                        {
                                                $html .= "\t</tr>\n"; // \t<tr 
$rp>\n
                                        }
-                               }
+                                    }
+                                }
                        }
                        $html .= "</table>\n";
                        $html .= "</form>";
@@ -214,8 +230,11 @@
                                return '';
                        }
                        reset($parmlist);
-                       while(list($pname,$pvalue)=each($parmlist))
-                       {
+                       //while(list($pname,$pvalue)=each($parmlist))
+                        if (is_array($parmlist))
+                        {
+                            foreach($parmlist as $pname => $pvalue)
+                            {
                                switch($pname)
                                {
                                        case 'value':
@@ -235,7 +254,8 @@
                                                        $comma = ', ';
                                                }
                                }
-                       }
+                            }
+                        }
                        return $html;
                }
 
@@ -257,10 +277,14 @@
                        $cnam = $this->arr_keys($frow);
                        if ($head == '')
                        {
-                               while(list(,$fn)=each($cnam))
-                               {
+                               //while(list(,$fn)=each($cnam))
+                                if (is_array($cnam))
+                                {
+                                    foreach($cnam as $key => $fn)
+                                    {
                                        $head[$fn] = array();
-                               }
+                                    }
+                                }
                        }
 
                        if (isset($_cols))
@@ -390,8 +414,11 @@
                        }
                        $html .= ">\n";
 
-                       while (list(,$itm)=each($opts))
-                       {
+                       //while (list(,$itm)=each($opts))
+                        if (is_array($opts))
+                        {
+                            foreach($opts as $key => $itm)
+                            {
                                $html .= '<option value="'.$itm.'" ';
                                if ($itm == $sel)
                                {
@@ -398,7 +425,8 @@
                                        $html .= 'selected ';
                                }
                                $html .= '>'.$itm."</option>\n";
-                       }
+                            }
+                        }
                        $html .= "</select>\n";
                        return $html;
                }
@@ -460,8 +488,11 @@
                        // Build Title Row
                        $table = array();
                        reset($printlist);
-                       while(list($pc,$pcol)=each($printlist))
-                       {
+                       //while(list($pc,$pcol)=each($printlist))
+                        if (is_array($printlist))
+                        {
+                            foreach($printlist as $pc => $pcol)
+                            {
                                $cname = $pcol['#name'];
                                $values = $head[$cname];
                                $title = $values['#title'];
@@ -472,7 +503,8 @@
                                $cparms = 
$this->arr_merge($values['#parms_hdr'],$pcol);
                                $cparms['value']=$title;
                                $table[0][$pc] = $cparms;
-                       }
+                            }
+                        }
                        return $table;
                }
 
@@ -488,8 +520,11 @@
                        $row = $table[0];
                        reset($row);
                        $intr = true;
-                       while(list(,$col)=each($row))
-                       {
+                       //while(list(,$col)=each($row))
+                        if (is_array($row))
+                        {
+                            foreach($row as $key => $col)
+                            {
                                if (!$intr)
                                {
                                        $html .= "\t<tr $rp>\n";
@@ -503,7 +538,8 @@
                                        $html .= "\t</tr>\n";
                                        $intr = false;
                                }
-                       }
+                            }
+                        }
                        return $html;
                }
 
@@ -511,13 +547,17 @@
                {
                        $out = array();
                        $test = array($a1,$a2,$a3,$a4,$a5,$a6,$a7,$a8);
-                       while(list(,$val) = each($test))
-                       {
+                       //while(list(,$val) = each($test))
+                        if (is_array($test))
+                        {
+                            foreach($test as $key => $val)
+                            {
                                if(is_array($val))
                                {
                                        $out += $val;
                                }
-                       }
+                            }
+                        }
                        return $out;
                }
 
@@ -524,10 +564,14 @@
                function arr_keys($fields,$array=True)
                {
                        @reset($fields);
-                       while(list($key,$val) = @each($fields))
-                       {
+                       //while(list($key,$val) = @each($fields))
+                        if (is_array($fields))
+                        {
+                            foreach($fields as $key => $val)
+                            {
                                $fkeys .= $key . ',';
-                       }
+                            }
+                        }
                        $fkeys = substr($fkeys,0,-1);
                        if($array)
                        {




reply via email to

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