Example #1
0
        if ($c == 0) {
            $_SESSION['thold_message'] = '<font size=-1>Either No Templates or Threshold(s) Already Exists - No thresholds were created.</font>';
        }
        raise_message('thold_created');
        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 == '') {
Example #2
0
set_default_action('thold');
switch (get_request_var('action')) {
    case 'ajax_hosts':
        get_allowed_ajax_hosts(true, false, 'h.id IN (SELECT host_id FROM thold_data)');
        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();