Пример #1
0
$conn = $db->connect();
if ($action != '' && isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
    $check_perms = array('only_updates' => array('func' => 'Session::am_i_admin', 'parameters' => array()), 'open_tickets' => array('func' => 'Session::menu_perms', 'parameters' => array('analysis-menu', 'IncidentsOpen')), 'unresolved_alarms' => array('func' => 'Session::menu_perms', 'parameters' => array('analysis-menu', 'ControlPanelAlarms')), 'sensor_status' => array('func' => 'Session::menu_perms', 'parameters' => array('configuration-menu', 'PolicySensors')), 'system_eps' => array('func' => 'Session::menu_perms', 'parameters' => array('analysis-menu', 'EventsForensics')), 'monitored_devices' => array('func' => 'Session::am_i_admin', 'parameters' => array()), 'events_trend' => array('func' => 'Session::menu_perms', 'parameters' => array('analysis-menu', 'EventsForensics')));
    if (array_key_exists($action, $check_perms) && !call_user_func_array($check_perms[$action]['func'], $check_perms[$action]['parameters'])) {
        $response['error'] = TRUE;
        $response['output'] = _("You don't have permissions to see this section");
        echo json_encode($response);
        $db->close();
        exit;
    }
    switch ($action) {
        case 'only_updates':
            $response = get_only_updates();
            break;
        case 'open_tickets':
            $response = get_open_tickets($conn);
            break;
        case 'unresolved_alarms':
            $response = get_unresolved_alarms($conn);
            break;
        case 'sensor_status':
            $response = get_sensor_status($conn);
            break;
        case 'system_eps':
            $response = get_system_eps($conn);
            break;
        case 'monitored_devices':
            $response = get_monitored_devices($conn);
            break;
        case 'events_trend':
            $response = get_events_trend($conn);
Пример #2
0
<?php

include_once '../includes/connection.php';
include_once '../includes/functions.php';
$results = get_all_identifications($dbh);
$results_open_tickets = get_open_tickets($dbh);
$results_pending_tickets = get_pending_tickets($dbh);
$results_closed_tickets = get_closed_tickets($dbh);
?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>HighSite Admin Area</title>

    <!-- Bootstrap Core CSS -->
    <link href="../bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="../bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">

    <!-- Timeline CSS -->
    <link href="../dist/css/timeline.css" rel="stylesheet">