Exemple #1
0
 /**
  * display the field for filters
  *
  * @param	string	$field_id		the id of the field used for id/name
  * @param 	mixed 	$value 			(optional) the value to put in the field
  *										retrieved from $_POST if not given
  * @param	string	$label			(optional) the label to use if not given the
  *									value will be retrieved from custom field
  *									$id_field
  * @param	string	$field_prefix 	(optional) the prefix to give to
  *									the field id/name
  * @param 	string 	$other_after 	optional html code added after the input element
  * @param	string 	$other_before 	optional html code added before the label element
  * @param   mixed 	$field_special	(optional) not used
  *
  * @return string 	of field xhtml code
  *
  * @access public
  */
 function play_filter($id_field, $value = FALSE, $label = FALSE, $field_prefix = FALSE, $other_after = '', $other_before = '', $field_special = FALSE)
 {
     require_once _base_ . '/lib/lib.form.php';
     if ($value === FALSE) {
         $value = Field::getFieldValue_Filter($_POST, $id_field, $field_prefix, '');
     }
     if ($label === FALSE) {
         $re_field = sql_query("\r\n\t\t\tSELECT translation\r\n\t\t\tFROM " . Field::_getMainTable() . "\r\n\t\t\tWHERE id_common = '" . (int) $id_field . "' AND type_field = '" . Field_Date::getFieldType() . "'");
         list($label) = sql_fetch_row($re_field);
     }
     return Form::getDatefield($label, Field::getFieldId_Filter($id_field, $field_prefix), Field::getFieldName_Filter($id_field, $field_prefix), $value, false, false, $label, $other_after, $other_before);
 }