Exemplo n.º 1
0
    $metodo = $_POST['txtMetodo'];
    $codigo = $_POST['txtCodigo'];
} else {
    $metodo = $_REQUEST['metodo'];
    $codigo = $_REQUEST['codigo'];
}
$valor = $_REQUEST['valor'];
switch ($metodo) {
    //SELEÇÕES DE GRID----------------------------------------------
    case 'carregagrid':
        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------------------------------------------------