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

PHP tag_get_field函数代码示例

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

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



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

示例1: print_filter_tag_string

/**
 * print tag fields
 * @return void
 */
function print_filter_tag_string()
{
    if (!access_has_global_level(config_get('tag_view_threshold'))) {
        return;
    }
    global $g_filter;
    $t_tag_string = $g_filter[FILTER_PROPERTY_TAG_STRING];
    if ($g_filter[FILTER_PROPERTY_TAG_SELECT] != 0 && tag_exists($g_filter[FILTER_PROPERTY_TAG_SELECT])) {
        $t_tag_string .= is_blank($t_tag_string) ? '' : config_get('tag_separator');
        $t_tag_string .= tag_get_field($g_filter[FILTER_PROPERTY_TAG_SELECT], 'name');
    }
    ?>
		<input type="hidden" id="tag_separator" value="<?php 
    echo config_get('tag_separator');
    ?>
" />
		<input type="text" name="<?php 
    echo FILTER_PROPERTY_TAG_STRING;
    ?>
" id="<?php 
    echo FILTER_PROPERTY_TAG_STRING;
    ?>
" size="40" value="<?php 
    echo string_attribute($t_tag_string);
    ?>
" />
		<select <?php 
    echo helper_get_tab_index();
    ?>
 name="<?php 
    echo FILTER_PROPERTY_TAG_SELECT;
    ?>
" id="<?php 
    echo FILTER_PROPERTY_TAG_SELECT;
    ?>
">
			<?php 
    print_tag_option_list();
    ?>
		</select>
		<?php 
}
开发者ID:vipjaven,项目名称:mantisbt,代码行数:46,代码来源:filter_api.php


示例2: require_api

require_api('gpc_api.php');
require_api('helper_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('print_api.php');
require_api('string_api.php');
require_api('tag_api.php');
require_api('user_api.php');
access_ensure_global_level(config_get('tag_view_threshold'));
compress_enable();
$f_tag_id = gpc_get_int('tag_id');
$t_tag_row = tag_get($f_tag_id);
$t_name = string_display_line($t_tag_row['name']);
$t_description = string_display($t_tag_row['description']);
$t_can_edit = access_has_global_level(config_get('tag_edit_threshold'));
$t_can_edit_own = $t_can_edit || auth_get_current_user_id() == tag_get_field($f_tag_id, 'user_id') && access_has_global_level(config_get('tag_edit_own_threshold'));
html_page_top(sprintf(lang_get('tag_details'), $t_name));
?>

<div id="tag-view-div" class="form-container">
	<h2><?php 
echo sprintf(lang_get('tag_details'), $t_name);
?>
</h2>
	<div class="section-link">
		<?php 
print_bracket_link('search.php?tag_string=' . urlencode($t_tag_row['name']), sprintf(lang_get('tag_filter_default'), tag_stats_attached($f_tag_id)));
?>
	</div>
	<div class="field-container">
		<span class="display-label"><span><?php 
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:tag_view_page.php


示例3: tag_bug_detach

/**
 * Detach a tag from a bug.
 * @param integer Tag ID
 * @param integer Bug ID
 * @param boolean Add history entries to bug
 * @param integer User Id (or null for current logged in user)
 */
function tag_bug_detach($p_tag_id, $p_bug_id, $p_add_history = true, $p_user_id = null)
{
    if ($p_user_id === null) {
        $t_user_id = auth_get_current_user_id();
    } else {
        $t_user_id = $p_user_id;
    }
    if (!tag_bug_is_attached($p_tag_id, $p_bug_id)) {
        trigger_error(TAG_NOT_ATTACHED, ERROR);
    }
    $t_tag_row = tag_bug_get_row($p_tag_id, $p_bug_id);
    if ($t_user_id == tag_get_field($p_tag_id, 'user_id') || $t_user_id == $t_tag_row['user_id']) {
        $t_detach_level = config_get('tag_detach_own_threshold');
    } else {
        $t_detach_level = config_get('tag_detach_threshold');
    }
    access_ensure_bug_level($t_detach_level, $p_bug_id, $t_user_id);
    $c_tag_id = db_prepare_int($p_tag_id);
    $c_bug_id = db_prepare_int($p_bug_id);
    $t_bug_tag_table = db_get_table('bug_tag');
    $query = "DELETE FROM {$t_bug_tag_table}\n\t\t\t\t\tWHERE tag_id=" . db_param() . ' AND bug_id=' . db_param();
    db_query_bound($query, array($c_tag_id, $c_bug_id));
    if ($p_add_history) {
        $t_tag_name = tag_get_field($p_tag_id, 'name');
        history_log_event_special($p_bug_id, TAG_DETACHED, $t_tag_name);
    }
    # updated the last_updated date
    bug_update_date($p_bug_id);
    return true;
}
开发者ID:Kirill,项目名称:mantisbt,代码行数:37,代码来源:tag_api.php


示例4: tag_bug_detach

/**
 * Detach a tag from a bug.
 * @param integer Tag ID
 * @param integer Bug ID
 * @param boolean Add history entries to bug
 * @param integer User Id (or null for current logged in user)	 
 */
function tag_bug_detach($p_tag_id, $p_bug_id, $p_add_history = true, $p_user_id = null)
{
    if ($p_user_id === null) {
        $t_user_id = auth_get_current_user_id();
    } else {
        $t_user_id = $p_user_id;
    }
    if (!tag_bug_is_attached($p_tag_id, $p_bug_id)) {
        trigger_error(TAG_NOT_ATTACHED, ERROR);
    }
    $t_tag_row = tag_bug_get_row($p_tag_id, $p_bug_id);
    if ($t_user_id == tag_get_field($p_tag_id, 'user_id') || $t_user_id == $t_tag_row['user_id']) {
        $t_detach_level = config_get('tag_detach_own_threshold');
    } else {
        $t_detach_level = config_get('tag_detach_threshold');
    }
    access_ensure_bug_level($t_detach_level, $p_bug_id, $t_user_id);
    $c_tag_id = db_prepare_int($p_tag_id);
    $c_bug_id = db_prepare_int($p_bug_id);
    $t_bug_tag_table = config_get('mantis_bug_tag_table');
    $query = "DELETE FROM {$t_bug_tag_table} \r\n\t\t\t\t\tWHERE tag_id='{$c_tag_id}' AND bug_id='{$c_bug_id}'";
    db_query($query);
    if ($p_add_history) {
        $t_tag_name = tag_get_field($p_tag_id, 'name');
        history_log_event_special($p_bug_id, TAG_DETACHED, $t_tag_name);
    }
    return true;
}
开发者ID:amjadtbssm,项目名称:website,代码行数:35,代码来源:tag_api.php


示例5: print_filter_tag_string

function print_filter_tag_string()
{
    if (!access_has_global_level(config_get('tag_view_threshold'))) {
        return;
    }
    global $t_filter;
    $t_tag_string = $t_filter['tag_string'];
    if ($t_filter['tag_select'] != 0) {
        $t_tag_string .= is_blank($t_tag_string) ? '' : config_get('tag_separator');
        $t_tag_string .= tag_get_field($t_filter['tag_select'], 'name');
    }
    ?>
		<input type="hidden" id="tag_separator" value="<?php 
    echo config_get('tag_separator');
    ?>
" />
		<input type="text" name="tag_string" id="tag_string" size="40" value="<?php 
    echo $t_tag_string;
    ?>
" />
		<select <?php 
    echo helper_get_tab_index();
    ?>
 name="tag_select" id="tag_select">
			<?php 
    print_tag_option_list();
    ?>
		</select>
		<?php 
}
开发者ID:amjadtbssm,项目名称:website,代码行数:30,代码来源:filter_api.php


示例6: require_api

require_api( 'lang_api.php' );
require_api( 'print_api.php' );
require_api( 'string_api.php' );
require_api( 'tag_api.php' );
require_api( 'user_api.php' );

access_ensure_global_level( config_get( 'tag_view_threshold' ) );
compress_enable();

$f_tag_id = gpc_get_int( 'tag_id' );
$t_tag_row = tag_get( $f_tag_id );

$t_name = string_display_line( $t_tag_row['name'] );
$t_description = string_display( $t_tag_row['description'] );
$t_can_edit = access_has_global_level( config_get( 'tag_edit_threshold' ) );
$t_can_edit_own = $t_can_edit || auth_get_current_user_id() == tag_get_field( $f_tag_id, 'user_id' )
	&& access_has_global_level( config_get( 'tag_edit_own_threshold' ) );


html_page_top( sprintf( lang_get( 'tag_details' ), $t_name ) ); ?>

<div id="tag-view-div" class="form-container">
	<h2><?php echo sprintf( lang_get( 'tag_details' ), $t_name ) ?></h2>
	<div class="section-link">
		<?php print_bracket_link( 'search.php?tag_string='.urlencode($t_tag_row['name']), sprintf( lang_get( 'tag_filter_default' ), tag_stats_attached( $f_tag_id ) ) ); ?>
	</div>
	<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
		<span class="display-label"><span><?php echo lang_get( 'tag_id' ) ?></span></span>
		<span class="display-value"><span><?php echo $t_tag_row['id'] ?></span></span>
		<span class="label-style"></span>
	</div>
开发者ID:rombert,项目名称:mantisbt,代码行数:31,代码来源:tag_view_page.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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