Esempio n. 1
0
    die(ossim_error());
}
$db = new ossim_db();
$conn = $db->connect();
if ($by == "user") {
    $title = _("TICKET BY USER");
    $data_pie = Incident::incidents_by_user($conn);
} elseif ($by == "type") {
    $title = _("TICKET BY TYPE");
    $data_pie = Incident::incidents_by_type($conn);
} elseif ($by == "type_descr") {
    $title = _("TICKET BY TYPE DESCRIPTION");
    $data_pie = Incident::incidents_by_type_descr($conn);
} elseif ($by == "status") {
    $title = _("TICKET BY STATUS");
    $data_pie = Incident::incidents_by_status($conn);
}
$db->close($conn);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="">
<head>
	<meta http-equiv="Pragma" content="no-cache"/>
	<link rel="stylesheet" type="text/css" href="../style/style.css"/>
	<!--[if IE]><script language="javascript" type="text/javascript" src="../../js/jqplot/excanvas.js"></script><![endif]-->
	<script type="text/javascript" src="../../js/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="../../js/jquery.flot.pie.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			
        ?>
        <table align='center' width='100%'>
            <tr>
                <td style='border-bottom:none;' valign='middle'><?php 
        echo _("No Data Available");
        ?>
</td>
            </tr>
        </table>
        <?php 
    }
}
$db = new ossim_db();
$conn = $db->connect();
$user = Session::get_session_user();
$tickets_by_status = Incident::incidents_by_status($conn, null, $user);
$tickets_by_type = Incident::incidents_by_type($conn, null, $user);
$tickets_by_user = Incident::incidents_by_user($conn, true, null, $user);
$tickets_by_tag = Incident::incidents_by_tag($conn, null, $user);
/*echo "<pre>";
	print_r($tickets_by_status);
echo "</pre>";*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title> <?php 
echo gettext("OSSIM Framework");
?>
 </title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
Esempio n. 3
0
									}
								});
						});
					</script>

			</table>
		</td>
	</tr>
	</table>
</td>
</tr>
</table>
<?php 
} elseif ($screen == "tickets" && Session::menu_perms("MenuIncidents", "IncidentsReport")) {
    // Incidents report
    $list1 = Incident::incidents_by_status($conn);
    // Status
    $list2 = Incident::incidents_by_type($conn);
    // Type
    $list3 = Incident::incidents_by_user($conn);
    // User
    ?>
<table cellpadding='0' cellspacing='0' border='0' align="center" width='99%'>
<tr>
<td class="canvas">
	<table cellpadding='0' cellspacing='0' border='0' width='100%'>
	<tr>
		<td height="3" colspan="11" bgcolor="#A1A1A1"></td>
	</tr>
	<tr>
		<td width="12" valign="top"><img src="../pixmaps/statusbar/btn_minimize.gif" border='0'></td>
Esempio n. 4
0
        								});
        						});
        					</script>
        
        			</table>
        		</td>
        	</tr>
        	</table>
        </td>
        </tr>
        </table>
        <?php 
} elseif ($screen == "tickets" && Session::menu_perms("analysis-menu", "IncidentsReport")) {
    // Incidents report
    $user = Session::get_session_user();
    $list1 = Incident::incidents_by_status($conn, null, $user);
    // Status
    $list2 = Incident::incidents_by_type($conn, null, $user);
    // Type
    $list3 = Incident::incidents_by_user($conn, true, null, $user);
    // User
    ?>
        <table cellpadding='0' cellspacing='0' border='0' align="center" width='100%'>
        <tr>
        <td class="canvas">
        	<table cellpadding='0' cellspacing='0' border='0' width='100%'>
        	<tr>
        		<td height="3" colspan="11" bgcolor="#A1A1A1"></td>
        	</tr>
        	<tr>
        		<td width="12" valign="top"></td>
Esempio n. 5
0
$data = array();
//The widget's data itself.
$label = array();
//Widget's label such as legend in charts, titles in tag clouds, etc...
$links = array();
//Links of each element of the widget.
/*
*
*	The code below is copied from /panel and will have to be adapted to the new DB structutre of the 4.0 version, that's why it is not commented.
*
*/
session_write_close();
//Now the widget's data will be calculated depending of the widget's type.
switch ($type) {
    case 'ticketStatus':
        $ticket_status = Incident::incidents_by_status($conn, $param_filters["assets"], $param_filters["user"]);
        if (is_array($ticket_status) && !empty($ticket_status)) {
            foreach ($ticket_status as $type => $ocurrences) {
                $data[] = $ocurrences;
                $label[] = _($type);
                $link = Menu::get_menu_url("/ossim/incidents/index.php?status={$type}&hmenu=Tickets&smenu=Tickets", 'analysis', 'tickets');
                $links[] = $link;
            }
        }
        $serie = 'Amount of Tickets';
        $colors = get_widget_colors(count($data));
        break;
    case 'ticketTypes':
        $ticket_by_type = Incident::incidents_by_type($conn, $param_filters['assets'], $param_filters['user']);
        if (is_array($ticket_by_type) && !empty($ticket_by_type)) {
            foreach ($ticket_by_type as $type => $ocurrences) {