Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Class Reference

class html

Helixhtml
Hide Inherited MembersUser Interface
Description
No description.
 
Constants
No constants.
 
Properties
 
Methods
public staticcalendar ( name , month , day , year )[ html ]
Parameters
requiredname
optionalmonth
optionalday
optionalyear
Code
218      static function calendar($__name,$__month=null,$__day=null,$__year=null)
219      {
220          $ddl_month = new select($__name . "[month]");
221          $ddl_month->addat(0,0,"-- MONTH --");
222          $ddl_month->value = $__month;
223         
224          $ddl_day = new select($__name . "[day]");
225          $ddl_day->addat(0,0,"-- DAY --");
226          $ddl_day->value = $__day;
227         
228          $ddl_year = new select($__name . "[year]");
229          $ddl_year->addat(0,0,"-- YEAR --");
230          $ddl_year->value = $__year;
231      }
public staticchecklist ( classname , name )[ html ]
Parameters
requiredclassname
requiredname
Code
203      static function checklist($classname, $name)
204      {
205          $checklist = new checklist($name);
206          if (!is_null($classname))
207          {
208          eval("\$ids = $classname::get_ids();");
209          foreach ($ids as $id) {
210              eval("\$o = new $classname($id);");
211              $checked=false;
212              $checklist->add($o->id,"<strong>$o->name</strong>&nbsp;&nbsp;$o->description",$checked);
213          }
214          }
215      return $checklist;
216      }
public staticdateddl ( name , selected_value , attr )[ html ]
Parameters
requiredname
optionalselected_value
optionalattr
Code
233      static function dateddl($name, $selected_value = null, $attr = null)
234      {
235          self::ddl("month", $name . "->month");
236          echo "<select></select>";
237          echo "<select></select>";
238      }
public staticddl ( classname , name , value , text_property , value_property , lookups [Array] , where_clause )[ html ]
Parameters
requiredclassname
requiredname
optionalvalue
optionaltext_property
optionalvalue_property
optionallookups [Array]
optionalwhere_clause
Code
181      static function ddl($classname, $name, $value=null, $text_property=null, $value_property=null, $lookups=array(), $where_clause=null)
182      {
183          $select = new select($name);
184          if (is_null($classname))
185          {
186              return $select;
187          }
188          eval("return \$object_list = {$classname}::get_objects(null,\$lookups,\$where_clause);");
189          foreach ($object_list as $o)
190          {
191          $selected=false;
192          $t = is_null($text_property) ? ntes($o->__toString()) : $o->{$text_property};
193          $v = is_null($value_property) ? $o->id : $o->{$value_property};
194          $select->add($v,$t);
195      }
196      if (!is_null($value))
197      {
198          $select->value = $value;
199      }
200      return $select;
201      }
public staticmulti_select ( name , arr , arr_selected , size [3] )[ html ]
Parameters
requiredname
requiredarr
requiredarr_selected
optionalsize [3]
Code
160  static function multi_select($name,$arr,$arr_selected,$size=3)
161  {
162      echo "<select name=\"".$name."[]\" multiple=\"multiple\" size=\"$size\">\n";
163      foreach ($arr as $key=>$val)
164      {
165          $selected = false;
166          for ($i = 0; $i <= count($arr_selected); $i++)
167          {
168              if ($arr_selected[$i]==$val)
169              {
170                  echo "<option value=\"$val\" SELECTED>$key</option>\n";
171              }
172              else
173              {
174                  echo "<option value=\"$val\">$key</option>\n";
175              }
176          }
177      }
178      echo "</select>";
179  }
public staticsearch_footer ( )[ html ]
public staticsearch_header ( class , vars , frm_style , txt_style , btn_style , btn_text )[ html ]
Parameters
requiredclass
optionalvars
optionalfrm_style
optionaltxt_style
optionalbtn_style
optionalbtn_text
Code
004  static function search_header($class,$vars=null,$frm_style=null,$txt_style=null,$btn_style=null,$btn_text=null)
005  {
006      global $sess;
007      // GET THE SEARCH KEYWORD AND LIST OFFSET FROM THE REQUEST VARS
008      $keyword = keyval($_REQUEST,"keyword");
009     
010      if (keyval($_REQUEST,"f") != "search" && !array_key_exists("offset",$_REQUEST))
011      {
012          search($class);
013      }
014     
015      $action = is_null($vars) ? "?" . $_SERVER["QUERY_STRING"] : $sess->url($vars);
016      $frm_style = is_null($frm_style) ? null : " style=\"$frm_style\"";
017      $txt_style = is_null($txt_style) ? null : " style=\"$txt_style\"";
018      $btn_style = is_null($btn_style) ? null : " style=\"$btn_style\"";
019      $btn_text = is_null($btn_text) ? "Search" : $btn_text;
020     
021      // DISPLAY THE SEARCH TEXT BOX AND BUTTON
022      $header  = "<form id=\"search_header\" action=\"" . $action . "\" method=\"post\"" . $frm_style . ">";
023      $header .= "<input type=\"hidden\" name=\"f\" value=\"search\" />";
024      $header .= "<input type=\"hidden\" name=\"offset\" value=\"0\" />";
025      $header .= "<input type=\"hidden\" name=\"class\" value=\"$class\" />";
026      if (is_array($vars))
027      {
028          foreach (explode("&",$vars) as $var)
029          {
030              list($k,$v) = explode("=",$var);
031              $input = new input($k,$v,"hidden");
032              $header .= $input->render();
033          }
034      }
035      $header .= "<input id=\"keyword\" type=\"text\" name=\"keyword\" value=\"" . ent($keyword) . "\"" . $txt_style . " />";
036      $header .= "<button id=\"btn_search_header_submit\" type=\"submit\"" . $btn_style . ">$btn_text</button>";
037      $header .= "</form>";
038      echo $header;
039  }
 
Accessors
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads