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(); }