示例#1
0
  @co-author 
  @comment   
  @copyright Copyright (c) 2011-2013 Plugin Monitoring for GLPI team
  @license   AGPL License 3.0 or (at your option) any later version
             http://www.gnu.org/licenses/agpl-3.0-standalone.html
  @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);
  @co-author
  @comment
  @copyright Copyright (c) 2011-2014 Plugin Monitoring for GLPI team
  @license   AGPL License 3.0 or (at your option) any later version
             http://www.gnu.org/licenses/agpl-3.0-standalone.html
  @link      https://forge.indepnet.net/projects/monitoring/
  @since     2011

  ------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Session::checkRight("plugin_monitoring_command", READ);
Html::header(__('Monitoring - commands', 'monitoring'), $_SERVER["PHP_SELF"], "plugins", "PluginMonitoringDashboard", "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["purge"])) {
                $pMonitoringCommand->delete($_POST);