<?php
/**
 * AJAX Backend Function for plugin_snmplive
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 * @author Michael Luggen <michael.luggen@unifr.ch>
 */
 
//fix for Opera XMLHttpRequests
if(!count($_POST) && $HTTP_RAW_POST_DATA){
  parse_str($HTTP_RAW_POST_DATA, $_POST);
}
 
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_INC.'inc/init.php');
//close sesseion
session_write_close();
 
require_once(DOKU_INC.'inc/pageutils.php');
require_once(DOKU_INC.'inc/utf8.php');
require_once(DOKU_PLUGIN.'snmplive/syntax.php');
 
header('Content-Type: text/html; charset=utf-8');
$SNMPip = cleanID($_POST['SNMPip']);
$SNMPoid = cleanID($_POST['SNMPoid']);
print syntax_plugin_snmplive::_getSNMPdata($SNMPip,$SNMPoid);
?>
