<?php if ($_POST['action'] == "save") { if (empty($_POST['item'])) { $res = ConfiguracaoController::insertAtuacao($_POST); if ($res) { header("Location: site-atuacao?lang=" . $_POST['lang']); exit; } else { die("ERRO"); } } else { $res = ConfiguracaoController::updateAtuacao($_POST); if ($res) { header("Location: site-atuacao?lang=" . $_POST['lang']); exit; } else { die("ERRO"); } } } elseif ($_POST['action'] == "del") { if (ConfiguracaoController::delete($_POST)) { die("OK"); } else { die("ERRO"); } }