[Cartoweb-users] Filter Error
Adriano Hantequeste Gomes
adrianohg at gmail.com
Wed Oct 4 12:28:55 EDT 2006
Sorry Sorry Sorry again. But return erro again
ServerFiltro.php:
<?php
class ServerRequest extends ServerPlugin
implements ClientResponder {
public function initializeResult($request) {
}
public function handleResult($request) {
}
public function initializeRequest($requ) {
$msMapObj = $this->serverContext->getMapObj();
for ($i = 0; $i < $msMapObj->numlayers; $i++) {
$msLayer = $msMapObj->getLayer($i);
if ($msLayer->name == $requ->layer) {
$filter = sprintf("classe = '%s'",
$requ->classe);
$msLayer->setFilter($filter);
}
}
}
}
?>
ClientFiltro.php:
<?php
class ClientFiltro extends ClientPlugin
implements ServerCaller, GuiProvider {
public function handleHttpGetRequest($request) {
}
public function handleHttpPostRequest($request) {
$mes = $_POST["mes"];
$classe = $_POST["classe"];
$incid = $_POST["incidente"];
$incidente = strtoupper($incid);
}
public function renderForm(Smarty $template) {
echo '<!-- Inicio do Filtro -->';
echo '<div id="Layer1" style="position:absolute; left:358px;
top:66px; width:511px; height:27px; z-index:1">';
echo ' <form action="geo.php" method="post" name="filtra">';
echo ' <table border="0" cellspacing="0" cellpadding="0">';
echo ' <tr>';
echo ' <td>Mês: ';
echo ' <select name="mes">';
echo ' <option value="">Escolha um Mês</option>';
echo ' <option value="1">Janeiro</option>';
echo ' <option value="2">Fevereiro</option>';
echo ' <option value="3">Março</option>';
echo ' <option value="4">Abril</option>';
echo ' <option value="5">Maio</option>';
echo ' <option value="6">Junho</option>';
echo ' <option value="7">Julho</option>';
echo ' <option value="8">Agosto</option>';
echo ' <option value="9">Setembro</option>';
echo ' <option value="10">Outubro</option>';
echo ' <option value="11">Novembro</option>';
echo ' <option value="12">Dezembro</option>';
echo ' </select> </td>';
echo ' <td>Classe: <select name="classe">';
echo ' <option value="">Escolha uma Classe</option>';
echo ' <option value="A">Pessoa</option>';
echo ' <option value="B">Patrimonio</option>';
echo ' <option value="C">Costumes</option>';
echo ' <option value="D">Adm. Publica</option>';
echo ' <option value="E">Toxico</option>';
echo ' <option value="F">Armas e Municoes</option>';
echo ' <option value="G">Diversos</option>';
echo ' <option value="H">Contravencoes</option>';
echo ' <option value="I">Transito</option>';
echo ' <option value="J">Bombeiro</option>';
echo ' </select> </td>';
echo ' <td>Incidente: <input name="incidente" type="text"
size="4" maxlength="4" /></td>';
echo ' <td><input name="submit" type="submit" id="submit"
value="Ok" /></td>';
echo ' </tr>';
echo ' </table>';
echo '</form></div>';
echo '<!-- Fim do Filtro -->';
}
public function buildRequest() {
$filterRequest = new FilterRequest;
$filterRequest->classe = $classe;
$filterRequest->layer = 'COMPLETO2004';
return $filterRequest;
}
}
?>
Thanks for atention
--
Atenciosamente,
Adriano Hantequeste Gomes
Departamento de Geoprocessamento - GEO
Gerência de Estatística e Analise Criminal - GEAC
Secretaria de Estado da Segurança Pública e Defesa Social - SESP
Av. Marechal Mascarenhas de Moraes, 2355
Bento Ferreira - Vitória - Espírito Santo
CEP: 29.052-121
Telefone: 55 27 3334-4736
Fax: 55 27 3334-4735
Celular: 55 27 9225-4852
More information about the Cartoweb-users
mailing list