• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP filter_get_plugin_filters函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中filter_get_plugin_filters函数的典型用法代码示例。如果您正苦于以下问题:PHP filter_get_plugin_filters函数的具体用法?PHP filter_get_plugin_filters怎么用?PHP filter_get_plugin_filters使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了filter_get_plugin_filters函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: header

        header('Content-Type: text/html; charset=utf-8');
    }
}
$f_filter_target = gpc_get_string('filter_target');
$t_function_name = 'print_filter_' . utf8_substr($f_filter_target, 0, -7);
if (function_exists($t_function_name)) {
    return_dynamic_filters_prepend_headers();
    call_user_func($t_function_name);
} else {
    if ('custom_field' == utf8_substr($f_filter_target, 0, 12)) {
        # custom function
        $t_custom_id = utf8_substr($f_filter_target, 13, -7);
        return_dynamic_filters_prepend_headers();
        print_filter_custom_field($t_custom_id);
    } else {
        $t_plugin_filters = filter_get_plugin_filters();
        $t_found = false;
        foreach ($t_plugin_filters as $t_field_name => $t_filter_object) {
            if ($t_field_name . '_filter' == $f_filter_target) {
                return_dynamic_filters_prepend_headers();
                print_filter_plugin_field($t_field_name, $t_filter_object);
                $t_found = true;
                break;
            }
        }
        if (!$t_found) {
            # error - no function to populate the target (e.g., print_filter_foo)
            error_parameters($f_filter_target);
            trigger_error(ERROR_FILTER_NOT_FOUND, ERROR);
        }
    }
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:return_dynamic_filters.php


示例2: filter_draw_selection_area2


//.........这里部分代码省略.........
			</td>
			<td class="small-caption" id="os_filter_target">
				<?php 
            print_multivalue_field(FILTER_PROPERTY_OS, $t_filter[FILTER_PROPERTY_OS]);
            ?>
			</td>
			<td class="small-caption" id="os_build_filter_target">
				<?php 
            print_multivalue_field(FILTER_PROPERTY_OS_BUILD, $t_filter[FILTER_PROPERTY_OS_BUILD]);
            ?>
			</td>
			<?php 
        } else {
            ?>
				<td colspan="3">&#160;</td>
			<?php 
        }
        ?>

			<td class="small-caption" id="tag_string_filter_target" colspan="5">
				<?php 
        $t_tag_string = $t_filter[FILTER_PROPERTY_TAG_STRING];
        if ($t_filter[FILTER_PROPERTY_TAG_SELECT] != 0 && tag_exists($t_filter[FILTER_PROPERTY_TAG_SELECT])) {
            $t_tag_string .= is_blank($t_tag_string) ? '' : config_get('tag_separator');
            $t_tag_string .= tag_get_field($t_filter[FILTER_PROPERTY_TAG_SELECT], 'name');
        }
        echo string_html_entities($t_tag_string);
        echo '<input type="hidden" name="', FILTER_PROPERTY_TAG_STRING, '" value="', string_attribute($t_tag_string), '" />';
        ?>
			</td>
		</tr>
		<?php 
        # get plugin filters
        $t_plugin_filters = filter_get_plugin_filters();
        $t_plugin_filter_links = array();
        $t_plugin_filter_fields = array();
        $t_column_count_by_row = array();
        $t_row = 0;
        foreach ($t_plugin_filters as $t_field_name => $t_filter_object) {
            # be sure the colspan is an integer
            $t_colspan = (int) $t_filter_object->colspan;
            # prevent silliness.
            if ($t_colspan < 0) {
                $t_colspan = abs($t_colspan);
            } else {
                if ($t_colspan > $t_filter_cols) {
                    $t_colspan = $t_filter_cols;
                } else {
                    if ($t_colspan == 0) {
                        $t_colspan = 1;
                    }
                }
            }
            # the row may already have elements in it. find out.
            $t_columns_available = $t_filter_cols - $t_column_count_by_row[$t_row];
            if ($t_columns_available == 0) {
                $t_row++;
            }
            # see if there is room in the current row
            if ($t_columns_available >= $t_colspan) {
                $t_assigned_row = $t_row;
                $t_column_count_by_row[$t_row] += $t_colspan;
            } else {
                $t_is_assigned = false;
                # find a row with space
                foreach ($t_column_count_by_row as $t_row_num => $t_col_count) {
开发者ID:vipjaven,项目名称:mantisbt,代码行数:67,代码来源:filter_api.php


示例3: filter_draw_selection_area2


//.........这里部分代码省略.........
			</td>
			<td class="small-caption" valign="top" id="os_filter_target">
				<?php 
            print_multivalue_field(FILTER_PROPERTY_OS, $t_filter[FILTER_PROPERTY_OS]);
            ?>
			</td>
			<td class="small-caption" valign="top" id="os_build_filter_target">
				<?php 
            print_multivalue_field(FILTER_PROPERTY_OS_BUILD, $t_filter[FILTER_PROPERTY_OS_BUILD]);
            ?>
			</td>
			<?php 
        } else {
            ?>
				<td colspan="3">&#160;</td>
			<?php 
        }
        ?>

			<td class="small-caption" valign="top" id="tag_string_filter_target" colspan="5">
				<?php 
        $t_tag_string = $t_filter[FILTER_PROPERTY_TAG_STRING];
        if ($t_filter[FILTER_PROPERTY_TAG_SELECT] != 0 && tag_exists($t_filter[FILTER_PROPERTY_TAG_SELECT])) {
            $t_tag_string .= is_blank($t_tag_string) ? '' : config_get('tag_separator');
            $t_tag_string .= tag_get_field($t_filter[FILTER_PROPERTY_TAG_SELECT], 'name');
        }
        echo string_html_entities($t_tag_string);
        echo '<input type="hidden" name="', FILTER_PROPERTY_TAG_STRING, '" value="', string_attribute($t_tag_string), '" />';
        ?>
			</td>
		</tr>
		<?php 
        # get plugin filters
        $t_plugin_filters = filter_get_plugin_filters();
        $t_column = 0;
        $t_fields = '';
        $t_values = '';
        # output a filter form element for each plugin filter
        foreach ($t_plugin_filters as $t_field_name => $t_filter_object) {
            $t_fields .= '<td class="small-caption" valign="top"> <a href="' . $t_filters_url . string_attribute($t_field_name) . '" id="' . string_attribute($t_field_name) . '_filter">' . string_display_line($t_filter_object->title) . '</a> </td>';
            $t_values .= '<td class="small-caption" valign="top" id="' . string_attribute($t_field_name) . '_filter_target"> ';
            if (!isset($t_filter[$t_field_name])) {
                $t_values .= lang_get('any');
            } else {
                switch ($t_filter_object->type) {
                    case FILTER_TYPE_STRING:
                    case FILTER_TYPE_INT:
                        if (filter_field_is_any($t_filter[$t_field_name])) {
                            $t_values .= lang_get('any');
                        } else {
                            $t_values .= string_display_line($t_filter[$t_field_name]);
                        }
                        $t_values .= '<input type="hidden" name="' . string_attribute($t_field_name) . '" value="' . string_attribute($t_filter[$t_field_name]) . '"/>';
                        break;
                    case FILTER_TYPE_BOOLEAN:
                        $t_values .= string_display_line($t_filter_object->display((bool) $t_filter[$t_field_name]));
                        $t_values .= '<input type="hidden" name="' . string_attribute($t_field_name) . '" value="' . (bool) $t_filter[$t_field_name] . '"/>';
                        break;
                    case FILTER_TYPE_MULTI_STRING:
                    case FILTER_TYPE_MULTI_INT:
                        $t_first = true;
                        $t_output = '';
                        if (!is_array($t_filter[$t_field_name])) {
                            $t_filter[$t_field_name] = array($t_filter[$t_field_name]);
                        }
                        foreach ($t_filter[$t_field_name] as $t_current) {
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:67,代码来源:filter_api.php



注:本文中的filter_get_plugin_filters函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP filter_get_roles_by_format函数代码示例发布时间:2022-05-15
下一篇:
PHP filter_get_name函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap