コード例 #1
0
                $PluginRacksRack_Item->delete($input);
                Html::back();
            } else {
                if (isset($_POST["update_server"])) {
                    if ($PluginRacksRack->canCreate()) {
                        foreach ($_POST["updateDevice"] as $key => $val) {
                            $vartype = "type" . $key;
                            $varspec = "plugin_racks_itemspecifications_id" . $key;
                            $varname = "name" . $key;
                            $varitems_id = "items_id" . $key;
                            if ($_POST[$vartype] == 'PluginRacksOtherModel') {
                                $PluginRacksOther->updateOthers($_POST[$varitems_id], $_POST[$varname]);
                            }
                            $varpos = "position" . $key;
                            $space_left = $PluginRacksRack_Item->updateItem($key, $_POST[$vartype], $_POST[$varspec], $_POST['plugin_racks_racks_id'], $_POST['rack_size'], $_POST['faces_id'], $_POST[$varitems_id], $_POST[$varpos]);
                        }
                    }
                    if ($space_left < 0) {
                        Session::addMessageAfterRedirect(__('No more place for insertion', 'racks'), false, ERROR);
                    }
                    Html::back();
                } else {
                    $PluginRacksRack->checkGlobal(READ);
                    Html::header(PluginRacksRack::getTypeName(2), '', "assets", "pluginracksmenu", "racks");
                    $PluginRacksRack->display($_GET);
                    Html::footer();
                }
            }
        }
    }
}