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


PHP get_status_color函数代码示例

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


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

示例1: bug_group_action_print_bug_list

/**
 * Print the list of selected issues and the legend for the status colors.
 *
 * @param $p_bug_ids_array   An array of issue ids.
 */
function bug_group_action_print_bug_list($p_bug_ids_array)
{
    $t_legend_position = config_get('status_legend_position');
    if (STATUS_LEGEND_POSITION_TOP == $t_legend_position) {
        html_status_legend();
        echo '<br />';
    }
    echo '<div align="center">';
    echo '<table class="width75" cellspacing="1">';
    echo '<tr class="row-1">';
    echo '<td class="category" colspan="2">';
    echo lang_get('actiongroup_bugs');
    echo '</td>';
    echo '</tr>';
    $t_i = 1;
    foreach ($p_bug_ids_array as $t_bug_id) {
        $t_class = sprintf("row-%d", $t_i++ % 2 + 1);
        echo sprintf("<tr bgcolor=\"%s\"> <td>%s</td> <td>%s</td> </tr>\n", get_status_color(bug_get_field($t_bug_id, 'status')), string_get_bug_view_link($t_bug_id), string_attribute(bug_get_field($t_bug_id, 'summary')));
    }
    echo '</table>';
    echo '</form>';
    echo '</div>';
    if (STATUS_LEGEND_POSITION_BOTTOM == $t_legend_position) {
        echo '<br />';
        html_status_legend();
    }
}
开发者ID:amjadtbssm,项目名称:website,代码行数:32,代码来源:bug_group_action_api.php

示例2: print_thead

/**
 * Print table head
 * @param $status_cols
 */
function print_thead($status_cols)
{
    echo '<thead>';
    echo '<tr>';
    echo '<th></th>';
    foreach ($status_cols as $status_col) {
        echo '<th bgcolor="' . get_status_color($status_col, null, null) . '" class="center">';
        $assocArray = MantisEnum::getAssocArrayIndexedByValues(lang_get('status_enum_string'));
        echo $assocArray[$status_col];
        echo '</th>';
    }
    echo '</tr>';
    echo '</thead>';
}
开发者ID:Cre-ator,项目名称:Whiteboard.StoryBoard-Plugin,代码行数:18,代码来源:storyboard_index.php

示例3: renderLists

 function renderLists()
 {
     $content = '';
     $status_codes = config_get('status_enum_string');
     $t_status_array = MantisEnum::getAssocArrayIndexedByValues($status_codes);
     foreach ($t_status_array as $status => $statusCode) {
         if ($statusCode != "backlog" && $statusCode != "closed") {
             $issues = $this->renderIssues($status);
             $statusName = string_display_line(get_enum_element('status', $status));
             $content .= '<div class="column">
                                 <div class="inside"
                                 style="background-color: ' . get_status_color($status) . '"
                                 id="' . $status . '">
                                 <h5 title="' . $status . '">' . $statusName . ' (' . sizeof($issues) . ')</h5>';
             $content .= implode("\n", $issues);
             $content .= '</div>';
             // inside
             $content .= '</div>';
             // column
         }
     }
     return $content;
 }
开发者ID:pedroresende,项目名称:MantisBTKanbanBoard,代码行数:23,代码来源:kanban.php

示例4: getBugsInfoJSONPResponse

function getBugsInfoJSONPResponse($bugsString)
{
    $t_bug_table = db_get_table('mantis_bug_table');
    $t_statuses = MantisEnum::getAssocArrayIndexedByValues(config_get('status_enum_string'));
    $statuses = '';
    foreach ($t_statuses as $t_state => $t_label) {
        $statuses .= '"' . $t_label . '": "' . get_status_color($t_state) . '", ';
    }
    $bugs_list = array_unique(str_split($bugsString, 7));
    $bugs_list = "'" . implode("', '", $bugs_list) . "'";
    $query = "SELECT id, status, summary\r\n\t\t\t  FROM `" . $t_bug_table . "`\r\n\t\t\t  WHERE id IN (" . $bugs_list . ")\r\n\t\t\t  ORDER BY FIELD(id, " . $bugs_list . ")";
    $results = db_query_bound($query);
    if ($results) {
        $json = '';
        while ($row = db_fetch_array($results)) {
            $id = $row['id'];
            $statusId = $row['status'];
            $summary = $row['summary'];
            $json .= '"' . $id . '": { "status": "' . $t_statuses[$statusId] . '", "summary": "' . htmlspecialchars($summary) . '" }, ';
        }
    }
    header("Content-Type: application/javascript; charset=utf-8");
    echo 'bugtrackerConnection_callback( { "offset": "' . $_REQUEST['offset'] . '", "length": "' . $_REQUEST['length'] . '", "statuses": { ' . substr($statuses, 0, -2) . ' }, "bugsInfo" : { ' . substr($json, 0, -2) . ' } } );';
}
开发者ID:evilchewits,项目名称:gitweb-mantisbt,代码行数:24,代码来源:getBugsInfo.php

示例5: print_amount_of_issues

/**
 * Print the amount of issues for each specified status in the user row of the plugin table
 *
 * @param $data_row
 * @param $stat_issue_count
 * @param $group_index
 * @param $print
 * @return mixed
 */
function print_amount_of_issues($data_row, $group_index, $stat_issue_count, $print)
{
    $user_id = $data_row['user_id'];
    for ($stat_index = 1; $stat_index <= userprojectapi::get_stat_count(); $stat_index++) {
        $stat_spec_status_ign = plugin_config_get('CStatIgn' . $stat_index);
        $temp_stat_issue_count = userprojectapi::calc_group_spec_amount($data_row, $group_index, $stat_index);
        $stat_issue_count_threshold = plugin_config_get('IAMThreshold' . $stat_index);
        $stat_status_id = plugin_config_get('CStatSelect' . $stat_index);
        $stat_issue_count[$stat_index] += $temp_stat_issue_count;
        /** group 2 -> mark all cells where issue count > 0 */
        if (!userprojectapi::check_user_id_is_enabled($user_id) && $temp_stat_issue_count > 0 && $group_index != 3) {
            echo '<td class="group_row_bg" style="background-color:' . plugin_config_get('TAMHBGColor') . '">';
        } else {
            if ($stat_issue_count_threshold <= $temp_stat_issue_count && $stat_issue_count_threshold > 0) {
                echo '<td style="background-color:' . plugin_config_get('TAMHBGColor') . '">';
            } else {
                echo '<td style="background-color:' . get_status_color($stat_status_id, null, null) . '">';
            }
        }
        if (!$print && $temp_stat_issue_count > 0) {
            $assigned_project_id = $data_row['assigned_project_id'];
            $target_version_id = $data_row['target_version_id'];
            $target_version = '';
            if (strlen($target_version_id) > 0) {
                $target_version = version_get_field($target_version_id, 'version');
            }
            $filter_string = '<a href="search.php?project_id=' . $assigned_project_id . '&amp;status_id=' . $stat_status_id;
            if ($group_index != 3 || $stat_spec_status_ign == OFF && $group_index == 3) {
                $filter_string .= '&amp;handler_id=' . userprojectapi::get_link_user_id($data_row['user_id']);
            }
            $filter_string .= '&amp;sticky_issues=on' . '&amp;target_version=' . $target_version . '&amp;sortby=last_updated' . '&amp;dir=DESC' . '&amp;hide_status_id=-2' . '&amp;match_type=0">';
            echo $filter_string;
            echo $temp_stat_issue_count;
            echo '</a>';
        } else {
            echo $temp_stat_issue_count;
        }
        echo '</td>' . PHP_EOL;
    }
    return $stat_issue_count;
}
开发者ID:Cre-ator,项目名称:Whiteboard.UserProjectView-Plugin,代码行数:50,代码来源:UserProject.php

示例6: print_issue_amount

/**
 * @param $amount_stat_columns
 * @param $print_flag
 * @param $version
 * @param $version_spec_bugs
 * @param $null_issues_flag
 */
function print_issue_amount($amount_stat_columns, $print_flag, $version, $version_spec_bugs, $null_issues_flag)
{
    if (plugin_config_get('ShowSpecStatCols') == ON) {
        for ($column_index = 1; $column_index <= $amount_stat_columns; $column_index++) {
            $column_spec_status = plugin_config_get('CStatSelect' . $column_index);
            $column_spec_bug_count = 0;
            if (!$null_issues_flag) {
                foreach ($version_spec_bugs as $version_spec_bug) {
                    if (bug_get_field($version_spec_bug, 'status') == $column_spec_status) {
                        $column_spec_bug_count++;
                    }
                }
                echo '<td class="status" bgcolor="' . get_status_color($column_spec_status) . '">';
                print_amount($print_flag, $column_spec_bug_count, $version);
            } else {
                echo '<td class="status" bgcolor="' . get_status_color($column_spec_status) . '">0';
            }
            echo '</td>';
        }
    }
    $version_spec_bug_count = count($version_spec_bugs);
    echo '<td class="status">';
    print_amount($print_flag, $version_spec_bug_count, $version);
    echo '</td>';
}
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:32,代码来源:version_view.php

示例7: get_status_bgcolor

function get_status_bgcolor($p_status)
{
    if (!(CLOSED == $p_status)) {
        return "bgcolor=\"" . get_status_color($p_status) . "\"";
    } else {
        return "";
    }
}
开发者ID:jgatica,项目名称:Netoffice,代码行数:8,代码来源:core_helper_API.php

示例8: write_bug_rows

function write_bug_rows($p_rows)
{
    global $t_columns, $t_filter;
    $t_in_stickies = $t_filter && 'on' == $t_filter['sticky_issues'];
    mark_time('begin loop');
    # -- Loop over bug rows --
    $t_rows = sizeof($p_rows);
    for ($i = 0; $i < $t_rows; $i++) {
        $t_row = $p_rows[$i];
        if (0 == $t_row['sticky'] && 0 == $i) {
            $t_in_stickies = false;
        }
        if (0 == $t_row['sticky'] && $t_in_stickies) {
            # demarcate stickies, if any have been shown
            ?>
               <tr>
                       <td class="left" colspan="<?php 
            echo sizeof($t_columns);
            ?>
" bgcolor="#999999">&nbsp;</td>
               </tr>
<?php 
            $t_in_stickies = false;
        }
        # choose color based on status
        $status_color = get_status_color($t_row['status']);
        echo '<tr bgcolor="', $status_color, '" border="1">';
        foreach ($t_columns as $t_column) {
            $t_column_value_function = 'print_column_value';
            helper_call_custom_function($t_column_value_function, array($t_column, $t_row));
        }
        echo '</tr>';
    }
}
开发者ID:jin255ff,项目名称:company_website,代码行数:34,代码来源:view_all_inc.php

示例9: html_status_percentage_legend

function html_status_percentage_legend()
{
    $t_mantis_bug_table = config_get('mantis_bug_table');
    $t_project_id = helper_get_current_project();
    $t_user_id = auth_get_current_user_id();
    #checking if it's a per project statistic or all projects
    $t_specific_where = helper_project_specific_where($t_project_id, $t_user_id);
    $query = "SELECT status, COUNT(*) AS number\r\n\t\t\t\tFROM {$t_mantis_bug_table}\r\n\t\t\t\tWHERE {$t_specific_where}\r\n\t\t\t\tGROUP BY status";
    $result = db_query($query);
    $t_bug_count = 0;
    $t_status_count_array = array();
    while ($row = db_fetch_array($result)) {
        $t_status_count_array[$row['status']] = $row['number'];
        $t_bug_count += $row['number'];
    }
    $t_arr = explode_enum_string(config_get('status_enum_string'));
    $enum_count = count($t_arr);
    if ($t_bug_count > 0) {
        echo '<br />';
        echo '<table class="width100" cellspacing="1">';
        echo '<tr>';
        echo '<td class="form-title" colspan="' . $enum_count . '">' . lang_get('issue_status_percentage') . '</td>';
        echo '</tr>';
        echo '<tr>';
        for ($i = 0; $i < $enum_count; $i++) {
            $t_s = explode_enum_arr($t_arr[$i]);
            $t_color = get_status_color($t_s[0]);
            $t_status = $t_s[0];
            if (!isset($t_status_count_array[$t_status])) {
                $t_status_count_array[$t_status] = 0;
            }
            $width = round($t_status_count_array[$t_status] / $t_bug_count * 100);
            if ($width > 0) {
                echo "<td class=\"small-caption-center\" width=\"{$width}%\" bgcolor=\"{$t_color}\">{$width}%</td>";
            }
        }
        echo '</tr>';
        echo '</table>';
    }
}
开发者ID:amjadtbssm,项目名称:website,代码行数:40,代码来源:html_api.php

示例10: helper_alternate_class

    # spacer
    if ($t_spacer > 0) {
        echo '<td colspan="', $t_spacer, '">&nbsp;</td>';
    }
    echo '</tr>';
}
#
# Status, Resolution
#
if ($tpl_show_status || $tpl_show_resolution) {
    echo '<tr ', helper_alternate_class(), '>';
    $t_spacer = 2;
    # Status
    if ($tpl_show_status) {
        echo '<th class="bug-status category">', lang_get('status'), '</th>';
        echo '<td class="bug-status" bgcolor="', get_status_color($tpl_bug->status), '">', $tpl_status, '</td>';
    } else {
        $t_spacer += 2;
    }
    # Resolution
    if ($tpl_show_resolution) {
        echo '<th class="bug-resolution category">', lang_get('resolution'), '</th>';
        echo '<td class="bug-resolution">', $tpl_resolution, '</td>';
    } else {
        $t_spacer += 2;
    }
    # spacer
    if ($t_spacer > 0) {
        echo '<td colspan="', $t_spacer, '">&nbsp;</td>';
    }
    echo '</tr>';
开发者ID:kaos,项目名称:mantisbt,代码行数:31,代码来源:bug_view_inc.php

示例11: write_bug_rows

function write_bug_rows($p_rows)
{
    global $t_columns, $t_filter;
    $t_in_stickies = $t_filter && 'on' == $t_filter['sticky_issues'];
    # pre-cache custom column data
    columns_plugin_cache_issue_data($p_rows);
    # -- Loop over bug rows --
    $t_rows = count($p_rows);
    for ($i = 0; $i < $t_rows; $i++) {
        $t_row = $p_rows[$i];
        if (0 == $t_row->sticky && 0 == $i) {
            $t_in_stickies = false;
        }
        if (0 == $t_row->sticky && $t_in_stickies) {
            # demarcate stickies, if any have been shown
            ?>
				<tr>
					<td class="left" colspan="<?php 
            echo count($t_columns);
            ?>
" bgcolor="#999999">&#160;</td>
				</tr>
<?php 
            $t_in_stickies = false;
        }
        # choose color based on status
        $status_color = get_status_color($t_row->status, auth_get_current_user_id(), $t_row->project_id);
        echo '<tr bgcolor="', $status_color, '" border="1" valign="top">';
        $t_column_value_function = 'print_column_value';
        foreach ($t_columns as $t_column) {
            helper_call_custom_function($t_column_value_function, array($t_column, $t_row));
        }
        echo '</tr>';
    }
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:35,代码来源:view_all_inc.php

示例12: mark_time

}
echo "({$v_start} - {$v_end} / {$t_bug_count})";
?>
	</td>
</tr>

<?php 
mark_time('begin loop');
# -- Loop over bug rows and create $v_* variables --
for ($i = 0; $i < sizeof($rows); $i++) {
    # prefix bug data with v_
    extract($rows[$i], EXTR_PREFIX_ALL, 'v');
    $t_summary = string_attribute($v_summary);
    $t_last_updated = date(config_get('normal_date_format'), $v_last_updated);
    # choose color based on status
    $status_color = get_status_color($v_status);
    # grab the bugnote count
    # @@@ thraxisp - not used???
    #		$bugnote_info = bug_get_bugnote_stats( $v_id );
    # Check for attachments
    $t_attachment_count = 0;
    if (file_can_view_bug_attachments($v_id)) {
        $t_attachment_count = file_bug_attachment_count($v_id);
    }
    # grab the project name
    $project_name = project_get_field($v_project_id, 'name');
    ?>

<tr bgcolor="<?php 
    echo $status_color;
    ?>
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:my_view_inc.php

示例13: db_fetch_array

 $t_total_paid = 0;
 for ($i = 0; $i < $t_sponsors; ++$i) {
     $row = db_fetch_array($result);
     $t_bug = bug_get($row['bug']);
     $t_sponsor = sponsorship_get($row['sponsor']);
     $t_buglist[] = $row['bug'] . ':' . $row['sponsor'];
     # describe bug
     $t_status = string_attribute(get_enum_element('status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id));
     $t_resolution = string_attribute(get_enum_element('resolution', $t_bug->resolution, auth_get_current_user_id(), $t_bug->project_id));
     $t_version_id = version_get_id($t_bug->fixed_in_version, $t_project);
     if (false !== $t_version_id && VERSION_RELEASED == version_get_field($t_version_id, 'released')) {
         $t_released_label = '<a title="' . lang_get('released') . '">' . $t_bug->fixed_in_version . '</a>';
     } else {
         $t_released_label = $t_bug->fixed_in_version;
     }
     echo '<tr bgcolor="' . get_status_color($t_bug->status, auth_get_current_user_id(), $t_bug->project_id) . '">';
     echo '<td><a href="' . string_get_bug_view_url($row['bug']) . '">' . bug_format_id($row['bug']) . '</a></td>';
     echo '<td>' . project_get_field($t_bug->project_id, 'name') . '&#160;</td>';
     echo '<td class="right">' . $t_released_label . '&#160;</td>';
     echo '<td><a title="' . $t_resolution . '"><u>' . $t_status . '</u>&#160;</a></td>';
     # summary
     echo '<td>' . string_display_line($t_bug->summary);
     if (VS_PRIVATE == $t_bug->view_state) {
         printf(' <img src="%s" alt="(%s)" title="%s" />', $t_icon_path . 'protected.gif', lang_get('private'), lang_get('private'));
     }
     # describe sponsorship amount
     echo '<td>';
     print_user($t_sponsor->user_id);
     echo '</td>';
     echo '<td class="right">' . sponsorship_format_amount($t_sponsor->amount) . '</td>';
     echo '<td><select name="sponsor_' . $row['bug'] . '_' . $t_sponsor->id . '">';
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:31,代码来源:account_sponsor_page.php

示例14: db_fetch_array

 $t_total_paid = 0;
 for ($i = 0; $i < $t_sponsors; ++$i) {
     $row = db_fetch_array($result);
     $t_bug = bug_get($row['bug']);
     $t_sponsor = sponsorship_get($row['sponsor']);
     $t_buglist[] = $row['bug'] . ':' . $row['sponsor'];
     # describe bug
     $t_status = string_attribute(get_enum_element('status', $t_bug->status));
     $t_resolution = string_attribute(get_enum_element('resolution', $t_bug->resolution));
     $t_version_id = version_get_id($t_bug->fixed_in_version, $t_project);
     if (false !== $t_version_id && VERSION_RELEASED == version_get_field($t_version_id, 'released')) {
         $t_released_label = '<a title="' . lang_get('released') . '">' . $t_bug->fixed_in_version . '</a>';
     } else {
         $t_released_label = $t_bug->fixed_in_version;
     }
     echo '<tr bgcolor="' . get_status_color($t_bug->status) . '">';
     echo '<td><a href="' . string_get_bug_view_url($row['bug']) . '">' . bug_format_id($row['bug']) . '</a></td>';
     echo '<td>' . project_get_field($t_bug->project_id, 'name') . '&nbsp;</td>';
     echo '<td class="right">' . $t_released_label . '&nbsp;</td>';
     echo '<td><a title="' . $t_resolution . '"><u>' . $t_status . '</u>&nbsp;</a></td>';
     # summary
     echo '<td>' . string_display_line($t_bug->summary);
     if (VS_PRIVATE == $t_bug->view_state) {
         printf(' <img src="%s" alt="(%s)" title="%s" />', $t_icon_path . 'protected.gif', lang_get('private'), lang_get('private'));
     }
     # describe sponsorship amount
     echo '<td>';
     print_user($t_sponsor->user_id);
     echo '</td>';
     echo '<td class="right">' . sponsorship_format_amount($t_sponsor->amount) . '</td>';
     echo '<td><select name="sponsor_' . $row['bug'] . '_' . $t_sponsor->id . '">';
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:account_sponsor_page.php

示例15: count

    $v_end = 0;
}
echo "({$v_start} - {$v_end} / {$t_bug_count})";
?>
	</td>
</tr>

<?php 
# -- Loop over bug rows and create $v_* variables --
$t_count = count($rows);
for ($i = 0; $i < $t_count; $i++) {
    $t_bug = $rows[$i];
    $t_summary = string_display_line_links($t_bug->summary);
    $t_last_updated = date(config_get('normal_date_format'), $t_bug->last_updated);
    # choose color based on status
    $status_color = get_status_color($t_bug->status, auth_get_current_user_id(), $t_bug->project_id);
    # Check for attachments
    $t_attachment_count = 0;
    # TODO: factor in the allow_view_own_attachments configuration option
    # instead of just using a global check.
    if (file_can_view_bug_attachments($t_bug->id, null)) {
        $t_attachment_count = file_bug_attachment_count($t_bug->id);
    }
    # grab the project name
    $project_name = project_get_field($t_bug->project_id, 'name');
    ?>

<tr bgcolor="<?php 
    echo $status_color;
    ?>
">
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:my_view_inc.php


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