along with GLPI; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: David DURIEUX
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
$pfit = new PluginFusioninventoryTask();
if (isset($_POST["action"])) {
    if ($_POST["action"] == "INVENTORY") {
        $pfit->showAgentInventory($_POST["on_device"], $_POST["device_type"]);
    } else {
        if ($_POST["action"] == "NETDISCOVERY") {
            $pfit->showAgentNetDiscovery($_POST["on_device"], $_POST["device_type"]);
        } else {
            if ($_POST["action"] == "SNMPQUERY") {
                $pfit->showAgentSNMPQuery($_POST["on_device"], $_POST["device_type"]);
            } else {
                if ($_POST["action"] == "WAKEONLAN") {
                    $pfit->showAgentWol($_POST["on_device"], $_POST["device_type"]);
                }
            }
        }
    }
    echo "<input type='hidden' name='action' value='" . $_POST["action"] . "'/>";
}