function displayResultsCore($query, $fields)
{
    $result = db_query_bound($query);
    $nbRows = 0;
    while ($row = db_fetch_array($result)) {
        $nbRows++;
        $t_bug = bug_get($row['id']);
        print "<tr> \n";
        print '<td><a href="' . string_get_bug_view_url($row['id']) . '">' . bug_format_id($row['id']) . '</a></td>';
        //print "<td> ".string_get_bug_view_url( ))." </td>\n";
        print "<td> " . string_display_line(get_enum_element('status', $t_bug->status)) . " </td>\n";
        print "<td> " . category_get_row($t_bug->category_id)['name'] . " </td>\n";
        print "<td> " . $t_bug->summary . " </td>\n";
        print "<td> " . user_get_field($t_bug->reporter_id, 'username') . " </td>\n";
        if ($t_bug->handler_id != null) {
            print "<td> " . user_get_field($t_bug->handler_id, 'username') . " </td>\n";
        }
        if (sizeof($fields) > 0) {
            for ($i = 0; $i < sizeof($fields); $i++) {
                print "<td> " . $row[$fields[$i]] . " </td>\n";
            }
        }
        print "</tr>\n";
    }
    return $nbRows;
}
/**
 * Prints the field within the custom action form.  This has an entry for
 * every field the user need to supply + the submit button.  The fields are
 * added as rows in a table that is already created by the calling code.
 * A row has two columns.
 */
function action_add_note_print_fields()
{
    echo '<tr class="row-1" valign="top"><td class="category">', lang_get('add_bugnote_title'), '</td><td><textarea name="bugnote_text" cols="80" rows="10"></textarea></td></tr>';
    ?>
	<!-- View Status -->
	<tr class="row-2">
	<td class="category">
		<?php 
    echo lang_get('view_status');
    ?>
	</td>
	<td>
<?php 
    $t_default_state = config_get('default_bugnote_view_status');
    if (access_has_project_level(config_get('set_view_status_threshold'))) {
        ?>
			<select name="view_state">
				<?php 
        print_enum_string_option_list('view_state', $t_default_state);
        ?>
			</select>
<?php 
    } else {
        echo get_enum_element('view_state', $t_default_state);
        echo '<input type="hidden" name="view_state" value="', $t_default_state, '" />';
    }
    ?>
	</td>
	</tr>
	<?php 
    echo '<tr><td colspan="2"><center><input type="submit" class="button" value="' . lang_get('add_bugnote_button') . ' " /></center></td></tr>';
}
Example #3
0
/**
 * gets the status icon
 * @param string $p_icon
 * @return string html img tag containing status icon
 * @access public
 */
function icon_get_status_icon( $p_icon ) {
	$t_icon_path = config_get( 'icon_path' );
	$t_status_icon_arr = config_get( 'status_icon_arr' );
	$t_priotext = get_enum_element( 'priority', $p_icon );
	if( isset( $t_status_icon_arr[$p_icon] ) && !is_blank( $t_status_icon_arr[$p_icon] ) ) {
		return "<img src=\"$t_icon_path$t_status_icon_arr[$p_icon]\" alt=\"\" title=\"$t_priotext\" />";
	} else {
		return "&#160;";
	}
}
Example #4
0
/**
 * gets the status icon
 * @param string $p_icon Icon file name.
 * @return string html img tag containing status icon
 * @access public
 */
function icon_get_status_icon($p_icon)
{
    $t_icon_path = config_get('icon_path');
    $t_status_icon_arr = config_get('status_icon_arr');
    $t_priotext = get_enum_element('priority', $p_icon);
    if (isset($t_status_icon_arr[$p_icon]) && !is_blank($t_status_icon_arr[$p_icon])) {
        return '<img src="' . $t_icon_path . $t_status_icon_arr[$p_icon] . '" alt="" title="' . $t_priotext . '" />';
    } else {
        return '&#160;';
    }
}
function reminder_print_status_option_list($p_name)
{
    $t_enum_values = MantisEnum::getValues(config_get('status_enum_string'));
    $t_selection = plugin_config_get($p_name);
    echo '<select name="' . $p_name . '[]" multiple="multiple" size="' . count($t_enum_values) . '">';
    foreach ($t_enum_values as $t_key) {
        $t_elem2 = get_enum_element('status', $t_key);
        echo '<option value="' . $t_key . '"';
        reminder_check_selected($t_selection, $t_key);
        echo '>' . $t_elem2 . '</option>';
    }
    echo '</select>';
}
function custom_function_default_roadmap_print_issue($p_issue_id, $p_issue_level = 0)
{
    $t_bug = bug_get($p_issue_id);
    if (bug_is_resolved($p_issue_id)) {
        $t_strike_start = '<strike>';
        $t_strike_end = '</strike>';
    } else {
        $t_strike_start = $t_strike_end = '';
    }
    $t_category = is_blank($t_bug->category) ? '' : '<b>[' . $t_bug->category . ']</b> ';
    echo str_pad('', $p_issue_level * 6, '&nbsp;'), '- ', $t_strike_start, string_get_bug_view_link($p_issue_id), ': ', $t_category, string_display_line_links($t_bug->summary);
    if ($t_bug->handler_id != 0) {
        echo ' (', prepare_user_name($t_bug->handler_id), ')';
    }
    echo ' - ', get_enum_element('status', $t_bug->status), $t_strike_end, '.<br />';
}
 /**
  * Builds notification emails for the selected customers about changes made in bugs reports they are linked to
  *
  * @param array $customer_ids the ids of the customer to notify
  * @param string $from the start of the interval
  * @param string $to the end of the interval
  *
  * @return array notified customers
  */
 static function buildNotificationEmails($customer_ids, $from, $to)
 {
     $emails = array();
     lang_push(plugin_config_get('email_notification_language'));
     $fromDate = self::startOfDay(strtotime($from));
     $toDate = self::endOfDay(strtotime($to));
     $changedBugIds = CustomerManagementDao::findAllChangedBugIds($customer_ids, $fromDate, $toDate);
     $dateFormat = config_get('short_date_format');
     foreach ($customer_ids as $customer_id) {
         $changesForCustomer = array();
         foreach ($changedBugIds as $changedBugId) {
             if ($changedBugId['customer_id'] == $customer_id) {
                 $changesForCustomer[] = array('bug' => bug_get($changedBugId['bug_id']));
             }
         }
         if (count($changesForCustomer) > 0) {
             $counter = 0;
             $text = '';
             foreach ($changesForCustomer as $changeForCustomer) {
                 $counter++;
                 $bugId = $changeForCustomer['bug']->id;
                 $text .= $counter . '. ';
                 $text .= sprintf(plugin_lang_get('email_notification_bug_header'), $changeForCustomer['bug']->id, $changeForCustomer['bug']->summary, date($dateFormat, $changeForCustomer['bug']->date_submitted), get_enum_element('status', $changeForCustomer['bug']->status));
                 $text .= "\n";
                 $reporterName = user_get_name($changeForCustomer['bug']->reporter_id);
                 $reporterEmail = user_get_email($changeForCustomer['bug']->reporter_id);
                 $text .= sprintf(plugin_lang_get('email_notification_bug_reported_by'), $reporterName, $reporterEmail);
                 $text .= "\n";
                 $text .= sprintf(plugin_lang_get('email_notification_bug_description'), $changeForCustomer['bug']->description);
                 $text .= "\n\n";
             }
             $customer = CustomerManagementDao::getCustomer($customer_id);
             $email = new EmailData();
             $email->email = $customer['email'];
             $email->subject = sprintf(plugin_lang_get('email_notification_title'), $customer['name'], $from, $to);
             $email->body = $text;
             $email->metadata['priority'] = config_get('mail_priority');
             $email->metadata['charset'] = 'utf-8';
             array_push($emails, $email);
         }
     }
     lang_pop();
     return $emails;
 }
Example #8
0
function addExtraBugData($bug)
{
    $bug["project_name"] = project_get_name($bug["project_id"]);
    if ($bug["reporter_id"] != "") {
        $bug["reporter_name"] = user_get_field($bug["reporter_id"], 'username');
    }
    $bug["severity_name"] = get_enum_element('severity', $bug["severity"]);
    $bug["priority_name"] = get_enum_element('priority', $bug["priority"]);
    $bug["status_name"] = get_enum_element('status', $bug["status"]);
    $bug["reproducibility_name"] = get_enum_element('reproducibility', $bug["reproducibility"]);
    if ($bug["handler_id"] == "") {
        $bug["handler_name"] = user_get_field($bug["handler_id"], 'username');
    }
    $bug["projection_name"] = get_enum_element('projection', $bug["projection"]);
    $bug["eta_name"] = get_enum_element('eta', $bug["eta"]);
    $bug["resolution_name"] = get_enum_element('resolution', $bug["resolution"]);
    $bug["description"] = bug_get_text_field($bug["id"], 'description');
    return $bug;
}
function get_status_option_list_plugin($p_user_auth = 0, $p_current_value = 0, $p_show_current = true, $p_add_close = false, $p_project_id = ALL_PROJECTS)
{
    $t_config_var_value = config_get('status_enum_string', null, null, $p_project_id);
    $t_enum_workflow = config_get('status_enum_workflow', null, null, $p_project_id);
    $t_enum_values = MantisEnum::getValues($t_config_var_value);
    $t_enum_list = array();
    foreach ($t_enum_values as $t_enum_value) {
        if (($p_show_current || $p_current_value != $t_enum_value) && access_compare_level($p_user_auth, access_get_status_threshold($t_enum_value, $p_project_id))) {
            $t_enum_list[$t_enum_value] = get_enum_element('status', $t_enum_value);
        }
    }
    if ($p_show_current) {
        $t_enum_list[$p_current_value] = get_enum_element('status', $p_current_value);
    }
    if ($p_add_close && access_compare_level($p_current_value, config_get('bug_resolved_status_threshold', null, null, $p_project_id))) {
        $t_closed = config_get('bug_closed_status_threshold', null, null, $p_project_id);
        if ($p_show_current || $p_current_value != $t_closed) {
            $t_enum_list[$t_closed] = get_enum_element('status', $t_closed);
        }
    }
    return $t_enum_list;
}
 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;
 }
Example #11
0
 function display_commit_message($event, $bugid)
 {
     if (!$bugid) {
         return;
     }
     $t_fields = config_get('bug_view_page_fields');
     $t_fields = columns_filter_disabled($t_fields);
     $tpl_show_id = in_array('id', $t_fields);
     $tpl_show_description = in_array('description', $t_fields);
     $tpl_show_status = in_array('status', $t_fields);
     if ($tpl_show_id && $tpl_show_description && $tpl_show_status) {
         bug_ensure_exists($bugid);
         $bug = bug_get($bugid, true);
         access_ensure_bug_level(VIEWER, $bugid);
         $tpl_description = string_display_links($bug->summary);
         $tpl_status = get_enum_element('status', $bug->status);
         $tpl_link = config_get('path') . string_get_bug_view_url($bugid, null);
         $message = sprintf('%s - #JJ%d: %s<br/>%s', strtoupper($tpl_status), $bugid, $tpl_description, $tpl_link);
         echo '<tr ', helper_alternate_class(), '>';
         echo '<td class="category">', plugin_lang_get('commit_message'), '</td>';
         echo '<td colspan="5">' . $message . '</td>';
         echo '</tr>';
     }
 }
Example #12
0
    echo lang_get('status');
    ?>
</td>
	</tr>
<?php 
    $t_bug_list = array();
    $t_total_owing = 0;
    $t_total_paid = 0;
    for ($i = 0; $i < $t_sponsor_count; ++$i) {
        $t_sponsor_row = $t_sponsors[$i];
        $t_bug = bug_get($t_sponsor_row['bug']);
        $t_sponsor = sponsorship_get($t_sponsor_row['sponsor']);
        $t_buglist[] = $t_sponsor_row['bug'] . ':' . $t_sponsor_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_bug->project_id);
        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;
        }
        # choose color based on status
        $t_status_label = html_get_status_css_class($t_bug->status, auth_get_current_user_id(), $t_bug->project_id);
        echo '<tr class="' . $t_status_label . '">';
        echo '<td><a href="' . string_get_bug_view_url($t_sponsor_row['bug']) . '">' . bug_format_id($t_sponsor_row['bug']) . '</a></td>';
        echo '<td>' . string_display_line(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 . '"><span class="underline">' . $t_status . '</span>&#160;</a></td>';
        # summary
        echo '<td>' . string_display_line($t_bug->summary);
Example #13
0
function print_formatted_severity_string($p_bug)
{
    $t_sev_str = get_enum_element('severity', $p_bug->severity, auth_get_current_user_id(), $p_bug->project_id);
    $t_severity_threshold = config_get('severity_significant_threshold');
    if ($t_severity_threshold >= 0 && $p_bug->severity >= $t_severity_threshold && $p_bug->status < config_get('bug_closed_status_threshold')) {
        echo "<span class=\"bold\">{$t_sev_str}</span>";
    } else {
        echo $t_sev_str;
    }
}
/**
 * return formatted string with all the details on the requested relationship
 * @param integer             $p_bug_id       A bug identifier.
 * @param BugRelationshipData $p_relationship A bug relationship object.
 * @param boolean             $p_html         Whether to return html or text output.
 * @param boolean             $p_html_preview Whether to include style/hyperlinks - if preview is false, we prettify the output.
 * @param boolean             $p_show_project Show Project details.
 * @return string
 */
function relationship_get_details($p_bug_id, BugRelationshipData $p_relationship, $p_html = false, $p_html_preview = false, $p_show_project = false)
{
    $t_summary_wrap_at = utf8_strlen(config_get('email_separator2')) - 28;
    $t_icon_path = config_get('icon_path');
    if ($p_bug_id == $p_relationship->src_bug_id) {
        # root bug is in the source side, related bug in the destination side
        $t_related_bug_id = $p_relationship->dest_bug_id;
        $t_related_project_name = project_get_name($p_relationship->dest_project_id);
        $t_relationship_descr = relationship_get_description_src_side($p_relationship->type);
    } else {
        # root bug is in the dest side, related bug in the source side
        $t_related_bug_id = $p_relationship->src_bug_id;
        $t_related_project_name = project_get_name($p_relationship->src_project_id);
        $t_relationship_descr = relationship_get_description_dest_side($p_relationship->type);
    }
    # related bug not existing...
    if (!bug_exists($t_related_bug_id)) {
        return '';
    }
    # user can access to the related bug at least as a viewer
    if (!access_has_bug_level(VIEWER, $t_related_bug_id)) {
        return '';
    }
    if ($p_html_preview == false) {
        $t_td = '<td>';
    } else {
        $t_td = '<td class="print">';
    }
    # get the information from the related bug and prepare the link
    $t_bug = bug_get($t_related_bug_id, false);
    $t_status_string = get_enum_element('status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id);
    $t_resolution_string = get_enum_element('resolution', $t_bug->resolution, auth_get_current_user_id(), $t_bug->project_id);
    $t_relationship_info_html = $t_td . string_no_break($t_relationship_descr) . '&#160;</td>';
    if ($p_html_preview == false) {
        $t_relationship_info_html .= '<td><a href="' . string_get_bug_view_url($t_related_bug_id) . '">' . string_display_line(bug_format_id($t_related_bug_id)) . '</a></td>';
        $t_relationship_info_html .= '<td><span class="issue-status" title="' . string_attribute($t_resolution_string) . '">' . string_display_line($t_status_string) . '</span></td>';
    } else {
        $t_relationship_info_html .= $t_td . string_display_line(bug_format_id($t_related_bug_id)) . '</td>';
        $t_relationship_info_html .= $t_td . string_display_line($t_status_string) . '&#160;</td>';
    }
    $t_relationship_info_text = utf8_str_pad($t_relationship_descr, 20);
    $t_relationship_info_text .= utf8_str_pad(bug_format_id($t_related_bug_id), 8);
    # get the handler name of the related bug
    $t_relationship_info_html .= $t_td;
    if ($t_bug->handler_id > 0) {
        $t_relationship_info_html .= string_no_break(prepare_user_name($t_bug->handler_id));
    }
    $t_relationship_info_html .= '&#160;</td>';
    # add project name
    if ($p_show_project) {
        $t_relationship_info_html .= $t_td . string_display_line($t_related_project_name) . '&#160;</td>';
    }
    # add summary
    if ($p_html == true) {
        $t_relationship_info_html .= $t_td . string_display_line_links($t_bug->summary);
        if (VS_PRIVATE == $t_bug->view_state) {
            $t_relationship_info_html .= sprintf(' <img src="%s" alt="(%s)" title="%s" />', $t_icon_path . 'protected.gif', lang_get('private'), lang_get('private'));
        }
    } else {
        if (utf8_strlen($t_bug->summary) <= $t_summary_wrap_at) {
            $t_relationship_info_text .= string_email_links($t_bug->summary);
        } else {
            $t_relationship_info_text .= utf8_substr(string_email_links($t_bug->summary), 0, $t_summary_wrap_at - 3) . '...';
        }
    }
    # add delete link if bug not read only and user has access level
    if (!bug_is_readonly($p_bug_id) && !current_user_is_anonymous() && $p_html_preview == false) {
        if (access_has_bug_level(config_get('update_bug_threshold'), $p_bug_id)) {
            $t_relationship_info_html .= ' [<a class="small" href="bug_relationship_delete.php?bug_id=' . $p_bug_id . '&amp;rel_id=' . $p_relationship->id . htmlspecialchars(form_security_param('bug_relationship_delete')) . '">' . lang_get('delete_link') . '</a>]';
        }
    }
    $t_relationship_info_html .= '&#160;</td>';
    $t_relationship_info_text .= "\n";
    if ($p_html_preview == false) {
        # choose color based on status
        $t_status_label = html_get_status_css_class($t_bug->status, auth_get_current_user_id(), $t_bug->project_id);
        $t_relationship_info_html = '<tr class="' . $t_status_label . '">' . $t_relationship_info_html . '</tr>' . "\n";
    } else {
        $t_relationship_info_html = '<tr>' . $t_relationship_info_html . '</tr>';
    }
    if ($p_html == true) {
        return $t_relationship_info_html;
    } else {
        return $t_relationship_info_text;
    }
}
Example #15
0
/**
 * 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 
        echo 'class="' . $t_trclass . '"';
        ?>
>
			<td class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_REPORTER_ID . '[]';
        ?>
" id="reporter_id_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('reporter_label');
        ?>
</a>
			</td>
			<td class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_MONITOR_USER_ID . '[]';
        ?>
" id="user_monitor_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('monitored_by_label');
        ?>
</a>
			</td>
			<td class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_HANDLER_ID . '[]';
        ?>
" id="handler_id_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('assigned_to_label');
        ?>
</a>
			</td>
			<td colspan="2" class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_CATEGORY_ID . '[]';
        ?>
" id="show_category_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('category_label');
        ?>
</a>
			</td>
			<td class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_SEVERITY . '[]';
        ?>
" id="show_severity_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('severity_label');
        ?>
</a>
			</td>
			<td class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_RESOLUTION . '[]';
        ?>
" id="show_resolution_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('resolution_label');
        ?>
</a>
			</td>
			<td class="small-caption">
				<?php 
        if (ON == config_get('enable_profiles')) {
            ?>
					<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_PROFILE_ID . '[]';
            ?>
" id="show_profile_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('profile_label');
            ?>
</a>
				<?php 
        }
        ?>
			</td>
			<?php 
        if ($t_filter_cols > 8) {
            echo '<td class="small-caption" colspan="' . ($t_filter_cols - 8) . '">&#160;</td>';
        }
        ?>
		</tr>

		<tr class="row-1">
			<td class="small-caption" id="reporter_id_filter_target">
							<?php 
        $t_output = '';
        $t_any_found = false;
        if (count($t_filter[FILTER_PROPERTY_REPORTER_ID]) == 0) {
            echo lang_get('any');
        } else {
            $t_first_flag = true;
            foreach ($t_filter[FILTER_PROPERTY_REPORTER_ID] as $t_current) {
                $t_this_name = '';
                echo '<input type="hidden" name="', FILTER_PROPERTY_REPORTER_ID, '[]" value="', string_attribute($t_current), '" />';
                if (filter_field_is_any($t_current)) {
                    $t_any_found = true;
                } else {
                    if (filter_field_is_myself($t_current)) {
                        if (access_has_project_level(config_get('report_bug_threshold'))) {
                            $t_this_name = '[' . lang_get('myself') . ']';
                        } else {
                            $t_any_found = true;
                        }
                    } else {
                        if (filter_field_is_none($t_current)) {
                            $t_this_name = lang_get('none');
                        } else {
                            $t_this_name = user_get_name($t_current);
                        }
                    }
                }
                if ($t_first_flag != true) {
                    $t_output = $t_output . '<br />';
                } else {
                    $t_first_flag = false;
                }
                $t_output = $t_output . string_display_line($t_this_name);
            }
            if (true == $t_any_found) {
                echo lang_get('any');
            } else {
                echo $t_output;
            }
        }
        ?>
			</td>
			<td class="small-caption" id="user_monitor_filter_target">
		<?php 
        $t_output = '';
        $t_any_found = false;
        if (count($t_filter[FILTER_PROPERTY_MONITOR_USER_ID]) == 0) {
            echo lang_get('any');
        } else {
            $t_first_flag = true;
            foreach ($t_filter[FILTER_PROPERTY_MONITOR_USER_ID] as $t_current) {
                echo '<input type="hidden" name="', FILTER_PROPERTY_MONITOR_USER_ID, '[]" value="', string_attribute($t_current), '" />';
                $t_this_name = '';
                if (filter_field_is_any($t_current)) {
                    $t_any_found = true;
                } else {
                    if (filter_field_is_myself($t_current)) {
                        if (access_has_project_level(config_get('monitor_bug_threshold'))) {
                            $t_this_name = '[' . lang_get('myself') . ']';
                        } else {
                            $t_any_found = true;
                        }
                    } else {
                        $t_this_name = user_get_name($t_current);
                    }
                }
                if ($t_first_flag != true) {
                    $t_output = $t_output . '<br />';
                } else {
                    $t_first_flag = false;
                }
                $t_output = $t_output . string_display_line($t_this_name);
            }
            if (true == $t_any_found) {
                echo lang_get('any');
            } else {
                echo string_display($t_output);
            }
        }
        ?>
			</td>
			<td class="small-caption" id="handler_id_filter_target">
							<?php 
        $t_output = '';
        $t_any_found = false;
        if (count($t_filter[FILTER_PROPERTY_HANDLER_ID]) == 0) {
            echo lang_get('any');
        } else {
            $t_first_flag = true;
            foreach ($t_filter[FILTER_PROPERTY_HANDLER_ID] as $t_current) {
                echo '<input type="hidden" name="', FILTER_PROPERTY_HANDLER_ID, '[]" value="', string_attribute($t_current), '" />';
                $t_this_name = '';
                if (filter_field_is_none($t_current)) {
                    $t_this_name = lang_get('none');
                } else {
                    if (filter_field_is_any($t_current)) {
                        $t_any_found = true;
                    } else {
                        if (filter_field_is_myself($t_current)) {
                            if (access_has_project_level(config_get('handle_bug_threshold'))) {
                                $t_this_name = '[' . lang_get('myself') . ']';
                            } else {
                                $t_any_found = true;
                            }
                        } else {
                            $t_this_name = user_get_name($t_current);
                        }
                    }
                }
                if ($t_first_flag != true) {
                    $t_output = $t_output . '<br />';
                } else {
                    $t_first_flag = false;
                }
                $t_output = $t_output . string_display_line($t_this_name);
            }
            if (true == $t_any_found) {
                echo lang_get('any');
            } else {
                echo string_display($t_output);
            }
        }
        ?>
			</td>
			<td colspan="2" class="small-caption" id="show_category_filter_target">
		<?php 
        $t_output = '';
        $t_any_found = false;
        if (count($t_filter[FILTER_PROPERTY_CATEGORY_ID]) == 0) {
            echo lang_get('any');
        } else {
            $t_first_flag = true;
            foreach ($t_filter[FILTER_PROPERTY_CATEGORY_ID] as $t_current) {
                echo '<input type="hidden" name="', FILTER_PROPERTY_CATEGORY_ID, '[]" value="', string_attribute($t_current), '" />';
                $t_this_string = '';
                if (filter_field_is_any($t_current)) {
                    $t_any_found = true;
                } else {
                    $t_this_string = $t_current;
                }
                if ($t_first_flag != true) {
                    $t_output = $t_output . '<br />';
                } else {
                    $t_first_flag = false;
                }
                $t_output = $t_output . string_display_line($t_this_string);
            }
            if (true == $t_any_found) {
                echo lang_get('any');
            } else {
                echo $t_output;
            }
        }
        ?>
			</td>
			<td class="small-caption" id="show_severity_filter_target">
		<?php 
        $t_output = '';
        $t_any_found = false;
        if (count($t_filter[FILTER_PROPERTY_SEVERITY]) == 0) {
            echo lang_get('any');
        } else {
            $t_first_flag = true;
            foreach ($t_filter[FILTER_PROPERTY_SEVERITY] as $t_current) {
                echo '<input type="hidden" name="', FILTER_PROPERTY_SEVERITY, '[]" value="', string_attribute($t_current), '" />';
                $t_this_string = '';
                if (filter_field_is_any($t_current)) {
                    $t_any_found = true;
                } else {
                    $t_this_string = get_enum_element('severity', $t_current);
                }
                if ($t_first_flag != true) {
                    $t_output = $t_output . '<br />';
                } else {
                    $t_first_flag = false;
                }
                $t_output = $t_output . string_display_line($t_this_string);
            }
            if (true == $t_any_found) {
                echo lang_get('any');
            } else {
                echo $t_output;
            }
        }
        ?>
			</td>
			<td class="small-caption" id="show_resolution_filter_target">
		<?php 
        $t_output = '';
        $t_any_found = false;
        if (count($t_filter[FILTER_PROPERTY_RESOLUTION]) == 0) {
            echo lang_get('any');
        } else {
            $t_first_flag = true;
            foreach ($t_filter[FILTER_PROPERTY_RESOLUTION] as $t_current) {
                echo '<input type="hidden" name="', FILTER_PROPERTY_RESOLUTION, '[]" value="', string_attribute($t_current), '" />';
                $t_this_string = '';
                if (filter_field_is_any($t_current)) {
                    $t_any_found = true;
                } else {
                    $t_this_string = get_enum_element('resolution', $t_current);
                }
                if ($t_first_flag != true) {
                    $t_output = $t_output . '<br />';
                } else {
                    $t_first_flag = false;
                }
                $t_output = $t_output . string_display_line($t_this_string);
            }
            if (true == $t_any_found) {
                echo lang_get('any');
            } else {
                echo $t_output;
            }
        }
        ?>
			</td>
			<?php 
        if (ON == config_get('enable_profiles')) {
            ?>
			<td class="small-caption" id="show_profile_filter_target">
		<?php 
            $t_output = '';
            $t_any_found = false;
            if (count($t_filter[FILTER_PROPERTY_PROFILE_ID]) == 0) {
                echo lang_get('any');
            } else {
                $t_first_flag = true;
                foreach ($t_filter[FILTER_PROPERTY_PROFILE_ID] as $t_current) {
                    echo '<input type="hidden" name="', FILTER_PROPERTY_PROFILE_ID, '[]" value="', string_attribute($t_current), '" />';
                    $t_this_string = '';
                    if (filter_field_is_any($t_current)) {
                        $t_any_found = true;
                    } else {
                        $t_profile = profile_get_row_direct($t_current);
                        $t_this_string = $t_profile['platform'] . ' ' . $t_profile['os'] . ' ' . $t_profile['os_build'];
                    }
                    if ($t_first_flag != true) {
                        $t_output = $t_output . '<br />';
                    } else {
                        $t_first_flag = false;
                    }
                    $t_output = $t_output . string_display_line($t_this_string);
                }
                if (true == $t_any_found) {
                    echo lang_get('any');
                } else {
                    echo $t_output;
                }
            }
            ?>
			</td>
			<?php 
        } else {
            ?>
				<td></td>
			<?php 
        }
        if ($t_filter_cols > 8) {
            echo '<td class="small-caption" colspan="' . ($t_filter_cols - 8) . '">&#160;</td>';
        }
        ?>
		</tr>
		<tr <?php 
        echo 'class="' . $t_trclass . '"';
        ?>
>
			<td class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_STATUS . '[]';
        ?>
" id="show_status_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('status_label');
        ?>
</a>
			</td>
			<td class="small-caption">
				<?php 
        if ('simple' == $t_view_type) {
            ?>
					<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_HIDE_STATUS . '[]';
            ?>
" id="hide_status_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('hide_status_label');
            ?>
</a>
				<?php 
        }
        ?>
			</td>
			<td class="small-caption">
			<?php 
        if ($t_show_build) {
            ?>
				<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_BUILD . '[]';
            ?>
" id="show_build_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('product_build_label');
            ?>
</a>
			<?php 
        }
        ?>
			</td>
			<?php 
        if ($t_show_product_version) {
            ?>
			<td colspan="2" class="small-caption">
				<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_VERSION . '[]';
            ?>
" id="show_version_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('product_version_label');
            ?>
</a>
			</td>
			<td colspan="1" class="small-caption">
				<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_FIXED_IN_VERSION . '[]';
            ?>
" id="show_fixed_in_version_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('fixed_in_version_label');
            ?>
</a>
			</td>
			<?php 
        } else {
            ?>
			<td colspan="2" class="small-caption">
				&#160;
			</td>
			<td colspan="1" class="small-caption">
				&#160;
			</td>
			<?php 
        }
        ?>
			<td colspan="1" class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_PRIORITY . '[]';
        ?>
" id="show_priority_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('priority_label');
        ?>
</a>
			</td>
			<?php 
        if ($t_show_product_version) {
            ?>
			<td colspan="1" class="small-caption">
				<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_TARGET_VERSION . '[]';
            ?>
" id="show_target_version_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('target_version_label');
            ?>
</a>
			</td>
			<?php 
        } else {
            ?>
			<td colspan="1" class="small-caption">
				&#160;
			</td>
			<?php 
        }
        if ($t_filter_cols > 8) {
            echo '<td class="small-caption" colspan="' . ($t_filter_cols - 7) . '">&#160;</td>';
        }
        ?>
		</tr>

		<tr class="row-1">
			<td class="small-caption" id="show_status_filter_target">
		<?php 
        $t_output = '';
        $t_any_found = false;
        if (count($t_filter[FILTER_PROPERTY_STATUS]) == 0) {
            echo lang_get('any');
        } else {
            $t_first_flag = true;
            foreach ($t_filter[FILTER_PROPERTY_STATUS] as $t_current) {
                echo '<input type="hidden" name="', FILTER_PROPERTY_STATUS, '[]" value="', string_attribute($t_current), '" />';
                $t_this_string = '';
                if (filter_field_is_any($t_current)) {
                    $t_any_found = true;
                } else {
                    $t_this_string = get_enum_element('status', $t_current);
                }
                if ($t_first_flag != true) {
                    $t_output = $t_output . '<br />';
                } else {
                    $t_first_flag = false;
                }
                $t_output = $t_output . string_display_line($t_this_string);
            }
            if (true == $t_any_found) {
                echo lang_get('any');
            } else {
                echo $t_output;
            }
        }
        ?>
			</td>
			<td class="small-caption" id="hide_status_filter_target">
		<?php 
        if ('simple' == $t_view_type) {
            $t_output = '';
            $t_none_found = false;
            if (count($t_filter[FILTER_PROPERTY_HIDE_STATUS]) == 0) {
                echo lang_get('none');
            } else {
                $t_first_flag = true;
                foreach ($t_filter[FILTER_PROPERTY_HIDE_STATUS] as $t_current) {
                    echo '<input type="hidden" name="', FILTER_PROPERTY_HIDE_STATUS, '[]" value="', string_attribute($t_current), '" />';
                    $t_this_string = '';
                    if (filter_field_is_none($t_current)) {
                        $t_none_found = true;
                    } else {
                        $t_this_string = get_enum_element('status', $t_current);
                    }
                    if ($t_first_flag != true) {
                        $t_output = $t_output . '<br />';
                    } else {
                        $t_first_flag = false;
                    }
                    $t_output = $t_output . string_display_line($t_this_string);
                }
                $t_hide_status_post = '';
                if (count($t_filter[FILTER_PROPERTY_HIDE_STATUS]) == 1) {
                    $t_hide_status_post = ' (' . lang_get('and_above') . ')';
                }
                if (true == $t_none_found) {
                    echo lang_get('none');
                } else {
                    echo $t_output . string_display_line($t_hide_status_post);
                }
            }
        }
        ?>
			</td>
		<?php 
        if ($t_show_build) {
            ?>
			<td class="small-caption" id="show_build_filter_target">
		<?php 
            $t_output = '';
            $t_any_found = false;
            if (count($t_filter[FILTER_PROPERTY_BUILD]) == 0) {
                echo lang_get('any');
            } else {
                $t_first_flag = true;
                foreach ($t_filter[FILTER_PROPERTY_BUILD] as $t_current) {
                    $t_current = stripslashes($t_current);
                    echo '<input type="hidden" name="', FILTER_PROPERTY_BUILD, '[]" value="', string_attribute($t_current), '" />';
                    $t_this_string = '';
                    if (filter_field_is_any($t_current)) {
                        $t_any_found = true;
                    } else {
                        if (filter_field_is_none($t_current)) {
                            $t_this_string = lang_get('none');
                        } else {
                            $t_this_string = $t_current;
                        }
                    }
                    if ($t_first_flag != true) {
                        $t_output = $t_output . '<br />';
                    } else {
                        $t_first_flag = false;
                    }
                    $t_output = $t_output . string_display_line($t_this_string);
                }
                if (true == $t_any_found) {
                    echo lang_get('any');
                } else {
                    echo $t_output;
                }
            }
            ?>
			</td>
			<?php 
        } else {
            ?>
			<td class="small-caption"></td>
			<?php 
        }
        if ($t_show_product_version) {
            ?>
			<td colspan="2" class="small-caption" id="show_version_filter_target">
							<?php 
            $t_output = '';
            $t_any_found = false;
            if (count($t_filter[FILTER_PROPERTY_VERSION]) == 0) {
                echo lang_get('any');
            } else {
                $t_first_flag = true;
                foreach ($t_filter[FILTER_PROPERTY_VERSION] as $t_current) {
                    $t_current = stripslashes($t_current);
                    echo '<input type="hidden" name="', FILTER_PROPERTY_VERSION, '[]" value="', string_attribute($t_current), '" />';
                    $t_this_string = '';
                    if (filter_field_is_any($t_current)) {
                        $t_any_found = true;
                    } else {
                        if (filter_field_is_none($t_current)) {
                            $t_this_string = lang_get('none');
                        } else {
                            $t_this_string = $t_current;
                        }
                    }
                    if ($t_first_flag != true) {
                        $t_output = $t_output . '<br />';
                    } else {
                        $t_first_flag = false;
                    }
                    $t_output = $t_output . string_display_line($t_this_string);
                }
                if (true == $t_any_found) {
                    echo lang_get('any');
                } else {
                    echo $t_output;
                }
            }
            ?>
			</td>
			<td colspan="1" class="small-caption" id="show_fixed_in_version_filter_target">
							<?php 
            $t_output = '';
            $t_any_found = false;
            if (count($t_filter[FILTER_PROPERTY_FIXED_IN_VERSION]) == 0) {
                echo lang_get('any');
            } else {
                $t_first_flag = true;
                foreach ($t_filter[FILTER_PROPERTY_FIXED_IN_VERSION] as $t_current) {
                    $t_current = stripslashes($t_current);
                    echo '<input type="hidden" name="', FILTER_PROPERTY_FIXED_IN_VERSION, '[]" value="', string_attribute($t_current), '" />';
                    $t_this_string = '';
                    if (filter_field_is_any($t_current)) {
                        $t_any_found = true;
                    } else {
                        if (filter_field_is_none($t_current)) {
                            $t_this_string = lang_get('none');
                        } else {
                            $t_this_string = $t_current;
                        }
                    }
                    if ($t_first_flag != true) {
                        $t_output = $t_output . '<br />';
                    } else {
                        $t_first_flag = false;
                    }
                    $t_output = $t_output . string_display_line($t_this_string);
                }
                if (true == $t_any_found) {
                    echo lang_get('any');
                } else {
                    echo $t_output;
                }
            }
            ?>
			</td>
		<?php 
        } else {
            ?>
			<td colspan="2" class="small-caption">
				&#160;
			</td>
			<td colspan="1" class="small-caption">
				&#160;
			</td>
		<?php 
        }
        ?>
			<td colspan="1" class="small-caption" id="show_priority_filter_target">
		<?php 
        $t_output = '';
        $t_any_found = false;
        if (count($t_filter[FILTER_PROPERTY_PRIORITY]) == 0) {
            echo lang_get('any');
        } else {
            $t_first_flag = true;
            foreach ($t_filter[FILTER_PROPERTY_PRIORITY] as $t_current) {
                echo '<input type="hidden" name="', FILTER_PROPERTY_PRIORITY, '[]" value="', string_attribute($t_current), '" />';
                $t_this_string = '';
                if (filter_field_is_any($t_current)) {
                    $t_any_found = true;
                } else {
                    $t_this_string = get_enum_element('priority', $t_current);
                }
                if ($t_first_flag != true) {
                    $t_output = $t_output . '<br />';
                } else {
                    $t_first_flag = false;
                }
                $t_output = $t_output . string_display_line($t_this_string);
            }
            if (true == $t_any_found) {
                echo lang_get('any');
            } else {
                echo $t_output;
            }
        }
        ?>
		</td>
		<?php 
        if ($t_show_product_version) {
            ?>
		<td colspan="1" class="small-caption" id="show_target_version_filter_target">
							<?php 
            $t_output = '';
            $t_any_found = false;
            if (count($t_filter[FILTER_PROPERTY_TARGET_VERSION]) == 0) {
                echo lang_get('any');
            } else {
                $t_first_flag = true;
                foreach ($t_filter[FILTER_PROPERTY_TARGET_VERSION] as $t_current) {
                    $t_current = stripslashes($t_current);
                    echo '<input type="hidden" name="', FILTER_PROPERTY_TARGET_VERSION, '[]" value="', string_attribute($t_current), '" />';
                    $t_this_string = '';
                    if (filter_field_is_any($t_current)) {
                        $t_any_found = true;
                    } else {
                        if (filter_field_is_none($t_current)) {
                            $t_this_string = lang_get('none');
                        } else {
                            $t_this_string = $t_current;
                        }
                    }
                    if ($t_first_flag != true) {
                        $t_output = $t_output . '<br />';
                    } else {
                        $t_first_flag = false;
                    }
                    $t_output = $t_output . string_display_line($t_this_string);
                }
                if (true == $t_any_found) {
                    echo lang_get('any');
                } else {
                    echo $t_output;
                }
            }
            ?>
			</td>
		<?php 
        } else {
            ?>
			<td colspan="1" class="small-caption">
				&#160;
			</td>
		<?php 
        }
        if ($t_filter_cols > 8) {
            echo '<td class="small-caption" colspan="' . ($t_filter_cols - 7) . '">&#160;</td>';
        }
        ?>

		</tr>

		<tr <?php 
        echo 'class="' . $t_trclass . '"';
        ?>
>
			<td class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_ISSUES_PER_PAGE;
        ?>
" id="per_page_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('show_label');
        ?>
</a>
			</td>
			<td class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_VIEW_STATE;
        ?>
" id="view_state_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('view_status_label');
        ?>
</a>
			</td>
			<td class="small-caption">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_STICKY;
        ?>
" id="sticky_issues_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('sticky_label');
        ?>
</a>
			</td>
			<td class="small-caption" colspan="2">
			</td>
			<td class="small-caption" >
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_FILTER_BY_DATE;
        ?>
" id="do_filter_by_date_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('use_date_filters_label');
        ?>
</a>
			</td>
			<td class="small-caption" colspan="2">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_RELATIONSHIP_TYPE;
        ?>
" id="relationship_type_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
><?php 
        echo lang_get('bug_relationships_label');
        ?>
</a>
			</td>
			<?php 
        if ($t_filter_cols > 8) {
            echo '<td class="small-caption" colspan="' . ($t_filter_cols - 8) . '">&#160;</td>';
        }
        ?>
		</tr>
		<tr class="row-1">
			<td class="small-caption" id="per_page_filter_target">
				<?php 
        echo $t_filter[FILTER_PROPERTY_ISSUES_PER_PAGE] == 0 ? lang_get('all') : string_display_line($t_filter[FILTER_PROPERTY_ISSUES_PER_PAGE]);
        echo '<input type="hidden" name="', FILTER_PROPERTY_ISSUES_PER_PAGE, '" value="', string_attribute($t_filter[FILTER_PROPERTY_ISSUES_PER_PAGE]), '" />';
        ?>
			</td>
			<td class="small-caption" id="view_state_filter_target">
				<?php 
        if (VS_PUBLIC === $t_filter[FILTER_PROPERTY_VIEW_STATE]) {
            echo lang_get('public');
        } else {
            if (VS_PRIVATE === $t_filter[FILTER_PROPERTY_VIEW_STATE]) {
                echo lang_get('private');
            } else {
                echo lang_get('any');
                $t_filter[FILTER_PROPERTY_VIEW_STATE] = META_FILTER_ANY;
            }
        }
        echo '<input type="hidden" name="', FILTER_PROPERTY_VIEW_STATE, '" value="', string_attribute($t_filter[FILTER_PROPERTY_VIEW_STATE]), '" />';
        ?>
			</td>
			<td class="small-caption" id="sticky_issues_filter_target">
				<?php 
        $t_sticky_filter_state = gpc_string_to_bool($t_filter[FILTER_PROPERTY_STICKY]);
        print $t_sticky_filter_state ? lang_get('yes') : lang_get('no');
        ?>
				<input type="hidden" name="<?php 
        echo FILTER_PROPERTY_STICKY;
        ?>
" value="<?php 
        echo $t_sticky_filter_state ? 'on' : 'off';
        ?>
" />
			</td>
			<td class="small-caption" colspan="2">&#160;
			</td>
			<td class="small-caption" id="do_filter_by_date_filter_target">
		<?php 
        if ('on' == $t_filter[FILTER_PROPERTY_FILTER_BY_DATE]) {
            echo '<input type="hidden" name="', FILTER_PROPERTY_FILTER_BY_DATE, '" value="', string_attribute($t_filter[FILTER_PROPERTY_FILTER_BY_DATE]), '" />';
            echo '<input type="hidden" name="', FILTER_PROPERTY_START_MONTH, '" value="', string_attribute($t_filter[FILTER_PROPERTY_START_MONTH]), '" />';
            echo '<input type="hidden" name="', FILTER_PROPERTY_START_DAY, '" value="', string_attribute($t_filter[FILTER_PROPERTY_START_DAY]), '" />';
            echo '<input type="hidden" name="', FILTER_PROPERTY_START_YEAR, '" value="', string_attribute($t_filter[FILTER_PROPERTY_START_YEAR]), '" />';
            echo '<input type="hidden" name="', FILTER_PROPERTY_END_MONTH, '" value="', string_attribute($t_filter[FILTER_PROPERTY_END_MONTH]), '" />';
            echo '<input type="hidden" name="', FILTER_PROPERTY_END_DAY, '" value="', string_attribute($t_filter[FILTER_PROPERTY_END_DAY]), '" />';
            echo '<input type="hidden" name="', FILTER_PROPERTY_END_YEAR, '" value="', string_attribute($t_filter[FILTER_PROPERTY_END_YEAR]), '" />';
            $t_chars = preg_split('//', config_get('short_date_format'), -1, PREG_SPLIT_NO_EMPTY);
            $t_time = mktime(0, 0, 0, $t_filter[FILTER_PROPERTY_START_MONTH], $t_filter[FILTER_PROPERTY_START_DAY], $t_filter[FILTER_PROPERTY_START_YEAR]);
            foreach ($t_chars as $t_char) {
                if (strcasecmp($t_char, 'M') == 0) {
                    echo ' ';
                    echo date('F', $t_time);
                }
                if (strcasecmp($t_char, 'D') == 0) {
                    echo ' ';
                    echo date('d', $t_time);
                }
                if (strcasecmp($t_char, 'Y') == 0) {
                    echo ' ';
                    echo date('Y', $t_time);
                }
            }
            echo ' - ';
            $t_time = mktime(0, 0, 0, $t_filter[FILTER_PROPERTY_END_MONTH], $t_filter[FILTER_PROPERTY_END_DAY], $t_filter[FILTER_PROPERTY_END_YEAR]);
            foreach ($t_chars as $t_char) {
                if (strcasecmp($t_char, 'M') == 0) {
                    echo ' ';
                    echo date('F', $t_time);
                }
                if (strcasecmp($t_char, 'D') == 0) {
                    echo ' ';
                    echo date('d', $t_time);
                }
                if (strcasecmp($t_char, 'Y') == 0) {
                    echo ' ';
                    echo date('Y', $t_time);
                }
            }
        } else {
            echo lang_get('no');
        }
        ?>
			</td>

			<td class="small-caption" colspan="2" id="relationship_type_filter_target">
		<?php 
        echo '<input type="hidden" name="', FILTER_PROPERTY_RELATIONSHIP_TYPE, '" value="', string_attribute($t_filter[FILTER_PROPERTY_RELATIONSHIP_TYPE]), '" />';
        echo '<input type="hidden" name="', FILTER_PROPERTY_RELATIONSHIP_BUG, '" value="', string_attribute($t_filter[FILTER_PROPERTY_RELATIONSHIP_BUG]), '" />';
        $c_rel_type = $t_filter[FILTER_PROPERTY_RELATIONSHIP_TYPE];
        $c_rel_bug = $t_filter[FILTER_PROPERTY_RELATIONSHIP_BUG];
        if (-1 == $c_rel_type || 0 == $c_rel_bug) {
            echo lang_get('any');
        } else {
            echo relationship_get_description_for_history($c_rel_type) . ' ' . $c_rel_bug;
        }
        ?>
			</td>
			<?php 
        if ($t_filter_cols > 8) {
            echo '<td class="small-caption" colspan="' . ($t_filter_cols - 8) . '">&#160;</td>';
        }
        ?>
		</tr>
		<tr <?php 
        echo 'class="' . $t_trclass . '"';
        ?>
>
			<td class="small-caption">
				<?php 
        if (ON == config_get('enable_profiles')) {
            ?>
					<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_PLATFORM;
            ?>
" id="platform_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('platform_label');
            ?>
</a>
				<?php 
        }
        ?>
			</td>
			<td class="small-caption">
				<?php 
        if (ON == config_get('enable_profiles')) {
            ?>
					<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_OS;
            ?>
" id="os_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('os_label');
            ?>
</a>
				<?php 
        }
        ?>
			</td>
			<td class="small-caption">
				<?php 
        if (ON == config_get('enable_profiles')) {
            ?>
					<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_OS_BUILD;
            ?>
" id="os_build_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('os_version_label');
            ?>
</a>
				<?php 
        }
        ?>
			</td>
			<td class="small-caption" colspan="5">
				<?php 
        if (access_has_global_level(config_get('tag_view_threshold'))) {
            ?>
				<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_TAG_STRING;
            ?>
" id="tag_string_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
><?php 
            echo lang_get('tags_label');
            ?>
</a>
				<?php 
        }
        ?>
			</td>
			<?php 
        if ($t_filter_cols > 8) {
            echo '<td class="small-caption" colspan="' . ($t_filter_cols - 8) . '">&#160;</td>';
        }
        ?>
		</tr>
		<tr class="row-1">
			<?php 
        if (ON == config_get('enable_profiles')) {
            ?>
			<td class="small-caption" id="platform_filter_target">
				<?php 
            print_multivalue_field(FILTER_PROPERTY_PLATFORM, $t_filter[FILTER_PROPERTY_PLATFORM]);
            ?>
			</td>
			<td class="small-caption" id="os_filter_target">
				<?php 
            print_multivalue_field(FILTER_PROPERTY_OS, $t_filter[FILTER_PROPERTY_OS]);
            ?>
			</td>
			<td class="small-caption" id="os_build_filter_target">
				<?php 
            print_multivalue_field(FILTER_PROPERTY_OS_BUILD, $t_filter[FILTER_PROPERTY_OS_BUILD]);
            ?>
			</td>
			<?php 
        } else {
            ?>
				<td colspan="3">&#160;</td>
			<?php 
        }
        ?>

			<td class="small-caption" id="tag_string_filter_target" colspan="5">
				<?php 
        $t_tag_string = $t_filter[FILTER_PROPERTY_TAG_STRING];
        if ($t_filter[FILTER_PROPERTY_TAG_SELECT] != 0 && tag_exists($t_filter[FILTER_PROPERTY_TAG_SELECT])) {
            $t_tag_string .= is_blank($t_tag_string) ? '' : config_get('tag_separator');
            $t_tag_string .= tag_get_field($t_filter[FILTER_PROPERTY_TAG_SELECT], 'name');
        }
        echo string_html_entities($t_tag_string);
        echo '<input type="hidden" name="', FILTER_PROPERTY_TAG_STRING, '" value="', string_attribute($t_tag_string), '" />';
        ?>
			</td>
		</tr>
		<?php 
        # get plugin filters
        $t_plugin_filters = filter_get_plugin_filters();
        $t_plugin_filter_links = array();
        $t_plugin_filter_fields = array();
        $t_column_count_by_row = array();
        $t_row = 0;
        foreach ($t_plugin_filters as $t_field_name => $t_filter_object) {
            # be sure the colspan is an integer
            $t_colspan = (int) $t_filter_object->colspan;
            # prevent silliness.
            if ($t_colspan < 0) {
                $t_colspan = abs($t_colspan);
            } else {
                if ($t_colspan > $t_filter_cols) {
                    $t_colspan = $t_filter_cols;
                } else {
                    if ($t_colspan == 0) {
                        $t_colspan = 1;
                    }
                }
            }
            # the row may already have elements in it. find out.
            $t_columns_available = $t_filter_cols - $t_column_count_by_row[$t_row];
            if ($t_columns_available == 0) {
                $t_row++;
            }
            # see if there is room in the current row
            if ($t_columns_available >= $t_colspan) {
                $t_assigned_row = $t_row;
                $t_column_count_by_row[$t_row] += $t_colspan;
            } else {
                $t_is_assigned = false;
                # find a row with space
                foreach ($t_column_count_by_row as $t_row_num => $t_col_count) {
                    if ($t_colspan <= $t_filter_cols - $t_col_count) {
                        $t_assigned_row = $t_row_num;
                        $t_column_count_by_row[$t_row_num] += $t_colspan;
                        $t_is_assigned = true;
                        break;
                    }
                }
                if (!$t_is_assigned) {
                    # no space was found in existing rows. Add a new row for it.
                    $t_assigned_row = count($t_plugin_filter_links);
                    $t_column_count_by_row[$t_assigned_row] = $t_colspan;
                }
            }
            $t_colspan_attr = $t_colspan > 1 ? 'colspan="' . $t_colspan . '" ' : '';
            $t_plugin_filter_links[$t_assigned_row][] = '<td ' . $t_colspan_attr . 'class="small-caption"> <a href="' . $t_filters_url . string_attribute($t_field_name) . '" id="' . string_attribute($t_field_name) . '_filter">' . string_display_line($t_filter_object->title) . '</a> </td>';
            $t_values = '<td ' . $t_colspan_attr . 'class="small-caption" id="' . string_attribute($t_field_name) . '_filter_target"> ';
            if (!isset($t_filter[$t_field_name])) {
                $t_values .= lang_get('any');
            } else {
                switch ($t_filter_object->type) {
                    case FILTER_TYPE_STRING:
                    case FILTER_TYPE_INT:
                        if (filter_field_is_any($t_filter[$t_field_name])) {
                            $t_values .= lang_get('any');
                        } else {
                            $t_values .= string_display_line($t_filter[$t_field_name]);
                        }
                        $t_values .= '<input type="hidden" name="' . string_attribute($t_field_name) . '" value="' . string_attribute($t_filter[$t_field_name]) . '"/>';
                        break;
                    case FILTER_TYPE_BOOLEAN:
                        $t_values .= string_display_line($t_filter_object->display((bool) $t_filter[$t_field_name]));
                        $t_values .= '<input type="hidden" name="' . string_attribute($t_field_name) . '" value="' . (bool) $t_filter[$t_field_name] . '"/>';
                        break;
                    case FILTER_TYPE_MULTI_STRING:
                    case FILTER_TYPE_MULTI_INT:
                        $t_first = true;
                        $t_output = '';
                        if (!is_array($t_filter[$t_field_name])) {
                            $t_filter[$t_field_name] = array($t_filter[$t_field_name]);
                        }
                        foreach ($t_filter[$t_field_name] as $t_current) {
                            if (filter_field_is_any($t_current)) {
                                $t_output .= lang_get('any');
                            } else {
                                $t_output .= ($t_first ? '' : '<br/>') . string_display_line($t_filter_object->display($t_current));
                                $t_first = false;
                            }
                            $t_values .= '<input type="hidden" name="' . string_attribute($t_field_name) . '[]" value="' . string_attribute($t_current) . '"/>';
                        }
                        $t_values .= $t_output;
                        break;
                }
            }
            $t_values .= '</td>';
            $t_plugin_filter_fields[$t_assigned_row][] = $t_values;
        }
        $t_row_count = count($t_plugin_filter_links);
        for ($i = 0; $i < $t_row_count; $i++) {
            if ($t_column_count_by_row[$i] < $t_filter_cols) {
                $t_plugin_filter_links[$i][] = '<td class="small-caption" colspan="' . ($t_filter_cols - $t_column_count_by_row[$i]) . '">&#160;</td>';
                $t_plugin_filter_fields[$i][] = '<td class="small-caption" colspan="' . ($t_filter_cols - $t_column_count_by_row[$i]) . '">&#160;</td>';
            }
            $t_links_row = "\n\t\t" . join("\n\t\t", $t_plugin_filter_links[$i]);
            $t_values_row = "\n\t\t" . join("\n\t\t", $t_plugin_filter_fields[$i]);
            echo "\n\t" . '<tr class="', $t_trclass, '">', $t_links_row, "\n\t</tr>";
            echo "\n\t" . '<tr class="row-1">', $t_values_row, "\n\t</tr>\n\t";
        }
        if (ON == config_get('filter_by_custom_fields')) {
            # -- Custom Field Searching --
            if (count($t_accessible_custom_fields_ids) > 0) {
                $t_per_row = config_get('filter_custom_fields_per_row');
                $t_num_fields = count($t_accessible_custom_fields_ids);
                $t_row_idx = 0;
                $t_col_idx = 0;
                $t_fields = '';
                $t_values = '';
                for ($i = 0; $i < $t_num_fields; $i++) {
                    if ($t_col_idx == 0) {
                        $t_fields = '<tr class="' . $t_trclass . '">';
                        $t_values = '<tr class="row-1">';
                    }
                    if (isset($t_accessible_custom_fields_names[$i])) {
                        $t_fields .= '<td class="small-caption"> ';
                        $t_fields .= '<a href="' . $t_filters_url . 'custom_field_' . $t_accessible_custom_fields_ids[$i] . '[]" id="custom_field_' . $t_accessible_custom_fields_ids[$i] . '_filter"' . $t_dynamic_filter_expander_class . '>';
                        $t_fields .= string_display_line(lang_get_defaulted($t_accessible_custom_fields_names[$i]));
                        $t_fields .= '</a> </td> ';
                    }
                    $t_output = '';
                    $t_any_found = false;
                    $t_values .= '<td class="small-caption" id="custom_field_' . $t_accessible_custom_fields_ids[$i] . '_filter_target"> ';
                    if (!isset($t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]])) {
                        $t_values .= lang_get('any');
                    } else {
                        if ($t_accessible_custom_fields_types[$i] == CUSTOM_FIELD_TYPE_DATE) {
                            $t_short_date_format = config_get('short_date_format');
                            if (!isset($t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]][1])) {
                                $t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]][1] = 0;
                            }
                            $t_start = date($t_short_date_format, $t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]][1]);
                            if (!isset($t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]][2])) {
                                $t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]][2] = 0;
                            }
                            $t_end = date($t_short_date_format, $t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]][2]);
                            switch ($t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]][0]) {
                                case CUSTOM_FIELD_DATE_ANY:
                                    $t_values .= lang_get('any');
                                    break;
                                case CUSTOM_FIELD_DATE_NONE:
                                    $t_values .= lang_get('none');
                                    break;
                                case CUSTOM_FIELD_DATE_BETWEEN:
                                    $t_values .= lang_get('between_date') . '<br />';
                                    $t_values .= $t_start . '<br />' . $t_end;
                                    break;
                                case CUSTOM_FIELD_DATE_ONORBEFORE:
                                    $t_values .= lang_get('on_or_before_date') . '<br />';
                                    $t_values .= $t_end;
                                    break;
                                case CUSTOM_FIELD_DATE_BEFORE:
                                    $t_values .= lang_get('before_date') . '<br />';
                                    $t_values .= $t_end;
                                    break;
                                case CUSTOM_FIELD_DATE_ON:
                                    $t_values .= lang_get('on_date') . '<br />';
                                    $t_values .= $t_start;
                                    break;
                                case CUSTOM_FIELD_DATE_AFTER:
                                    $t_values .= lang_get('after_date') . '<br />';
                                    $t_values .= $t_start;
                                    break;
                                case CUSTOM_FIELD_DATE_ONORAFTER:
                                    $t_values .= lang_get('on_or_after_date') . '<br />';
                                    $t_values .= $t_start;
                                    break;
                            }
                        } else {
                            $t_first_flag = true;
                            foreach ($t_filter['custom_fields'][$t_accessible_custom_fields_ids[$i]] as $t_current) {
                                $t_current = stripslashes($t_current);
                                $t_this_string = '';
                                if (filter_field_is_any($t_current)) {
                                    $t_any_found = true;
                                } else {
                                    if (filter_field_is_none($t_current)) {
                                        $t_this_string = lang_get('none');
                                    } else {
                                        $t_this_string = $t_current;
                                    }
                                }
                                if ($t_first_flag != true) {
                                    $t_output = $t_output . '<br />';
                                } else {
                                    $t_first_flag = false;
                                }
                                $t_output = $t_output . string_display_line($t_this_string);
                                $t_values .= '<input type="hidden" name="custom_field_' . $t_accessible_custom_fields_ids[$i] . '[]" value="' . string_attribute($t_current) . '" />';
                            }
                        }
                        if (true == $t_any_found) {
                            $t_values .= lang_get('any');
                        } else {
                            $t_values .= $t_output;
                        }
                    }
                    $t_values .= ' </td>';
                    $t_col_idx++;
                    if ($t_col_idx == $t_per_row) {
                        if ($t_filter_cols > $t_per_row) {
                            $t_fields .= '<td colspan="' . ($t_filter_cols - $t_per_row) . '">&#160;</td> ';
                            $t_values .= '<td colspan="' . ($t_filter_cols - $t_per_row) . '">&#160;</td> ';
                        }
                        $t_fields .= '</tr>' . "\n";
                        $t_values .= '</tr>' . "\n";
                        echo $t_fields;
                        echo $t_values;
                        $t_col_idx = 0;
                        $t_row_idx++;
                    }
                }
                if ($t_col_idx > 0) {
                    if ($t_col_idx < $t_per_row) {
                        $t_fields .= '<td colspan="' . ($t_per_row - $t_col_idx) . '">&#160;</td> ';
                        $t_values .= '<td colspan="' . ($t_per_row - $t_col_idx) . '">&#160;</td> ';
                    }
                    if ($t_filter_cols > $t_per_row) {
                        $t_fields .= '<td colspan="' . ($t_filter_cols - $t_per_row) . '">&#160;</td> ';
                        $t_values .= '<td colspan="' . ($t_filter_cols - $t_per_row) . '">&#160;</td> ';
                    }
                    $t_fields .= '</tr>' . "\n";
                    $t_values .= '</tr>' . "\n";
                    echo $t_fields;
                    echo $t_values;
                }
            }
        }
        ?>
		<tr class="row-1">
			<td class="small-caption category2">
				<a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_NOTE_USER_ID;
        ?>
" id="note_user_id_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
>
					<?php 
        echo lang_get('note_user_id_label');
        ?>
				</a>
			</td>
			<td class="small-caption" id="note_user_id_filter_target">
				<?php 
        $t_output = '';
        $t_any_found = false;
        if (count($t_filter[FILTER_PROPERTY_NOTE_USER_ID]) == 0) {
            echo lang_get('any');
        } else {
            $t_first_flag = true;
            foreach ($t_filter[FILTER_PROPERTY_NOTE_USER_ID] as $t_current) {
                echo '<input type="hidden" name="', FILTER_PROPERTY_NOTE_USER_ID, '[]" value="', string_attribute($t_current), '" />';
                $t_this_name = '';
                if (filter_field_is_none($t_current)) {
                    $t_this_name = lang_get('none');
                } else {
                    if (filter_field_is_any($t_current)) {
                        $t_any_found = true;
                    } else {
                        if (filter_field_is_myself($t_current)) {
                            if (access_has_project_level(config_get('handle_bug_threshold'))) {
                                $t_this_name = '[' . lang_get('myself') . ']';
                            } else {
                                $t_any_found = true;
                            }
                        } else {
                            $t_this_name = user_get_name($t_current);
                        }
                    }
                }
                if ($t_first_flag != true) {
                    $t_output = $t_output . '<br />';
                } else {
                    $t_first_flag = false;
                }
                $t_output = $t_output . string_display_line($t_this_name);
            }
            if (true == $t_any_found) {
                echo lang_get('any');
            } else {
                echo $t_output;
            }
        }
        ?>
			</td>

			<!-- Sort by -->
			<td class="small-caption category2">
				<a href="<?php 
        echo $t_filters_url . 'show_sort';
        ?>
" id="show_sort_filter"<?php 
        echo $t_dynamic_filter_expander_class;
        ?>
>
					<?php 
        echo lang_get('sort_label');
        ?>
				</a>
			</td>
			<td class="small-caption" id="show_sort_filter_target">
				<?php 
        $t_sort_fields = explode(',', $t_filter[FILTER_PROPERTY_SORT_FIELD_NAME]);
        $t_dir_fields = explode(',', $t_filter[FILTER_PROPERTY_SORT_DIRECTION]);
        for ($i = 0; $i < 2; $i++) {
            if (isset($t_sort_fields[$i])) {
                if (0 < $i) {
                    echo ', ';
                }
                $t_sort = $t_sort_fields[$i];
                if (strpos($t_sort, 'custom_') === 0) {
                    $t_field_name = string_display(lang_get_defaulted(utf8_substr($t_sort, utf8_strlen('custom_'))));
                } else {
                    $t_field_name = string_get_field_name($t_sort);
                }
                echo $t_field_name . ' ' . lang_get('bugnote_order_' . utf8_strtolower($t_dir_fields[$i]));
                echo '<input type="hidden" name="', FILTER_PROPERTY_SORT_FIELD_NAME, '_', $i, '" value="', string_attribute($t_sort_fields[$i]), '" />';
                echo '<input type="hidden" name="', FILTER_PROPERTY_SORT_DIRECTION, '_', $i, '" value="', string_attribute($t_dir_fields[$i]), '" />';
            }
        }
        ?>
			</td>
<?php 
        if ('advanced' == $t_view_type) {
            ?>
			<!-- Project -->
			<td class="small-caption category2" colspan="2">
				<a href="<?php 
            echo $t_filters_url . FILTER_PROPERTY_PROJECT_ID;
            ?>
" id="project_id_filter"<?php 
            echo $t_dynamic_filter_expander_class;
            ?>
>
					<?php 
            echo lang_get('email_project_label');
            ?>
				</a>
			</td>
			<td class="small-caption" id="project_id_filter_target">
<?php 
            $t_output = '';
            if (!is_array($t_filter[FILTER_PROPERTY_PROJECT_ID])) {
                $t_filter[FILTER_PROPERTY_PROJECT_ID] = array($t_filter[FILTER_PROPERTY_PROJECT_ID]);
            }
            if (count($t_filter[FILTER_PROPERTY_PROJECT_ID]) == 0) {
                echo lang_get('current');
            } else {
                $t_first_flag = true;
                foreach ($t_filter[FILTER_PROPERTY_PROJECT_ID] as $t_current) {
                    echo '<input type="hidden" name="', FILTER_PROPERTY_PROJECT_ID, '[]" value="', string_attribute($t_current), '" />';
                    $t_this_name = '';
                    if (META_FILTER_CURRENT == $t_current) {
                        $t_this_name = '[' . lang_get('current') . ']';
                    } else {
                        $t_this_name = project_get_name($t_current, false);
                    }
                    if ($t_first_flag != true) {
                        $t_output = $t_output . '<br />';
                    } else {
                        $t_first_flag = false;
                    }
                    $t_output = $t_output . string_display_line($t_this_name);
                }
                echo $t_output;
            }
            ?>
			</td>
<?php 
            if ($t_filter_cols > 6) {
                echo '<td class="small-caption" colspan="' . ($t_filter_cols - 5) . '">&#160;</td>';
            }
        } else {
            if ($t_filter_cols > 3) {
                echo '<td class="small-caption" colspan="' . ($t_filter_cols - 2) . '">&#160;</td>';
            }
        }
        ?>
		</tr>

		<!-- Match Type -->
		<tr class="row-1">
			<td class="small-caption category2"><a href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_MATCH_TYPE;
        ?>
" id="match_type_filter"><?php 
        echo lang_get('filter_match_type');
        ?>
:</a></td>
			<td class="small-caption" id="match_type_filter_target">
			<?php 
        switch ($t_filter[FILTER_PROPERTY_MATCH_TYPE]) {
            case FILTER_MATCH_ANY:
                echo lang_get('filter_match_any');
                break;
            case FILTER_MATCH_ALL:
            default:
                echo lang_get('filter_match_all');
                break;
        }
        ?>
			<input type="hidden" name="match_type" value="<?php 
        echo $t_filter[FILTER_PROPERTY_MATCH_TYPE];
        ?>
"/>
			</td>

			<td class="small-caption category2">
				<a id="highlight_changed_filter"
					href="<?php 
        echo $t_filters_url . FILTER_PROPERTY_HIGHLIGHT_CHANGED;
        ?>
"
					<?php 
        #echo $t_dynamic_filter_expander_class;
        ?>
>
					<?php 
        echo lang_get('changed_label');
        ?>
				</a>
			</td>
			<td class="small-caption" valign="top" id="highlight_changed_filter_target">
				<?php 
        echo $t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED];
        ?>
				<input type="hidden"
					name="<?php 
        echo FILTER_PROPERTY_HIGHLIGHT_CHANGED;
        ?>
"
					value="<?php 
        echo string_attribute($t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED]);
        ?>
"
				/>
			</td>

			<td colspan="4">&#160;</td>
		</tr>
	</table>
		<?php 
    }
    # expanded
    collapse_icon('filter');
    echo '<div class="search-box">';
    echo '<label>';
    echo lang_get('search') . '&#160;';
    echo '<input type="text" size="16" name="', FILTER_PROPERTY_SEARCH, '" value="', string_attribute($t_filter[FILTER_PROPERTY_SEARCH]), '" />';
    echo '</label>';
    echo '</div>';
    ?>
	<div class="submit-query"><input type="submit" name="filter" value="<?php 
    echo lang_get('filter_button');
    ?>
" /></div>
	</form>
	<?php 
    $t_stored_queries_arr = filter_db_get_available_queries();
    if (access_has_project_level(config_get('stored_query_create_threshold'))) {
        ?>
	<div class="save-query">
		<form method="post" name="save_query" action="query_store_page.php">
			<?php 
        # CSRF protection not required here - form does not result in modifications
        ?>
			<input type="submit" name="save_query_button" class="button-small" value="<?php 
        echo lang_get('save_query');
        ?>
" />
		</form>
	</div><?php 
    }
    if (count($t_stored_queries_arr) > 0) {
        ?>
	<div class="manage-queries">
		<form method="post" name="open_queries" action="query_view_page.php">
			<?php 
        # CSRF protection not required here - form does not result in modifications
        ?>
			<input type="submit" name="switch_to_query_button" class="button-small" value="<?php 
        echo lang_get('open_queries');
        ?>
" />
		</form>
	</div>
	<div class="stored-queries">
		<form method="get" name="list_queries<?php 
        echo $t_form_name_suffix;
        ?>
" action="view_all_set.php">
			<?php 
        # CSRF protection not required here - form does not result in modifications
        ?>
			<input type="hidden" name="type" value="3" />
			<select name="source_query_id">
				<option value="-1"><?php 
        echo '[' . lang_get('reset_query') . ']';
        ?>
</option>
				<option value="-1"></option>
				<?php 
        $t_source_query_id = isset($t_filter['_source_query_id']) ? (int) $t_filter['_source_query_id'] : -1;
        foreach ($t_stored_queries_arr as $t_query_id => $t_query_name) {
            echo '<option value="' . $t_query_id . '" ';
            check_selected($t_query_id, $t_source_query_id);
            echo '>' . string_display_line($t_query_name) . '</option>';
        }
        ?>
			</select>
			<input type="submit" name="switch_to_query_button" class="button-small" value="<?php 
        echo lang_get('use_query');
        ?>
" />
		</form>
	</div> <?php 
    } else {
        ?>
	<div class="reset-query">
		<form method="get" name="reset_query" action="view_all_set.php">
			<?php 
        # CSRF protection not required here - form does not result in modifications
        ?>
			<input type="hidden" name="type" value="3" />
			<input type="hidden" name="source_query_id" value="-1" />
			<input type="submit" name="reset_query_button" class="button-small" value="<?php 
        echo lang_get('reset_query');
        ?>
" />
		</form>
	</div><?php 
    }
    ?>

	<div class="filter-links">
		<?php 
    if (access_has_project_level(config_get('create_permalink_threshold'))) {
        ?>
			<form method="get" action="permalink_page.php">
				<?php 
        # CSRF protection not required here - form does not result in modifications
        ?>
				<input type="hidden" name="url" value="<?php 
        echo urlencode(filter_get_url($t_filter));
        ?>
" />
				<input type="submit" name="reset_query_button" class="button-small" value="<?php 
        echo lang_get('create_filter_link');
        ?>
" />
			</form>
			<?php 
    }
    $t_view_filters = config_get('view_filters');
    if (SIMPLE_ONLY != $t_view_filters && ADVANCED_ONLY != $t_view_filters) {
        ?>
			<form method="get" action="view_all_set.php">
				<?php 
        # CSRF protection not required here - form does not result in modifications
        ?>
				<input type="hidden" name="type" value="<?php 
        echo config_get('use_dynamic_filters') ? '6' : '';
        ?>
" />
				<input type="hidden" name="view_type" value="<?php 
        echo 'advanced' == $t_view_type ? 'simple' : 'advanced';
        ?>
" />
				<input type="submit" name="reset_query_button" class="button-small" value="<?php 
        echo 'advanced' == $t_view_type ? lang_get('simple_filters') : lang_get('advanced_filters');
        ?>
" />
			</form>
			<?php 
    }
    ?>
	</div>

	</div>
	<br />
<?php 
}
Example #16
0
function print_column_status($p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    echo '<td class="center">';
    printf('<u><a title="%s">%s</a></u>', get_enum_element('resolution', $p_row['resolution']), get_enum_element('status', $p_row['status']));
    # print username instead of status
    if (ON == config_get('show_assigned_names') && $p_row['handler_id'] > 0 && access_has_bug_level(config_get('view_handler_threshold'), $p_row['id'])) {
        printf(' (%s)', prepare_user_name($p_row['handler_id']));
    }
    echo '</td>';
}
 /> <?php 
    echo lang_get('public');
    ?>
		<input <?php 
    echo helper_get_tab_index();
    ?>
 type="radio" name="view_state" value="<?php 
    echo VS_PRIVATE;
    ?>
" <?php 
    check_checked($f_view_state, VS_PRIVATE);
    ?>
 /> <?php 
    echo lang_get('private');
} else {
    echo get_enum_element('project_view_state', $f_view_state);
}
?>
	</td>
</tr>

<!-- Relationship (in case of cloned bug creation...) -->
<?php 
if ($f_master_bug_id > 0) {
    ?>
<tr <?php 
    echo helper_alternate_class();
    ?>
>
	<td class="category">
		<?php 
Example #18
0
 $writer->startElement('bugnotes');
 foreach ($t_bugnotes as $t_bugnote) {
     $writer->startElement('bugnote');
     # id
     $writer->writeElement('id', $t_bugnote->id);
     # reporter
     $writer->startElement('reporter');
     $writer->writeAttribute('id', $t_bugnote->reporter_id);
     $writer->text(user_get_name($t_bugnote->reporter_id));
     $writer->endElement();
     # bug note
     $writer->writeElement('note', $t_bugnote->note);
     # view state
     $writer->startElement('view_state');
     $writer->writeAttribute('id', $t_bugnote->view_state);
     $writer->text(get_enum_element('view_state', $t_bugnote->view_state));
     $writer->endElement();
     # date submitted
     $writer->writeElement('date_submitted', $t_bugnote->date_submitted);
     # last modified
     $writer->writeElement('last_modified', $t_bugnote->last_modified);
     # note type
     $writer->writeElement('note_type', $t_bugnote->note_type);
     # note attr
     $writer->writeElement('note_attr', $t_bugnote->note_attr);
     # time tracking
     $writer->writeElement('time_tracking', $t_bugnote->time_tracking);
     $writer->endElement();
     # bugnote
 }
 $writer->endElement();
Example #19
0
    ?>
>
			<td>
				<?php 
    echo $t_display[$i];
    ?>
			</td>
			<td>
			<?php 
    $t_email = user_get_email($t_user['id']);
    print_email_link($t_email, $t_email);
    ?>
			</td>
			<td>
				<?php 
    echo get_enum_element('access_levels', $t_user['access_level']);
    ?>
			</td>
			<td class="center">
			<?php 
    # You need global or project-specific permissions to remove users
    #  from this project
    if ($t_can_manage_users && access_has_project_level($t_user['access_level'], $f_project_id)) {
        if (project_includes_user($f_project_id, $t_user['id'])) {
            print_button("manage_proj_user_remove.php?project_id={$f_project_id}&user_id=" . $t_user['id'], lang_get('remove_link'));
            $t_removable_users_exist = true;
        }
    }
    ?>
			</td>
		</tr>
Example #20
0
}
# Bugnote Text Box
echo '<tr>';
echo '<th class="category"><label for="bugnote_text">' . lang_get('add_bugnote_title') . '</label></th>';
echo '<td colspan="5"><textarea ', helper_get_tab_index(), ' id="bugnote_text" name="bugnote_text" cols="80" rows="10"></textarea></td></tr>';
# Bugnote Private Checkbox (if permitted)
if (access_has_bug_level(config_get('private_bugnote_threshold'), $t_bug_id)) {
    echo '<tr>';
    echo '<th class="category">' . lang_get('private') . '</th>';
    echo '<td colspan="5">';
    $t_default_bugnote_view_status = config_get('default_bugnote_view_status');
    if (access_has_bug_level(config_get('set_view_status_threshold'), $t_bug_id)) {
        echo '<input ', helper_get_tab_index(), ' type="checkbox" id="private" name="private" ', check_checked(config_get('default_bugnote_view_status'), VS_PRIVATE), ' />';
        echo lang_get('private');
    } else {
        echo get_enum_element('view_state', $t_default_bugnote_view_status);
    }
    echo '</td></tr>';
}
# Time Tracking (if permitted)
if (config_get('time_tracking_enabled')) {
    if (access_has_bug_level(config_get('time_tracking_edit_threshold'), $t_bug_id)) {
        echo '<tr>';
        echo '<th class="category"><label for="time_tracking">' . lang_get('time_tracking') . '</label></th>';
        echo '<td colspan="5"><input type="text" id="time_tracking" name="time_tracking" size="5" placeholder="hh:mm" /></td></tr>';
    }
}
event_signal('EVENT_BUGNOTE_ADD_FORM', array($t_bug_id));
# Submit Button
if ($t_bottom_buttons_enabled) {
    ?>
Example #21
0
    ?>
"><?php 
    echo htmlentities(config_get_global('bugnote_link_tag')) . $t_bugnote_id_formatted;
    ?>
</a></span><br />

		<span class="bugnote-reporter">
		<?php 
    echo print_user($t_bugnote->reporter_id);
    ?>
		<span class="small access-level"><?php 
    if (user_exists($t_bugnote->reporter_id)) {
        $t_access_level = access_get_project_level(null, (int) $t_bugnote->reporter_id);
        // Only display access level when higher than 0 (ANYBODY)
        if ($t_access_level > ANYBODY) {
            echo '(', get_enum_element('access_levels', $t_access_level), ')';
        }
    }
    ?>
</span>
		</span>

		<?php 
    if (VS_PRIVATE == $t_bugnote->view_state) {
        ?>
		<span class="small bugnote-view-state">[ <?php 
        echo lang_get('private');
        ?>
 ]</span>
		<?php 
    }
		<tr>
			<td>
				<a href="manage_custom_field_edit_page.php?field_id=<?php 
    echo $t_field_id;
    ?>
"><?php 
    echo custom_field_get_display_name($t_desc['name']);
    ?>
</a>
			</td>
			<td><?php 
    echo count(custom_field_get_project_ids($t_field_id));
    ?>
</td>
			<td><?php 
    echo get_enum_element('custom_field_type', $t_desc['type']);
    ?>
</td>
			<td><?php 
    echo string_display($t_desc['possible_values']);
    ?>
</td>
			<td><?php 
    echo string_display($t_desc['default_value']);
    ?>
</td>
		</tr><?php 
}
# Create Form END
?>
	</table>
Example #23
0
/**
 *
 * @param BugData $p_bug bug object
 * @param int $p_columns_target see COLUMNS_TARGET_* in constant_inc.php
 * @return null
 * @access public
 */
function print_column_status($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    echo '<td class="column-status">';
    printf('<span class="issue-status" title="%s">%s</span>', get_enum_element('resolution', $p_bug->resolution, auth_get_current_user_id(), $p_bug->project_id), get_enum_element('status', $p_bug->status, auth_get_current_user_id(), $p_bug->project_id));
    # print username instead of status
    if (ON == config_get('show_assigned_names') && $p_bug->handler_id > 0 && access_has_project_level(config_get('view_handler_threshold'), $p_bug->project_id)) {
        printf(' (%s)', prepare_user_name($p_bug->handler_id));
    }
    echo '</td>';
}
		<td>
		<?php 
        echo sprintf(lang_get('total_sponsorship_amount'), sponsorship_format_amount($t_total_sponsorship));
        if (access_has_bug_level(config_get('view_sponsorship_details_threshold'), $f_bug_id)) {
            echo '<br /><br />';
            $i = 0;
            foreach ($t_sponsorship_ids as $id) {
                $t_sponsorship = sponsorship_get($id);
                $t_date_added = date(config_get('normal_date_format'), $t_sponsorship->date_submitted);
                echo $i > 0 ? '<br />' : '';
                $i++;
                echo sprintf(lang_get('label'), $t_date_added) . lang_get('word_separator');
                print_user($t_sponsorship->user_id);
                echo ' (' . sponsorship_format_amount($t_sponsorship->amount) . ')';
                if (access_has_bug_level(config_get('handle_sponsored_bugs_threshold'), $f_bug_id)) {
                    echo ' ' . get_enum_element('sponsorship', $t_sponsorship->paid);
                }
            }
        }
        ?>
		</td>
		</tr>
<?php 
    }
    ?>
</table>

<?php 
    collapse_closed('sponsorship');
    ?>
Example #25
0
	return;
}

$t_anonymous_user_id = user_get_id_by_name( $t_anonymous_account );
check_print_test_row(
	'anonymous_account is a valid user account',
	$t_anonymous_user_id !== false,
	array( false => 'You need to specify a valid user account to use with the anonymous_account configuration options.' )
);

check_print_test_row(
	'anonymous_account user has the enabled flag set',
	user_is_enabled( $t_anonymous_user_id ),
	array( false => 'The anonymous user account must be enabled before it can be used.' )
);

check_print_test_row(
	'anonymous_account user has the protected flag set',
	user_get_field( $t_anonymous_user_id, 'protected' ),
	array( false => 'The anonymous user account needs to have the protected flag set to prevent anonymous users modifying the account.' )
);

check_print_test_row(
	'anonymous_account user does not have administrator permissions',
	!user_is_administrator( $t_anonymous_user_id ),
	array(
		true => 'The anonymous user account currently has an access level of: ' . htmlentities( get_enum_element( 'access_levels', user_get_access_level( $t_anonymous_user_id ) ) ),
		false => 'The anonymous user account should not have administrator level permissions.'
	)
);
Example #26
0
$t_last_updated = $t_show_last_updated ? string_display_line(date(config_get('normal_date_format'), $t_bug->last_updated)) : '';
$t_platform = string_display_line($t_bug->platform);
$t_os = string_display_line($t_bug->os);
$t_os_version = string_display_line($t_bug->os_build);
$t_is = string_display_line($t_bug->os);
$t_status = string_display_line(get_enum_element('status', $t_bug->status));
$t_priority = string_display_line(get_enum_element('priority', $t_bug->priority));
$t_resolution = string_display_line(get_enum_element('resolution', $t_bug->resolution));
$t_product_build = string_display_line($t_bug->build);
$t_projection = string_display_line(get_enum_element('projection', $t_bug->projection));
$t_eta = string_display_line(get_enum_element('eta', $t_bug->eta));
$t_summary = string_display_line_links(bug_format_summary($f_bug_id, SUMMARY_FIELD));
$t_description = string_display_links($t_bug->description);
$t_steps_to_reproduce = string_display_links($t_bug->steps_to_reproduce);
$t_additional_information = string_display_links($t_bug->additional_information);
$t_view_state = $t_show_view_state ? get_enum_element('view_state', $t_bug->view_state) : '';
if ($t_show_due_date) {
    if (!date_is_null($t_bug->due_date)) {
        $t_due_date = date(config_get('normal_date_format'), $t_bug->due_date);
    } else {
        $t_due_date = '';
    }
}
$t_product_version = $t_show_product_version ? string_display_line(prepare_version_string($t_bug->project_id, version_get_id($t_bug->version, $t_bug->project_id))) : '';
$t_target_version = $t_show_target_version ? string_display_line(prepare_version_string($t_bug->project_id, version_get_id($t_bug->target_version, $t_bug->project_id))) : '';
$t_fixed_in_version = $t_show_fixed_in_version ? string_display_line(prepare_version_string($t_bug->project_id, version_get_id($t_bug->fixed_in_version, $t_bug->project_id))) : '';
html_page_top1(bug_format_summary($f_bug_id, SUMMARY_CAPTION));
html_head_end();
html_body_begin();
echo '<br />';
echo '<table class="width100" cellspacing="1">';
 }
 echo '<span class="color-global">' . lang_get('colour_global') . '</span></p>';
 get_section_begin_for_email(lang_get('email_notification'));
 #		get_capability_row_for_email( lang_get( 'email_on_new' ), 'new' );  # duplicate of status change to 'new'
 get_capability_row_for_email(lang_get('email_on_updated'), 'updated');
 get_capability_row_for_email(lang_get('email_on_assigned'), 'owner');
 get_capability_row_for_email(lang_get('email_on_reopened'), 'reopened');
 get_capability_row_for_email(lang_get('email_on_deleted'), 'deleted');
 get_capability_row_for_email(lang_get('email_on_bugnote_added'), 'bugnote');
 if (config_get('enable_sponsorship') == ON) {
     get_capability_row_for_email(lang_get('email_on_sponsorship_changed'), 'sponsor');
 }
 get_capability_row_for_email(lang_get('email_on_relationship_changed'), 'relation');
 $t_statuses = MantisEnum::getAssocArrayIndexedByValues(config_get('status_enum_string'));
 foreach ($t_statuses as $t_status => $t_label) {
     get_capability_row_for_email(lang_get('status_changed_to') . ' \'' . get_enum_element('status', $t_status) . '\'', $t_label);
 }
 get_section_end_for_email();
 if ($g_can_change_flags || $g_can_change_defaults) {
     echo '<p>' . lang_get('notify_actions_change_access') . "\n";
     echo '<select name="notify_actions_access">' . "\n";
     print_enum_string_option_list('access_levels', config_get_access('notify_flags'));
     echo "\n</select></p>";
     echo '<input type="submit" class="button" value="' . lang_get('change_configuration') . '" />' . "\n";
     echo "</form>\n";
     echo '<div class="right">' . "\n";
     echo '<form id="mail_config_action" method="post" action="manage_config_revert.php">' . "\n";
     echo form_security_field('manage_config_revert') . "\n";
     echo '<input name="revert" type="hidden" value="notify_flags,default_notify_flags" />' . "\n";
     echo '<input name="project" type="hidden" value="' . $t_project . '" />' . "\n";
     echo '<input name="return" type="hidden" value="' . string_attribute(form_action_self()) . '" />' . "\n";
Example #28
0
/**
 * return the resolution string
 * @param object $p_bug the bug
 * @return string formatted resolution string
 * @access public
 */
function csv_format_resolution($p_bug)
{
    return csv_escape_string(get_enum_element('resolution', $p_bug->resolution, auth_get_current_user_id(), $p_bug->project_id));
}
        ?>
</a>
	</td>
	<td>
		<?php 
        echo get_enum_element('project_status', $t_project['status']);
        ?>
	</td>
	<td>
		<?php 
        echo trans_bool($t_project['enabled']);
        ?>
	</td>
	<td>
		<?php 
        echo get_enum_element('project_view_state', $t_project['view_state']);
        ?>
	</td>
	<td>
		<?php 
        echo string_display_links($t_project['description']);
        ?>
	</td>
</tr>
<?php 
    }
    $t_subprojects = project_hierarchy_get_subprojects($t_project_id, true);
    if (0 < count($t_projects) || 0 < count($t_subprojects)) {
        array_unshift($t_stack, $t_projects);
    }
    if (0 < count($t_subprojects)) {

<tr <?php 
echo helper_alternate_class();
?>
>

	<!-- ETA -->
	<td class="category">
		<?php 
echo lang_get('eta');
?>
	</td>
	<td>
		<?php 
echo get_enum_element('eta', $t_bug->eta);
?>
	</td>

	<!-- fixed in version -->
		<?php 
$t_show_version = ON == config_get('show_product_version') || AUTO == config_get('show_product_version') && count(version_get_all_rows($t_bug->project_id)) > 0;
if ($t_show_version) {
    ?>
	<td class="category">
		<?php 
    echo lang_get('fixed_in_version');
    ?>
	</td>
	<td>
		<?php