Formulare maj obarveny tabulky
authorThomas Mudrunka <tomas@mudrunka.cz>
Mon, 16 Apr 2012 07:54:43 +0000 (09:54 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Mon, 16 Apr 2012 07:54:43 +0000 (09:54 +0200)
index.php

index 06dd1bf69c31a4f809082503b56846378541a39d..6296552329f21e584583511ee65a902658dcf5a6 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -496,8 +496,10 @@ EOF;
                        'model' => array('model_descript')
                );
                $html = '<table>';
+               $even=false;
                foreach($columns as $column)    {
-                       $html.='<tr><td>'.T($class).':<b>'.T($column['Field']).'</b>:&nbsp;</td><td>';
+                       $html.='<tr class="'. ($even ? 'tr_even' : 'tr_odd') .'"><td>'.T($class).':<b>'.T($column['Field']).'</b>:&nbsp;</td><td>';
+                       $even = !$even;
                        $name="values[$class][".$column['Field'].'][]';
                        $val = $update && isset($current[$column['Field']]) ? $current[$column['Field']] : false;
                        switch(true) {
This page took 0.15245 seconds and 4 git commands to generate.