public function drawBoxes($lang)
 {
     TextBuilder::$bd = new bd();
     TextBuilder_EN::$bd = new bd();
     TextBuilder_ES::$bd = new bd();
     $carac_mun = PerfilPrint::getCaracteristicas(TextBuilder::$idMunicipio);
     //IDHM
     $pop = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "PESOTOT");
     //IDHM_R
     $micro_meso = PerfilPrint::getMicroMeso(TextBuilder::$idMunicipio, "PESOTOT");
     //IDHM_R
     $idhm = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "IDHM");
     //IDHM_R
     if ($lang == "pt") {
         $tabela = new BlockTabela("Caracterização do território", 2, 4);
         //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010");
         $tabela->addBox("Área", str_replace(".", ",", $carac_mun[0]["area"]) . " km²");
         $tabela->addBox("IDHM 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3)));
         $tabela->addBox("Faixa do IDHM", Formulas::getSituacaoIDH($idhm, $lang));
         $tabela->addBox("População (Censo 2010)", $pop[2]["valor"] . " hab.");
         $tabela->addBox("Densidade demográfica", str_replace(".", ",", $carac_mun[0]["densidade"]) . " hab/km²");
         $tabela->addBox("Ano de instalação", $carac_mun[0]["anoinst"]);
         $tabela->addBox("Microrregião", $micro_meso[0]["micro"]);
         $tabela->addBox("Mesorregião", $micro_meso[0]["meso"]);
     } else {
         if ($lang == "en") {
             $tabela = new BlockTabela("Characterization of the territory", 2, 4);
             //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010");
             $tabela->addBox("Area", str_replace(".", ",", $carac_mun[0]["area"]) . " km²");
             $tabela->addBox("MHDI 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3)));
             $tabela->addBox("MHDI category", Formulas::getSituacaoIDH($idhm, $lang));
             $tabela->addBox("Population (Census of 2000)", $pop[2]["valor"] . " Inhabitants");
             $tabela->addBox("Population density", str_replace(".", ",", $carac_mun[0]["densidade"]) . " inhabitants/km²");
             $tabela->addBox("Year of Establishment", $carac_mun[0]["anoinst"]);
             $tabela->addBox("Microregion", $micro_meso[0]["micro"]);
             $tabela->addBox("Mesoregion", $micro_meso[0]["meso"]);
         } else {
             if ($lang == "es") {
                 $tabela = new BlockTabela("Caracterización del territorio", 2, 4);
                 //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010");
                 $tabela->addBox("Area", str_replace(".", ",", $carac_mun[0]["area"]) . " km²");
                 $tabela->addBox("IDHM 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3)));
                 $tabela->addBox("Nivel de IDHM", Formulas::getSituacaoIDH($idhm, $lang));
                 $tabela->addBox("Población (censo 2010)", $pop[2]["valor"] . " hab.");
                 $tabela->addBox("Densidad demográfica", str_replace(".", ",", $carac_mun[0]["densidade"]) . " hab/km²");
                 $tabela->addBox("Año de fundación", $carac_mun[0]["anoinst"]);
                 $tabela->addBox("Microrregión", $micro_meso[0]["micro"]);
                 $tabela->addBox("Mesorregión", $micro_meso[0]["meso"]);
             }
         }
     }
     $tabela->draw();
 }
Ejemplo n.º 2
0
$cidade = $_POST["city"];
$lang = $_POST["lang"];
$perfilType = $_POST["perfilType"];
//(isset($_POST["print"]) ? $print = true : $print = false );
$perfil = new Perfil($cidade, $perfilType);
TextBuilder::$idMunicipio = $perfil->getCityId();
TextBuilder::$nomeMunicipio = $perfil->getCityName();
TextBuilder::$ufMunicipio = $perfil->getUfName();
TextBuilder::$lang = $lang;
TextBuilder::$type = $perfilType;
TextBuilder::$print = true;
//@#Todo perfil já estará adaptado para impressão.
$perfil->drawScriptsMaps();
$perfil->drawMap();
//$perfil->drawBoxes($lang, $perfilType);
TextBuilder::$bd = new bd();
$boxes = new ITCaracterizacao($lang, $perfilType);
$boxes->getTabelaCaracterizacao();
//IDH ----------------------------------
TextBuilder::$aba = new ITComponentes($lang, $perfilType);
$block_componente = new Block(1);
TextBuilder::generateIDH_componente($block_componente);
$block_componente->draw();
//@NãoInclusoEmRM&UDH
if ($perfilType != "perfil_rm" && $perfilType != "perfil_udh") {
    $block_table_componente = new Block(15);
} else {
    $block_table_componente = new Block(29);
}
TextBuilder::generateIDH_table_componente($block_table_componente);
$block_table_componente->draw();