当前位置: 首页>>代码示例>>PHP>>正文


PHP isset_request_var函数代码示例

本文整理汇总了PHP中isset_request_var函数的典型用法代码示例。如果您正苦于以下问题:PHP isset_request_var函数的具体用法?PHP isset_request_var怎么用?PHP isset_request_var使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了isset_request_var函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: thold_config_insert

function thold_config_insert()
{
    global $menu;
    $menu['Management']['plugins/thold/notify_lists.php'] = __('Notification Lists');
    $menu['Management']['plugins/thold/thold.php'] = __('Thresholds');
    $menu['Templates']['plugins/thold/thold_templates.php'] = __('Threshold');
    if (isset_request_var('thold_vrule')) {
        if (get_nfilter_request_var('thold_vrule') == 'on') {
            $_SESSION['sess_config_array']['thold_draw_vrules'] = 'on';
            $_SESSION['sess_config_array']['boost_png_cache_enable'] = false;
        } elseif (get_nfilter_request_var('thold_vrule') == '') {
            $_SESSION['sess_config_array']['thold_draw_vrules'] = '';
        }
    }
    define('ST_RESTORAL', 0);
    // Restoral
    define('ST_TRIGGERA', 1);
    // Trigger Alert
    define('ST_NOTIFYRA', 2);
    // Notify Alert Retrigger
    define('ST_NOTIFYWA', 3);
    // Notify Warning
    define('ST_NOTIFYAL', 4);
    // Notify Alert
    define('ST_NOTIFYRS', 5);
    // Notify Restoral
    define('ST_TRIGGERW', 6);
    // Trigger Warning
    define('ST_NOTIFYAW', 7);
    // Notify Restoral to Warning
    define('STAT_HI', 2);
    define('STAT_LO', 1);
    define('STAT_NORMAL', 0);
}
开发者ID:Cacti,项目名称:plugin_thold,代码行数:34,代码来源:settings.php

示例2: save_schedules

function save_schedules()
{
    /* ================= input validation ================= */
    get_filter_request_var('id');
    get_filter_request_var('savedquery');
    get_filter_request_var('sendinterval');
    /* ==================================================== */
    $save['title'] = get_nfilter_request_var('title');
    $save['savedquery'] = get_nfilter_request_var('savedquery');
    $save['sendinterval'] = get_nfilter_request_var('sendinterval');
    $save['start'] = get_nfilter_request_var('start');
    $save['email'] = get_nfilter_request_var('email');
    $t = time();
    $d = strtotime(get_nfilter_request_var('start'));
    $i = $save['sendinterval'];
    if (isset_request_var('id')) {
        $save['id'] = get_request_var('id');
        $q = db_fetch_row('SELECT * FROM plugin_flowview_schedules WHERE id = ' . $save['id']);
        if (!isset($q['lastsent']) || $save['start'] != $q['start'] || $save['sendinterval'] != $q['sendinterval']) {
            while ($d < $t) {
                $d += $i;
            }
            $save['lastsent'] = $d - $i;
        }
    } else {
        $save['id'] = '';
        while ($d < $t) {
            $d += $i;
        }
        $save['lastsent'] = $d - $i;
    }
    if (isset_request_var('enabled')) {
        $save['enabled'] = 'on';
    } else {
        $save['enabled'] = 'off';
    }
    $id = sql_save($save, 'plugin_flowview_schedules', 'id', true);
    if (is_error_message()) {
        header('Location: flowview_schedules.php?tab=sched&header=false&action=edit&id=' . (empty($id) ? get_filter_request_var('id') : $id));
        exit;
    }
    header('Location: flowview_schedules.php?tab=sched&header=false');
    exit;
}
开发者ID:Cacti,项目名称:plugin_flowview,代码行数:44,代码来源:flowview_schedules.php

示例3: mactrack_site_remove

function mactrack_site_remove()
{
    global $config;
    /* ================= input validation ================= */
    get_filter_request_var('site_id');
    /* ==================================================== */
    if (read_config_option('remove_verification') == 'on' && !isset_request_var('confirm')) {
        top_header();
        form_confirm(__('Are You Sure?'), __("Are you sure you want to delete the site <strong>'%s'</strong>?", db_fetch_cell('SELECT description FROM host WHERE id=' . get_request_var('device_id'))), 'mactrack_sites.php', 'mactrack_sites.php?action=remove&site_id=' . get_request_var('site_id'));
        bottom_footer();
        exit;
    }
    if (read_config_option('remove_verification') == '' || isset_request_var('confirm')) {
        api_mactrack_site_remove(get_request_var('site_id'));
    }
}
开发者ID:Cacti,项目名称:plugin_mactrack,代码行数:16,代码来源:mactrack_sites.php

示例4: schedule_edit

function schedule_edit()
{
    global $plugins, $config, $tabs, $maint_types, $maint_intervals;
    /* ================= input validation ================= */
    get_filter_request_var('id');
    /* ==================================================== */
    maint_tabs();
    if (isset_request_var('id')) {
        $id = get_request_var('id');
        $maint_item_data = db_fetch_row('SELECT * FROM plugin_maint_schedules WHERE id = ' . $id);
    } else {
        $id = 0;
        $maint_item_data = array('id' => 0, 'name' => __('New Maintenance Schedule'), 'enabled' => 'on', 'mtype' => 1, 'stime' => time(), 'etime' => time() + 3600, 'minterval' => 0);
    }
    $header_label = get_header_label();
    if (get_request_var('tab') == 'general') {
        form_start('maint.php', 'maint');
        html_start_box(htmlspecialchars($header_label), '100%', '', '3', 'center', '');
        $form_array = array('general_header' => array('friendly_name' => __('Schedule'), 'method' => 'spacer'), 'name' => array('friendly_name' => __('Schedule Name'), 'method' => 'textbox', 'max_length' => 100, 'default' => $maint_item_data['name'], 'description' => __('Provide the Maintenance Schedule a meaningful name'), 'value' => isset($maint_item_data['name']) ? $maint_item_data['name'] : ''), 'enabled' => array('friendly_name' => __('Enabled'), 'method' => 'checkbox', 'default' => 'on', 'description' => __('Whether or not this threshold will be checked and alerted upon.'), 'value' => isset($maint_item_data['enabled']) ? $maint_item_data['enabled'] : ''), 'mtype' => array('friendly_name' => __('Schedule Type'), 'method' => 'drop_array', 'on_change' => 'changemaintType()', 'array' => $maint_types, 'description' => __('The type of Threshold that will be monitored.'), 'value' => isset($maint_item_data['mtype']) ? $maint_item_data['mtype'] : ''), 'minterval' => array('friendly_name' => __('Interval'), 'method' => 'drop_array', 'array' => $maint_intervals, 'default' => 86400, 'description' => __('This is the interval in which the start / end time will repeat.'), 'value' => isset($maint_item_data['minterval']) ? $maint_item_data['minterval'] : '1'), 'stime' => array('friendly_name' => __('Start Time'), 'method' => 'textbox', 'max_length' => 100, 'description' => __('The start date / time for this schedule. Most date / time formats accepted.'), 'default' => date('F j, Y, G:i', time()), 'value' => isset($maint_item_data['stime']) ? date('F j, Y,  G:i', $maint_item_data['stime']) : ''), 'etime' => array('friendly_name' => __('End Time'), 'method' => 'textbox', 'max_length' => 100, 'default' => date('F j, Y, G:i', time() + 3600), 'description' => __('The end date / time for this schedule. Most date / time formats accepted.'), 'value' => isset($maint_item_data['etime']) ? date('F j, Y,  G:i', $maint_item_data['etime']) : ''), 'save_component' => array('method' => 'hidden', 'value' => '1'), 'save' => array('method' => 'hidden', 'value' => 'edit'), 'id' => array('method' => 'hidden', 'value' => $id));
        draw_edit_form(array('config' => array('no_form_tag' => true), 'fields' => $form_array));
        html_end_box();
        form_save_button('maint.php', 'return');
        ?>
		<script type='text/javascript'>

		var date1Open = false;
		var date2Open = false;

		function changemaintType () {
			type = $('#mtype').val();
			switch(type) {
			case '1':
				$('#row_minterval').hide();
				break;
			case '2':
				$('#row_minterval').show();
				break;
			}
		}
	
		$(function() {
			$('#stime').after('<i id="startDate" class="calendar fa fa-calendar" title="<?php 
        print __('Start Date/Time Selector');
        ?>
"></i>');
			$('#etime').after('<i id="endDate" class="calendar fa fa-calendar" title="<?php 
        print __('End Date/Time Selector');
        ?>
"></i>');
			$('#startDate').click(function() {
				if (date1Open) {
					date1Open = false;
					$('#stime').datetimepicker('hide');
				}else{
					date1Open = true;
					$('#stime').datetimepicker('show');
				}
			});

			$('#endDate').click(function() {
				if (date2Open) {
					date2Open = false;
					$('#etime').datetimepicker('hide');
				}else{
					date2Open = true;
					$('#etime').datetimepicker('show');
				}
			});

			changemaintType ();

			$('#stime').datetimepicker({
				minuteGrid: 10,
				stepMinute: 1,
				showAnim: 'slideDown',
				numberOfMonths: 1,
				timeFormat: 'HH:mm',
				dateFormat: 'MM d, yy, ',
				showButtonPanel: false
			});

			$('#etime').datetimepicker({
				minuteGrid: 10,
				stepMinute: 1,
				showAnim: 'slideDown',
				numberOfMonths: 1,
				timeFormat: 'HH:mm',
				dateFormat: 'MM d, yy, ',
				showButtonPanel: false
			});
		});
		</script>
		<?php 
    } elseif (get_request_var('tab') == 'hosts') {
        thold_hosts($header_label);
    } elseif (get_request_var('tab') == 'webseer') {
        webseer_urls($header_label);
    } else {
        api_plugin_hook_function('maint_show_tab', $header_label);
    }
//.........这里部分代码省略.........
开发者ID:Cacti,项目名称:plugin_maint,代码行数:101,代码来源:maint.php

示例5: syslog_graph_buttons

function syslog_graph_buttons($graph_elements = array())
{
    global $config, $timespan, $graph_timeshifts;
    include dirname(__FILE__) . '/config.php';
    if (get_nfilter_request_var('action') == 'view') {
        return;
    }
    if (isset_request_var('graph_end') && strlen(get_filter_request_var('graph_end'))) {
        $date1 = date('Y-m-d H:i:s', get_filter_request_var('graph_start'));
        $date2 = date('Y-m-d H:i:s', get_filter_request_var('graph_end'));
    } else {
        $date1 = $timespan['current_value_date1'];
        $date2 = $timespan['current_value_date2'];
    }
    if (isset($graph_elements[1]['local_graph_id'])) {
        $graph_local = db_fetch_row("SELECT host_id FROM graph_local WHERE id='" . $graph_elements[1]['local_graph_id'] . "'");
        $sql_where = '';
        if (isset($graph_local['host_id'])) {
            $host = db_fetch_row("SELECT description, hostname FROM host WHERE id='" . $graph_local['host_id'] . "'");
            if (sizeof($host)) {
                if (!is_ipv4_address($host['description']) && strpos($host['description'], '.') !== false) {
                    $parts = explode('.', $host['description']);
                    $sql_where = "WHERE host LIKE '" . $parts[0] . ".%'";
                } else {
                    $sql_where = "WHERE host='" . $host['description'] . "'";
                }
                if (!is_ipv4_address($host['hostname']) && strpos($host['hostname'], '.') !== false) {
                    $parts = explode('.', $host['hostname']);
                    $sql_where .= ($sql_where != '' ? ' OR ' : 'WHERE ') . "host LIKE '" . $parts[0] . ".%'";
                } else {
                    $sql_where .= ($sql_where != '' ? ' OR ' : 'WHERE ') . "host='" . $host['hostname'] . "'";
                }
                if ($sql_where != '') {
                    $host = syslog_db_fetch_cell("SELECT host_id FROM `" . $syslogdb_default . "`.`syslog_hosts` {$sql_where}");
                    if (!empty($host)) {
                        print "<a href='" . htmlspecialchars($config['url_path'] . 'plugins/syslog/syslog.php?tab=syslog&reset=1&host=' . $host['host_id'] . '&date1=' . $date1 . '&date2=' . $date2) . "'><img src='" . $config['url_path'] . "plugins/syslog/images/view_syslog.png' border='0' alt='' title='" . __('Display Syslog in Range') . "'></a><br>";
                    }
                }
            }
        }
    }
}
开发者ID:Cacti,项目名称:plugin_syslog,代码行数:42,代码来源:setup.php

示例6: save_devices

function save_devices()
{
    /* ================= input validation ================= */
    get_filter_request_var('id');
    get_filter_request_var('version');
    get_filter_request_var('rotation');
    get_filter_request_var('expire');
    get_filter_request_var('port');
    get_filter_request_var('compression');
    /* ==================================================== */
    if (isset_request_var('id')) {
        $save['id'] = get_request_var('id');
    } else {
        $save['id'] = '';
    }
    $save['name'] = get_nfilter_request_var('name');
    $save['folder'] = get_nfilter_request_var('folder');
    $save['allowfrom'] = get_nfilter_request_var('allowfrom');
    $save['port'] = get_nfilter_request_var('port');
    $save['nesting'] = get_nfilter_request_var('nesting');
    $save['version'] = get_nfilter_request_var('version');
    $save['rotation'] = get_nfilter_request_var('rotation');
    $save['expire'] = get_nfilter_request_var('expire');
    $save['compression'] = get_nfilter_request_var('compression');
    $id = sql_save($save, 'plugin_flowview_devices', 'id', true);
    if (is_error_message()) {
        header('Location: flowview_devices.php?tab=listeners&header=false&action=edit&id=' . (empty($id) ? get_request_var('id') : $id));
        exit;
    }
    header('Location: flowview_devices.php?tab=listeners&header=false');
    exit;
}
开发者ID:Cacti,项目名称:plugin_flowview,代码行数:32,代码来源:flowview_devices.php

示例7: mactrack_utilities_recreate_aggregated_data

function mactrack_utilities_recreate_aggregated_data()
{
    global $config;
    if (read_config_option('remove_verification') == 'on' && !isset_request_var('confirm')) {
        top_header();
        form_confirm(__('Are You Sure?'), __('Are you sure you want to delete and recreate all the Aggregated Port to MAC to IP results from the system?'), 'mactrack_utilities.php', 'mactrack_utilities.php?action=mactrack_utilities_recreate_aggregated_data');
        bottom_footer();
        exit;
    }
    if (read_config_option('remove_verification') == '' || isset_request_var('confirm')) {
        $old_rows = db_fetch_cell('SELECT COUNT(*) FROM mac_track_aggregated_ports');
        db_execute('TRUNCATE TABLE mac_track_aggregated_ports');
        db_execute('INSERT INTO mac_track_aggregated_ports
			(site_id, device_id, hostname, device_name,
			vlan_id, vlan_name, mac_address, vendor_mac, ip_address, dns_hostname,
			port_number, port_name, date_last, first_scan_date, count_rec, authorized)
			SELECT site_id, device_id, hostname, device_name,
			vlan_id, vlan_name, mac_address, vendor_mac, ip_address, dns_hostname,
			port_number, port_name, max(scan_date), min(scan_date), count(*), authorized
			FROM mac_track_ports
			GROUP BY site_id,device_id, mac_address, port_number, ip_address, vlan_id, authorized');
        $new_rows = db_fetch_cell('SELECT COUNT(*) FROM mac_track_aggregated_ports');
        top_header();
        mactrack_utilities();
        html_start_box('Device Tracking Database Results', '100%', '', '3', 'center', '');
        ?>
		<td>
			The following number of records have been removed from the aggergated table: <?php 
        print $old_rows;
        ?>
. And <?php 
        print $new_rows;
        ?>
 number of record will be added.
		</td>
		<?php 
        html_end_box();
    }
}
开发者ID:Cacti,项目名称:plugin_mactrack,代码行数:39,代码来源:mactrack_utilities.php

示例8: array

 +-------------------------------------------------------------------------+
 | http://www.cacti.net/                                                   |
 +-------------------------------------------------------------------------+
*/
$stat_report_array = array(0 => 'Statistics Reports', 99 => 'Summary', 5 => 'UDP/TCP Destination Port', 6 => 'UDP/TCP Source Port', 7 => 'UDP/TCP Port', 8 => 'Destination IP', 9 => 'Source IP', 10 => 'Source/Destination IP', 11 => 'Source or Destination IP', 12 => 'IP Protocol', 17 => 'Input Interface', 18 => 'Output Interface', 23 => 'Input/Output Interface', 19 => 'Source AS', 20 => 'Destination AS', 21 => 'Source/Destination AS', 22 => 'IP ToS', 24 => 'Source Prefix', 25 => 'Destination Prefix', 26 => 'Source/Destination Prefix');
$print_report_array = array(0 => 'Print Reports', 1 => 'Flow Times', 4 => 'AS Numbers', 5 => '132 Columns', 9 => '1 Line with Tags', 10 => 'AS Aggregation', 11 => 'Protocol Port Aggregation', 12 => 'Source Prefix Aggregation', 13 => 'Destination Prefix Aggregation', 14 => 'Prefix Aggregation', 24 => 'Full (Catalyst)');
$flow_select_array = array(1 => 'Any Part in Specified Time Span', 2 => 'End Time in Specified Time Span', 3 => 'Start Time in Specified Time Span', 4 => 'Entirely in Specified Time Span');
$ip_protocols_array = array('' => 'Select One', 6 => 'TCP', 17 => 'UDP', 1 => 'ICMP', 2 => 'IGMP', 3 => 'GGP', 4 => 'IPENCAP', 5 => 'ST', 7 => 'CBT', 8 => 'EGP', 9 => 'IGP', 10 => 'BBN-RCC-MON', 11 => 'NVP-II', 12 => 'PUP', 13 => 'ARGUS', 14 => 'EMCON', 15 => 'XNET', 16 => 'CHAOS', 18 => 'MUX', 19 => 'DCN-MEAS', 20 => 'HMP', 21 => 'PRM', 22 => 'XNS-IDP', 23 => 'TRUNK-1', 24 => 'TRUNK-2', 25 => 'LEAF-1', 26 => 'LEAF-2', 27 => 'RDP', 28 => 'IRTP', 29 => 'ISO-TP4', 30 => 'NETBLT', 31 => 'MFE-NSP', 32 => 'MERIT-INP', 33 => 'DCCP', 34 => '3PC', 35 => 'IDPR', 36 => 'XTP', 37 => 'DDP', 38 => 'IDPR-CMTP', 39 => 'TP++', 40 => 'IL', 41 => 'IPv6', 42 => 'SDRP', 43 => 'IPv6-Route', 44 => 'IPv6-Frag', 45 => 'IDRP', 46 => 'RSVP', 47 => 'GRE', 48 => 'DSR', 49 => 'BNA', 50 => 'IPSEC-ESP', 51 => 'IPSEC-AH', 58 => 'IPv6-ICMP', 59 => 'IPv6-NoNxt', 60 => 'IPv6-Opts', 73 => 'RSPF', 81 => 'VMTP', 88 => 'EIGRP', 89 => 'OSPF', 92 => 'MTP', 94 => 'IPIP', 98 => 'ENCAP');
$resolve_addresses_array = array('Y' => 'Yes', 'N' => 'No');
$devices_arr = db_fetch_assoc('SELECT folder, name FROM plugin_flowview_devices ORDER BY name');
$devices = array();
if (!empty($devices_arr)) {
    $ddevice = $devices_arr[0]['folder'];
    foreach ($devices_arr as $d) {
        $devices[$d['folder']] = $d['name'];
    }
} else {
    $ddevice = 0;
}
$query_newname_field = array('friendly_name' => '', 'name' => 'queryname', 'method' => 'textbox', 'max_length' => 255, 'default' => '', 'description' => '', 'value' => isset_request_var('queryname') ? get_nfilter_request_var('queryname') : '');
$query_name_field = array('friendly_name' => '', 'method' => 'drop_sql', 'default' => 0, 'description' => '', 'value' => isset_request_var('query') ? get_filter_request_var('query') : 0, 'none_value' => 'None', 'on_change' => 'applyFilter()', 'sql' => 'SELECT id, name FROM plugin_flowview_queries ORDER BY name');
$device_name_field = array('friendly_name' => '', 'method' => 'drop_array', 'default' => 0, 'description' => '', 'value' => isset_request_var('device_name') ? get_nfilter_request_var('device_name') : $ddevice, 'none_value' => 'None', 'array' => $devices);
$cutoff_lines_field = array('friendly_name' => '', 'method' => 'drop_array', 'default' => 20, 'description' => '', 'value' => isset_request_var('cutoff_lines') ? get_nfilter_request_var('cutoff_lines') : 0, 'array' => array('999999' => 'All', '5' => 'Top 5', '10' => 'Top 10', '20' => 'Top 20', '30' => 'Top 30', '40' => 'Top 40', '50' => 'Top 50', '100' => 'Top 100', '200' => 'Top 200'));
$cutoff_octets_field = array('friendly_name' => '', 'method' => 'drop_array', 'default' => 0, 'description' => '', 'value' => isset_request_var('cutoff_octets') ? get_nfilter_request_var('cutoff_octets') : '', 'array' => array('0' => 'No Limit', '1024' => '1K   Bytes', '10240' => '10K  Bytes', '20480' => '20K  Bytes', '102400' => '100K Bytes', '512000' => '500K Bytes', '1024000' => '1M   Bytes', '10240000' => '10M  Bytes', '20480000' => '20M  Bytes', '51200000' => '50M  Bytes', '102400000' => '100M Bytes', '204800000' => '200M Bytes', '512000000' => '500M Bytes', '1024000000' => '1G   Bytes'));
$ip_protocol_field = array('friendly_name' => '', 'method' => 'drop_array', 'default' => 0, 'description' => '', 'value' => isset_request_var('protocols') ? get_nfilter_request_var('protocols') : '', 'array' => $ip_protocols_array);
$stat_report_field = array('friendly_name' => '', 'name' => 'stat_report', 'method' => 'drop_array', 'default' => 10, 'description' => '', 'value' => isset_request_var('stat_report') ? get_nfilter_request_var('stat_report') : 10, 'array' => $stat_report_array);
$flow_select_field = array('friendly_name' => '', 'method' => 'drop_array', 'default' => 1, 'description' => '', 'value' => isset_request_var('flow_select') ? get_nfilter_request_var('flow_select') : 1, 'array' => $flow_select_array);
$print_report_field = array('friendly_name' => '', 'method' => 'drop_array', 'default' => 0, 'description' => '', 'value' => isset_request_var('print_report') ? get_nfilter_request_var('print_report') : 0, 'array' => $print_report_array);
$resolve_addresses_field = array('friendly_name' => '', 'method' => 'drop_array', 'default' => 'Y', 'description' => '', 'value' => isset_request_var('resolve_addresses') ? get_nfilter_request_var('resolve_addresses') : 'Y', 'array' => $resolve_addresses_array);
$stat_columns_array = array(5 => array(1, 2, '-1', '-1', '0', 'Port', 'Flows', 'Bytes', 'Packets'), 6 => array(1, 2, '-1', '-1', '0', 'Port', 'Flows', 'Bytes', 'Packets'), 7 => array(1, 2, '-1', '-1', '0', 'Port', 'Flows', 'Bytes', 'Packets'), 8 => array(1, 2, 0, '-1', '-1', 'Dest IP', 'Flows', 'Bytes', 'Packets'), 9 => array(1, 2, 0, '-1', '-1', 'Src IP', 'Flows', 'Bytes', 'Packets'), 10 => array(1, 3, '0,1', '-1', '-1', 'Src IP', 'Dest IP', 'Flows', 'Bytes', 'Packets'), 11 => array(1, 2, 0, '-1', '-1', 'Src/Dest IP', 'Flows', 'Bytes', 'Packets'), 12 => array(1, 2, '-1', '0', '-1', 'Protocol', 'Flows', 'Bytes', 'Packets'), 17 => array(1, 2, '-1', '-1', '-1', 'Input IF', 'Flows', 'Bytes', 'Packets'), 18 => array(1, 2, '-1', '-1', '-1', 'Output IF', 'Flows', 'Bytes', 'Packets'), 19 => array(1, 2, '-1', '-1', '-1', 'Src AS', 'Flows', 'Bytes', 'Packets'), 20 => array(1, 2, '-1', '-1', '-1', 'Dest AS', 'Flows', 'Bytes', 'Packets'), 21 => array(1, 3, '-1', '-1', '-1', 'Src AS', 'Dest AS', 'Flows', 'Bytes', 'Packets'), 22 => array(1, 2, '-1', '-1', '-1', 'TOS', 'Flows', 'Bytes', 'Packets'), 23 => array(1, 3, '-1', '-1', '-1', 'Input IF', 'Output IF', 'Flows', 'Bytes', 'Packets'), 24 => array(1, 2, '0', '-1', '-1', 'Src Prefix', 'Flows', 'Bytes', 'Packets'), 25 => array(1, 2, '0', '-1', '-1', 'Dest Prefix', 'Flows', 'Bytes', 'Packets'), 26 => array(1, 3, '0,1', '-1', '-1', 'Src Prefix', 'Dest Prefix', 'Flows', 'Bytes', 'Packets'));
$print_columns_array = array(1 => array(2, 8, '1,3', '1', '4', '1', '5,6', 'Src IF', 'Src IP', 'Dest IF', 'Dest IP', 'Protocol', 'Src Port', 'Dest Port', 'Packets', 'Bytes', 'Start Time', 'End Time', 'Active', 'B/Pk', 'Ts', 'Fl'), 4 => array(1, 5, '', '0', '2', '0', '', 'Src IP', 'Dest IP', 'Protocol', 'Src AS', 'Dest AS', 'Bytes', 'Packets'), 5 => array(1, 11, '3,6', '0', '8', '0', '4,7', 'Start Time', 'End Time', 'Src IF', 'Src IP', 'Src Port', 'Dest IF', 'Dest IP', 'Dest Port', 'Protocol', 'Flags', 'Packets', 'Bytes'));
开发者ID:Cacti,项目名称:plugin_flowview,代码行数:31,代码来源:arrays.php

示例9: syslog_action_edit

function syslog_action_edit()
{
    global $colors, $message_types, $syslog_freqs, $syslog_times;
    include dirname(__FILE__) . '/config.php';
    /* ================= input validation ================= */
    get_filter_request_var('id');
    get_filter_request_var('type');
    /* ==================================================== */
    if (isset_request_var('id')) {
        $report = syslog_db_fetch_row('SELECT *
			FROM `' . $syslogdb_default . '`.`syslog_reports`
			WHERE id=' . get_request_var('id'));
        if (sizeof($report)) {
            $header_label = __('Report Edit [edit: %s]', $report['name']);
        } else {
            $header_label = __('Report Edit [new]');
            $report['name'] = __('New Report Record');
        }
    } else {
        $header_label = __('Report Edit [new]');
        $report['name'] = __('New Report Record');
    }
    $fields_syslog_report_edit = array('spacer0' => array('method' => 'spacer', 'friendly_name' => __('Report Details')), 'name' => array('method' => 'textbox', 'friendly_name' => __('Report Name'), 'description' => __('Please describe this Report.'), 'value' => '|arg1:name|', 'max_length' => '250'), 'enabled' => array('method' => 'drop_array', 'friendly_name' => __('Enabled?'), 'description' => __('Is this Report Enabled?'), 'value' => '|arg1:enabled|', 'array' => array('on' => __('Enabled'), '' => __('Disabled')), 'default' => 'on'), 'type' => array('method' => 'drop_array', 'friendly_name' => __('String Match Type'), 'description' => __('Define how you would like this string matched.'), 'value' => '|arg1:type|', 'array' => $message_types, 'default' => 'matchesc'), 'message' => array('method' => 'textbox', 'friendly_name' => __('Syslog Message Match String'), 'description' => __('The matching component of the syslog message.'), 'value' => '|arg1:message|', 'default' => '', 'max_length' => '255'), 'timespan' => array('method' => 'drop_array', 'friendly_name' => __('Report Frequency'), 'description' => __('How often should this Report be sent to the distribution list?'), 'value' => '|arg1:timespan|', 'array' => $syslog_freqs, 'default' => 'del'), 'timepart' => array('method' => 'drop_array', 'friendly_name' => __('Send Time'), 'description' => __('What time of day should this report be sent?'), 'value' => '|arg1:timepart|', 'array' => $syslog_times, 'default' => 'del'), 'message' => array('friendly_name' => __('Syslog Message Match String'), 'description' => __('The matching component of the syslog message.'), 'method' => 'textbox', 'max_length' => '255', 'value' => '|arg1:message|', 'default' => ''), 'body' => array('friendly_name' => __('Report Body Text'), 'textarea_rows' => '5', 'textarea_cols' => '60', 'description' => __('The information that will be contained in the body of the report.'), 'method' => 'textarea', 'class' => 'textAreaNotes', 'value' => '|arg1:body|', 'default' => ''), 'email' => array('friendly_name' => __('Report e-mail Addresses'), 'textarea_rows' => '3', 'textarea_cols' => '60', 'description' => __('Comma delimited list of e-mail addresses to send the report to.'), 'method' => 'textarea', 'class' => 'textAreaNotes', 'value' => '|arg1:email|', 'default' => ''), 'notes' => array('friendly_name' => __('Report Notes'), 'textarea_rows' => '3', 'textarea_cols' => '60', 'description' => __('Space for Notes on the Report'), 'method' => 'textarea', 'class' => 'textAreaNotes', 'value' => '|arg1:notes|', 'default' => ''), 'id' => array('method' => 'hidden_zero', 'value' => '|arg1:id|'), '_id' => array('method' => 'hidden_zero', 'value' => '|arg1:id|'), 'save_component_report' => array('method' => 'hidden', 'value' => '1'));
    form_start('syslog_reports.php');
    html_start_box($header_label, '100%', '', '3', 'center', '');
    draw_edit_form(array('config' => array('form_name' => 'chk'), 'fields' => inject_form_variables($fields_syslog_report_edit, isset($report) ? $report : array())));
    html_end_box();
    form_save_button('syslog_reports.php', '', 'id');
    form_end();
}
开发者ID:Cacti,项目名称:plugin_syslog,代码行数:30,代码来源:syslog_reports.php

示例10: mikrotik_host_save

function mikrotik_host_save($data)
{
    $id = $data['host_id'];
    if (isset_request_var('mikrotik_user')) {
        db_execute_prepared('REPLACE INTO plugin_mikrotik_credentials (host_id, user, password) VALUES (?,?,?)', array($id, get_nfilter_request_var('mikrotik_user'), get_nfilter_request_var('mikrotik_password')));
    }
    return $data;
}
开发者ID:Cacti,项目名称:plugin_mikrotik,代码行数:8,代码来源:setup.php

示例11: template_save_edit

function template_save_edit()
{
    /* ================= input validation ================= */
    get_filter_request_var('id');
    get_filter_request_var('thold_type');
    get_filter_request_var('thold_hi');
    get_filter_request_var('thold_low');
    get_filter_request_var('thold_fail_trigger');
    get_filter_request_var('time_hi');
    get_filter_request_var('time_low');
    get_filter_request_var('time_fail_trigger');
    get_filter_request_var('time_fail_length');
    get_filter_request_var('thold_warning_type');
    get_filter_request_var('thold_warning_hi');
    get_filter_request_var('thold_warning_low');
    get_filter_request_var('thold_warning_fail_trigger');
    get_filter_request_var('time_warning_hi');
    get_filter_request_var('time_warning_low');
    get_filter_request_var('time_warning_fail_trigger');
    get_filter_request_var('time_warning_fail_length');
    get_filter_request_var('bl_ref_time_range');
    get_filter_request_var('bl_pct_down');
    get_filter_request_var('bl_pct_up');
    get_filter_request_var('bl_fail_trigger');
    get_filter_request_var('repeat_alert');
    get_filter_request_var('data_type');
    get_filter_request_var('cdef');
    get_filter_request_var('notify_warning');
    get_filter_request_var('notify_alert');
    get_filter_request_var('snmp_event_severity');
    get_filter_request_var('snmp_event_warning_severity');
    /* ==================================================== */
    /* clean up date1 string */
    if (isset_request_var('name')) {
        set_request_var('name', trim(str_replace(array("\\", "'", '"'), '', get_nfilter_request_var('name'))));
    }
    if (isset_request_var('snmp_trap_category')) {
        set_request_var('snmp_event_category', db_qstr(trim(str_replace(array("\\", "'", '"'), '', get_nfilter_request_var('snmp_event_category')))));
    }
    /* save: data_template */
    $save['id'] = get_nfilter_request_var('id');
    $save['hash'] = get_hash_thold_template($save['id']);
    $save['name'] = get_nfilter_request_var('name');
    $save['thold_type'] = get_nfilter_request_var('thold_type');
    // High / Low
    $save['thold_hi'] = get_nfilter_request_var('thold_hi');
    $save['thold_low'] = get_nfilter_request_var('thold_low');
    $save['thold_fail_trigger'] = get_nfilter_request_var('thold_fail_trigger');
    // Time Based
    $save['time_hi'] = get_nfilter_request_var('time_hi');
    $save['time_low'] = get_nfilter_request_var('time_low');
    $save['time_fail_trigger'] = get_nfilter_request_var('time_fail_trigger');
    $save['time_fail_length'] = get_nfilter_request_var('time_fail_length');
    if (isset_request_var('thold_fail_trigger') && get_nfilter_request_var('thold_fail_trigger') != '') {
        $save['thold_fail_trigger'] = get_nfilter_request_var('thold_fail_trigger');
    } else {
        $alert_trigger = read_config_option('alert_trigger');
        if ($alert_trigger != '' && is_numeric($alert_trigger)) {
            $save['thold_fail_trigger'] = $alert_trigger;
        } else {
            $save['thold_fail_trigger'] = 5;
        }
    }
    /***  Warnings  ***/
    // High / Low Warnings
    $save['thold_warning_hi'] = get_nfilter_request_var('thold_warning_hi');
    $save['thold_warning_low'] = get_nfilter_request_var('thold_warning_low');
    $save['thold_warning_fail_trigger'] = get_nfilter_request_var('thold_warning_fail_trigger');
    // Time Based Warnings
    $save['time_warning_hi'] = get_nfilter_request_var('time_warning_hi');
    $save['time_warning_low'] = get_nfilter_request_var('time_warning_low');
    $save['time_warning_fail_trigger'] = get_nfilter_request_var('time_warning_fail_trigger');
    $save['time_warning_fail_length'] = get_nfilter_request_var('time_warning_fail_length');
    if (isset_request_var('thold_warning_fail_trigger') && get_nfilter_request_var('thold_warning_fail_trigger') != '') {
        $save['thold_warning_fail_trigger'] = get_nfilter_request_var('thold_warning_fail_trigger');
    } else {
        $alert_trigger = read_config_option('alert_trigger');
        if ($alert_trigger != '' && is_numeric($alert_trigger)) {
            $save['thold_warning_fail_trigger'] = $alert_trigger;
        } else {
            $save['thold_warning_fail_trigger'] = 5;
        }
    }
    $save['thold_enabled'] = isset_request_var('thold_enabled') ? 'on' : 'off';
    $save['exempt'] = isset_request_var('exempt') ? 'on' : '';
    $save['restored_alert'] = isset_request_var('restored_alert') ? 'on' : '';
    if (isset_request_var('bl_ref_time_range') && get_nfilter_request_var('bl_ref_time_range') != '') {
        $save['bl_ref_time_range'] = get_nfilter_request_var('bl_ref_time_range');
    } else {
        $alert_bl_timerange_def = read_config_option('alert_bl_timerange_def');
        if ($alert_bl_timerange_def != '' && is_numeric($alert_bl_timerange_def)) {
            $save['bl_ref_time_range'] = $alert_bl_timerange_def;
        } else {
            $save['bl_ref_time_range'] = 10800;
        }
    }
    $save['bl_pct_down'] = get_nfilter_request_var('bl_pct_down');
    $save['bl_pct_up'] = get_nfilter_request_var('bl_pct_up');
    if (isset_request_var('bl_fail_trigger') && get_nfilter_request_var('bl_fail_trigger') != '') {
        $save['bl_fail_trigger'] = get_nfilter_request_var('bl_fail_trigger');
//.........这里部分代码省略.........
开发者ID:Cacti,项目名称:plugin_thold,代码行数:101,代码来源:thold_templates.php

示例12: syslog_action_edit

function syslog_action_edit()
{
    global $message_types, $severities;
    include dirname(__FILE__) . '/config.php';
    /* ================= input validation ================= */
    get_filter_request_var('id');
    get_filter_request_var('type');
    get_filter_request_var('date');
    /* ==================================================== */
    if (!isempty_request_var('id') && get_nfilter_request_var('action') == 'edit') {
        $alert = syslog_db_fetch_row('SELECT *
			FROM `' . $syslogdb_default . '`.`syslog_alert`
			WHERE id=' . get_request_var('id'));
        if (sizeof($alert)) {
            $header_label = __('Alert Edit [edit: %s]' . $alert['name']);
        } else {
            $header_label = __('Alert Edit [new]');
        }
    } else {
        if (isset_request_var('id') && get_nfilter_request_var('action') == 'newedit') {
            $syslog_rec = syslog_db_fetch_row("SELECT * FROM `" . $syslogdb_default . "`.`syslog` WHERE seq=" . get_request_var("id") . (isset_request_var('date') ? " AND logtime='" . get_request_var("date") . "'" : ""));
            $header_label = __('Alert Ednt [new]');
            if (sizeof($syslog_rec)) {
                $alert['message'] = $syslog_rec['message'];
            }
            $alert['name'] = __('New Alert Rule');
        } else {
            $header_label = __('Alert Edit [new]');
            $alert['name'] = __('New Alert Rule');
        }
    }
    $alert_retention = read_config_option('syslog_alert_retention');
    if ($alert_retention != '' && $alert_retention > 0 && $alert_retention < 365) {
        $repeat_end = $alert_retention * 24 * 60 / 5;
    }
    $repeatarray = array(0 => __('Not Set'), 1 => __('%d Minutes', 5), 2 => __('%d Minutes', 10), 3 => __('%d Minutes', 15), 4 => __('%d Minutes', 20), 6 => __('%d Minutes', 30), 8 => __('%d Minutes', 45), 12 => __('%d Hour', 1), 24 => __('%d Hours', 2), 36 => __('%d Hours', 3), 48 => __('%d Hours', 4), 72 => __('%d Hours', 6), 96 => __('%d Hours', 8), 144 => __('%d Hours', 12), 288 => __('%d Day', 1), 576 => __('%d Days', 2), 2016 => __('%d Week', 1), 4032 => __('%d Weeks', 2), 8640 => __('Month'));
    if ($repeat_end) {
        foreach ($repeatarray as $i => $value) {
            if ($i > $repeat_end) {
                unset($repeatarray[$i]);
            }
        }
    }
    $fields_syslog_alert_edit = array('spacer0' => array('method' => 'spacer', 'friendly_name' => __('Alert Details')), 'name' => array('method' => 'textbox', 'friendly_name' => __('Alert Name'), 'description' => __('Please describe this Alert.'), 'value' => '|arg1:name|', 'max_length' => '250', 'size' => 80), 'severity' => array('method' => 'drop_array', 'friendly_name' => __('Severity'), 'description' => __('What is the Severity Level of this Alert?'), 'value' => '|arg1:severity|', 'array' => $severities, 'default' => '1'), 'report_method' => array('method' => 'drop_array', 'friendly_name' => __('Reporting Method'), 'description' => __('Define how to Alert on the syslog messages.'), 'value' => '|arg1:method|', 'array' => array('0' => __('Individual'), '1' => __('Threshold')), 'default' => '0'), 'num' => array('method' => 'textbox', 'friendly_name' => __('Threshold'), 'description' => __('For the \'Threshold\' method, If the number seen is above this value an Alert will be triggered.'), 'value' => '|arg1:num|', 'size' => '4', 'max_length' => '10', 'default' => '1'), 'type' => array('method' => 'drop_array', 'friendly_name' => __('String Match Type'), 'description' => __('Define how you would like this string matched.  If using the SQL Expression type you may use any valid SQL expression
			to generate the alarm.  Available fields include \'message\', \'facility\', \'priority\', and \'host\'.'), 'value' => '|arg1:type|', 'array' => $message_types, 'on_change' => 'changeTypes()', 'default' => 'matchesc'), 'message' => array('friendly_name' => __('Syslog Message Match String'), 'description' => __('Enter the matching component of the syslog message, the facility or host name, or the SQL where clause if using the SQL Expression Match Type.'), 'textarea_rows' => '2', 'textarea_cols' => '70', 'method' => 'textarea', 'class' => 'textAreaNotes', 'value' => '|arg1:message|', 'default' => ''), 'enabled' => array('method' => 'drop_array', 'friendly_name' => __('Alert Enabled'), 'description' => __('Is this Alert Enabled?'), 'value' => '|arg1:enabled|', 'array' => array('on' => __('Enabled'), '' => __('Disabled')), 'default' => 'on'), 'repeat_alert' => array('friendly_name' => __('Re-Alert Cycle'), 'method' => 'drop_array', 'array' => $repeatarray, 'default' => '0', 'description' => __('Do not resend this alert again for the same host, until this amount of time has elapsed. For threshold based alarms, this applies to all hosts.'), 'value' => '|arg1:repeat_alert|'), 'notes' => array('friendly_name' => __('Alert Notes'), 'textarea_rows' => '5', 'textarea_cols' => '70', 'description' => __('Space for Notes on the Alert'), 'method' => 'textarea', 'class' => 'textAreaNotes', 'value' => '|arg1:notes|', 'default' => ''), 'spacer1' => array('method' => 'spacer', 'friendly_name' => __('Alert Actions')), 'open_ticket' => array('method' => 'drop_array', 'friendly_name' => __('Open Ticket'), 'description' => __('Should a Help Desk Ticket be opened for this Alert'), 'value' => '|arg1:open_ticket|', 'array' => array('on' => __('Yes'), '' => __('No')), 'default' => ''), 'email' => array('method' => 'textarea', 'friendly_name' => __('E-Mails to Notify'), 'textarea_rows' => '5', 'textarea_cols' => '70', 'description' => __('Please enter a comma delimited list of e-mail addresses to inform.  If you
			wish to send out e-mail to a recipient in SMS format, please prefix that recipient\'s e-mail address
			with <b>\'sms@\'</b>.  For example, if the recipients SMS address is <b>\'2485551212@mycarrier.net\'</b>, you would
			enter it as <b>\'sms@2485551212@mycarrier.net\'</b> and it will be formatted as an SMS message.'), 'class' => 'textAreaNotes', 'value' => '|arg1:email|', 'max_length' => '255'), 'command' => array('friendly_name' => __('Alert Command'), 'textarea_rows' => '5', 'textarea_cols' => '70', 'description' => __('When an Alert is triggered, run the following command.  The following replacement variables
			are available <b>\'&lt;HOSTNAME&gt;\'</b>, <b>\'&lt;ALERTID&gt;\'</b>, <b>\'&lt;MESSAGE&gt;\'</b>,
			<b>\'&lt;FACILITY&gt;\'</b>, <b>\'&lt;PRIORITY&gt;\'</b>, <b>\'&lt;SEVERITY&gt;\'</b>.  Please
			note that <b>\'&lt;HOSTNAME&gt;\'</b> is only available on individual thresholds.'), 'method' => 'textarea', 'class' => 'textAreaNotes', 'value' => '|arg1:command|', 'default' => ''), 'id' => array('method' => 'hidden_zero', 'value' => '|arg1:id|'), '_id' => array('method' => 'hidden_zero', 'value' => '|arg1:id|'), 'save_component_alert' => array('method' => 'hidden', 'value' => '1'));
    form_start('syslog_alerts.php', 'syslog_edit');
    html_start_box($header_label, '100%', '', '3', 'center', '');
    draw_edit_form(array('config' => array('no_form_tag' => true), 'fields' => inject_form_variables($fields_syslog_alert_edit, sizeof($alert) ? $alert : array())));
    html_end_box();
    form_save_button('syslog_alerts.php', '', 'id');
    ?>
	<script type='text/javascript'>

	function changeTypes() {
		if ($('#type').val() == 'sql') {
			$('#message').prep('rows', 6);
		}else{
			$('#message').prep('rows', 2);
		}
	}
	</script>

	<?php 
}
开发者ID:Cacti,项目名称:plugin_syslog,代码行数:70,代码来源:syslog_alerts.php

示例13: mikrotik_view_graphs

function mikrotik_view_graphs()
{
    global $current_user, $config, $host_template_hashes, $graph_template_hashes;
    include './lib/timespan_settings.php';
    include './lib/html_graph.php';
    html_graph_validate_preview_request_vars();
    /* include graph view filter selector */
    html_start_box(__('Graph Preview Filters') . (isset_request_var('style') && strlen(get_request_var('style')) ? ' [ ' . __('Custom Graph List Applied - Filtering from List') . ' ]' : ''), '100%', '', '3', 'center', '');
    html_graph_preview_filter('mikrotik.php', 'graphs', 'ht.hash IN ("' . implode('","', $host_template_hashes) . '")', 'gt.hash IN ("' . implode('","', $graph_template_hashes) . '")');
    html_end_box();
    /* the user select a bunch of graphs of the 'list' view and wants them displayed here */
    $sql_or = '';
    if (isset_request_var('style')) {
        if (get_request_var('style') == 'selective') {
            /* process selected graphs */
            if (!isempty_request_var('graph_list')) {
                foreach (explode(',', get_request_var('graph_list')) as $item) {
                    $graph_list[$item] = 1;
                }
            } else {
                $graph_list = array();
            }
            if (!isempty_request_var('graph_add')) {
                foreach (explode(',', get_request_var('graph_add')) as $item) {
                    $graph_list[$item] = 1;
                }
            }
            /* remove items */
            if (!isempty_request_var('graph_remove')) {
                foreach (explode(',', get_request_var('graph_remove')) as $item) {
                    unset($graph_list[$item]);
                }
            }
            $i = 0;
            foreach ($graph_list as $item => $value) {
                $graph_array[$i] = $item;
                $i++;
            }
            if (isset($graph_array) && sizeof($graph_array) > 0) {
                /* build sql string including each graph the user checked */
                $sql_or = array_to_sql_or($graph_array, 'gtg.local_graph_id');
                $set_rra_id = empty($rra_id) ? read_user_setting('default_rra_id') : get_request_var('rra_id');
            }
        }
    }
    $total_graphs = 0;
    // Filter sql_where
    $sql_where = strlen(get_request_var('filter')) ? "gtg.title_cache LIKE '%" . get_request_var('filter') . "%'" : '';
    $sql_where .= (strlen($sql_or) && strlen($sql_where) ? ' AND ' : '') . $sql_or;
    // Host Id sql_where
    if (get_request_var('host_id') > 0) {
        $sql_where .= (strlen($sql_where) ? ' AND' : '') . ' gl.host_id=' . get_request_var('host_id');
    } else {
        $host_ids = mikrotik_host_ids_from_hashes($host_template_hashes);
        if (sizeof($host_ids)) {
            $sql_where .= (strlen($sql_where) ? ' AND' : '') . ' gl.host_id IN (' . implode(',', $host_ids) . ')';
        } else {
            $sql_where .= (strlen($sql_where) ? ' AND' : '') . ' 1=0';
        }
    }
    // Graph Template Id sql_where
    if (get_request_var('graph_template_id') > 0) {
        $sql_where .= (strlen($sql_where) ? ' AND' : '') . ' gl.graph_template_id IN(' . get_request_var('graph_template_id') . ')';
    } else {
        $graph_template_ids = mikrotik_graph_templates_from_hashes($graph_template_hashes);
        if (sizeof($graph_template_ids)) {
            $sql_where .= (strlen($sql_where) ? ' AND' : '') . ' gl.graph_template_id IN (' . implode(',', $graph_template_ids) . ')';
        } else {
            $sql_where .= (strlen($sql_where) ? ' AND' : '') . ' 1=0';
        }
    }
    $limit = get_request_var('graphs') * (get_request_var('page') - 1) . ',' . get_request_var('graphs');
    $order = 'gtg.title_cache';
    $graphs = get_allowed_graphs($sql_where, $order, $limit, $total_graphs);
    /* do some fancy navigation url construction so we don't have to try and rebuild the url string */
    if (preg_match('/page=[0-9]+/', basename($_SERVER['QUERY_STRING']))) {
        $nav_url = str_replace('&page=' . get_request_var('page'), '', get_browser_query_string());
    } else {
        $nav_url = get_browser_query_string() . '&host_id=' . get_request_var('host_id');
    }
    $nav_url = preg_replace('/((\\?|&)host_id=[0-9]+|(\\?|&)filter=[a-zA-Z0-9]*)/', '', $nav_url);
    $nav = html_nav_bar($nav_url, MAX_DISPLAY_PAGES, get_request_var('page'), get_request_var('graphs'), $total_graphs, get_request_var('columns'), __('Graphs'), 'page', 'main');
    print $nav;
    html_start_box('', '100%', '', '3', 'center', '');
    if (get_request_var('thumbnails') == 'true') {
        html_graph_thumbnail_area($graphs, '', 'graph_start=' . get_current_graph_start() . '&graph_end=' . get_current_graph_end(), '', get_request_var('columns'));
    } else {
        html_graph_area($graphs, '', 'graph_start=' . get_current_graph_start() . '&graph_end=' . get_current_graph_end(), '', get_request_var('columns'));
    }
    html_end_box();
    if ($total_graphs > 0) {
        print $nav;
    }
    bottom_footer();
}
开发者ID:Cacti,项目名称:plugin_mikrotik,代码行数:95,代码来源:mikrotik.php

示例14: mactrack_macw_remove

function mactrack_macw_remove()
{
    global $config;
    /* ================= input validation ================= */
    get_filter_request_var('mac_id');
    /* ==================================================== */
    if (read_config_option('remove_verification') == 'on' && !isset_request_var('confirm')) {
        top_header();
        form_confirm(__('Are You Sure?'), __('Are you sure you want to delete the watched Mac Address %s?', db_fetch_cell_prepared('SELECT name FROM mac_track_macwatch WHERE mac_id=?', array(get_request_var('mac_id')))), 'mactrack_macwatch.php', 'mactrack_macwatch.php?action=remove&mac_id=' . get_request_var('mac_id'));
        bottom_footer();
        exit;
    }
    if (read_config_option('remove_verification') == '' || isset_request_var('confirm')) {
        api_mactrack_macw_remove(get_request_var('mac_id'));
    }
}
开发者ID:Cacti,项目名称:plugin_mactrack,代码行数:16,代码来源:mactrack_macwatch.php

示例15: flowview_save_filter

function flowview_save_filter()
{
    if (isset_request_var('new_query') && get_nfilter_request_var('new_query') != '') {
        $queryname = get_nfilter_request_var('new_query');
        $save['id'] = '';
        $save['name'] = form_input_validate($queryname, 'queryname', '', false, 3);
    } else {
        $save['id'] = get_filter_request_var('query');
    }
    $save['device'] = get_nfilter_request_var('device_name');
    $save['timespan'] = get_nfilter_request_var('predefined_timespan');
    $save['startdate'] = get_nfilter_request_var('date1');
    $save['enddate'] = get_nfilter_request_var('date2');
    $save['tosfields'] = get_nfilter_request_var('tos_fields');
    $save['tcpflags'] = get_nfilter_request_var('tcp_flags');
    $save['protocols'] = get_nfilter_request_var('protocols');
    $save['sourceip'] = get_nfilter_request_var('source_address');
    $save['sourceport'] = get_nfilter_request_var('source_port');
    $save['sourceinterface'] = get_nfilter_request_var('source_if');
    $save['sourceas'] = get_nfilter_request_var('source_as');
    $save['destip'] = get_nfilter_request_var('dest_address');
    $save['destport'] = get_nfilter_request_var('dest_port');
    $save['destinterface'] = get_nfilter_request_var('desc_if');
    $save['destas'] = get_nfilter_request_var('desc_as');
    $save['statistics'] = get_nfilter_request_var('stat_report');
    $save['printed'] = get_nfilter_request_var('print_report');
    $save['includeif'] = get_nfilter_request_var('flow_select');
    $save['sortfield'] = get_nfilter_request_var('sort_field');
    $save['cutofflines'] = get_nfilter_request_var('cutoff_lines');
    $save['cutoffoctets'] = get_nfilter_request_var('cutoff_octets');
    $save['resolve'] = get_nfilter_request_var('resolve_addresses');
    $id = sql_save($save, 'plugin_flowview_queries', 'id', true);
    if (is_error_message() || $id == '') {
        print 'error';
    } else {
        print $id;
    }
}
开发者ID:Cacti,项目名称:plugin_flowview,代码行数:38,代码来源:flowview.php


注:本文中的isset_request_var函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。