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