Exemplo n.º 1
0
<?php

session_start();
/*
 * armazena os dados da UF na sessão para poupar conexões com o BD
 */
if (!isset($_SESSION['ufs'])) {
    require_once "../business/localidade_business_class.php";
    $oBuf = new LocalidadeBusiness();
    $arrUF = $oBuf->findAllUf();
    $_SESSION['ufs'] = $arrUF;
}
$arrUFs = $_SESSION['ufs'];
//indicador
if (isset($_REQUEST['indicador'])) {
    $indicador = $_REQUEST['indicador'];
} else {
    $indicador = "grupo_socio";
    //Brasil
}
//uf
if (isset($_REQUEST['uf'])) {
    $uf = $_REQUEST['uf'];
} else {
    $uf = 0;
    //Brasil
}
require_once "incs/cabecalho.php";
require_once "incs/config.php";
?>
            
Exemplo n.º 2
0
                </div>
                
                <div id="corpo">
                    <div id="titulo">Indicadores por Tema</div><br /><br /><br/>
		<div id="textos_ind"><b>Selecione a Localidade:</b></div>

                    <div id="divLocalidade">
<br />
                    
                    <form action="selecoes.php" method="post" id="frmLocalidades" name="frmLocalidades">
                        <input type="hidden" name="indicadors" value="<?php 
echo $strIndicador;
?>
" />
                    <?php 
$oLdao = new LocalidadeBusiness();
$arrUfs = $oLdao->findLocsByNivelId(1);
$selecionar = true;
foreach ($arrUfs as $ufId => $obj) {
    if ($exibeSoUf) {
        if ($selecionar) {
            echo "<input type=\"checkbox\" onClick=\"SelAll(this)\"><img src=\"img/seta.gif\">&nbsp;<i>Selecionar todas as localidades deste n&iacute;vel</i><br>";
            $selecionar = false;
        }
        echo "<input type=\"checkbox\" name=\"locs[]\" value=\"{$ufId}\"> {$obj->getLocalidadeNome()}<br/>\n";
    } else {
        echo "<a href=\"javascript:listaLocs('loc_{$ufId}');\"><img src=\"img/mais.png\" border=\"0\"></a>";
        if ($exibeTudoEUf) {
            echo "<input type=\"checkbox\" name=\"locs[]\" value=\"{$ufId}\">";
        }
        echo " {$obj->getLocalidadeNome()}<br/>\n";
Exemplo n.º 3
0
                
                <div id="corpo">
                        <div id="titulo">Indicadores por Tema</div><br /><br /><br/>
                    <!--LOCALIDADES SELECIONADAS-->
                    <div id="indSelected" style="width:100%; display:table;float:left;">
                        <table cellpadding="0" cellspacing="0" border="0" width="96%">
<tr><td width="80%">
<div id="textos_ind" style="color:#666;margin-left:0;margin-right:0;"> Localidades selecionadas:</div>
                        <form id="frmLocSel" name="frmLocSel" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="post">
                            <select name="lstLoc[]" multiple id="lstLoc" size="8" style="font-size:12px;color:#666;width:100%;background:#efefef;border:1px solid #cccccc;margin:0px;">
                            <?php 
//popula o box com de indicadores selecionados
$oLdao = new LocalidadeBusiness();
$arrObjListLoc = $oLdao->findLocsByArrId($_SESSION['localidades']);
foreach ($arrObjListLoc as $key => $objListLoc) {
    echo "<option value=\"{$objListLoc->getLocalidadeId()}\">{$objListLoc->getLocalidadeNome()}</option>";
    //if ($oLdao->findLocById($objListLoc->getRegiaoId()) != null) {
    //	echo $oLdao->findLocById($objListLoc->getRegiaoId())->getLocalidadeNome() ." -->";
    //}
    //cho $objListLoc->getLocalidadeNome() ."</option>";
}
?>
                        </select></td>
			<td valign="middle" align="center"><br />
                        <input type="button" name="btnAddLoc" id="btnAddLoc" value="Adicionar a lista" ><br /><br />
                        <input type="submit" name="btnRemLoc" id="btnRemLoc" value="Remover da lista" ></td></tr></table>
                    </form>
                  </div>
Exemplo n.º 4
0
#Localidades li {
list-style: none;
margin: 0.5em 0 0.5em 0.2em;
}
#Localidades li a {
margin:0;
padding:0;
text-decoration:none;
color: #000;
}
#Localidades li a:visited {
color: #000;
}
#Localidades li a:hover {
text-decoration:underline;
}
</style>
<?php 
if (isset($_REQUEST['cirId'])) {
    require_once "../business/localidade_business_class.php";
    $cirId = $_REQUEST['cirId'];
    $oLdao = new LocalidadeBusiness();
    $arrLocalidades = $oLdao->findLocsByCirId($cirId);
    echo "<p style='text-align:right;margin-right:10px;border-bottom:1px solid #000'>Municípios da CIR</p>";
    echo "<div id=\"divLoc\">";
    echo "<ul id='Localidades'>";
    foreach ($arrLocalidades as $indice => $arrMun) {
        echo "<li style=\"font-size:11px;\">{$arrMun->getLocalidadeNome()}</li>";
    }
    echo "</ul></div>";
}
Exemplo n.º 5
0
<?php

header('Content-Type: text/html; charset=iso-8859-1');
require_once "../business/sintese_business_class.php";
require_once "../business/localidade_business_class.php";
if (isset($_REQUEST['munId'])) {
    $munId = $_REQUEST['munId'];
} else {
    $munId = 350010;
}
$sDao = new SinteseBusiness();
$arrDados = $sDao->findSinteseByLocId($munId);
$lDao = new LocalidadeBusiness();
$objLoc = $lDao->findLocById($munId);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br" lang="pt-br">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8;charset=iso-8859-1;" />
<title><?php 
echo htmlentities("Síntese do município");
?>
</title>

<link rel="stylesheet" type="text/css" media="screen" href="css/redmond/jquery-ui-1.8.2.custom.css" />
<link rel="stylesheet" href="css/crt_estilos.css" type="text/css" />
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.printElement.js"></script>
<script>
 $(document).ready(function(){
	$('a.newlink').click(function() {
Exemplo n.º 6
0
            //seleciona todos os ítens (checkboxes) de municipios
            $('#sellMuns').click(function() {
 		$(document).find(':checkbox').attr('checked', this.checked);
            });
</script>
 <form action="pesq03.php" method="post" id="frmLocalidades" name="frmLocalidades">
 
<?php 
require_once "../business/localidade_business_class.php";
$arrAbrangDesc = array('macroreg' => 'Macro-regiao', 'drs' => 'Departamento Regional de Saúde - DRS', 'colegiado' => 'Colegiado', 'municipio' => 'Município', 'gve' => 'Grupo de Vigilância Epidemiológica - GVE', 'grupo' => 'Tipologia de Grupo');
if (isset($_REQUEST['abrang'])) {
    $abrang = $_REQUEST['abrang'];
} else {
    $abrang = "macroreg";
}
$oLdao = new LocalidadeBusiness();
$arrLocalidades = $oLdao->ListMunsByAbrangField($abrang);
$i = 0;
echo "<span><b>" . strtoupper($arrAbrangDesc[$abrang]) . "</b><br></span>";
echo "<input id=\"sellMuns\" type=\"checkbox\" > <i>Selecionar todos os munic&iacute;pios (645)</i><br>\n";
foreach ($arrLocalidades as $abrangencia => $arrMuns) {
    $i++;
    $nome = "abrang_{$i}";
    echo "<br/><a href=\"javascript:listaLocs('loc_{$nome}');\"><img src=\"img/mais.png\" border=\"0\"></a><b> {$abrangencia}</b>\n";
    echo "<div id=\"loc_{$nome}\" class=\"div1\">";
    echo "<input type=\"checkbox\" onClick=\"SelAll(this)\"> <i>Selecionar todos os munic&iacute;pios deste n&iacute;vel</i><br>\n";
    foreach ($arrMuns as $mun_cod => $mun_desc) {
        if (isset($_SESSION['localidades'])) {
            $checked = in_array($mun_cod, $_SESSION['localidades']) ? 'checked' : '';
        } else {
            $checked = "";
Exemplo n.º 7
0
<?php

//recebe cod uf
//$uf=0;
if (isset($_REQUEST['uf'])) {
    $uf = $_REQUEST['uf'];
} else {
    $uf = 0;
    //Brasil
}
//nivel 1=uf - 2=cir 3= municipio
if (isset($_REQUEST['nivel'])) {
    $nivel = $_REQUEST['nivel'];
} else {
    $nivel = 2;
    //Brasil
}
//indicador do mapa ex. grupo_socio etc
if (isset($_REQUEST['indicador'])) {
    $indMap = $_REQUEST['indicador'];
} else {
    $indMap = 'grupo_socio';
    //Grupos Socioeconomicos
}
header('Content-Type: text/html; charset=iso-8859-1');
require_once "../business/localidade_business_class.php";
$oLdao = new LocalidadeBusiness();
echo $oLdao->geraMapaGeoJSon($nivel, $uf, $indMap);