if (isset($_POST['txtMetodo'])) { $metodo = $_POST['txtMetodo']; $codigo = $_POST['txtCodigo']; } else { $metodo = $_REQUEST['metodo']; $codigo = $_REQUEST['codigo']; } switch ($metodo) { //SELEÇÕES DE GRID---------------------------------------------- case 'carregagrid': header("Content-Type: text/xml"); require_once "../controle/xml.gti.php"; require_once "../modelo/tipo.cls.php"; $xml = new gtiXML(); $tipo = new clsTipo(); $arr = $tipo->ListaTipoArray(); $lista = $xml->ArrayParaXML($arr); echo $lista; break; //EXCLUSÕES------------------------------------------------ //EXCLUSÕES------------------------------------------------ case 'excluir': require_once "../modelo/tipo.cls.php"; $tipo = new clsTipo(); $tipo->Excluir($codigo); $config = new clsConfig(); $config->ConfirmaOperacao("tipo.frm.php", "Registro excluido com sucesso!"); break; //ALTERAÇÕES----------------------------------------------- //ALTERAÇÕES----------------------------------------------- case 'altera':