$config->update($_POST);
     Html::back();
 } else {
     if (isset($_POST["delete"])) {
         Session::checkRight("plugin_manufacturersimports", PURGE);
         $config->delete($_POST, true);
         Html::redirect("./config.form.php");
     } else {
         if (isset($_POST["update_model"])) {
             Session::checkRight("plugin_manufacturersimports", UPDATE);
             $model->addModel($_POST);
             Html::back();
         } else {
             if (isset($_POST["delete_model"])) {
                 Session::checkRight("plugin_manufacturersimports", UPDATE);
                 $model->delete($_POST["id"]);
                 Html::back();
             } else {
                 Html::header(__('Setup'), '', "tools", "pluginmanufacturersimportsmenu", "config");
                 $config->checkGlobal(READ);
                 $config->display($_GET);
                 echo "<div align='center'>";
                 echo "<a href='" . PluginManufacturersimportsConfig::getFormURL(true) . "'>";
                 echo __('Back');
                 echo "</a>";
                 echo "</div>";
                 Html::footer();
             }
         }
     }
 }
Example #2
0
    if (isset($_POST["update"])) {
        Session::checkRight("config", "w");
        $config->update($_POST);
        Html::back();
    } else {
        if (isset($_POST["delete"])) {
            Session::checkRight("config", "w");
            $config->delete($_POST, 1);
            Html::redirect("./config.form.php");
        } else {
            if (isset($_POST["update_model"])) {
                $model->addModel($_POST);
                Html::back();
            } else {
                if (isset($_POST["delete_model"])) {
                    $model->delete(array('id' => $_POST["id"]));
                    Html::back();
                } else {
                    Html::header(__('Setup'), '', "plugins", "manufacturersimports", "config");
                    $config->showForm($_GET["id"]);
                    echo "<div align='center'>";
                    echo "<a href='" . $CFG_GLPI["root_doc"] . "/plugins/manufacturersimports/front/config.form.php'>";
                    echo __('Back');
                    echo "</a>";
                    echo "</div>";
                    Html::footer();
                }
            }
        }
    }
}