Example #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;
}
echo excel_format_column_title(lang_get('issue_id'));
echo excel_format_column_title(lang_get('project_name'));
echo excel_format_column_title(lang_get('category'));
echo excel_format_column_title(lang_get('summary'));
if ($t_show_realname) {
    echo excel_format_column_title(lang_get('realname'));
} else {
    echo excel_format_column_title(lang_get('username'));
}
echo excel_format_column_title(lang_get('timestamp'));
echo excel_format_column_title(lang_get('minutes'));
echo excel_format_column_title(lang_get('time_tracking_time_spent'));
if ($t_show_cost) {
    echo excel_format_column_title('cost');
}
echo excel_format_column_title('note');
echo '</Row>';
foreach ($t_billing_rows as $t_billing) {
    echo "\n<Row>\n";
    echo excel_prepare_number($t_billing['bug_id']);
    echo excel_prepare_string($t_billing['project_name']);
    echo excel_prepare_string($t_billing['bug_category']);
    echo excel_prepare_string($t_billing['bug_summary']);
    if ($t_show_realname) {
        echo excel_prepare_string($t_billing['reporter_realname']);
    } else {
        echo excel_prepare_string($t_billing['reporter_username']);
    }
    echo excel_prepare_string(date($t_date_format, $t_billing['date_submitted']));
    echo excel_prepare_number($t_billing['minutes']);
    echo excel_prepare_string($t_billing['duration']);
Example #3
0
/**
 * 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;
}