Beispiel #1
0
 /**
  * Constructor.
  * 
  * @param srting $ua 		El User-Agent del celular
  * @param string $href 		El destino del link
  * @param string $img_src 	El path a la imagen que tendr� el banner
  * @param string $alt 		El parametro ALT de la imagen del banner
  */
 function Banner($ua, $href, $img_src, $alt = "")
 {
     $this->conn = new coneXion("Web", true);
     $tam = "mediano";
     if (miscFunctions::soportaAnchoChico($this->conn->db, $ua)) {
         $tam = "chico";
     }
     if (miscFunctions::soportaAnchoMedio($this->conn->db, $ua)) {
         $tam = "mediano";
     }
     if (miscFunctions::soportaAnchoMayor($this->conn->db, $ua)) {
         $tam = "grande";
     }
     /*
     		    $img_src = explode(".", $img_src);
     		    $pre = "";
     		    for($i = 0; $i < count($img_src) - 1; $i++) {
     			$pre .= $img_src[$i];
     		    }
     		    $img_src = $pre."_".$tam.".".$img_src[count($img_src) - 1];
     */
     $img_src = str_replace(".gif", "_" . $tam . ".gif", $img_src);
     $img_src = str_replace(".jpg", "_" . $tam . ".jpg", $img_src);
     if ($href != "") {
         $this->link = new Link($href);
         $this->link->AddComponent(new Imagen($img_src, $alt));
     } else {
         $this->link = new Imagen($img_src, $alt);
     }
     $this->template = "templates/banner.tpl";
 }
Beispiel #2
0
 function Display()
 {
     global $ua;
     //utilizamos la variable global "$ua" que se declara en el archivo "getCelularHeader.php"
     global $CELULARES_PESO_SIMPLE;
     $html = $this->_loadTemplate();
     $estilos = $this->loadStyleSheet();
     $html = str_replace("#ESTILOS#", $estilos, $html);
     $html = str_replace("#BLACKBERRY_STYLES#", '<link rel="stylesheet" type="text/css" media="handset" href="./estilos/estilos.css" />', $html);
     $tipo_cabezal = "chico";
     //Por si el modelo no es soportado o alguna otra cosa, asumimos que el m�s chico de todos se puede ver
     if (miscFunctions::soportaAnchoMayor($this->conn->db, $ua)) {
         $tipo_cabezal = "grande";
         $html = str_replace("#ANCHO_PANTALLA#", ANCHO_PANTALLA_GRANDE, $html);
     }
     if (miscFunctions::soportaAnchoMedio($this->conn->db, $ua)) {
         $tipo_cabezal = "mediano";
         $html = str_replace("#ANCHO_PANTALLA#", ANCHO_PANTALLA_MEDIANA, $html);
     }
     if (miscFunctions::soportaAnchoChico($this->conn->db, $ua)) {
         $tipo_cabezal = "chico";
         $html = str_replace("#ANCHO_PANTALLA#", ANCHO_PANTALLA_CHICA, $html);
     }
     //Cargamos los LOGOS-EXTRAS
     $tpl_extras_logos = $this->loadExtraTemplates($this->extras_logos_tpl);
     $html = str_replace("#LOGOS-EXTRAS#", $tpl_extras_logos, $html);
     //Cargamos los PIE-EXTRAS
     $tpl_extras_urls = $this->loadExtraTemplates($this->extras_pie_tpl);
     $html = str_replace("#PIE-EXTRAS#", $tpl_extras_urls, $html);
     if ($this->marca_blanca || MARCA_BLANCA == 1) {
         $html = preg_replace("/#LOGO-WZZP#.+#LOGO-WZZP#/", "", $html);
     } else {
         $html = preg_replace("/#LOGO-WZZP#/", "", $html);
     }
     //la constante HIDE_HEADER se debe definir en el archivo constantes.php de cada wap
     if (HIDE_HEADER === 1) {
         $html = preg_replace("/#IMG-HEADER#.+#IMG-HEADER#/", "", $html);
     } else {
         $html = preg_replace("/#IMG-HEADER#/", "", $html);
     }
     if (ANCEL == 1) {
         if (SHOW_LINK_DALE == 1) {
             $seccion_pie_dest = new Seccion("", "center", "", SECCION_SIN_TITULO);
             $link_dale = null;
             if (servicio3G()) {
                 $link_dale = new Link("http://www.3g.dale.com.uy", "<br/>Volver a portal 3G");
             } else {
                 $link_dale = new Link("http://www.dale.com.uy", "<br/>Volver a portal DALE");
             }
             $html = str_replace("#LINK-DALE#", $link_dale->Display(), $html);
         }
     }
     $html = str_replace("#LINK-DALE#", "", $html);
     //super HACZOR malo:
     $html = str_replace(".list-item {float:left;  width: 65px; ", ".list-item {", $html);
     $html = str_replace("#TIPO_CABEZAL#", $tipo_cabezal, $html);
     $html = str_replace("#TITULO#", $this->titulo, $html);
     $html_interior = parent::Display();
     if (TIGO_GT == 1 || VIVA_BO == 1 || CLARO_PA == 1) {
         $html_interior = str_replace("\$", "", $html_interior);
     }
     if (AGREGAR_EXTRA_PESOS == 1) {
         $html_interior = str_replace("\$", "\$\$", $html_interior);
     }
     /* * /
     		if(in_array($ua, $CELULARES_PESO_SIMPLE)) {
     			$html_interior = str_replace("$$", "$ ", $html_interior);
     		}
     		//*/
     $html = str_replace("#COMPONENTES#", $html_interior, $html);
     $html = str_replace("#HTTP_REFERER#", $_SERVER['HTTP_REFERER'], $html);
     $html = str_replace("&amp;", "&", $html);
     ///$html = str_replace("&", "&amp;", $html);
     $html = konvert($html);
     $html = str_replace("�", "&#241;", $html);
     $html = str_replace("�", "&#225;", $html);
     $html = str_replace("é", "&#233;", $html);
     $html = str_replace("í", "&#237;", $html);
     $html = str_replace("ó", "&#243;", $html);
     $html = str_replace("ú", "&#250;", $html);
     $html = str_replace("Ñ", "&#209;", $html);
     $html = str_replace("Á", "&#193;", $html);
     $html = str_replace("É", "&#201;", $html);
     $html = str_replace("Í", "&#205;", $html);
     $html = str_replace("Ó", "&#211;", $html);
     $html = str_replace("Ú", "&#218;", $html);
     $html = str_replace("¿", "&#191;", $html);
     $html = str_replace(chr(173), "", $html);
     /*
     		$html = str_replace("&", "&amp;", $html);
     		$html = str_replace("�", "&#241;", $html);
     		$html = str_replace("�", "&#225;", $html);
     		$html = str_replace("é", "&#233;", $html);
     		$html = str_replace("í", "&#237;", $html);
     		$html = str_replace("ó", "&#243;", $html);
     		$html = str_replace("ú", "&#250;", $html);
     		$html = str_replace("Ñ", "&#209;", $html);
     		$html = str_replace("Á", "&#193;", $html);
     		$html = str_replace("É", "&#201;", $html);
     		$html = str_replace("Í", "&#205;", $html);
     		$html = str_replace("Ó", "&#211;", $html);
     		$html = str_replace("Ú", "&#218;", $html);
     		$html = str_replace("¿", "&#191;", $html);
     		**/
     $html = str_replace("&amp;nbsp;", "&#32;", $html);
     $partes = explode("id=\"paginado\"", $html);
     $nuevo_html = "";
     foreach ($partes as $i => $p) {
         if ($i == 0) {
             $i = "";
         }
         $nuevo_html .= $p . " id=\"paginado{$i}\" ";
         $largo_cola = strlen(" id=\"paginado{$i}\"");
     }
     $nuevo_html = substr($nuevo_html, 0, strlen($nuevo_html) - $largo_cola);
     $html = $nuevo_html;
     //  $html = strtolower($html);
     return $html;
 }
Beispiel #3
0
 function Display()
 {
     //Chancho....
     global $db;
     global $ua;
     $html = $this->_loadTemplate();
     $html = str_replace("#CLASS#", $this->extra_class, $html);
     /**
     		  Constantes en el constantes.php de la carpeta wapComponents:
     		  ANCHO_PANTALLA_CHICA
     		  ANCHO_PANTALLA_MEDIANA
     		  ANCHO_PANTALLA_GRANDE
     Constantes en el archivo constantes.php de la carpeta de la WAP:
     		  TIT_SECCION_PADDING  -  Especifica el Padding que tendrá la imagen en ambos lados (especificado en px)
     		  TIT_SECCION_FONT_COLOR - El color de la fuente del titulo, especificado en formato HTML
     		  PREFIX_TITULO_SECCION - Nombre base que tendrán las imagenes para formar la imagen del titulo
     */
     if (GENERAR_IMAGEN_TITULO_SECCION == 1) {
         //Si el titulo lo vamos a generar como una imagen...
         if (miscFunctions::soportaAnchoChico($db, $ua)) {
             $nombre_tam = "chica";
             $tam = ANCHO_PANTALLA_CHICA;
         }
         if (miscFunctions::soportaAnchoMedio($db, $ua)) {
             $nombre_tam = "mediana";
             $tam = ANCHO_PANTALLA_MEDIANA;
         }
         if (miscFunctions::soportaAnchoMayor($db, $ua)) {
             $nombre_tam = "grande";
             $tam = ANCHO_PANTALLA_GRANDE;
         }
         // -- Creamos el titulo
         $width = $tam - TIT_SECCION_PADDING * 2;
         //Le restamos el padding de ambos lados de la imagen
         $nombre_img = str_replace(" ", "_", $this->titulo) . "_" . $nombre_tam . ".gif";
         $nombre_img = str_replace("<", "", $nombre_img);
         $nombre_img = str_replace(">", "", $nombre_img);
         $nombre_img = str_replace("\"", "", $nombre_img);
         $nombre_img = str_replace("\\", "", $nombre_img);
         $nombre_img = str_replace("/", "", $nombre_img);
         $nombre_img = str_replace("=", "", $nombre_img);
         $nombre_img = str_replace("&", "", $nombre_img);
         $nombre_img = str_replace(chr(241), "n", $nombre_img);
         $nombre_img = str_replace(chr(225), "a", $nombre_img);
         $nombre_img = str_replace(chr(233), "e", $nombre_img);
         $nombre_img = str_replace(chr(237), "i", $nombre_img);
         $nombre_img = str_replace(chr(243), "o", $nombre_img);
         $nombre_img = str_replace(chr(250), "u", $nombre_img);
         $nombre_img = str_replace(chr(209), "N", $nombre_img);
         $nombre_img = str_replace(chr(193), "A", $nombre_img);
         $nombre_img = str_replace(chr(201), "E", $nombre_img);
         $nombre_img = str_replace(chr(205), "I", $nombre_img);
         $nombre_img = str_replace(chr(211), "O", $nombre_img);
         $nombre_img = str_replace(chr(218), "U", $nombre_img);
         $nombre_img = str_replace(chr(191), "", $nombre_img);
         $nombre_img = str_replace(chr(63), "", $nombre_img);
         $this->titulo = strip_tags($this->titulo);
         $tit = new Titulo($this->titulo, $width, TIT_SECCION_FONT_COLOR, $nombre_img);
         if ($this->link_titulo !== false) {
             $tit->setUnderline(true);
         }
         $tit->setImages(PREFIX_TITULO_SECCION);
         $img_titulo_src = $tit->getPath();
         $this->img_header = new Imagen($img_titulo_src, $this->titulo);
         if ($this->link_titulo !== false) {
             //Si el titulo es un link, entonces metemos la imagen dentro de un link
             $titulo_seccion = new Link($this->link_titulo, "", $this->img_header->src);
         } else {
             $titulo_seccion = $this->img_header;
         }
         $html = str_replace("#TITULO#", $titulo_seccion->Display(), $html);
         // -- Fin creación del titulo
     } else {
         if ($this->link_titulo !== false) {
             $link = new Link($this->link_titulo, $this->titulo);
             $html = str_replace("#TITULO#", $link->Display(), $html);
         } else {
             $html = str_replace("#TITULO#", $this->titulo, $html);
         }
     }
     $html = str_replace("#ALIGN#", $this->align, $html);
     if ($this->font_size == NORMAL_FONT_SIZE) {
         $html = str_replace("<#SIZE#>", "", $html);
         $html = str_replace("</#SIZE#>", "", $html);
         $html = str_replace("#SIZE#", $this->font_size, $html);
     } else {
         $html = str_replace("#SIZE#", $this->font_size, $html);
     }
     $html_interior = parent::Display();
     $html = str_replace("#COMPONENTES#", $html_interior, $html);
     return $html;
 }
Beispiel #4
0
 function Display()
 {
     global $db;
     global $ua;
     $html = $this->_loadTemplate();
     $listItem = $this->_loadListItemTemplate();
     $html_links = "";
     $nro_columnas = 2;
     foreach ($this->contenido as $i => $cont) {
         switch ($this->estilo) {
             default:
             case LISTA_LINKS:
                 //
                 if (!$this->_soportaXHTML()) {
                     $html_links .= "<tr><td>" . $cont->Display() . "</td></tr>";
                     //$html_links .= "<br/>";
                     $nro_columnas = 1;
                 } else {
                     $html_links .= str_replace("#ITEM#", $cont->Display(), $listItem);
                     $par_impar = ($i + 1) % 2 == 0 ? "par" : "impar";
                     $html_links = str_replace("#PAR_IMPAR#", "item-" . $par_impar, $html_links);
                     if (!$this->has_menu_items) {
                         //$html_links .= "<tr><td><div class='clear' ></div></td></tr>";
                     }
                 }
                 break;
             case LISTA_COLOR_LINKS:
                 if ($this->_soportaXHTML()) {
                     $html_links .= str_replace("#ITEM#", $cont->Display(), $listItem);
                     $par_impar = ($i + 1) % 2 == 0 ? "par" : "impar";
                     $html_links = str_replace("#PAR_IMPAR#", "item-" . $par_impar, $html_links);
                     $nro_columnas = 1;
                 } else {
                     $html_links .= "<tr><td>" . ($i + 1) . $cont->Display() . "</td></tr>";
                     //$html_links .= ($i + 1)."- ".$cont->Display()."<br/>";
                 }
                 break;
             case LISTA_NUMERADA_LINKS:
                 if ($this->_soportaXHTML()) {
                     $html_links .= str_replace("#ITEM#", $i + 1 . "- " . $cont->Display(), $listItem);
                     $par_impar = ($i + 1) % 2 == 0 ? "par" : "impar";
                     $html_links = str_replace("#PAR_IMPAR#", "item-" . $par_impar, $html_links);
                     $nro_columnas = 1;
                 } else {
                     $html_links .= "<tr><td>" . ($i + 1) . "- " . $cont->Display() . "</td></tr>";
                     //$html_links .= ($i + 1)."- ".$cont->Display()."<br/>";
                 }
                 break;
             case LISTA_INTERCALADA_LINKS:
                 $html_bullet = is_object($this->bullet) ? $this->bullet->Display() : $this->bullet;
                 if ($this->_soportaXHTML()) {
                     $html_links .= str_replace("#ITEM#", $html_bullet . " " . $cont->Display(), $listItem);
                     $par_impar = ($i + 1) % 2 == 0 ? "par" : "impar";
                     $html_links = str_replace("#PAR_IMPAR#", "item-" . $par_impar, $html_links);
                     $nro_columnas = 1;
                 } else {
                     $html_links .= "<tr><td>" . $html_bullet . " " . $cont->Display() . "</td></tr>";
                     //$html_links .= $html_bullet." ".$cont->Display()."<br/>";
                 }
                 break;
             case LISTA2X2_LINKS:
                 if (get_class($cont) == "Link") {
                     //si es un link, preguntamos si tiene una imagen dentro
                     if ($cont->hasImage()) {
                         //si tiene una imagen dentro,  tenemos que ver el ancho máximo que podemos llegar a tener en la pantalla
                         //porque se puede dar que tengamos 2 links, con preview, y la suma de sus anchos, sea mayor al ancho máximo de la pantalla
                         if (miscFunctions::soportaAnchoChico($db, $ua)) {
                             $cont->setImageWidth(40);
                             //Seteado a fuego a 40px de ancho
                         } else {
                             if (miscFunctions::soportaAnchoMedio($db, $ua)) {
                                 $cont->setImageWidth(50);
                             }
                         }
                     }
                 }
                 if ($this->_soportaXHTML()) {
                     //Si estamos en XHTML-MP usamos el template del item de la lista
                     $html_links .= str_replace("#ITEM#", $cont->Display(), $listItem);
                 } else {
                     if (count($cont->getText()) > 0) {
                         $cont->removeText();
                     }
                     $html_links .= str_replace("#ITEM#", $cont->Display(), $listItem);
                 }
                 if (($i + 1) % 2 == 0) {
                     //si es par, entonces, dejamos el segundo TR, para cerrar el par, y sacamos el primero
                     $html_links = str_replace("#TRF#", "", $html_links);
                     $html_links = str_replace("#/TRF#", "", $html_links);
                     $html_links = preg_replace("/#TRI#.+#\\/TRI#/", "", $html_links);
                     //	 $html_links .= "<div class=\"clear\" ></div>";
                 } else {
                     //Si es impar, dejamos el primer TR y sacamos el final
                     $html_links = str_replace("#TRI#", "", $html_links);
                     $html_links = str_replace("#/TRI#", "", $html_links);
                     $html_links = preg_replace("/#TRF#.+#\\/TRF#/", "", $html_links);
                 }
                 $nro_columnas = 2;
                 break;
             case NAVEGACION_LINKS:
                 $html_links .= $cont->Display() . " | ";
                 $html_links = trim(trim($html_links), "|");
                 break;
         }
     }
     $html_links = str_replace("#TRF#", "", $html_links);
     $html_links = str_replace("#/TRF#", "", $html_links);
     $html_links = str_replace("#TRI#", "", $html_links);
     $html_links = str_replace("#/TRI#", "", $html_links);
     if (count($this->contenido) % 2 != 0 && $this->estilo == LISTA2X2_LINKS) {
         $html_links .= "</tr>";
     }
     if ($this->_soportaXHTML()) {
         //Si estamos en XHTML-MP usamos el template del item de la lista
         //	$html_links .= "<div class=\"clear\" ></div>";
     }
     $html_links = str_replace("#PAR_IMPAR#", "", $html_links);
     $html = str_replace("#TITULO#", $this->titulo, $html);
     $html = str_replace("#COLUMNAS#", $nro_columnas, $html);
     $html = str_replace("#LINKS#", $html_links, $html);
     $html = str_replace("#CLASE-EXT#", $this->extra_class, $html);
     return $html;
 }
Beispiel #5
0
 function Display()
 {
     //Chequeamos si estamos tratando con el drutt de ANCEL
     $allHeaders = getallheaders();
     $esDruttANCEL = false;
     //		if(strtoupper($allHeaders["DRUTT"]) == "SI") {
     if (ANCEL == 1) {
         $esDruttANCEL = true;
     }
     global $ua;
     //utilizamos la variable global "$ua" que se declara en el archivo "getCelularHeader.php"
     global $CELULARES_PESO_SIMPLE;
     $html = $this->_loadTemplate();
     $estilos = $this->loadStyleSheet();
     $html = str_replace("#ESTILOS#", $estilos, $html);
     $html = str_replace("#BLACKBERRY_STYLES#", '<link rel="stylesheet" type="text/css" media="handset" href="./estilos/estilos.css" />', $html);
     //Chanchadas que tenemos que hacer si estamos trabajando con el drutt de ancel:
     if ($esDruttANCEL) {
         $html = str_replace('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"  >', "<html>", $html);
         $html = str_replace('<style type="text/css">', '<style drutt-force="true"> ', $html);
     }
     $tipo_cabezal = "chico";
     //Por si el modelo no es soportado o alguna otra cosa, asumimos que el m�s chico de todos se puede ver
     if (miscFunctions::soportaAnchoMayor($this->conn->db, $ua)) {
         $tipo_cabezal = "grande";
         $html = str_replace("#ANCHO_PANTALLA#", ANCHO_PANTALLA_GRANDE, $html);
     }
     if (miscFunctions::soportaAnchoMedio($this->conn->db, $ua)) {
         $tipo_cabezal = "mediano";
         ///$html = str_replace("#ANCHO_PANTALLA#", ANCHO_PANTALLA_MEDIANA, $html);
         $html = str_replace("#ANCHO_PANTALLA#", ANCHO_PANTALLA_MEDIANA, $html);
     }
     if (miscFunctions::soportaAnchoChico($this->conn->db, $ua)) {
         $tipo_cabezal = "chico";
         $html = str_replace("#ANCHO_PANTALLA#", ANCHO_PANTALLA_CHICA, $html);
     }
     //Cargamos los LOGOS-EXTRAS
     $tpl_extras_logos = $this->loadExtraTemplates($this->extras_logos_tpl);
     $html = str_replace("#LOGOS-EXTRAS#", $tpl_extras_logos, $html);
     //Cargamos los PIE-EXTRAS
     $tpl_extras_urls = $this->loadExtraTemplates($this->extras_pie_tpl);
     if (OPERADORA_MCM == 'claro.pe') {
         $tpl_extras_urls = '<a href="http://claroper-cw.qpass.com/ndmns/index">IR a Claro</a>' . $tpl_extras_urls;
     }
     $html = str_replace("#PIE-EXTRAS#", $tpl_extras_urls, $html);
     if ($this->marca_blanca || MARCA_BLANCA == 1) {
         $html = preg_replace("/#LOGO-WZZP#.+#LOGO-WZZP#/", "", $html);
     } else {
         $html = preg_replace("/#LOGO-WZZP#/", "", $html);
     }
     //la constante HIDE_HEADER se debe definir en el archivo constantes.php de cada wap
     if (HIDE_HEADER === 1) {
         $html = preg_replace("/#IMG-HEADER#.+#IMG-HEADER#/", "", $html);
     } else {
         $html = preg_replace("/#IMG-HEADER#/", "", $html);
     }
     if (ANCEL == 1) {
         if (SHOW_LINK_DALE == 1) {
             $seccion_pie_dest = new Seccion("", "center", "", SECCION_SIN_TITULO);
             $link_dale = null;
             if (servicio3G()) {
                 $link_dale = new Link("http://www.3g.dale.com.uy", "<br/>Volver a portal 3G");
             } else {
                 $link_dale = new Link("http://www.dale.com.uy", "<br/>Volver a portal DALE");
             }
             $html = str_replace("#LINK-DALE#", $link_dale->Display(), $html);
         }
     }
     $html = str_replace("#LINK-DALE#", "", $html);
     //super HACZOR malo:
     $html = str_replace(".list-item {float:left;  width: 65px; ", ".list-item {", $html);
     $html = str_replace("#TIPO_CABEZAL#", $this->cabezal_name . '_' . $tipo_cabezal, $html);
     $html = str_replace("#TITULO#", $this->titulo, $html);
     $html_interior = parent::Display();
     if (defined('TIGO_GT') || defined('VIVA_BO') || defined('CLARO_PA')) {
         if (TIGO_GT == 1 || VIVA_BO == 1 || CLARO_PA == 1) {
             $html_interior = str_replace("\$", "", $html_interior);
         }
     }
     if (defined('AGREGAR_EXTRA_PESOS')) {
         if (AGREGAR_EXTRA_PESOS == 1) {
             $html_interior = str_replace("\$", "\$\$", $html_interior);
         }
     }
     /* * /
     		if(in_array($ua, $CELULARES_PESO_SIMPLE)) {
     			$html_interior = str_replace("$$", "$ ", $html_interior);
     		}
     		//*/
     $html = str_replace("#COMPONENTES#", $html_interior, $html);
     $html = str_replace("#HTTP_REFERER#", $_SERVER['HTTP_REFERER'], $html);
     $html = str_replace("&amp;", "&", $html);
     ///$html = str_replace("&", "&amp;", $html);
     $html = konvert($html);
     $html = str_replace("�", "&#241;", $html);
     $html = str_replace("�", "&#225;", $html);
     $html = str_replace("é", "&#233;", $html);
     $html = str_replace("í", "&#237;", $html);
     $html = str_replace("ó", "&#243;", $html);
     $html = str_replace("ú", "&#250;", $html);
     $html = str_replace("Ñ", "&#209;", $html);
     $html = str_replace("Á", "&#193;", $html);
     $html = str_replace("É", "&#201;", $html);
     $html = str_replace("Í", "&#205;", $html);
     $html = str_replace("Ó", "&#211;", $html);
     $html = str_replace("Ú", "&#218;", $html);
     $html = str_replace("¿", "&#191;", $html);
     $html = str_replace(chr(173), "", $html);
     /*
     		$html = str_replace("&", "&amp;", $html);
     		$html = str_replace("�", "&#241;", $html);
     		$html = str_replace("�", "&#225;", $html);
     		$html = str_replace("é", "&#233;", $html);
     		$html = str_replace("í", "&#237;", $html);
     		$html = str_replace("ó", "&#243;", $html);
     		$html = str_replace("ú", "&#250;", $html);
     		$html = str_replace("Ñ", "&#209;", $html);
     		$html = str_replace("Á", "&#193;", $html);
     		$html = str_replace("É", "&#201;", $html);
     		$html = str_replace("Í", "&#205;", $html);
     		$html = str_replace("Ó", "&#211;", $html);
     		$html = str_replace("Ú", "&#218;", $html);
     		$html = str_replace("¿", "&#191;", $html);
     		**/
     $html = str_replace("&amp;nbsp;", "&#32;", $html);
     $partes = explode("id=\"paginado\"", $html);
     $nuevo_html = "";
     foreach ($partes as $i => $p) {
         if ($i == 0) {
             $i = "";
         }
         $nuevo_html .= $p . " id=\"paginado{$i}\" ";
         $largo_cola = strlen(" id=\"paginado{$i}\"");
     }
     $nuevo_html = substr($nuevo_html, 0, strlen($nuevo_html) - $largo_cola);
     $html = $nuevo_html;
     include_once $_SERVER["DOCUMENT_ROOT"] . "/../lib/kStats/kga.php";
     $html = str_replace("</body>", "{$kgaHtml}</body>", $html);
     //  $html = strtolower($html);
     return $html;
 }