1<?php
2/**
3 * AJAX Backend Function for plugin_snmplive
4 *
5 * @author Andreas Gohr <andi@splitbrain.org>
6 * @author Michael Luggen <michael.luggen@unifr.ch>
7 */
8
9//fix for Opera XMLHttpRequests
10if(!count($_POST) && $HTTP_RAW_POST_DATA){
11  parse_str($HTTP_RAW_POST_DATA, $_POST);
12}
13
14if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../').'/');
15if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
16require_once(DOKU_INC.'inc/init.php');
17//close sesseion
18session_write_close();
19
20require_once(DOKU_INC.'inc/pageutils.php');
21require_once(DOKU_INC.'inc/utf8.php');
22require_once(DOKU_PLUGIN.'snmplive/syntax.php');
23
24header('Content-Type: text/html; charset=utf-8');
25$SNMPip = cleanID($_POST['SNMPip']);
26$SNMPoid = cleanID($_POST['SNMPoid']);
27print syntax_plugin_snmplive::_getSNMPdata($SNMPip,$SNMPoid);
28?>
29