public static function generateIDH_componente($block_componente) { if (TextBuilder_ES::$print) { $block_componente->setData("quebra", "<div style='page-break-after: always'></div>"); } else { $block_componente->setData("quebra", ""); } $block_componente->setData("fonte", TextBuilder_ES::$fontePerfil); $block_componente->setData("titulo", "IDHM"); //@Translate $block_componente->setData("subtitulo", "Componentes"); //@Translate $block_componente->setData("canvasContent", getChartDesenvolvimentoHumano(TextBuilder_ES::$idMunicipio, TextBuilder_ES::$lang)); $block_componente->setData("info", ""); $idhm = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "IDHM"); //IDHM $idhm_r = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "IDHM_R"); //IDHM_R $idhm_l = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "IDHM_L"); //IDHM_L $idhm_e = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "IDHM_E"); //IDHM_E //@Translate $str = "El Índice de Desarrollo Humano Municipal (IDHM) de [municipio] es de [idh] para [2010].\n El municipio tiene un nivel de desarrollo humano [Faixa_DH]. \n Entre el 2000 y 2010, el factor que más se incrementó en términos absolutos fue [Dimensao2000a2010]. \n Entre 1991 y el 2000, el factor que más se incrementó en términos absolutos fue [Dimensao1991a2000].\n "; $texto = new Texto($str); $texto->replaceTags("2010", Formulas::getLabelAno2010($idhm)); $texto->replaceTags("municipio", TextBuilder_ES::$nomeMunicipio); $texto->replaceTags("idh", Formulas::getIDH2010($idhm)); $texto->replaceTags("Faixa_DH", Formulas::getSituacaoIDH($idhm, TextBuilder_ES::$lang)); $texto->replaceTags("Dimensao2000a2010", Formulas::getDimensao(TextBuilder_ES::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => true, "faixa9100" => false))); $texto->replaceTags("Dimensao1991a2000", Formulas::getDimensao(TextBuilder_ES::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => false, "faixa9100" => true))); $block_componente->setData("text", $texto->getTexto()); }
public static function generateIDH_componente($block_componente) { if (TextBuilder_EN::$print) { $block_componente->setData("quebra", "<div style='page-break-after: always'></div>"); } else { $block_componente->setData("quebra", ""); } $block_componente->setData("fonte", TextBuilder_EN::$fontePerfil); $block_componente->setTi("titulo", "MHDI"); //@Translate $block_componente->setData("subtitulo", "Components"); //@Translate $block_componente->setData("canvasContent", getChartDesenvolvimentoHumano(TextBuilder_EN::$idMunicipio, TextBuilder_EN::$lang)); $block_componente->setData("info", ""); $idhm = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "IDHM"); //IDHM $idhm_r = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "IDHM_R"); //IDHM_R $idhm_l = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "IDHM_L"); //IDHM_L $idhm_e = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "IDHM_E"); //IDHM_E //@Translate $str = "The Municipal Human Development Index (MHDI) of [municipio] is [idh] in [2010].\n The municipality is located in category [Faixa_DH] Human Development. \n Between 2000 and 2010, the dimension that grew the most in absolute terms was [Dimensao2000a2010]. \n Between 1991 and 2000, the dimension that grew the most in absolute terms was [Dimensao1991a2000].\n "; $texto = new Texto($str); $texto->replaceTags("2010", Formulas::getLabelAno2010($idhm)); $texto->replaceTags("municipio", TextBuilder_EN::$nomeMunicipio); $texto->replaceTags("idh", Formulas::getIDH2010($idhm)); $texto->replaceTags("Faixa_DH", Formulas::getSituacaoIDH($idhm, TextBuilder_EN::$lang)); $texto->replaceTags("Dimensao2000a2010", Formulas::getDimensao(TextBuilder_EN::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => true, "faixa9100" => false))); $texto->replaceTags("Dimensao1991a2000", Formulas::getDimensao(TextBuilder_EN::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => false, "faixa9100" => true))); $block_componente->setData("text", $texto->getTexto()); }
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(); }
function getTabelaCaracterizacao() { $carac_mun = Perfil::getCaracteristicas(TextBuilder::$idMunicipio); //IDHM $pop = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "PESOTOT"); //IDHM_R $area = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "AREA"); //IDHM_R $densidade = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "DENSIDADE"); //IDHM_R $anoinst = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "ANOINST"); //IDHM_R $micro_meso = Perfil::getMicroMeso(TextBuilder::$idMunicipio, "PESOTOT"); //IDHM_R $uf_rm = Perfil::getUfRm(TextBuilder::$idMunicipio); $idhm = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "IDHM"); //IDHM_R switch ($this->type) { case "perfil_m": if ($this->lang == "pt") { $tabela = new BlockTabela("Caracterização do território", 2, 4, $this->type); //$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, $this->lang)); $tabela->addBox("População (Censo 2010)", number_format($pop[2]["valor"], 0, ",", ".") . " 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 ($this->lang == "en") { $tabela = new BlockTabela("Characterization of the territory", 2, 4, $this->type); //$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, $this->lang)); $tabela->addBox("Population (Census of 2000)", number_format($pop[2]["valor"], 0, ",", ".") . " 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 ($this->lang == "es") { $tabela = new BlockTabela("Caracterización del territorio", 2, 4, $this->type); //$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, $this->lang)); $tabela->addBox("Población (censo 2010)", number_format($pop[2]["valor"], 0, ",", ".") . " 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"]); } } } break; case "perfil_rm": if ($this->lang == "pt") { $tabela = new BlockTabela("Caracterização do território", 1, 5, $this->type); //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010"); //$tabela->addBox("Área", $area[2]["valor"] . " km²"); $tabela->addBox("IDHM 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3))); $tabela->addBox("Faixa do IDHM", Formulas::getSituacaoIDH($idhm, $this->lang)); $tabela->addBox("População (Censo 2010)", number_format($pop[2]["valor"], 0, ",", ".") . " hab."); $tabela->addBox("Área", isset($area[2]["valor"]) ? str_replace(".", ",", $area[2]["valor"]) . " km²" : ""); $tabela->addBox("Densidade demográfica", isset($densidade[2]["valor"]) ? str_replace(".", ",", $densidade[2]["valor"]) . " hab/km²" : ""); //$tabela->addBox("Ano de instalação", $anoinst[2]["valor"]); // $tabela->addBox("Região", $micro_meso[0]["micro"]); // $tabela->addBox("Estado", $micro_meso[0]["meso"]); // $tabela->addBox("", ""); // $tabela->addBox("", ""); // $tabela->addBox("", ""); } else { if ($this->lang == "en") { $tabela = new BlockTabela("Characterization of the territory", 2, 4, $this->type); //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010"); $tabela->addBox("Area", ""); $tabela->addBox("MHDI 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3))); $tabela->addBox("MHDI category", Formulas::getSituacaoIDH($idhm, $this->lang)); $tabela->addBox("Population (Census of 2000)", number_format($pop[2]["valor"], 0, ",", ".") . " Inhabitants"); $tabela->addBox("Population density", ""); $tabela->addBox("Year of Establishment", ""); $tabela->addBox("", ""); $tabela->addBox("", ""); } else { if ($this->lang == "es") { $tabela = new BlockTabela("Caracterización del territorio", 2, 4, $this->type); //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010"); $tabela->addBox("Area", ""); $tabela->addBox("IDHM 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3))); $tabela->addBox("Nivel de IDHM", Formulas::getSituacaoIDH($idhm, $this->lang)); $tabela->addBox("Población (censo 2010)", number_format($pop[2]["valor"], 0, ",", ".") . " hab."); $tabela->addBox("Densidad demográfica", ""); $tabela->addBox("Año de fundación", ""); $tabela->addBox("", ""); $tabela->addBox("", ""); } } } break; case "perfil_uf": if ($this->lang == "pt") { $tabela = new BlockTabela("Caracterização do território", 1, 5, $this->type); //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010"); $tabela->addBox("IDHM 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3))); $tabela->addBox("Faixa do IDHM", Formulas::getSituacaoIDH($idhm, $this->lang)); $tabela->addBox("População (Censo 2010)", number_format($pop[2]["valor"], 0, ",", ".") . " hab."); $tabela->addBox("Área", isset($area[2]["valor"]) ? str_replace(".", ",", $area[2]["valor"]) . " km²" : ""); $tabela->addBox("Densidade demográfica", isset($densidade[2]["valor"]) ? str_replace(".", ",", $densidade[2]["valor"]) . " hab/km²" : ""); //$tabela->addBox("Ano de instalação", ""); //$tabela->addBox("", ""); //$tabela->addBox("", ""); } else { if ($this->lang == "en") { $tabela = new BlockTabela("Characterization of the territory", 1, 5, $this->type); //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010"); $tabela->addBox("MHDI 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3))); $tabela->addBox("MHDI category", Formulas::getSituacaoIDH($idhm, $this->lang)); $tabela->addBox("Population (Census of 2000)", number_format($pop[2]["valor"], 0, ",", ".") . " Inhabitants"); $tabela->addBox("Area", ""); $tabela->addBox("Population density", ""); //$tabela->addBox("Year of Establishment", ""); //$tabela->addBox("", ""); //$tabela->addBox("", ""); } else { if ($this->lang == "es") { $tabela = new BlockTabela("Caracterización del territorio", 1, 5, $this->type); //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010"); $tabela->addBox("IDHM 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3))); $tabela->addBox("Nivel de IDHM", Formulas::getSituacaoIDH($idhm, $this->lang)); $tabela->addBox("Población (censo 2010)", number_format($pop[2]["valor"], 0, ",", ".") . " hab."); $tabela->addBox("Area", ""); $tabela->addBox("Densidad demográfica", ""); //$tabela->addBox("Año de fundación", ""); //$tabela->addBox("", ""); //$tabela->addBox("", ""); } } } break; case "perfil_udh": // echo "<script type='text/javascript'> // // rmUrl = retira_acentos('" . $uf_rm[0]["nome"] . "').replace(/\s/g, '-'); // ufUrl = retira_acentos('" . $uf_rm[0]["nomeuf"] . "').replace(/\s/g, '-'); // // splited = document.URL.split('/'); // // rmLink = splited[0]+ '/' +splited[1]+ '/' +splited[2]+ '/' +splited[3]+ '/' // +splited[4]+ '/' +'perfil_rm/' + rmUrl; // // ufLink = splited[0]+ '/' +splited[1]+ '/' +splited[2]+ '/' +splited[3]+ '/' // +splited[4]+ '/' +'perfil_uf/' + ufUrl; // // document.getElementById('myRmLink').href = rmLink; // document.getElementById('myUfLink').href = ufLink; // // //alert(mont); // </script>"; if ($this->lang == "pt") { $tabela = new BlockTabela("Caracterização do território", 1, 5, $this->type); //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010"); //$tabela->addBox("Área", ""); $tabela->addBox("IDHM 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3))); $tabela->addBox("Faixa do IDHM", Formulas::getSituacaoIDH($idhm, $this->lang)); $tabela->addBox("População (Censo 2010)", number_format($pop[2]["valor"], 0, ",", ".") . " hab."); $tabela->addBox("Área", isset($area[2]["valor"]) ? str_replace(".", ",", $area[2]["valor"]) . " km²" : ""); $tabela->addBox("Densidade demográfica", isset($densidade[2]["valor"]) ? str_replace(".", ",", $densidade[2]["valor"]) . " hab/km²" : ""); // $tabela->addBox("Ano de instalação", ""); // $tabela->addBox("Região Metropolitana", "<a href='#' id='myRmLink'>" . $uf_rm[0]["rm"] . "</a>"); // $tabela->addBox("Estado", "<a href='#' id='myUfLink'>" . $uf_rm[0]["nomeuf"] . "</a>"); } else { if ($this->lang == "en") { $tabela = new BlockTabela("Characterization of the territory", 2, 4, $this->type); //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010"); $tabela->addBox("Area", ""); $tabela->addBox("MHDI 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3))); $tabela->addBox("MHDI category", Formulas::getSituacaoIDH($idhm, $this->lang)); $tabela->addBox("Population (Census of 2000)", number_format($pop[2]["valor"], 0, ",", ".") . " Inhabitants"); $tabela->addBox("Population density", ""); $tabela->addBox("Year of Establishment", ""); $tabela->addBox("Metropolitan Region", "<a href='#' id='myRmLink'>" . $uf_rm[0]["rm"] . "</a>"); $tabela->addBox("State", "<a href='#' id='myUfLink'>" . $uf_rm[0]["nomeuf"] . "</a>"); } else { if ($this->lang == "es") { $tabela = new BlockTabela("Caracterización del territorio", 2, 4, $this->type); //$tabela->setManual("link", $path_dir."atlas/tabela/nulo/mapa/municipal/filtro/municipio/{$this->nomeCru}/indicador/idhm-2010"); $tabela->addBox("Area", ""); $tabela->addBox("IDHM 2010", str_replace(".", ",", number_format($idhm[2]["valor"], 3))); $tabela->addBox("Nivel de IDHM", Formulas::getSituacaoIDH($idhm, $this->lang)); $tabela->addBox("Población (censo 2010)", number_format($pop[2]["valor"], 0, ",", ".") . " hab."); $tabela->addBox("Densidad demográfica", ""); $tabela->addBox("Año de fundación", ""); $tabela->addBox("Región Metropolitana", "<a href='#' id='myRmLink'>" . $uf_rm[0]["rm"] . "</a>"); $tabela->addBox("Estado", "<a href='#' id='myUfLink'>" . $uf_rm[0]["nomeuf"] . "</a>"); } } } break; default: break; } $tabela->draw(); }
public static function generateIDH_componente($block_componente) { if (TextBuilder::$print) { $block_componente->setData("quebra", "<div style='page-break-after: always;'></div>"); } else { $block_componente->setData("quebra", ""); } $block_componente->setData("fonte", TextBuilder::$fontePerfil); $block_componente->setData("titulo", TextBuilder::$aba->getTitulo()); //@Translate $block_componente->setData("subtitulo", TextBuilder::$aba->getSubTitulo()); //@Translate $block_componente->setData("canvasContent", TextBuilder::$aba->getChartDesenvolvimentoHumano(TextBuilder::$idMunicipio)); $block_componente->setData("info", ""); $idhm = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "IDHM"); //IDHM $idhm_r = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "IDHM_R"); //IDHM_R $idhm_l = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "IDHM_L"); //IDHM_L $idhm_e = TextBuilder::getVariaveis_table(TextBuilder::$idMunicipio, "IDHM_E"); //IDHM_E //@Translate $str = TextBuilder::$aba->getTexto(); $texto = new Texto($str); $texto->replaceTags("2010", Formulas::getLabelAno2010($idhm)); $texto->replaceTags("municipio", TextBuilder::$nomeMunicipio); $mDaUdh = TextBuilder::getMUN_udh(TextBuilder::$idMunicipio); if (isset($mDaUdh[0]) && count($mDaUdh[0]) > 0) { $mDaUdh_nome = $mDaUdh[0]["nome"]; } else { $mDaUdh_nome = ''; } $texto->replaceTags("municipio_udh", $mDaUdh_nome); $rmDaUdh = TextBuilder::getRM_udh(TextBuilder::$idMunicipio); if (empty($rmDaUdh[0]["nome"])) { $texto->replaceTags("rm", $mDaUdh_nome); } else { $texto->replaceTags("rm", $rmDaUdh[0]["nome"]); } $texto->replaceTags("idh", Formulas::getIDH2010($idhm)); $texto->replaceTags("Faixa_DH", Formulas::getSituacaoIDH($idhm, TextBuilder::$lang)); $texto->replaceTags("Dimensao2010", Formulas::getDimensao2010(TextBuilder::$lang, $idhm_r, $idhm_l, $idhm_e)); //$texto->replaceTags("Dimensao2000a2010", Formulas::getDimensao(TextBuilder::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => true, "faixa9100" => false))); //$texto->replaceTags("Dimensao1991a2000", Formulas::getDimensao(TextBuilder::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => false, "faixa9100" => true))); //Novo trecho criado para apresentação inicial de RMs e UDHs --------------------- if (TextBuilder::$type == "perfil_rm" || TextBuilder::$type == "perfil_udh") { $strShow = TextBuilder::$aba->getTextoShow(); $textoShow = new Texto($strShow); if (TextBuilder::$type == "perfil_udh") { $rmDaUdh = TextBuilder::getRM_udh(TextBuilder::$idMunicipio); $textoShow->replaceTags("nome_rm", $rmDaUdh[0]["nome"]); $municipios = TextBuilder::getMunicipios_rm($rmDaUdh[0]["id"]); } else { $municipios = TextBuilder::getMunicipios_rm(TextBuilder::$idMunicipio); } //URL - Busca ------------ $server = $_SERVER['SERVER_NAME']; $endereco = $_SERVER['REQUEST_URI']; $pieces = explode("/", $endereco); $urlAtual = "http://" . $server . "/" . $pieces[1] . "/" . TextBuilder::$lang . "/perfil_m/"; //----------------------------- $textMunicipios = ""; foreach ($municipios as &$value) { // if ($value["id"] == TextBuilder::$idMunicipio) $textMunicipios .= "<a href='" . $urlAtual . $value["id"] . "' target='blank'>" . $value["nome"] . " (" . $value["uf"] . ")" . "</a>, "; } $textoShow->replaceTags("municipios", $textMunicipios); $textoShow->replaceTags("esp_count", sizeof($municipios)); $textoShow->replaceTags("esp", TextBuilder::$nomeMunicipio); $block_componente->setData("text_show", $textoShow->getTexto()); } else { $block_componente->setData("text_show", ""); } //---------------------------------------------------------------- $block_componente->setData("text", $texto->getTexto()); }