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

PHP user_cache_array_rows函数代码示例

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

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



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

示例1: project_get_all_user_rows

function project_get_all_user_rows($p_project_id = ALL_PROJECTS, $p_access_level = ANYBODY, $p_include_global_users = true)
{
    $c_project_id = db_prepare_int($p_project_id);
    # Optimization when access_level is NOBODY
    if (NOBODY == $p_access_level) {
        return array();
    }
    $t_user_table = db_get_table('user');
    $t_project_user_list_table = db_get_table('project_user_list');
    $t_project_table = db_get_table('project');
    $t_on = ON;
    $t_users = array();
    $t_global_access_level = $p_access_level;
    if ($c_project_id != ALL_PROJECTS && $p_include_global_users) {
        # looking for specific project
        if (VS_PRIVATE == project_get_field($p_project_id, 'view_state')) {
            /** @todo (thraxisp) this is probably more complex than it needs to be
             * When a new project is created, those who meet 'private_project_threshold' are added
             *  automatically, but don't have an entry in project_user_list_table.
             *  if they did, you would not have to add global levels.
             */
            $t_private_project_threshold = config_get('private_project_threshold');
            if (is_array($t_private_project_threshold)) {
                if (is_array($p_access_level)) {
                    # both private threshold and request are arrays, use intersection
                    $t_global_access_level = array_intersect($p_access_level, $t_private_project_threshold);
                } else {
                    # private threshold is an array, but request is a number, use values in threshold higher than request
                    $t_global_access_level = array();
                    foreach ($t_private_project_threshold as $t_threshold) {
                        if ($p_access_level <= $t_threshold) {
                            $t_global_access_level[] = $t_threshold;
                        }
                    }
                }
            } else {
                if (is_array($p_access_level)) {
                    // private threshold is a number, but request is an array, use values in request higher than threshold
                    $t_global_access_level = array();
                    foreach ($p_access_level as $t_threshold) {
                        if ($t_threshold >= $t_private_project_threshold) {
                            $t_global_access_level[] = $t_threshold;
                        }
                    }
                } else {
                    // both private threshold and request are numbers, use maximum
                    $t_global_access_level = max($p_access_level, $t_private_project_threshold);
                }
            }
        }
    }
    if (is_array($t_global_access_level)) {
        if (0 == count($t_global_access_level)) {
            $t_global_access_clause = '>= ' . NOBODY . ' ';
        } else {
            if (1 == count($t_global_access_level)) {
                $t_global_access_clause = '= ' . array_shift($t_global_access_level) . ' ';
            } else {
                $t_global_access_clause = 'IN (' . implode(',', $t_global_access_level) . ')';
            }
        }
    } else {
        $t_global_access_clause = ">= {$t_global_access_level} ";
    }
    if ($p_include_global_users) {
        $query = "SELECT id, username, realname, access_level\n\t\t\t\tFROM {$t_user_table}\n\t\t\t\tWHERE enabled = " . db_param() . "\n\t\t\t\t\tAND access_level {$t_global_access_clause}";
        $result = db_query_bound($query, array($t_on));
        $t_row_count = db_num_rows($result);
        for ($i = 0; $i < $t_row_count; $i++) {
            $row = db_fetch_array($result);
            $t_users[$row['id']] = $row;
        }
    }
    if ($c_project_id != ALL_PROJECTS) {
        // Get the project overrides
        $query = "SELECT u.id, u.username, u.realname, l.access_level\n\t\t\t\tFROM {$t_project_user_list_table} l, {$t_user_table} u\n\t\t\t\tWHERE l.user_id = u.id\n\t\t\t\tAND u.enabled = " . db_param() . "\n\t\t\t\tAND l.project_id = " . db_param();
        $result = db_query_bound($query, array($t_on, $c_project_id));
        $t_row_count = db_num_rows($result);
        for ($i = 0; $i < $t_row_count; $i++) {
            $row = db_fetch_array($result);
            if (is_array($p_access_level)) {
                $t_keep = in_array($row['access_level'], $p_access_level);
            } else {
                $t_keep = $row['access_level'] >= $p_access_level;
            }
            if ($t_keep) {
                $t_users[$row['id']] = $row;
            } else {
                # If user's overridden level is lower than required, so remove
                #  them from the list if they were previously there
                unset($t_users[$row['id']]);
            }
        }
    }
    user_cache_array_rows(array_keys($t_users));
    return array_values($t_users);
}
开发者ID:Kirill,项目名称:mantisbt,代码行数:97,代码来源:project_api.php


示例2: auth_get_current_user_id

$t_user_id = auth_get_current_user_id();
#precache access levels
if (isset($g_project_override)) {
    access_cache_matrix_project($g_project_override);
} else {
    access_cache_matrix_project(helper_get_current_project());
}
# get the bugnote data
$t_bugnote_order = current_user_get_pref('bugnote_order');
$t_bugnotes = bugnote_get_all_visible_bugnotes($f_bug_id, $t_bugnote_order, 0, $t_user_id);
#precache users
$t_bugnote_users = array();
foreach ($t_bugnotes as $t_bugnote) {
    $t_bugnote_users[] = $t_bugnote->reporter_id;
}
user_cache_array_rows($t_bugnote_users);
$num_notes = count($t_bugnotes);
?>

<?php 
# Bugnotes BEGIN
?>
<a id="bugnotes"></a><br />

<?php 
collapse_open('bugnotes');
?>
<table class="bugnotes width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
<?php 
开发者ID:nextgens,项目名称:mantisbt,代码行数:31,代码来源:bugnote_view_inc.php


示例3: create_reporter_summary

function create_reporter_summary()
{
    global $reporter_name, $reporter_count;
    $t_project_id = helper_get_current_project();
    $t_user_table = db_get_table('user');
    $t_bug_table = db_get_table('bug');
    $t_user_id = auth_get_current_user_id();
    $specific_where = helper_project_specific_where($t_project_id, $t_user_id);
    $query = "SELECT reporter_id\n\t\t\t\t FROM {$t_bug_table}\n\t\t\t\t WHERE {$specific_where}";
    $result = db_query_bound($query);
    $t_total_reported = db_num_rows($result);
    $t_reporter_arr = array();
    $t_reporters = array();
    for ($i = 0; $i < $t_total_reported; $i++) {
        $row = db_fetch_array($result);
        if (isset($t_reporter_arr[$row['reporter_id']])) {
            $t_reporter_arr[$row['reporter_id']]++;
        } else {
            $t_reporter_arr[$row['reporter_id']] = 1;
            $t_reporters[] = $row['reporter_id'];
        }
    }
    if (count($t_reporter_arr) == 0) {
        return array();
    }
    user_cache_array_rows($t_reporters);
    foreach ($t_reporter_arr as $t_reporter => $t_count) {
        $t_metrics[user_get_name($t_reporter)] = $t_count;
    }
    ksort($t_metrics);
    # end for
    return $t_metrics;
}
开发者ID:kaos,项目名称:mantisbt,代码行数:33,代码来源:graph_api.php


示例4: summary_print_by_reporter

/**
 * print bug counts by reporter id
 * @return void
 */
function summary_print_by_reporter()
{
    $t_reporter_summary_limit = config_get('reporter_summary_limit');
    $t_project_id = helper_get_current_project();
    $t_specific_where = helper_project_specific_where($t_project_id);
    if (' 1<>1' == $t_specific_where) {
        return;
    }
    $t_query = 'SELECT reporter_id, COUNT(*) as num
				FROM {bug}
				WHERE ' . $t_specific_where . '
				GROUP BY reporter_id
				ORDER BY num DESC';
    $t_result = db_query($t_query, array(), $t_reporter_summary_limit);
    $t_reporters = array();
    while ($t_row = db_fetch_array($t_result)) {
        $t_reporters[] = $t_row['reporter_id'];
    }
    user_cache_array_rows($t_reporters);
    foreach ($t_reporters as $t_reporter) {
        $v_reporter_id = $t_reporter;
        $t_query = 'SELECT COUNT(id) as bugcount, status FROM {bug}
					WHERE reporter_id=' . db_param() . '
					AND ' . $t_specific_where . '
					GROUP BY status
					ORDER BY status';
        $t_result2 = db_query($t_query, array($v_reporter_id));
        $t_bugs_open = 0;
        $t_bugs_resolved = 0;
        $t_bugs_closed = 0;
        $t_bugs_total = 0;
        $t_resolved_val = config_get('bug_resolved_status_threshold');
        $t_closed_val = config_get('bug_closed_status_threshold');
        while ($t_row2 = db_fetch_array($t_result2)) {
            $t_bugs_total += $t_row2['bugcount'];
            if ($t_closed_val <= $t_row2['status']) {
                $t_bugs_closed += $t_row2['bugcount'];
            } else {
                if ($t_resolved_val <= $t_row2['status']) {
                    $t_bugs_resolved += $t_row2['bugcount'];
                } else {
                    $t_bugs_open += $t_row2['bugcount'];
                }
            }
        }
        if (0 < $t_bugs_total) {
            $t_user = string_display_line(user_get_name($v_reporter_id));
            $t_bug_link = '<a class="subtle" href="' . config_get('bug_count_hyperlink_prefix') . '&amp;' . FILTER_PROPERTY_REPORTER_ID . '=' . $v_reporter_id;
            if (0 < $t_bugs_open) {
                $t_bugs_open = $t_bug_link . '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=' . $t_resolved_val . '">' . $t_bugs_open . '</a>';
            }
            if (0 < $t_bugs_resolved) {
                $t_bugs_resolved = $t_bug_link . '&amp;' . FILTER_PROPERTY_STATUS . '=' . $t_resolved_val . '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=' . $t_closed_val . '">' . $t_bugs_resolved . '</a>';
            }
            if (0 < $t_bugs_closed) {
                $t_bugs_closed = $t_bug_link . '&amp;' . FILTER_PROPERTY_STATUS . '=' . $t_closed_val . '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=">' . $t_bugs_closed . '</a>';
            }
            if (0 < $t_bugs_total) {
                $t_bugs_total = $t_bug_link . '&amp;' . FILTER_PROPERTY_HIDE_STATUS . '=">' . $t_bugs_total . '</a>';
            }
            summary_helper_print_row($t_user, $t_bugs_open, $t_bugs_resolved, $t_bugs_closed, $t_bugs_total);
        }
    }
}
开发者ID:gtn,项目名称:mantisbt,代码行数:68,代码来源:summary_api.php


示例5: filter_get_bug_rows

$t_page_count = null;
$rows = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true);
if ($rows === false) {
    print_header_redirect('view_all_set.php?type=0');
}
$t_bugslist = array();
$t_users_handlers = array();
$t_project_ids = array();
$t_row_count = count($rows);
for ($i = 0; $i < $t_row_count; $i++) {
    array_push($t_bugslist, $rows[$i]->id);
    $t_users_handlers[] = $rows[$i]->handler_id;
    $t_project_ids[] = $rows[$i]->project_id;
}
$t_unique_users_handlers = array_unique($t_users_handlers);
$t_unique_project_ids = array_unique($t_project_ids);
user_cache_array_rows($t_unique_users_handlers);
project_cache_array_rows($t_unique_project_ids);
gpc_set_cookie(config_get('bug_list_cookie'), implode(',', $t_bugslist));
compress_enable();
# don't index view issues pages
html_robots_noindex();
html_page_top1(lang_get('view_bugs_link'));
if (current_user_get_pref('refresh_delay') > 0) {
    html_meta_redirect('view_all_bug_page.php?page_number=' . $f_page_number, current_user_get_pref('refresh_delay') * 60);
}
html_page_top2();
print_recently_visited();
define('VIEW_ALL_INC_ALLOW', true);
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'view_all_inc.php';
html_page_bottom();
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:view_all_bug_page.php


示例6: bug_get_monitors

/**
 * Returns the list of users monitoring the specified bug
 *
 * @param int $p_bug_id
 */
function bug_get_monitors($p_bug_id)
{
    if (!access_has_bug_level(config_get('show_monitor_list_threshold'), $p_bug_id)) {
        return array();
    }
    $c_bug_id = db_prepare_int($p_bug_id);
    $t_bug_monitor_table = db_get_table('mantis_bug_monitor_table');
    $t_user_table = db_get_table('mantis_user_table');
    # get the bugnote data
    $query = "SELECT user_id, enabled\n\t\t\tFROM {$t_bug_monitor_table} m, {$t_user_table} u\n\t\t\tWHERE m.bug_id=" . db_param() . " AND m.user_id = u.id\n\t\t\tORDER BY u.realname, u.username";
    $result = db_query_bound($query, array($c_bug_id));
    $num_users = db_num_rows($result);
    $t_users = array();
    for ($i = 0; $i < $num_users; $i++) {
        $row = db_fetch_array($result);
        $t_users[$i] = $row['user_id'];
    }
    user_cache_array_rows($t_users);
    return $t_users;
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:25,代码来源:bug_api.php


示例7: summary_print_by_reporter

function summary_print_by_reporter()
{
    $t_mantis_bug_table = db_get_table('mantis_bug_table');
    $t_mantis_user_table = db_get_table('mantis_user_table');
    $t_reporter_summary_limit = config_get('reporter_summary_limit');
    $t_project_id = helper_get_current_project();
    $t_user_id = auth_get_current_user_id();
    $specific_where = helper_project_specific_where($t_project_id);
    if (' 1<>1' == $specific_where) {
        return;
    }
    $query = "SELECT reporter_id, COUNT(*) as num\n\t\t\t\tFROM {$t_mantis_bug_table}\n\t\t\t\tWHERE {$specific_where}\n\t\t\t\tGROUP BY reporter_id\n\t\t\t\tORDER BY num DESC";
    $result = db_query($query, $t_reporter_summary_limit);
    $t_reporters = array();
    while ($row = db_fetch_array($result)) {
        $t_reporters[] = $row['reporter_id'];
    }
    user_cache_array_rows($t_reporters);
    foreach ($t_reporters as $t_reporter) {
        $v_reporter_id = $t_reporter;
        $query = "SELECT COUNT(id) as bugcount, status FROM {$t_mantis_bug_table}\n\t\t\t\t\tWHERE reporter_id={$v_reporter_id}\n\t\t\t\t\tAND {$specific_where}\n\t\t\t\t\tGROUP BY status\n\t\t\t\t\tORDER BY status";
        $result2 = db_query($query);
        $last_reporter = -1;
        $t_bugs_open = 0;
        $t_bugs_resolved = 0;
        $t_bugs_closed = 0;
        $t_bugs_total = 0;
        $t_resolved_val = config_get('bug_resolved_status_threshold');
        $t_closed_val = config_get('bug_closed_status_threshold');
        while ($row2 = db_fetch_array($result2)) {
            $t_bugs_total += $row2['bugcount'];
            if ($t_closed_val <= $row2['status']) {
                $t_bugs_closed += $row2['bugcount'];
            } else {
                if ($t_resolved_val <= $row2['status']) {
                    $t_bugs_resolved += $row2['bugcount'];
                } else {
                    $t_bugs_open += $row2['bugcount'];
                }
            }
        }
        if (0 < $t_bugs_total) {
            $t_user = string_display_line(user_get_name($v_reporter_id));
            $t_bug_link = '<a class="subtle" href="' . config_get('bug_count_hyperlink_prefix') . '&amp;' . FILTER_PROPERTY_REPORTER_ID . '=' . $v_reporter_id;
            if (0 < $t_bugs_open) {
                $t_bugs_open = $t_bug_link . '&amp;' . FILTER_PROPERTY_HIDE_STATUS_ID . '=' . $t_resolved_val . '">' . $t_bugs_open . '</a>';
            }
            if (0 < $t_bugs_resolved) {
                $t_bugs_resolved = $t_bug_link . '&amp;' . FILTER_PROPERTY_STATUS_ID . '=' . $t_resolved_val . '&amp;' . FILTER_PROPERTY_HIDE_STATUS_ID . '=' . $t_closed_val . '">' . $t_bugs_resolved . '</a>';
            }
            if (0 < $t_bugs_closed) {
                $t_bugs_closed = $t_bug_link . '&amp;' . FILTER_PROPERTY_STATUS_ID . '=' . $t_closed_val . '&amp;' . FILTER_PROPERTY_HIDE_STATUS_ID . '=">' . $t_bugs_closed . '</a>';
            }
            if (0 < $t_bugs_total) {
                $t_bugs_total = $t_bug_link . '&amp;' . FILTER_PROPERTY_HIDE_STATUS_ID . '=">' . $t_bugs_total . '</a>';
            }
            summary_helper_print_row($t_user, $t_bugs_open, $t_bugs_resolved, $t_bugs_closed, $t_bugs_total);
        }
    }
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:60,代码来源:summary_api.php


示例8: user_cache_array_rows

     $t_parent_version = $t_row['parent_version'];
     if (!helper_call_custom_function('changelog_include_issue', array($t_issue_id))) {
         continue;
     }
     if (0 === strcasecmp($t_parent_version, $t_version)) {
         $t_issue_ids[] = $t_issue_id;
         $t_issue_parents[] = $t_issue_parent;
     } else {
         if (!in_array($t_issue_id, $t_issue_ids)) {
             $t_issue_ids[] = $t_issue_id;
             $t_issue_parents[] = null;
         }
     }
     $t_issue_handlers[] = $t_row['handler_id'];
 }
 user_cache_array_rows(array_unique($t_issue_handlers));
 $t_issues_resolved = count(array_unique($t_issue_ids));
 if ($t_issues_resolved > 0) {
     if (!$t_project_header_printed) {
         print_project_header_changelog($t_project_name);
         $t_project_header_printed = true;
     }
     if (!$t_version_header_printed) {
         print_version_header($t_version_id);
         $t_version_header_printed = true;
     }
     if (!is_blank($t_description)) {
         echo string_display("<br />{$t_description}<br /><br />");
     }
 } else {
     continue;
开发者ID:WebuddhaInc,项目名称:mantisbt-plugin-wbquickreport,代码行数:31,代码来源:changelog_page.php


示例9: bug_get_monitors

/**
 * Returns the list of users monitoring the specified bug
 *
 * @param integer $p_bug_id Integer representing bug identifier.
 * @return array
 */
function bug_get_monitors( $p_bug_id ) {
	if( ! access_has_bug_level( config_get( 'show_monitor_list_threshold' ), $p_bug_id ) ) {
		return array();
	}

	# get the bugnote data
	$t_query = 'SELECT user_id, enabled
			FROM {bug_monitor} m, {user} u
			WHERE m.bug_id=' . db_param() . ' AND m.user_id = u.id
			ORDER BY u.realname, u.username';
	$t_result = db_query( $t_query, array( $p_bug_id ) );

	$t_users = array();
	while( $t_row = db_fetch_array( $t_result ) ) {
		$t_users[] = $t_row['user_id'];
	}

	user_cache_array_rows( $t_users );

	return $t_users;
}
开发者ID:01-Scripts,项目名称:mantisbt,代码行数:27,代码来源:bug_api.php


示例10: create_reporter_summary

/**
 * Create summary table of reporters
 * @return array
 */
function create_reporter_summary()
{
    $t_project_id = helper_get_current_project();
    $t_user_id = auth_get_current_user_id();
    $t_specific_where = helper_project_specific_where($t_project_id, $t_user_id);
    $t_query = 'SELECT reporter_id FROM {bug} WHERE ' . $t_specific_where;
    $t_result = db_query($t_query);
    $t_reporter_arr = array();
    $t_reporters = array();
    while ($t_row = db_fetch_array($t_result)) {
        if (isset($t_reporter_arr[$t_row['reporter_id']])) {
            $t_reporter_arr[$t_row['reporter_id']]++;
        } else {
            $t_reporter_arr[$t_row['reporter_id']] = 1;
            $t_reporters[] = $t_row['reporter_id'];
        }
    }
    if (count($t_reporter_arr) == 0) {
        return array();
    }
    user_cache_array_rows($t_reporters);
    foreach ($t_reporter_arr as $t_reporter => $t_count) {
        $t_metrics[user_get_name($t_reporter)] = $t_count;
    }
    ksort($t_metrics);
    return $t_metrics;
}
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:graph_api.php


示例11: print_header_redirect

    print_header_redirect('view_all_set.php?type=0');
}
$t_bugslist = array();
$t_unique_user_ids = array();
$t_unique_project_ids = array();
$t_row_count = count($t_rows);
for ($i = 0; $i < $t_row_count; $i++) {
    array_push($t_bugslist, $t_rows[$i]->id);
    $t_handler_id = $t_rows[$i]->handler_id;
    $t_unique_user_ids[$t_handler_id] = $t_handler_id;
    $t_reporter_id = $t_rows[$i]->reporter_id;
    $t_unique_user_ids[$t_reporter_id] = $t_reporter_id;
    $t_project_id = $t_rows[$i]->project_id;
    $t_unique_project_ids[$t_project_id] = $t_project_id;
}
user_cache_array_rows($t_unique_user_ids);
project_cache_array_rows($t_unique_project_ids);
gpc_set_cookie(config_get('bug_list_cookie'), implode(',', $t_bugslist));
compress_enable();
# don't index view issues pages
html_robots_noindex();
html_page_top1(lang_get('view_bugs_link'));
if (current_user_get_pref('refresh_delay') > 0) {
    $t_query = '?';
    if ($f_page_number > 1) {
        $t_query .= 'page_number=' . $f_page_number . '&';
    }
    $t_query .= 'refresh=true';
    html_meta_redirect('view_all_bug_page.php' . $t_query, current_user_get_pref('refresh_delay') * 60);
}
html_page_top2();
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:view_all_bug_page.php


示例12: email_notify_new_account

/**
 * notify the selected group a new user has signup
 * @param string $p_username Username of new user.
 * @param string $p_email    Email address of new user.
 * @return void
 */
function email_notify_new_account($p_username, $p_email)
{
    log_event(LOG_EMAIL, 'New account for user %s', $p_username);
    $t_threshold_min = config_get('notify_new_user_created_threshold_min');
    $t_threshold_users = project_get_all_user_rows(ALL_PROJECTS, $t_threshold_min);
    $t_user_ids = array_keys($t_threshold_users);
    user_cache_array_rows($t_user_ids);
    user_pref_cache_array_rows($t_user_ids);
    foreach ($t_threshold_users as $t_user) {
        lang_push(user_pref_get_language($t_user['id']));
        $t_recipient_email = user_get_email($t_user['id']);
        $t_subject = '[' . config_get('window_title') . '] ' . lang_get('new_account_subject');
        $t_message = lang_get('new_account_signup_msg') . "\n\n" . lang_get('new_account_username') . ' ' . $p_username . "\n" . lang_get('new_account_email') . ' ' . $p_email . "\n" . lang_get('new_account_IP') . ' ' . $_SERVER['REMOTE_ADDR'] . "\n" . config_get_global('path') . "\n\n" . lang_get('new_account_do_not_reply');
        if (!is_blank($t_recipient_email)) {
            email_store($t_recipient_email, $t_subject, $t_message);
            log_event(LOG_EMAIL, 'New Account Notify for email = \'%s\'', $t_recipient_email);
        }
        lang_pop();
    }
}
开发者ID:spring,项目名称:spring-website,代码行数:26,代码来源:email_api.php


示例13: require_api

require_api('print_api.php');
require_api('user_api.php');
if (access_has_bug_level(config_get('show_monitor_list_threshold'), $f_bug_id)) {
    $c_bug_id = db_prepare_int($f_bug_id);
    $t_bug_monitor_table = db_get_table('bug_monitor');
    $t_user_table = db_get_table('user');
    # get the bugnote data
    $query = "SELECT user_id, enabled\n\t\t\tFROM {$t_bug_monitor_table} m, {$t_user_table} u\n\t\t\tWHERE m.bug_id=" . db_param() . " AND m.user_id = u.id\n\t\t\tORDER BY u.realname, u.username";
    $result = db_query_bound($query, array($c_bug_id));
    $num_users = db_num_rows($result);
    $t_users = array();
    for ($i = 0; $i < $num_users; $i++) {
        $row = db_fetch_array($result);
        $t_users[$i] = $row['user_id'];
    }
    user_cache_array_rows($t_users);
    echo '<a id="monitors"></a><br />';
    collapse_open('monitoring');
    ?>
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
<?php 
    collapse_icon('monitoring');
    ?>
		<?php 
    echo lang_get('users_monitoring_bug');
    ?>
	</td>
</tr>
<tr class="row-1">
开发者ID:kaos,项目名称:mantisbt,代码行数:31,代码来源:bug_monitor_list_view_inc.php


示例14: bug_get_monitors

/**
 * Returns the list of users monitoring the specified bug
 *
 * @param int $p_bug_id
 * @return array
 */
function bug_get_monitors($p_bug_id)
{
    if (!access_has_bug_level(config_get('show_monitor_list_threshold'), $p_bug_id)) {
        return array();
    }
    $t_bug_monitor_table = db_get_table('bug_monitor');
    $t_user_table = db_get_table('user');
    # get the bugnote data
    $t_query = "SELECT user_id, enabled\n\t\t\tFROM {$t_bug_monitor_table} m, {$t_user_table} u\n\t\t\tWHERE m.bug_id=" . db_param() . " AND m.user_id = u.id\n\t\t\tORDER BY u.realname, u.username";
    $t_result = db_query_bound($t_query, array($p_bug_id));
    $t_users = array();
    while ($t_row = db_fetch_array($t_result)) {
        $t_users[] = $t_row['user_id'];
    }
    user_cache_array_rows($t_users);
    return $t_users;
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:23,代码来源:bug_api.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP user_can函数代码示例发布时间:2022-05-23
下一篇:
PHP user_bonus函数代码示例发布时间: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