* the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * MMC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "modules/inventory/includes/xmlrpc.php"; if (isset($_POST["bconfirm"], $_POST["numRule"])) { // Delete selected rule deleteEntityRule($_POST["numRule"]); if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("The entity rule has been deleted successfully.", "inventory")); } return; } else { $title = _T("Delete this rule?", 'inventory'); $f = new PopupForm($title, 'deleteEntityRuleForm'); $f->add(new HiddenTpl("numRule"), array("value" => $_GET['numRule'], "hide" => True)); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); } ?> <script type="text/javascript"> jQuery(function() {
* the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * MMC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "modules/update/includes/xmlrpc.inc.php"; if (isset($_POST["bconfirm"], $_POST["id"])) { // Delete selected rule deleteEntityRule($_POST["id"]); if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("The entity rule has been deleted successfully.", "glpi")); } //header("Location: " . urlStrRedirect("base/computers/entityRules")); return; } else { /* Form displaying */ $title = _T("Delete this rule?", 'glpi'); $f = new PopupForm($title, 'deleteEntityRuleForm'); $f->add(new HiddenTpl("id"), array("value" => $_GET['id'], "hide" => True)); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); } ?>