$taxa->setTaxaCasadaIene($_POST['ienes']); $taxa->setTaxaUSD1($_POST['usd1']); $taxa->setTaxaUSD2($_POST['usd2']); $taxa->setData($_POST['data']); $taxa->setId($_POST['id']); $resultado = $DAO->Atualizar($taxa); if ($resultado == 1) { echo '<script language= "JavaScript">alert("Registro alterado com sucesso");</script>'; // echo '<script language= "JavaScript">location.href="index.php";</script>'; } else { echo '<script language= "JavaScript">alert("Erro ao salvar o registro.");</script>'; print_r($resultado); } } else { $taxa->setId(limpaTexto($_GET['id'])); $resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_FINANCEIRO_TAXA . " WHERE id = " . $taxa->getId()); foreach ($resultado as $item) { $taxa->setTaxaPTAX($item['taxa_ptax_d2']); $taxa->setTaxaCasadaIene($item['taxa_casada_iene']); $taxa->setTaxaUSD1($item['taxa_usd1']); $taxa->setTaxaUSD2($item['taxa_usd2']); $taxa->setData($item['data']); } } ?> <!-- topbar ends --> <div class="container-fluid"> <div class="row-fluid"> <!-- left menu starts --> <div class="span2 main-menu-span">