Example #1
0
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
if (!isset($_GET["withtemplate"])) {
    $_GET["withtemplate"] = "";
}
if (!isset($_GET["plugin_resources_resources_id"])) {
    $_GET["plugin_resources_resources_id"] = "";
}
$reportconfig = new PluginResourcesReportConfig();
if (isset($_POST["add"])) {
    if ($reportconfig->canCreate()) {
        $reportconfig->add($_POST);
    }
    Html::back();
} else {
    if (isset($_POST["update"])) {
        if ($reportconfig->canCreate()) {
            $reportconfig->update($_POST);
        }
        Html::back();
    } else {
        if (isset($_POST["delete"])) {
            if ($reportconfig->canCreate()) {
                $reportconfig->delete($_POST, 1);
            }
            Html::redirect(Toolbox::getItemTypeFormURL('PluginResourcesResource') . "?id=" . $_POST["plugin_resources_resources_id"]);
        } else {