size=$size; $this->form='TextForm'; $this->only_positive=$only_positive; $this->min_num=$min_num; $this->max_num=$max_num; } function check($value) { $this->value=Utils::form_text($value); settype($value, "integer"); if($this->only_positive==true && $value<0) { $value=0; } if($this->min_num<>0 && $value<$this->min_num) { $value=$this->min_num; } if($this->max_num<>0 && $value>$this->max_num) { $value=$this->max_num; } return $value; } function get_type_sql() { return 'INT('.$this->size.') NOT NULL'; } /** * This function is used for show the value on a human format */ public function show_formatted($value) { return $value; } function get_parameters_default() { return array($this->name_component, '', 0); } } ?>