本文整理汇总了PHP中Field::getFieldValue_Filter方法的典型用法代码示例。如果您正苦于以下问题:PHP Field::getFieldValue_Filter方法的具体用法?PHP Field::getFieldValue_Filter怎么用?PHP Field::getFieldValue_Filter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Field
的用法示例。
在下文中一共展示了Field::getFieldValue_Filter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: play_filter
/**
* 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';
$lang =& DoceboLanguage::createInstance('field');
if ($value === FALSE) {
echo "Trallallero: " . Field::getFieldValue_Filter($_POST, $id_field, $field_prefix, 'false');
if (Field::getFieldValue_Filter($_POST, $id_field, $field_prefix, 'false') == 'false') {
$value = 'false';
} else {
$value = 'true';
}
}
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_Upload::getFieldType() . "'");
list($label) = sql_fetch_row($re_field);
}
return Form::getRadioSet($label, Field::getFieldId_Filter($id_field, $field_prefix), Field::getFieldName_Filter($id_field, $field_prefix), array($lang->def('_YES') => 'true', $lang->def('_NO') => 'false'), $value, $other_after, $other_before);
}
示例2: play_filter
/**
* 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_Freetext::getFieldType() . "'");
list($label) = sql_fetch_row($re_field);
}
return Form::getTextfield($label, Field::getFieldId_Filter($id_field, $field_prefix), Field::getFieldName_Filter($id_field, $field_prefix), 255, $value, $label, $other_after, $other_before);
/* in filter all in one line
return Form::getSimpleTextarea($label,
Field::getFieldId_Filter($id_field, $field_prefix),
Field::getFieldName_Filter($id_field, $field_prefix),
$value );*/
}
示例3: play_filter
/**
* 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) if is an array the elements are
* the options of dropdown, if is numeric is trated
* as a field id and used to retrieve options
* if not given the elements will be retrieved from
* custom field $id_field
*
* @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, '0');
}
$option = array();
$option[0] = Lang::t('_DROPDOWN_NOVALUE', 'field');
if (is_array($field_special)) {
foreach ($field_special as $key_opt => $label_opt) {
$option[$key_opt] = $label_opt;
}
} else {
$re_field_element = sql_query("\r\n\t\t\tSELECT id_common_son, translation\r\n\t\t\tFROM " . Field_Dropdown::_getElementTable() . "\r\n\t\t\tWHERE idField = '" . (int) ($field_special !== FALSE ? $field_special : $id_field) . "'\r\n\t\t\t\tAND lang_code = '" . getLanguage() . "'\r\n\t\t\tORDER BY sequence");
while (list($id_common_son, $element) = sql_fetch_row($re_field_element)) {
$option[$id_common_son] = $element;
}
}
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 . "'\r\n\t\t\t\tAND type_field = '" . Field_Dropdown::getFieldType() . "'");
list($label) = sql_fetch_row($re_field);
}
return Form::getDropdown($label, Field::getFieldId_Filter($id_field, $field_prefix), Field::getFieldName_Filter($id_field, $field_prefix), $option, $value, $other_after, $other_before);
}