Example #1
0
 function Display()
 {
     $html = $this->_loadTemplate();
     $html = str_replace("#ACTION#", $this->action, $html);
     $html = str_replace("#METHOD#", $this->method, $html);
     $html = str_replace("#SUBMIT_CAPTION#", $this->submit_caption, $html);
     $elementos = parent::Display();
     if (!$this->_soportaXHTML()) {
         $post_fields = "";
         foreach ($this->contenido as $item) {
             $post_fields .= is_object($item) ? $item->getPostField() : $item;
         }
         foreach ($this->hidden as $item) {
             $post_fields .= is_object($item) ? $item->getPostField() : $item;
         }
         $html = str_replace("#POSTFIELDS#", $post_fields, $html);
     } else {
         foreach ($this->hidden as $h) {
             $elementos .= $h->getHidden();
         }
     }
     $html = str_replace("#COMPONENTES#", $elementos, $html);
     return $html;
 }
Example #2
0
 function Display()
 {
     $html = $this->_loadTemplate();
     $html = str_replace("#HREF#", $this->href, $html);
     $html = str_replace("#CLASE#", $this->clase, $html);
     $html = str_replace("#CLASE#", "", $html);
     //Por si no le seteamos una clase
     $html_interior = "";
     if ($this->img) {
         switch ($this->img_pos) {
             case LEFT_SIDE:
                 $html_interior .= $this->img->Display();
                 $html_interior .= parent::Display();
                 break;
             case TOP_SIDE:
                 $html_interior .= $this->img->Display();
                 $html_interior .= "<br/>" . parent::Display();
                 break;
             case RIGHT_SIDE:
                 $html_interior .= parent::Display();
                 $html_interior .= $this->img->Display();
                 break;
             case BOTTOM_SIDE:
                 $html_interior .= parent::Display();
                 $html_interior .= "<br/>" . $this->img->Display();
                 break;
         }
     } else {
         $html_interior .= parent::Display();
     }
     $html = str_replace("#CONTENIDO#", $html_interior, $html);
     $html .= $this->extra_text;
     if ($this->is_new) {
         $imgNew = new Imagen(IMAGEN_NEW, TITLE_NEW);
         $html .= $imgNew->Display();
         if ($this->_soportaXHTML()) {
             $html .= "<div class=\"clear\" ></div>";
         } else {
             $html .= "<br/>";
         }
     }
     if ($this->is_hot) {
         $imgHot = new Imagen(IMAGEN_HOT, TITLE_HOT);
         $html .= $imgHot->Display();
         //if(!$this->_soportaXHTML()) {
         $html .= "<br/>";
         //}
     }
     if ($this->is_hit) {
         $imgHit = new Imagen(IMAGEN_HIT, TITLE_HIT);
         $html .= $imgHit->Display();
         if ($this->_soportaXHTML()) {
             $html .= "<div class=\"clear\" ></div>";
         } else {
             $html .= "<br/>";
         }
     }
     return $html;
 }
Example #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;
 }
Example #4
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;
 }
Example #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;
 }