/[openfoncier]/trunk/obj/om_formulaire.class.php
ViewVC logotype

Diff of /trunk/obj/om_formulaire.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1195 by fmichon, Wed Jan 9 15:44:25 2013 UTC revision 1260 by nhaye, Thu Feb 14 13:48:01 2013 UTC
# Line 136  class om_formulaire extends formulaire { Line 136  class om_formulaire extends formulaire {
136          //          //
137          echo "</ul>\n";          echo "</ul>\n";
138      }      }
139    
140        function tableau($champ,$validation,$DEBUG = false) {
141            echo "<table>";
142                echo "<tr>";
143                foreach ($this->select[$champ]["column_header"] as $value) {
144                    echo "<th>";
145                    echo $value;
146                    echo "</th>";
147                }
148                echo "</tr>";
149                
150                $k=0;
151                $keys = array_keys($this->select[$champ]["values"]);
152                $values = array_values($this->select[$champ]["values"]);
153                for ($i=0; $i<count($this->select[$champ]["row_header"]); $i++) {
154                    echo "<tr>";
155                    echo "<th>";
156                    echo $this->select[$champ]["row_header"][$i];
157                    echo "</th>";
158    
159                    for ($j=0; $j<count($this->select[$champ]["column_header"])-1; $j++) {
160                        echo "<td>";
161                        echo "<input value=\"{$values[$k]}\" name=\"{$keys[$k]}\"/>";
162                        echo "</td>";
163                        $k++;
164                    }
165                    echo "</tr>";
166                }
167            echo "</table>";
168        }
169  }  }
170    
171  ?>  ?>

Legend:
Removed from v.1195  
changed lines
  Added in v.1260

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26