예제 #1
0
     header("Content-Type: text/xml");
     require_once "../controle/xml.gti.php";
     require_once "../modelo/departamento.cls.php";
     $xml = new gtiXML();
     $departamento = new clsDepartamento();
     $arr = $departamento->ListaDepartamentoArray();
     $lista = $xml->ArrayParaXML($arr);
     echo $lista;
     break;
 case 'filtrar':
     header("Content-Type: text/xml");
     require_once "../controle/xml.gti.php";
     require_once "../modelo/departamento.cls.php";
     $xml = new gtiXML();
     $departamento = new clsDepartamento();
     $arr = $departamento->FiltraDepartamentoArray(strtolower($valor));
     $lista = $xml->ArrayParaXML($arr);
     echo $lista;
     break;
     //EXCLUSÕES------------------------------------------------
 //EXCLUSÕES------------------------------------------------
 case 'excluir':
     if ($codigo != 1) {
         require_once "../modelo/departamento.cls.php";
         $departamento = new clsDepartamento();
         $departamento->Excluir($codigo);
         $config = new clsConfig();
         $config->ConfirmaOperacao("departamento.frm.php", "Registro excluido com sucesso!");
     } else {
         require_once "../config.cls.php";
         $config = new clsConfig();