当前位置: 首页>>代码示例>>PHP>>正文


PHP access_has_any_project函数代码示例

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


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

示例1: filter_draw_selection_area2

/**
 * Prints the filter selection area for both the bug list view screen and
 * the bug list print screen. This function was an attempt to make it easier to
 * add new filters and rearrange them on screen for both pages.
 * @param integer $p_page_number Page number.
 * @param boolean $p_for_screen  Whether output is for screen view.
 * @param boolean $p_expanded    Whether to display expanded.
 * @return void
 */
function filter_draw_selection_area2($p_page_number, $p_for_screen = true, $p_expanded = true)
{
    $t_form_name_suffix = $p_expanded ? '_open' : '_closed';
    $t_filter = current_user_get_bug_filter();
    $t_filter = filter_ensure_valid_filter($t_filter === false ? array() : $t_filter);
    $t_project_id = helper_get_current_project();
    $t_page_number = (int) $p_page_number;
    $t_view_type = $t_filter['_view_type'];
    $t_tdclass = 'small-caption';
    $t_trclass = 'row-category2';
    $t_action = 'view_all_set.php?f=3';
    if ($p_for_screen == false) {
        $t_tdclass = 'print';
        $t_trclass = '';
        $t_action = 'view_all_set.php';
    }
    ?>

	<div class="filter-box">
		<form method="post" name="filters<?php 
    echo $t_form_name_suffix;
    ?>
" id="filters_form<?php 
    echo $t_form_name_suffix;
    ?>
" action="<?php 
    echo $t_action;
    ?>
">
		<?php 
    # CSRF protection not required here - form does not result in modifications
    ?>
		<input type="hidden" name="type" value="1" />
		<?php 
    if ($p_for_screen == false) {
        echo '<input type="hidden" name="print" value="1" />';
        echo '<input type="hidden" name="offset" value="0" />';
    }
    ?>
		<input type="hidden" name="page_number" value="<?php 
    echo $t_page_number;
    ?>
" />
		<input type="hidden" name="view_type" value="<?php 
    echo $t_view_type;
    ?>
" />
		<?php 
    $t_filter_cols = config_get('filter_custom_fields_per_row');
    if ($p_expanded) {
        ?>
		<table width="100%" cellspacing="1">
		<?php 
        $t_custom_cols = $t_filter_cols;
        $t_current_user_access_level = current_user_get_access_level();
        $t_accessible_custom_fields_ids = array();
        $t_accessible_custom_fields_names = array();
        $t_accessible_custom_fields_values = array();
        $t_num_custom_rows = 0;
        $t_per_row = 0;
        if (ON == config_get('filter_by_custom_fields')) {
            $t_custom_fields = custom_field_get_linked_ids($t_project_id);
            foreach ($t_custom_fields as $t_cfid) {
                $t_field_info = custom_field_cache_row($t_cfid, true);
                if ($t_field_info['access_level_r'] <= $t_current_user_access_level && $t_field_info['filter_by']) {
                    $t_accessible_custom_fields_ids[] = $t_cfid;
                    $t_accessible_custom_fields_names[] = $t_field_info['name'];
                    $t_accessible_custom_fields_types[] = $t_field_info['type'];
                    $t_accessible_custom_fields_values[] = custom_field_distinct_values($t_field_info);
                }
            }
            if (count($t_accessible_custom_fields_ids) > 0) {
                $t_per_row = config_get('filter_custom_fields_per_row');
                $t_num_custom_rows = ceil(count($t_accessible_custom_fields_ids) / $t_per_row);
            }
        }
        $t_filters_url = 'view_filters_page.php?for_screen=' . $p_for_screen;
        if ('advanced' == $t_view_type) {
            $t_filters_url = $t_filters_url . '&amp;view_type=advanced';
        }
        $t_filters_url = $t_filters_url . '&amp;target_field=';
        $t_show_product_version = version_should_show_product_version($t_project_id);
        $t_show_build = $t_show_product_version && config_get('enable_product_build') == ON;
        # overload handler_id setting if user isn't supposed to see them (ref #6189)
        if (!access_has_any_project(config_get('view_handler_threshold'))) {
            $t_filter[FILTER_PROPERTY_HANDLER_ID] = array(META_FILTER_ANY);
        }
        $t_dynamic_filter_expander_class = config_get('use_dynamic_filters') ? ' class="dynamic-filter-expander"' : '';
        ?>

		<tr <?php 
//.........这里部分代码省略.........
开发者ID:vipjaven,项目名称:mantisbt,代码行数:101,代码来源:filter_api.php

示例2: print_column_selection

/**
 * Print table data for column selection
 *
 * @param BugData $p_bug bug object
 * @param int $p_columns_target see COLUMNS_TARGET_* in constant_inc.php
 * @return null
 * @access public
 */
function print_column_selection($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    global $g_checkboxes_exist;
    echo '<td class="column-selection">';
    if (access_has_any_project(config_get('report_bug_threshold', null, null, $p_bug->project_id)) || access_has_project_level(config_get('move_bug_threshold', null, null, $p_bug->project_id), $p_bug->project_id) || access_has_project_level(config_get('update_bug_assign_threshold', null, null, $p_bug->project_id), $p_bug->project_id) || access_has_project_level(config_get('update_bug_threshold', null, null, $p_bug->project_id), $p_bug->project_id) || access_has_project_level(config_get('delete_bug_threshold', null, null, $p_bug->project_id), $p_bug->project_id) || access_has_project_level(config_get('update_bug_status_threshold', null, null, $p_bug->project_id), $p_bug->project_id) || access_has_project_level(config_get('set_bug_sticky_threshold', null, null, $p_bug->project_id), $p_bug->project_id) || access_has_project_level(config_get('change_view_status_threshold', null, null, $p_bug->project_id), $p_bug->project_id) || access_has_project_level(config_get('add_bugnote_threshold', null, null, $p_bug->project_id), $p_bug->project_id) || access_has_project_level(config_get('tag_attach_threshold', null, null, $p_bug->project_id), $p_bug->project_id) || access_has_project_level(config_get('roadmap_update_threshold', null, null, $p_bug->project_id), $p_bug->project_id)) {
        $g_checkboxes_exist = true;
        printf("<input type=\"checkbox\" name=\"bug_arr[]\" value=\"%d\" />", $p_bug->id);
    } else {
        echo "&#160;";
    }
    echo '</td>';
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:20,代码来源:columns_api.php

示例3: bug_group_action_get_commands

/**
 * Get a list of bug group actions available to the current user for one or
 * more projects.
 * @param array $p_project_ids An array containing one or more project IDs.
 * @return array
 */
function bug_group_action_get_commands(array $p_project_ids = null)
{
    if ($p_project_ids === null || count($p_project_ids) == 0) {
        $p_project_ids = array(ALL_PROJECTS);
    }
    $t_commands = array();
    foreach ($p_project_ids as $t_project_id) {
        if (!isset($t_commands['MOVE']) && access_has_project_level(config_get('move_bug_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['MOVE'] = lang_get('actiongroup_menu_move');
        }
        if (!isset($t_commands['COPY']) && access_has_any_project(config_get('report_bug_threshold', null, null, $t_project_id))) {
            $t_commands['COPY'] = lang_get('actiongroup_menu_copy');
        }
        if (!isset($t_commands['ASSIGN']) && access_has_project_level(config_get('update_bug_assign_threshold', null, null, $t_project_id), $t_project_id)) {
            if (ON == config_get('auto_set_status_to_assigned', null, null, $t_project_id) && access_has_project_level(access_get_status_threshold(config_get('bug_assigned_status', null, null, $t_project_id), $t_project_id), $t_project_id)) {
                $t_commands['ASSIGN'] = lang_get('actiongroup_menu_assign');
            } else {
                $t_commands['ASSIGN'] = lang_get('actiongroup_menu_assign');
            }
        }
        if (!isset($t_commands['CLOSE']) && access_has_project_level(config_get('update_bug_status_threshold', null, null, $t_project_id), $t_project_id) && (access_has_project_level(access_get_status_threshold(config_get('bug_closed_status_threshold', null, null, $t_project_id), $t_project_id), $t_project_id) || access_has_project_level(config_get('allow_reporter_close', null, null, $t_project_id), $t_project_id))) {
            $t_commands['CLOSE'] = lang_get('actiongroup_menu_close');
        }
        if (!isset($t_commands['DELETE']) && access_has_project_level(config_get('delete_bug_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['DELETE'] = lang_get('actiongroup_menu_delete');
        }
        if (!isset($t_commands['RESOLVE']) && access_has_project_level(config_get('update_bug_status_threshold', null, null, $t_project_id), $t_project_id) && access_has_project_level(access_get_status_threshold(config_get('bug_resolved_status_threshold', null, null, $t_project_id), $t_project_id), $t_project_id)) {
            $t_commands['RESOLVE'] = lang_get('actiongroup_menu_resolve');
        }
        if (!isset($t_commands['SET_STICKY']) && access_has_project_level(config_get('set_bug_sticky_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['SET_STICKY'] = lang_get('actiongroup_menu_set_sticky');
        }
        if (!isset($t_commands['UP_PRIOR']) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['UP_PRIOR'] = lang_get('actiongroup_menu_update_priority');
        }
        if (!isset($t_commands['EXT_UPDATE_SEVERITY']) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['EXT_UPDATE_SEVERITY'] = lang_get('actiongroup_menu_update_severity');
        }
        if (!isset($t_commands['UP_STATUS']) && access_has_project_level(config_get('update_bug_status_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['UP_STATUS'] = lang_get('actiongroup_menu_update_status');
        }
        if (!isset($t_commands['UP_CATEGORY']) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['UP_CATEGORY'] = lang_get('actiongroup_menu_update_category');
        }
        if (!isset($t_commands['VIEW_STATUS']) && access_has_project_level(config_get('change_view_status_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['VIEW_STATUS'] = lang_get('actiongroup_menu_update_view_status');
        }
        if (!isset($t_commands['EXT_UPDATE_PRODUCT_BUILD']) && config_get('enable_product_build', null, null, $t_project_id) == ON && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['EXT_UPDATE_PRODUCT_BUILD'] = lang_get('actiongroup_menu_update_product_build');
        }
        if (!isset($t_commands['EXT_ADD_NOTE']) && access_has_project_level(config_get('add_bugnote_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['EXT_ADD_NOTE'] = lang_get('actiongroup_menu_add_note');
        }
        if (!isset($t_commands['EXT_ATTACH_TAGS']) && access_has_project_level(config_get('tag_attach_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['EXT_ATTACH_TAGS'] = lang_get('actiongroup_menu_attach_tags');
        }
        if (!isset($t_commands['UP_FIXED_IN_VERSION']) && version_should_show_product_version($t_project_id) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['UP_FIXED_IN_VERSION'] = lang_get('actiongroup_menu_update_fixed_in_version');
        }
        if (!isset($t_commands['UP_TARGET_VERSION']) && version_should_show_product_version($t_project_id) && access_has_project_level(config_get('roadmap_update_threshold', null, null, $t_project_id), $t_project_id)) {
            $t_commands['UP_TARGET_VERSION'] = lang_get('actiongroup_menu_update_target_version');
        }
        $t_custom_field_ids = custom_field_get_linked_ids($t_project_id);
        foreach ($t_custom_field_ids as $t_custom_field_id) {
            if (!custom_field_has_write_access_to_project($t_custom_field_id, $t_project_id)) {
                continue;
            }
            $t_custom_field_def = custom_field_get_definition($t_custom_field_id);
            $t_command_id = 'custom_field_' . $t_custom_field_id;
            $t_command_caption = sprintf(lang_get('actiongroup_menu_update_field'), lang_get_defaulted($t_custom_field_def['name']));
            $t_commands[$t_command_id] = string_display($t_command_caption);
        }
    }
    $t_custom_group_actions = config_get('custom_group_actions');
    foreach ($t_custom_group_actions as $t_custom_group_action) {
        # use label if provided to get the localized text, otherwise fallback to action name.
        if (isset($t_custom_group_action['label'])) {
            $t_commands[$t_custom_group_action['action']] = lang_get_defaulted($t_custom_group_action['label']);
        } else {
            $t_commands[$t_custom_group_action['action']] = lang_get_defaulted($t_custom_group_action['action']);
        }
    }
    return $t_commands;
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:90,代码来源:bug_group_action_api.php

示例4: print_menu

function print_menu()
{
    if (auth_is_user_authenticated()) {
        $t_protected = current_user_get_field('protected');
        $t_current_project = helper_get_current_project();
        print '<table class="width100" cellspacing="0">';
        print '<tr>';
        print '<td class="menu">';
        $t_menu_options = array();
        # Main Page
        $t_menu_options[] = '<a href="main_page.php">' . lang_get('main_link') . '</a>';
        # My View
        $t_menu_options[] = '<a href="my_view_page.php">' . lang_get('my_view_link') . '</a>';
        # View Bugs
        $t_menu_options[] = '<a href="view_all_bug_page.php">' . lang_get('view_bugs_link') . '</a>';
        # Report Bugs
        if (access_has_project_level(config_get('report_bug_threshold'))) {
            $t_menu_options[] = string_get_bug_report_link();
        }
        # Changelog Page
        if (access_has_project_level(config_get('view_changelog_threshold'))) {
            $t_menu_options[] = '<a href="changelog_page.php">' . lang_get('changelog_link') . '</a>';
        }
        # Roadmap Page
        if (access_has_project_level(config_get('roadmap_view_threshold'))) {
            $t_menu_options[] = '<a href="roadmap_page.php">' . lang_get('roadmap_link') . '</a>';
        }
        # Summary Page
        if (access_has_project_level(config_get('view_summary_threshold'))) {
            $t_menu_options[] = '<a href="summary_page.php">' . lang_get('summary_link') . '</a>';
        }
        # Project Documentation Page
        if (ON == config_get('enable_project_documentation')) {
            $t_menu_options[] = '<a href="proj_doc_page.php">' . lang_get('docs_link') . '</a>';
        }
        # Project Wiki
        if (wiki_is_enabled()) {
            $t_menu_options[] = '<a href="wiki.php?type=project&amp;id=' . $t_current_project . '">' . lang_get('wiki') . '</a>';
        }
        # Manage Users (admins) or Manage Project (managers) or Manage Custom Fields
        $t_show_access = min(config_get('manage_user_threshold'), config_get('manage_project_threshold'), config_get('manage_custom_fields_threshold'));
        if (access_has_global_level($t_show_access) || access_has_any_project($t_show_access)) {
            $t_current_project = helper_get_current_project();
            if (access_has_global_level(config_get('manage_user_threshold'))) {
                $t_link = 'manage_user_page.php';
            } else {
                if (access_has_project_level(config_get('manage_project_threshold'), $t_current_project) && $t_current_project != ALL_PROJECTS) {
                    $t_link = 'manage_proj_edit_page.php?project_id=' . $t_current_project;
                } else {
                    $t_link = 'manage_proj_page.php';
                }
            }
            $t_menu_options[] = "<a href=\"{$t_link}\">" . lang_get('manage_link') . '</a>';
        }
        # News Page
        if (access_has_project_level(config_get('manage_news_threshold'))) {
            # Admin can edit news for All Projects (site-wide)
            if (ALL_PROJECTS != helper_get_current_project() || access_has_project_level(ADMINISTRATOR)) {
                $t_menu_options[] = '<a href="news_menu_page.php">' . lang_get('edit_news_link') . '</a>';
            } else {
                $t_menu_options[] = '<a href="login_select_proj_page.php">' . lang_get('edit_news_link') . '</a>';
            }
        }
        # Account Page (only show accounts that are NOT protected)
        if (OFF == $t_protected) {
            $t_menu_options[] = '<a href="account_page.php">' . lang_get('account_link') . '</a>';
        }
        # Add custom options
        $t_custom_options = prepare_custom_menu_options('main_menu_custom_options');
        $t_menu_options = array_merge($t_menu_options, $t_custom_options);
        if (config_get('time_tracking_enabled') && config_get('time_tracking_with_billing')) {
            $t_menu_options[] = '<a href="billing_page.php">' . lang_get('time_tracking_billing_link') . '</a>';
        }
        # Logout (no if anonymously logged in)
        if (!current_user_is_anonymous()) {
            $t_menu_options[] = '<a href="logout_page.php">' . lang_get('logout_link') . '</a>';
        }
        print implode($t_menu_options, ' | ');
        print '</td>';
        print '<td class="menu right nowrap">';
        print '<form method="post" action="jump_to_bug.php">';
        if (ON == config_get('use_javascript')) {
            $t_bug_label = lang_get('issue_id');
            print "<input type=\"text\" name=\"bug_id\" size=\"10\" class=\"small\" value=\"{$t_bug_label}\" onfocus=\"if (this.value == '{$t_bug_label}') this.value = ''\" onblur=\"if (this.value == '') this.value = '{$t_bug_label}'\" />&nbsp;";
        } else {
            print "<input type=\"text\" name=\"bug_id\" size=\"10\" class=\"small\" />&nbsp;";
        }
        print '<input type="submit" class="button-small" value="' . lang_get('jump') . '" />&nbsp;';
        print '</form>';
        print '</td>';
        print '</tr>';
        print '</table>';
    }
}
开发者ID:amjadtbssm,项目名称:website,代码行数:94,代码来源:html_api.php

示例5: print_menu

/**
 * Print the main menu
 * @return null
 */
function print_menu()
{
    if (auth_is_user_authenticated()) {
        $t_protected = current_user_get_field('protected');
        $t_current_project = helper_get_current_project();
        $t_menu_options = array();
        # Main Page
        $t_menu_options[] = '<a href="' . helper_mantis_url('main_page.php') . '">' . lang_get('main_link') . '</a>';
        # Plugin / Event added options
        $t_event_menu_options = event_signal('EVENT_MENU_MAIN_FRONT');
        foreach ($t_event_menu_options as $t_plugin => $t_plugin_menu_options) {
            foreach ($t_plugin_menu_options as $t_callback => $t_callback_menu_options) {
                if (is_array($t_callback_menu_options)) {
                    $t_menu_options = array_merge($t_menu_options, $t_callback_menu_options);
                } else {
                    if (!is_null($t_callback_menu_options)) {
                        $t_menu_options[] = $t_callback_menu_options;
                    }
                }
            }
        }
        # My View
        $t_menu_options[] = '<a href="' . helper_mantis_url('my_view_page.php">') . lang_get('my_view_link') . '</a>';
        # View Bugs
        $t_menu_options[] = '<a href="' . helper_mantis_url('view_all_bug_page.php">') . lang_get('view_bugs_link') . '</a>';
        # Report Bugs
        if (access_has_project_level(config_get('report_bug_threshold'))) {
            $t_menu_options[] = string_get_bug_report_link();
        }
        # Changelog Page
        if (access_has_project_level(config_get('view_changelog_threshold'))) {
            $t_menu_options[] = '<a href="' . helper_mantis_url('changelog_page.php">') . lang_get('changelog_link') . '</a>';
        }
        # Roadmap Page
        if (access_has_project_level(config_get('roadmap_view_threshold'))) {
            $t_menu_options[] = '<a href="' . helper_mantis_url('roadmap_page.php">') . lang_get('roadmap_link') . '</a>';
        }
        # Summary Page
        if (access_has_project_level(config_get('view_summary_threshold'))) {
            $t_menu_options[] = '<a href="' . helper_mantis_url('summary_page.php">') . lang_get('summary_link') . '</a>';
        }
        # Project Documentation Page
        if (ON == config_get('enable_project_documentation')) {
            $t_menu_options[] = '<a href="' . helper_mantis_url('proj_doc_page.php">') . lang_get('docs_link') . '</a>';
        }
        # Project Wiki
        if (config_get_global('wiki_enable') == ON) {
            $t_menu_options[] = '<a href="' . helper_mantis_url('wiki.php?type=project&amp;id=') . $t_current_project . '">' . lang_get('wiki') . '</a>';
        }
        # Plugin / Event added options
        $t_event_menu_options = event_signal('EVENT_MENU_MAIN');
        foreach ($t_event_menu_options as $t_plugin => $t_plugin_menu_options) {
            foreach ($t_plugin_menu_options as $t_callback => $t_callback_menu_options) {
                if (is_array($t_callback_menu_options)) {
                    $t_menu_options = array_merge($t_menu_options, $t_callback_menu_options);
                } else {
                    if (!is_null($t_callback_menu_options)) {
                        $t_menu_options[] = $t_callback_menu_options;
                    }
                }
            }
        }
        # Manage Users (admins) or Manage Project (managers) or Manage Custom Fields
        if (access_has_global_level(config_get('manage_site_threshold'))) {
            $t_link = helper_mantis_url('manage_overview_page.php');
            $t_menu_options[] = '<a class="manage-menu-link" href="' . $t_link . '">' . lang_get('manage_link') . '</a>';
        } else {
            $t_show_access = min(config_get('manage_user_threshold'), config_get('manage_project_threshold'), config_get('manage_custom_fields_threshold'));
            if (access_has_global_level($t_show_access) || access_has_any_project($t_show_access)) {
                $t_current_project = helper_get_current_project();
                if (access_has_global_level(config_get('manage_user_threshold'))) {
                    $t_link = helper_mantis_url('manage_user_page.php');
                } else {
                    if (access_has_project_level(config_get('manage_project_threshold'), $t_current_project) && $t_current_project != ALL_PROJECTS) {
                        $t_link = helper_mantis_url('manage_proj_edit_page.php?project_id=') . $t_current_project;
                    } else {
                        $t_link = helper_mantis_url('manage_proj_page.php');
                    }
                }
                $t_menu_options[] = "<a href=\"{$t_link}\">" . lang_get('manage_link') . '</a>';
            }
        }
        # News Page
        if (news_is_enabled() && access_has_project_level(config_get('manage_news_threshold'))) {
            # Admin can edit news for All Projects (site-wide)
            if (ALL_PROJECTS != helper_get_current_project() || current_user_is_administrator()) {
                $t_menu_options[] = '<a href="' . helper_mantis_url('news_menu_page.php">') . lang_get('edit_news_link') . '</a>';
            } else {
                $t_menu_options[] = '<a href="' . helper_mantis_url('login_select_proj_page.php">') . lang_get('edit_news_link') . '</a>';
            }
        }
        # Account Page (only show accounts that are NOT protected)
        if (OFF == $t_protected) {
            $t_menu_options[] = '<a class="account-menu-link" href="' . helper_mantis_url('account_page.php">') . lang_get('account_link') . '</a>';
        }
        # Add custom options
//.........这里部分代码省略.........
开发者ID:nextgens,项目名称:mantisbt,代码行数:101,代码来源:html_api.php

示例6: print_column_selection

/**
 *
 * @param BugData $p_bug bug obect
 * @param int $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php
 * @return null
 * @access public
 */
function print_column_selection( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
	global $g_checkboxes_exist;

	echo '<td class="column-selection">';
	if( access_has_any_project( config_get( 'report_bug_threshold', null, null, $p_bug->project_id ) ) ||
		# !TODO: check if any other projects actually exist for the bug to be moved to
		access_has_project_level( config_get( 'move_bug_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ||
		# !TODO: factor in $g_auto_set_status_to_assigned == ON
		access_has_project_level( config_get( 'update_bug_assign_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ||
		access_has_project_level( config_get( 'update_bug_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ||
		access_has_project_level( config_get( 'delete_bug_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ||
		# !TODO: check to see if the bug actually has any different selectable workflow states
		access_has_project_level( config_get( 'update_bug_status_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ||
		access_has_project_level( config_get( 'set_bug_sticky_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ||
		access_has_project_level( config_get( 'change_view_status_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ||
		access_has_project_level( config_get( 'add_bugnote_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ||
		access_has_project_level( config_get( 'tag_attach_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ||
		access_has_project_level( config_get( 'roadmap_update_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ) {
		$g_checkboxes_exist = true;
		printf( "<input type=\"checkbox\" name=\"bug_arr[]\" value=\"%d\" />", $p_bug->id );
	} else {
		echo "&#160;";
	}
	echo '</td>';
}
开发者ID:rombert,项目名称:mantisbt,代码行数:32,代码来源:columns_api.php

示例7: filter_draw_selection_area2

/**
 *  Prints the filter selection area for both the bug list view screen and
 *  the bug list print screen. This function was an attempt to make it easier to
 *  add new filters and rearrange them on screen for both pages.
 * @param int $p_page_number
 * @param bool $p_for_screen
 * @param bool $p_expanded
 */
function filter_draw_selection_area2($p_page_number, $p_for_screen = true, $p_expanded = true)
{
    $t_form_name_suffix = $p_expanded ? '_open' : '_closed';
    $t_filter = current_user_get_bug_filter();
    $t_filter = filter_ensure_valid_filter($t_filter);
    $t_project_id = helper_get_current_project();
    $t_page_number = (int) $p_page_number;
    $t_view_type = $t_filter['_view_type'];
    $t_tdclass = 'small-caption';
    $t_trclass = 'row-category2';
    $t_action = 'view_all_set.php?f=3';
    if ($p_for_screen == false) {
        $t_tdclass = 'print';
        $t_trclass = '';
        $t_action = 'view_all_set.php';
    }
    ?>

		<br />
		<form method="post" name="filters<?php 
    echo $t_form_name_suffix;
    ?>
" id="filters_form<?php 
    echo $t_form_name_suffix;
    ?>
" action="<?php 
    echo $t_action;
    ?>
">
		<?php 
    # CSRF protection not required here - form does not result in modifications
    ?>
		<input type="hidden" name="type" value="1" />
		<?php 
    if ($p_for_screen == false) {
        echo '<input type="hidden" name="print" value="1" />';
        echo '<input type="hidden" name="offset" value="0" />';
    }
    ?>
		<input type="hidden" name="page_number" value="<?php 
    echo $t_page_number;
    ?>
" />
		<input type="hidden" name="view_type" value="<?php 
    echo $t_view_type;
    ?>
" />
		<table class="width100" cellspacing="1">

		<?php 
    $t_filter_cols = config_get('filter_custom_fields_per_row');
    if ($p_expanded) {
        $t_custom_cols = $t_filter_cols;
        $t_current_user_access_level = current_user_get_access_level();
        $t_accessible_custom_fields_ids = array();
        $t_accessible_custom_fields_names = array();
        $t_accessible_custom_fields_values = array();
        $t_num_custom_rows = 0;
        $t_per_row = 0;
        if (ON == config_get('filter_by_custom_fields')) {
            $t_custom_fields = custom_field_get_linked_ids($t_project_id);
            foreach ($t_custom_fields as $t_cfid) {
                $t_field_info = custom_field_cache_row($t_cfid, true);
                if ($t_field_info['access_level_r'] <= $t_current_user_access_level && $t_field_info['filter_by']) {
                    $t_accessible_custom_fields_ids[] = $t_cfid;
                    $t_accessible_custom_fields_names[] = $t_field_info['name'];
                    $t_accessible_custom_fields_types[] = $t_field_info['type'];
                    $t_accessible_custom_fields_values[] = custom_field_distinct_values($t_field_info);
                }
            }
            if (count($t_accessible_custom_fields_ids) > 0) {
                $t_per_row = config_get('filter_custom_fields_per_row');
                $t_num_custom_rows = ceil(count($t_accessible_custom_fields_ids) / $t_per_row);
            }
        }
        $t_filters_url = 'view_filters_page.php?for_screen=' . $p_for_screen;
        if ('advanced' == $t_view_type) {
            $t_filters_url = $t_filters_url . '&amp;view_type=advanced';
        }
        $t_filters_url = $t_filters_url . '&amp;target_field=';
        $t_show_product_version = version_should_show_product_version($t_project_id);
        $t_show_build = $t_show_product_version && config_get('enable_product_build') == ON;
        # overload handler_id setting if user isn't supposed to see them (ref #6189)
        if (!access_has_any_project(config_get('view_handler_threshold'))) {
            $t_filter[FILTER_PROPERTY_HANDLER_ID] = array(META_FILTER_ANY);
        }
        ?>

		<tr <?php 
        echo "class=\"" . $t_trclass . "\"";
        ?>
>
//.........这里部分代码省略.........
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:101,代码来源:filter_api.php


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