} else { die("ERRO"); } } else { // upload background if (!empty($_FILES['file-background']['name'])) { $str = ImagemHelper::upload($_POST['dir'], "topo-home-background", $_POST['item'], $_FILES['file-background']); $str = explode("*;*", $str); $_POST['background'] = $str[1]; } elseif ($_POST['delete-background'] == 1) { ImagemHelper::delete("img/" . $_POST['dir'] . "/" . $_POST['background']); $_POST['background'] = ""; } // preparaBotao(); $res = ConfiguracaoController::updateTopo($_POST); if ($res) { header("Location: site-topo-home?lang=" . $_POST['lang']); exit; } else { die("ERRO"); } } } elseif ($_POST['action'] == "del") { if (ConfiguracaoController::delete($_POST)) { die("OK"); } else { die("ERRO"); } } // prepara atributos do botão