Ejemplo n.º 1
0
  @link      https://forge.indepnet.net/projects/monitoring/
  @since     2011

  ------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
PluginMonitoringProfile::checkRight("command", "w");
Html::header(__('Monitoring', 'monitoring'), $_SERVER["PHP_SELF"], "plugins", "monitoring", "command");
$pMonitoringCommand = new PluginMonitoringCommand();
if (isset($_POST["copy"])) {
    $pMonitoringCommand->showForm("", array(), $_POST);
    Html::footer();
    exit;
} else {
    if (isset($_POST["add"])) {
        $_POST = $pMonitoringCommand->convertPostdata($_POST);
        $pMonitoringCommand->add($_POST);
        Html::back();
    } else {
        if (isset($_POST["update"])) {
            $_POST = $pMonitoringCommand->convertPostdata($_POST);
            $pMonitoringCommand->update($_POST);
            Html::back();
        } else {
            if (isset($_POST["delete"])) {
                $pMonitoringCommand->delete($_POST);
                $pMonitoringCommand->redirectToList();
            }
        }
    }
}