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


PHP current_user_get_access_level函数代码示例

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


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

require_api('form_api.php');
require_api('helper_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('print_api.php');
require_api('project_api.php');
require_api('string_api.php');
require_api('workflow_api.php');
auth_reauthenticate();
html_page_top(lang_get('manage_workflow_config'));
print_manage_menu('adm_permissions_report.php');
print_manage_config_menu('manage_config_workflow_page.php');
# CSS class names for overrides color coding
define('COLOR_GLOBAL', 'color-global');
define('COLOR_PROJECT', 'color-project');
$g_access = current_user_get_access_level();
$t_project = helper_get_current_project();
$g_can_change_workflow = $g_access >= config_get_access('status_enum_workflow');
$g_can_change_flags = $g_can_change_workflow;
$g_overrides = array();
/**
 * Set overrides
 * @param string $p_config     Configuration value.
 * @param bool   $p_can_change True if user has access level to change config
 * @param string $p_color      CSS class name
 * @return void
 */
function set_overrides($p_config, $p_can_change, $p_color)
{
    global $g_overrides;
    if (!$p_can_change) {
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:manage_config_workflow_page.php

示例3: require_api

require_api('custom_field_api.php');
require_api('error_api.php');
require_api('filter_api.php');
require_api('filter_constants_inc.php');
require_api('gpc_api.php');
require_api('helper_api.php');
auth_ensure_user_authenticated();
compress_enable();
global $t_filter;
global $t_select_modifier;
$t_filter = current_user_get_bug_filter();
if ($t_filter === false) {
    $t_filter = filter_get_default();
}
$t_project_id = helper_get_current_project();
$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_types = array();
$t_accessible_custom_fields_values = array();
$t_filter_cols = 7;
$t_custom_cols = 1;
$t_custom_rows = 0;
if (ON == config_get('filter_by_custom_fields')) {
    $t_custom_cols = config_get('filter_custom_fields_per_row');
    $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_accessible_custom_fields_ids[] = $t_cfid;
            $t_accessible_custom_fields_names[] = $t_field_info['name'];
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:return_dynamic_filters.php

示例4: helper_alternate_class

		</td>
	</tr>

	<!-- Project access level -->
	<tr <?php 
echo helper_alternate_class();
?>
>
		<td class="category">
			<?php 
echo lang_get('access_level_project');
?>
		</td>
		<td>
			<?php 
echo get_enum_element('access_levels', current_user_get_access_level());
?>
		</td>
	</tr>

	<!-- Assigned project list -->
	<tr <?php 
echo helper_alternate_class();
?>
 valign="top">
		<td class="category">
			<?php 
echo lang_get('assigned_projects');
?>
		</td>
		<td>
开发者ID:khinT,项目名称:mantisbt-master,代码行数:31,代码来源:account_page.php

示例5: html_login_info

function html_login_info()
{
    $t_username = current_user_get_field('username');
    $t_access_level = get_enum_element('access_levels', current_user_get_access_level());
    $t_now = date(config_get('complete_date_format'));
    $t_realname = current_user_get_field('realname');
    print '<table class="hide">';
    print '<tr>';
    print '<td class="login-info-left">';
    if (current_user_is_anonymous()) {
        $t_return_page = $_SERVER['PHP_SELF'];
        if (isset($_SERVER['QUERY_STRING'])) {
            $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
        }
        $t_return_page = string_url($t_return_page);
        print lang_get('anonymous') . ' | <a href="login_page.php?return=' . $t_return_page . '">' . lang_get('login_link') . '</a>';
        if (config_get('allow_signup') == ON) {
            print ' | <a href="signup_page.php">' . lang_get('signup_link') . '</a>';
        }
    } else {
        echo lang_get('logged_in_as'), ": <span class=\"italic\">", string_display($t_username), "</span> <span class=\"small\">";
        echo is_blank($t_realname) ? "({$t_access_level})" : "(" . string_display($t_realname) . " - {$t_access_level})";
        echo "</span>";
    }
    print '</td>';
    print '<td class="login-info-middle">';
    print "<span class=\"italic\">{$t_now}</span>";
    print '</td>';
    print '<td class="login-info-right">';
    print '<form method="post" name="form_set_project" action="set_project.php">';
    echo lang_get('email_project'), ': ';
    if (ON == config_get('show_extended_project_browser')) {
        print_extended_project_browser(helper_get_current_project_trace());
    } else {
        if (ON == config_get('use_javascript')) {
            print '<select name="project_id" class="small" onchange="document.forms.form_set_project.submit();">';
        } else {
            print '<select name="project_id" class="small">';
        }
        print_project_option_list(join(';', helper_get_current_project_trace()), true, null, true);
        print '</select> ';
    }
    print '<input type="submit" class="button-small" value="' . lang_get('switch') . '" />';
    if (OFF != config_get('rss_enabled')) {
        # Link to RSS issues feed for the selected project, including authentication details.
        print '<a href="' . rss_get_issues_feed_url() . '">';
        print '<img src="images/rss.gif" alt="' . lang_get('rss') . '" style="border-style: none; margin: 5px; vertical-align: middle;" />';
        print '</a>';
    }
    print '</form>';
    print '</td>';
    print '</tr>';
    print '</table>';
}
开发者ID:amjadtbssm,项目名称:website,代码行数:54,代码来源:html_api.php

示例6: html_login_info

/**
 * (11) Print the user's account information
 * Also print the select box where users can switch projects
 * @return null
 */
function html_login_info()
{
    $t_username = current_user_get_field('username');
    $t_access_level = get_enum_element('access_levels', current_user_get_access_level());
    $t_now = date(config_get('complete_date_format'));
    $t_realname = current_user_get_field('realname');
    echo '<table class="hide">';
    echo '<tr>';
    echo '<td class="login-info-left">';
    if (current_user_is_anonymous()) {
        $t_return_page = $_SERVER['SCRIPT_NAME'];
        if (isset($_SERVER['QUERY_STRING'])) {
            $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
        }
        $t_return_page = string_url($t_return_page);
        echo lang_get('anonymous') . ' | <a href="' . helper_mantis_url('login_page.php?return=' . $t_return_page) . '">' . lang_get('login_link') . '</a>';
        if (config_get_global('allow_signup') == ON) {
            echo ' | <a href="' . helper_mantis_url('signup_page.php') . '">' . lang_get('signup_link') . '</a>';
        }
    } else {
        echo lang_get('logged_in_as'), ": <span class=\"italic\">", string_html_specialchars($t_username), "</span> <span class=\"small\">";
        echo is_blank($t_realname) ? "({$t_access_level})" : "(" . string_html_specialchars($t_realname) . " - {$t_access_level})";
        echo "</span>";
    }
    echo '</td>';
    echo '<td class="login-info-middle">';
    echo "<span class=\"italic\">{$t_now}</span>";
    echo '</td>';
    echo '<td class="login-info-right">';
    # Project Selector hidden if only one project visisble to user
    $t_show_project_selector = true;
    $t_project_ids = current_user_get_accessible_projects();
    if (count($t_project_ids) == 1) {
        $t_project_id = (int) $t_project_ids[0];
        if (count(current_user_get_accessible_subprojects($t_project_id)) == 0) {
            $t_show_project_selector = false;
        }
    }
    if ($t_show_project_selector) {
        echo '<form method="post" name="form_set_project" action="' . helper_mantis_url('set_project.php') . '">';
        # CSRF protection not required here - form does not result in modifications
        echo lang_get('email_project'), ': ';
        if (ON == config_get('show_extended_project_browser')) {
            print_extended_project_browser(helper_get_current_project_trace());
        } else {
            if (ON == config_get('use_javascript')) {
                echo '<select name="project_id" class="small" onchange="document.forms.form_set_project.submit();">';
            } else {
                echo '<select name="project_id" class="small">';
            }
            print_project_option_list(join(';', helper_get_current_project_trace()), true, null, true);
            echo '</select> ';
        }
        echo '<input type="submit" class="button-small" value="' . lang_get('switch') . '" />';
        echo '</form>';
    } else {
        # User has only one project, set it as both current and default
        if (ALL_PROJECTS == helper_get_current_project()) {
            helper_set_current_project($t_project_id);
            if (!current_user_is_protected()) {
                current_user_set_default_project($t_project_id);
            }
            # Force reload of current page, except if we got here after
            # creating the first project
            $t_redirect_url = str_replace(config_get('short_path'), '', $_SERVER['REQUEST_URI']);
            if ('manage_proj_create.php' != $t_redirect_url) {
                html_meta_redirect($t_redirect_url, 0, false);
            }
        }
    }
    if (OFF != config_get('rss_enabled')) {
        # Link to RSS issues feed for the selected project, including authentication details.
        echo '<a href="' . htmlspecialchars(rss_get_issues_feed_url()) . '">';
        echo '<img src="' . helper_mantis_url('images/rss.png') . '" alt="' . lang_get('rss') . '" style="border-style: none; margin: 5px; vertical-align: middle;" />';
        echo '</a>';
    }
    echo '</td>';
    echo '</tr>';
    echo '</table>';
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:85,代码来源:html_api.php

示例7: html_login_info

/**
 * (11) Print the user's account information
 * Also print the select box where users can switch projects
 * @return null
 */
function html_login_info()
{
    $t_username = current_user_get_field('username');
    $t_access_level = get_enum_element('access_levels', current_user_get_access_level());
    $t_now = date(config_get('complete_date_format'));
    $t_realname = current_user_get_field('realname');
    echo '<div id="login-info">';
    if (current_user_is_anonymous()) {
        $t_return_page = $_SERVER['SCRIPT_NAME'];
        if (isset($_SERVER['QUERY_STRING'])) {
            $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
        }
        $t_return_page = string_url($t_return_page);
        echo '<span id="logged-anon-label">' . lang_get('anonymous') . '</span>';
        echo '<span id="login-link"><a href="' . helper_mantis_url('login_page.php?return=' . $t_return_page) . '">' . lang_get('login_link') . '</a></span>';
        if (config_get_global('allow_signup') == ON) {
            echo '<span id="signup-link"><a href="' . helper_mantis_url('signup_page.php') . '">' . lang_get('signup_link') . '</a></span>';
        }
    } else {
        echo '<span id="logged-in-label">' . lang_get('logged_in_as') . '</span>';
        echo '<span id="logged-in-user">' . string_html_specialchars($t_username) . '</span>';
        echo '<span id="logged-in">';
        echo !is_blank($t_realname) ? '<span id="logged-in-realname">' . string_html_specialchars($t_realname) . '</span>' : '';
        echo '<span id="logged-in-accesslevel" class="' . $t_access_level . '">' . $t_access_level . '</span>';
        echo '</span>';
    }
    echo '</div>';
    $t_show_project_selector = true;
    if (count(current_user_get_accessible_projects()) == 1) {
        // >1
        $t_project_ids = current_user_get_accessible_projects();
        $t_project_id = (int) $t_project_ids[0];
        if (count(current_user_get_accessible_subprojects($t_project_id)) == 0) {
            $t_show_project_selector = false;
        }
    }
    if (OFF != config_get('rss_enabled')) {
        echo '<div id="rss-feed">';
        # Link to RSS issues feed for the selected project, including authentication details.
        echo '<a href="' . htmlspecialchars(rss_get_issues_feed_url()) . '">';
        echo '<img src="' . helper_mantis_url('images/rss.png') . '" alt="' . lang_get('rss') . '" title="' . lang_get('rss') . '" />';
        echo '</a>';
        echo '</div>';
    }
    if ($t_show_project_selector) {
        echo '<form method="post" id="form-set-project" action="' . helper_mantis_url('set_project.php') . '">';
        echo '<fieldset id="project-selector">';
        # CSRF protection not required here - form does not result in modifications
        echo '<label for="form-set-project-id">' . lang_get('email_project') . '</label>';
        echo '<select id="form-set-project-id" name="project_id">';
        print_project_option_list(join(';', helper_get_current_project_trace()), true, null, true);
        echo '</select> ';
        echo '<input type="submit" class="button" value="' . lang_get('switch') . '" />';
        echo '</fieldset>';
        echo '</form>';
        echo '<div id="current-time">' . $t_now . '</div>';
    } else {
        echo '<div id="current-time-centered">' . $t_now . '</div>';
    }
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:65,代码来源:html_api.php

示例8: html_login_info

/**
 * (10) Print the user's account information
 * Also print the select box where users can switch projects
 * @return void
 */
function html_login_info()
{
    $t_username = current_user_get_field('username');
    $t_access_level = get_enum_element('access_levels', current_user_get_access_level());
    $t_now = date(config_get('complete_date_format'));
    $t_realname = current_user_get_field('realname');
    # Login information
    echo '<div id="login-info">' . "\n";
    if (current_user_is_anonymous()) {
        $t_return_page = $_SERVER['SCRIPT_NAME'];
        if (isset($_SERVER['QUERY_STRING'])) {
            $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
        }
        $t_return_page = string_url($t_return_page);
        echo "\t" . '<span id="logged-anon-label">' . lang_get('anonymous') . '</span>' . "\n";
        echo "\t" . '<span id="login-link"><a href="' . helper_mantis_url('login_page.php?return=' . $t_return_page) . '">' . lang_get('login_link') . '</a></span>' . "\n";
        if (config_get_global('allow_signup') == ON) {
            echo "\t" . '<span id="signup-link"><a href="' . helper_mantis_url('signup_page.php') . '">' . lang_get('signup_link') . '</a></span>' . "\n";
        }
    } else {
        echo "\t" . '<span id="logged-in-label">' . lang_get('logged_in_as') . '</span>' . "\n";
        echo "\t" . '<span id="logged-in-user">' . string_html_specialchars($t_username) . '</span>' . "\n";
        echo "\t" . '<span id="logged-in">';
        echo !is_blank($t_realname) ? "\t" . '<span id="logged-in-realname">' . string_html_specialchars($t_realname) . '</span>' . "\n" : '';
        echo "\t" . '<span id="logged-in-accesslevel" class="' . $t_access_level . '">' . $t_access_level . '</span>' . "\n";
        echo "\t" . '</span>' . "\n";
    }
    echo '</div>' . "\n";
    # RSS feed
    if (OFF != config_get('rss_enabled')) {
        echo '<div id="rss-feed">' . "\n";
        # Link to RSS issues feed for the selected project, including authentication details.
        echo "\t" . '<a href="' . htmlspecialchars(rss_get_issues_feed_url()) . '">' . "\n";
        echo "\t" . '<img src="' . helper_mantis_url('images/rss.png') . '" alt="' . lang_get('rss') . '" title="' . lang_get('rss') . '" />' . "\n";
        echo "\t" . '</a>' . "\n";
        echo '</div>' . "\n";
    }
    # Project Selector (hidden if only one project visisble to user)
    $t_show_project_selector = true;
    $t_project_ids = current_user_get_accessible_projects();
    if (count($t_project_ids) == 1) {
        $t_project_id = (int) $t_project_ids[0];
        if (count(current_user_get_accessible_subprojects($t_project_id)) == 0) {
            $t_show_project_selector = false;
        }
    }
    if ($t_show_project_selector) {
        echo '<div id="project-selector-div">';
        echo '<form method="post" id="form-set-project" action="' . helper_mantis_url('set_project.php') . '">';
        echo '<fieldset id="project-selector">';
        # CSRF protection not required here - form does not result in modifications
        echo '<label for="form-set-project-id">' . lang_get('email_project') . '</label>';
        echo '<select id="form-set-project-id" name="project_id">';
        print_project_option_list(join(';', helper_get_current_project_trace()), true, null, true);
        echo '</select> ';
        echo '<input type="submit" class="button" value="' . lang_get('switch') . '" />';
        echo '</fieldset>';
        echo '</form>';
        echo '</div>';
    } else {
        # User has only one project, set it as both current and default
        if (ALL_PROJECTS == helper_get_current_project()) {
            helper_set_current_project($t_project_id);
            if (!current_user_is_protected()) {
                current_user_set_default_project($t_project_id);
            }
            # Force reload of current page, except if we got here after
            # creating the first project
            $t_redirect_url = str_replace(config_get('short_path'), '', $_SERVER['REQUEST_URI']);
            if ('manage_proj_create.php' != $t_redirect_url) {
                html_meta_redirect($t_redirect_url, 0, false);
            }
        }
    }
    # Current time
    echo '<div id="current-time">' . $t_now . '</div>';
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:82,代码来源:html_api.php

示例9: filter_draw_selection_area2

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 
    print $t_action;
    ?>
">
		<input type="hidden" name="type" value="1" />
		<?php 
    if ($p_for_screen == false) {
        print '<input type="hidden" name="print" value="1" />';
        print '<input type="hidden" name="offset" value="0" />';
    }
    ?>
		<input type="hidden" name="page_number" value="<?php 
    print $t_page_number;
    ?>
" />
		<input type="hidden" name="view_type" value="<?php 
    print $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_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_cfid);
                }
            }
            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_version = ON == config_get('show_product_version') || AUTO == config_get('show_product_version') && count(version_get_all_rows_with_subs($t_project_id)) > 0;
        # overload handler_id setting if user isn't supposed to see them (ref #6189)
        if (!access_has_project_level(config_get('view_handler_threshold'), $t_project_id)) {
            $t_filter['handler_id'] = array(META_FILTER_ANY);
        }
        ?>

		<tr <?php 
        print "class=\"" . $t_trclass . "\"";
        ?>
>
			<td class="small-caption" valign="top">
				<a href="<?php 
        print $t_filters_url . 'reporter_id[]';
        ?>
" id="reporter_id_filter"><?php 
        print lang_get('reporter');
        ?>
:</a>
			</td>
			<td class="small-caption" valign="top">
				<a href="<?php 
        print $t_filters_url . 'user_monitor[]';
//.........这里部分代码省略.........
开发者ID:amjadtbssm,项目名称:website,代码行数:101,代码来源:filter_api.php

示例10: 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_project_level(config_get('view_handler_threshold'), $t_project_id)) {
            $t_filter[FILTER_PROPERTY_HANDLER_ID] = array(META_FILTER_ANY);
        }
        ?>

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

示例11: lang_get

					$t_show_update_button = true;
					echo '<label for="realname"><span>' . lang_get( 'realname' ) . '</span></label>';
					echo '<span class="input">';
					echo '<input id="realname" type="text" size="32" maxlength="' . DB_FIELD_SIZE_REALNAME . '" name="realname" value="' . string_attribute( $u_realname ) . '" />';
					echo '</span>';
				} ?>
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
				<span class="display-label"><span><?php echo lang_get( 'access_level' ) ?></span></span>
				<span class="input"><span class="field-value"><?php echo get_enum_element( 'access_levels', $u_access_level ); ?></span></span>
				<span class="label-style"></span>
			</div>
			<div class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
				<span class="display-label"><span><?php echo lang_get( 'access_level_project' ) ?></span></span>
				<span class="input"><span class="field-value"><?php echo get_enum_element( 'access_levels', current_user_get_access_level() ); ?></span></span>
				<span class="label-style"></span>
			</div>
			<?php
			$t_projects = user_get_assigned_projects( auth_get_current_user_id() );
			if( count( $t_projects ) > 0 ) {
				echo '<div class="field-container ' . helper_alternate_class_no_attribute() . '">';
				echo '<span class="display-label"><span>' . lang_get( 'assigned_projects' ) . '</span></span>';
				echo '<div class="input">';
				echo '<ul class="project-list">';
				foreach( $t_projects AS $t_project_id=>$t_project ) {
					$t_project_name = string_attribute( $t_project['name'] );
					$t_view_state = $t_project['view_state'];
					$t_access_level = $t_project['access_level'];
					$t_access_level = get_enum_element( 'access_levels', $t_access_level );
					$t_view_state = get_enum_element( 'project_view_state', $t_view_state );
开发者ID:rombert,项目名称:mantisbt,代码行数:31,代码来源:account_page.php

示例12: html_login_info

function html_login_info()
{
    $t_username = current_user_get_field('username');
    $t_access_level = get_enum_element('access_levels', current_user_get_access_level());
    $t_now = date(config_get('complete_date_format'));
    $t_realname = current_user_get_field('realname');
    print '<table class="hide">';
    print '<tr>';
    print '<td class="login-info-left">';
    if (current_user_is_anonymous()) {
        if (!php_version_at_least('4.1.0')) {
            global $_SERVER;
        }
        $t_return_page = $_SERVER['PHP_SELF'];
        if (isset($_SERVER['QUERY_STRING'])) {
            $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
        }
        $t_return_page = string_url($t_return_page);
        print lang_get('anonymous') . ' | <a href="login_page.php?return=' . $t_return_page . '">' . lang_get('login_link') . '</a>';
        if (config_get('allow_signup') == ON) {
            print ' | <a href="signup_page.php">' . lang_get('signup_link') . '</a>';
        }
    } else {
        echo lang_get('logged_in_as'), ": <span class=\"italic\">", string_display($t_username), "</span> <span class=\"small\">";
        echo is_blank($t_realname) ? "({$t_access_level})" : "(", string_display($t_realname), " - {$t_access_level})";
        echo "</span>";
    }
    print '</td>';
    print '<td class="login-info-middle">';
    print "<span class=\"italic\">{$t_now}</span>";
    print '</td>';
    print '<td class="login-info-right">';
    print '<form method="post" name="form_set_project" action="set_project.php">';
    echo lang_get('email_project'), ': ';
    if (ON == config_get('use_javascript')) {
        print '<select name="project_id" class="small" onchange="document.forms.form_set_project.submit();">';
    } else {
        print '<select name="project_id" class="small">';
    }
    print_project_option_list(join(';', helper_get_current_project_trace()), true, null, true);
    print '</select> ';
    print '<input type="submit" class="button-small" value="' . lang_get('switch') . '" />';
    print '</form>';
    print '</td>';
    print '</tr>';
    print '</table>';
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:47,代码来源:html_api.php


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