예제 #1
0
/**
 * Gets an Xml Row that contains all column titles
 * @param string $p_style_id The optional style id.
 * @returns The xml row.
 */
function excel_get_titles_row($p_style_id = '')
{
    $t_columns = excel_get_columns();
    $t_ret = excel_get_start_row($p_style_id);
    foreach ($t_columns as $t_column) {
        $t_ret .= excel_format_column_title(column_get_title($t_column));
    }
    $t_ret .= '</Row>';
    return $t_ret;
}
예제 #2
0
$t_export_title = excel_get_default_filename();
$t_short_date_format = config_get('short_date_format');
# This is where we used to do the entire actual filter ourselves
$t_page_number = gpc_get_int('page_number', 1);
$t_per_page = 100;
$t_result = filter_get_bug_rows($t_page_number, $t_per_page, $t_page_count, $t_bug_count);
if ($t_result === false) {
    print_header_redirect('view_all_set.php?type=0&print=1');
}
header('Content-Type: application/vnd.ms-excel; charset=UTF-8');
header('Pragma: public');
header('Content-Disposition: attachment; filename="' . urlencode(file_clean_name($t_export_title)) . '.xml"');
echo excel_get_header($t_export_title);
echo excel_get_titles_row();
$f_bug_arr = explode(',', $f_export);
$t_columns = excel_get_columns();
do {
    # pre-cache custom column data
    columns_plugin_cache_issue_data($t_result);
    foreach ($t_result as $t_row) {
        if (is_blank($f_export) || in_array($t_row->id, $f_bug_arr)) {
            echo excel_get_start_row();
            foreach ($t_columns as $t_column) {
                $t_custom_field = column_get_custom_field_name($t_column);
                if ($t_custom_field !== null) {
                    echo excel_format_custom_field($t_row->id, $t_row->project_id, $t_custom_field);
                } else {
                    if (column_is_plugin_column($t_column)) {
                        echo excel_format_plugin_column_value($t_column, $t_row);
                    } else {
                        $t_function = 'excel_format_' . $t_column;
예제 #3
0
파일: excel_api.php 프로젝트: kaos/mantisbt
/**
 * Gets an Xml Row that contains all column titles.
 * @returns The xml row.
 */
function excel_get_titles_row()
{
    $t_columns = excel_get_columns();
    $t_ret = '<Row>';
    foreach ($t_columns as $t_column) {
        $t_custom_field = column_get_custom_field_name($t_column);
        if ($t_custom_field !== null) {
            $t_ret .= excel_format_column_title(lang_get_defaulted($t_custom_field));
        } else {
            $t_column_title = column_get_title($t_column);
            $t_ret .= excel_format_column_title($t_column_title);
        }
    }
    $t_ret .= '</Row>';
    return $t_ret;
}