Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Function Reference

build_controls ( )

Description
No description.
 
Parameters
No parameters for this function
 
Code
507  function build_controls()
508  {
509      $controls = array();
510      foreach ($_REQUEST as $k=>$v)
511      {
512          $controls[$k] = new forminput();
513          $controls[$k]->name = $k;
514          if (is_array($v))
515          {
516              if (count($v)==3 && array_key_exists("year",$v) && array_key_exists("month",$v) && array_key_exists("day",$v))
517              {
518                  $date = new dateselect("date",$v);
519                  $controls[$k]->value = $date->value;
520              }
521              if (count($v)==3 && array_key_exists("hour",$v) && array_key_exists("minute",$v) && array_key_exists("ampm",$v))
522              {
523                  $time = new timeselect("time",$v);
524                  $controls[$k]->value = $time->value;
525              }
526          }
527          else
528          {
529              $controls[$k]->value = (strlen($v) == 0) ? null : $v;
530          }
531      }
532      return $controls;
533  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads