示例#1
0
echo '</form>';
if (isset($search)) {
    echo "<div id='incident-search-content'>";
    echo "<h1>" . __('Report results');
    echo "<div id='button-bar-title'>";
    echo "<ul>";
    echo "<li>";
    echo '<a href="index.php?sec=reporting&amp;sec2=operation/reporting/incidents_html
			&amp;custom_search=' . $id_search . '&amp;show_stats=' . $show_stats . '&amp;show_list=' . $show_list . '&amp;clean_output=1&amp;pdf_output=1">
			<img src="images/page_white_acrobat.png" title="' . __('Export to PDF') . '"></a>';
    echo "</li>";
    echo "</ul>";
    echo "</div>";
    echo "</h1>";
    echo "<br>";
    $custom_search = get_custom_search($id_search, 'incidents');
    if ($custom_search) {
        if ($custom_search["form_values"]) {
            $filter = unserialize($custom_search["form_values"]);
            $filter_form = $filter;
            echo '<h3 class="suc">' . sprintf(__('Custom search "%s" loaded'), $custom_search["name"]) . '</h3>';
        } else {
            echo '<h3 class="error">' . sprintf(__('Could not load "%s" custom search'), $custom_search["name"]) . '</h3>';
        }
    } else {
        echo '<h3 class="error">' . __('Could not load custom search') . '</h3>';
    }
    include "incident_statistics.php";
    if ($show_list) {
        $statuses = get_indicent_status();
        $resolutions = get_incident_resolutions();
示例#2
0
$counter = 0;
$max_per_file = 5;

if ($custom_searches === false) {
		$custom .= "<table style='margin: 10px auto;'>";
        $custom .= "<tr>";
        $custom .= "<td>";
        $custom .= "<em>".__("There aren't custom search defined for this user")."</em>";
        $custom .= "</td>";
        $custom .= "</tr>";
		$custom .= "</table>";
} else {
	foreach ($custom_searches as $cs) {
		
		$c_search = get_custom_search ($cs['id'], 'incidents');
		
		if ($c_search) { 
			if ($c_search["form_values"]) {
				$filter_search = unserialize($c_search["form_values"]);
			}
		}
		
		$count_cs = filter_incidents ($filter_search, true);
		
		$custom .="<div class='custom_search'>";
		$custom .= "<a href='index.php?sec=incidents&sec2=operation/incidents/incident_search&saved_searches=".$cs["id"]."'>".$cs["name"]." ". "(". $count_cs.")" . "</a><br>";
		$custom .="</div>";
	}
	$custom .= "<div style='clear:both;'></div>";
}
示例#3
0
			if ($result === false) {
			echo ui_print_error_message (__('Could not create custom search'), '', true, 'h3', true);
		}
		else {
			echo ui_print_success_message (__('Custom search saved'), '', true, 'h3', true);
		}
	}
	else {
		echo ui_print_error_message (__('This name already exist'), '', true, 'h3', true);
	}
}

/* Get a custom search*/
if ($id_search && !$delete_custom_search) {
	
	$search = get_custom_search ($id_search, 'leads');
	
	if ($search) { 
		
		if ($search["form_values"]) {
			
			$filter = unserialize($search["form_values"]);
			echo ui_print_success_message (sprintf(__('Custom search "%s" loaded'), $search["name"]), '', true, 'h3', true);
		}
		else {
			echo ui_print_error_message (sprintf(__('Could not load "%s" custom search'), $search["name"]), '', true, 'h3', true);	
		}
	}
	else {
		echo ui_print_error_message (__('Could not load custom search'), '', true, 'h3', true);
	}