Example #1
0
 /**
  * public static function getFilefield( $label_name, $id, $name, $value = '', $alt_name = '', $other_after = '', $other_before = '' )
  *
  * @param string $label_name 	text contained into the label
  * @param string $id 			the id of the element
  * @param string $name 			the name of the element
  * @param string $value 		optional default value for the input field
  * @param string $alt_name 		the alt name for the field
  * @param string $other_after 	optional html code added after the input element
  * @param string $other_before 	optional html code added before the label element
  * @return string with the html code for the input type="text" element
  */
 public static function getFilefield($label_name, $id, $name, $value = '', $alt_name = '', $other_after = '', $other_before = '', $other_afterbefore = '')
 {
     if ($alt_name == '') {
         $alt_name = strip_tags($label_name);
     }
     $p_size = intval(ini_get('post_max_size'));
     $u_size = intval(ini_get('upload_max_filesize'));
     $max_kb = $p_size < $u_size ? $p_size : $u_size;
     $other_after = ' (Max. ' . $max_kb . ' Mb) ' . $other_after;
     return Form::getLineFilefield('form_line_l', 'floating', $label_name, 'fileupload', $id, $name, $value, $alt_name, '', $other_after, $other_before, $other_afterbefore);
 }