Exemplo n.º 1
0
        if (isset($_SESSION["graph_return"])) {
            $return_to = $_SESSION["graph_return"];
            unset($_SESSION["graph_return"]);
            kill_session_var("graph_return");
            header('Location: ' . $return_to);
        } else {
            header('Location: ../../graphs_new.php?host_id=' . $hostid);
        }
        exit;
        break;
    case 'disable':
        thold_threshold_disable($_REQUEST["id"]);
        header('Location: ' . $_SERVER["HTTP_REFERER"]);
        exit;
    case 'enable':
        thold_threshold_enable($_REQUEST["id"]);
        header('Location: ' . $_SERVER["HTTP_REFERER"]);
        exit;
}
include_once $config['include_path'] . '/top_header.php';
$t = db_fetch_assoc('SELECT id, name, name_cache FROM data_template_data WHERE local_data_id=' . $rra . ' LIMIT 1');
$desc = $t[0]['name_cache'];
unset($t);
$rrdsql = db_fetch_assoc("SELECT id FROM data_template_rrd WHERE local_data_id={$rra} ORDER BY id");
$sql = '';
foreach ($rrdsql as $r) {
    if ($sql == '') {
        $sql = ' task_item_id = ' . $r['id'];
    } else {
        $sql .= ' OR task_item_id = ' . $r['id'];
    }
Exemplo n.º 2
0
        break;
    case 'ajax_hosts_noany':
        get_allowed_ajax_hosts(false, false, 'h.id IN (SELECT host_id FROM thold_data)');
        break;
    case 'thold':
        general_header();
        thold_tabs();
        tholds();
        bottom_footer();
        break;
    case 'disable':
        thold_threshold_disable(get_filter_request_var('id'));
        header('Location: thold_graph.php');
        exit;
    case 'enable':
        thold_threshold_enable(get_filter_request_var('id'));
        header('Location: thold_graph.php');
        exit;
    case 'hoststat':
        general_header();
        thold_tabs();
        hosts();
        bottom_footer();
        break;
    default:
        general_header();
        thold_tabs();
        thold_show_log();
        bottom_footer();
        break;
}