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("&", "&", $html); ///$html = str_replace("&", "&", $html); $html = konvert($html); $html = str_replace("�", "ñ", $html); $html = str_replace("�", "á", $html); $html = str_replace("é", "é", $html); $html = str_replace("í", "í", $html); $html = str_replace("ó", "ó", $html); $html = str_replace("ú", "ú", $html); $html = str_replace("Ñ", "Ñ", $html); $html = str_replace("Á", "Á", $html); $html = str_replace("É", "É", $html); $html = str_replace("Í", "Í", $html); $html = str_replace("Ó", "Ó", $html); $html = str_replace("Ú", "Ú", $html); $html = str_replace("¿", "¿", $html); $html = str_replace(chr(173), "", $html); /* $html = str_replace("&", "&", $html); $html = str_replace("�", "ñ", $html); $html = str_replace("�", "á", $html); $html = str_replace("é", "é", $html); $html = str_replace("í", "í", $html); $html = str_replace("ó", "ó", $html); $html = str_replace("ú", "ú", $html); $html = str_replace("Ñ", "Ñ", $html); $html = str_replace("Á", "Á", $html); $html = str_replace("É", "É", $html); $html = str_replace("Í", "Í", $html); $html = str_replace("Ó", "Ó", $html); $html = str_replace("Ú", "Ú", $html); $html = str_replace("¿", "¿", $html); **/ $html = str_replace("&nbsp;", " ", $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; }
break;*/ case 1: //el segundo paso: mostramos el contenido para una categoría $titulo = obtenerNombreCat($idCat); $cant_p_pagina = 4; $conts = obtenerContenidosPorCat_mms($idCat, $type, $pagina, $cant_p_pagina); $total = $conts['total']; unset($conts['total']); $lista = array(); foreach ($conts as $cont) { $id = $cont['id']; $nombre = $cont['nombre']; $preview = explode(".", $cont['referencia']); $imagen = $preview[0] . "_p." . $preview[1]; $nombre = utf8_encode(str_replace("&", "&", stripslashes($nombre))); $url = urlDruttAncel($msisdn, $cont['id'], false, servicio3G(), NOMBRE_PORTAL_DESCARGA); $lista[] = new Link($url, $nombre, PATH_PREVIEW . "/" . $imagen, TOP_SIDE); } $tipoLista = LISTA2X2_LINKS; //Seteamos el tipo de la lista de links, para que se muestren las imagenes de 2 en 2 $volver_link = "./"; $home_link = "./"; $paginado = new Paginado($cant_p_pagina, $pagina, $total, $_GET, "videos.php"); $alineacion_seccion = "center"; break; case 2: //el tercer paso: mostramos el mensaje con las opciones "SI" o "NO" header("Location: hacer_descarga.php?id={$idCont}"); die; $datos_cat = obtenerIdCat_mms($db, $idCont, OPERADORA_MCM, NOMBRE_MCM); $titulo = str_replace("&", "&", $datos_cat["autor"]);
$conts = obtenerContenidosPorCat_mms($idCat, $type, $pagina, $cant_img_pagina); $total = $conts['total']; unset($conts['total']); $lista = array(); foreach ($conts as $cont) { ///--------------- CHANCHADAS A CONTINUACION $nombre = str_replace("128x128", "50x50", $cont['archivo']); //$nombre = str_replace(".gif", "_p.gif", $nombre); //$nombre = str_replace("101x80", "40x32", $nombre); $nombre = str_replace("/netuy", "", $nombre); if ($type == 5) { //esto es una chanchada... todo por no guardar los archivos donde van1!!! ñia!!! $nombre = str_replace("50x50", "40x32", $nombre); } //--------------- FIN DE LAS CHANCHADAS $lista[] = new Link(urlDruttAncel($msisdn, $cont['id'], false, servicio3G(), NOMBRE_PORTAL_DESCARGA), "Descargar", "getimage.php?path=http://www.wazzup.com.uy/netuy/{$nombre}"); } $tipoLista = LISTA2X2_LINKS; //Seteamos el tipo de la lista de links, para que se muestren las imagenes de 2 en 2 $volver_link = "index.php"; $home_link = "index.php"; $text_align = "center"; $paginado = new Paginado($cant_img_pagina, $pagina, $total, $_GET, "images.php"); break; case 2: //el tercer paso: mostramos el mensaje con las opciones "SI" o "NO" $datos_cat = obtenerIdCat_mms($db, $idCont, OPERADORA_MCM, NOMBRE_MCM); $titulo = $datos_cat["autor"]; $idCat = $datos_cat["id"]; if ($back == 'c') { $volver_link = "images.php?push={$nombre_wap}&tipoCat={$type}&cat={$idCat}&step=1";
$db = $miC->db; ///////////////////////////////////////////////////////7 ///// LOGICA ///////////////////////////////////////////////////////7 $idCont = $_GET['id']; $nombre_wap = 'infusio_wap'; if ($msisdn) { $sql = "SELECT reintentos, pk_ventas_wap_billing as id\r\n\t\tFROM ancel.ventas_wap_billing\r\n\t\tWHERE descarga = {$idCont}\r\n\t\tAND celular = '{$celular}'\r\n\t\tAND useragent = '{$ua}'\r\n\t\tAND reintentos < 3 \r\n\t\tAND nombre_wap = '{$nombre_wap}'\r\n\t\tAND CONCAT(fecha, ' ', hora) >= DATE_SUB(now(), INTERVAL 24 HOUR)"; $rs = mysql_query($sql, $db); if ($rs) { $row = mysql_fetch_assoc($rs); if ($row['reintentos'] > 0 && $row['reintentos'] < 3) { $idCompra = $row['id']; $url_descarga = urlDruttAncel($msisdn, $idCont, $idCompra, servicio3G(), $nombre_wap); } else { $url_descarga = urlDruttAncel($msisdn, $idCont, false, servicio3G(), $nombre_wap); } mail("*****@*****.**", "infusio wap", "-INICIO- url_descarga=" . $url_descarga . " -FIN-"); header("Location: {$url_descarga}"); exit; } else { $texto = "Hubo un error en la compra del contenido, porfavor, intentelo más tarde."; } } else { $texto = "Hubo un error en la compra del contenido, porfavor, intentelo más tarde."; } /////////////////////////////////////////// ///// PRESENTACION /////////////////////////////////////////// $pagina = new Pagina(NOMBRE_PORTAL . " - Descarga tu contenido"); $seccion = new Seccion("Descargas", "center", SMALL_FONT_SIZE);
function showLinks($nombre_seccion = "", $align = "left", $style = LISTA_INTERCALADA_LINKS) { $cantidad = count($this->juegos); for ($i = $this->cantCajas; $i < $cantidad; $i++) { if (ANCEL_DRUTT == 1) { include_once "rewrite_lib.php"; include_once dirname(__FILE__) . "/../wap.wazzup.com.uy/wap_common/getCelularHeader.php"; $href = urlDruttAncel($msisdn, $this->juegos[$i]['id'], false, servicio3G(), NOMBRE_PORTAL_DESCARGA); } else { $href = $this->archivo . "?id=" . $this->juegos[$i]['id']; } $menuItem = new Link($href, $this->juegos[$i]["nombre"]); switch ($this->juegos[$i]['attr']) { case "hot": $menuItem->setHot(true); break; case "hit": $menuItem->setHit(true); break; case "new": $menuItem->setNew(true); break; } $lista_js[] = $menuItem; } if ($lista_js) { if ($nombre_seccion) { $seccion = new Seccion($nombre_seccion, $align, SMALL_FONT_SIZE); } else { $seccion = new Seccion($nombre_seccion, $align, SMALL_FONT_SIZE, SECCION_SIN_TITULO); } $listaLinks = new ListaLinks(); $listaLinks->SetStyle($style); $imagen = new Imagen("./images/bullet.gif", "*"); $listaLinks->setBullet($imagen); $listaLinks->AddComponent($lista_js); $seccion->AddComponent($listaLinks); return $seccion; } else { return ""; } }
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("&", "&", $html); ///$html = str_replace("&", "&", $html); $html = konvert($html); $html = str_replace("�", "ñ", $html); $html = str_replace("�", "á", $html); $html = str_replace("é", "é", $html); $html = str_replace("í", "í", $html); $html = str_replace("ó", "ó", $html); $html = str_replace("ú", "ú", $html); $html = str_replace("Ñ", "Ñ", $html); $html = str_replace("Á", "Á", $html); $html = str_replace("É", "É", $html); $html = str_replace("Í", "Í", $html); $html = str_replace("Ó", "Ó", $html); $html = str_replace("Ú", "Ú", $html); $html = str_replace("¿", "¿", $html); $html = str_replace(chr(173), "", $html); /* $html = str_replace("&", "&", $html); $html = str_replace("�", "ñ", $html); $html = str_replace("�", "á", $html); $html = str_replace("é", "é", $html); $html = str_replace("í", "í", $html); $html = str_replace("ó", "ó", $html); $html = str_replace("ú", "ú", $html); $html = str_replace("Ñ", "Ñ", $html); $html = str_replace("Á", "Á", $html); $html = str_replace("É", "É", $html); $html = str_replace("Í", "Í", $html); $html = str_replace("Ó", "Ó", $html); $html = str_replace("Ú", "Ú", $html); $html = str_replace("¿", "¿", $html); **/ $html = str_replace("&nbsp;", " ", $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; }
$estilo_lista = LISTA_NUMERADA_LINKS; $alineado_texto = "left"; $paginado = new Paginado($cant_por_pagina, $pagina, $total, $_GET, "ringtones.php"); $volver_link = "index.php?push={$nombre_wap}"; $home_link = "index.php?push={$nombre_wap}"; break; case 1: //el segundo paso: mostramos el contenido para una categor�a $titulo = "Mp3"; $items_por_pagina = 6; $conts = obtenerContenidosPorCat_mms($idCat, $type, $pagina2, $items_por_pagina); $total = $conts['total']; unset($conts['total']); $lista = array(); foreach ($conts as $cont) { $lista[] = new Link(urlDruttAncel($msisdn, $cont['id'], false, servicio3G(), NOMBRE_PORTAL_DESCARGA), utf8_encode(str_replace("&", "&", stripslashes($cont['nombre'])))); $idCont = $cont['id']; } //chanchada, lo se... lo hace con el ultimo idCont pq da igual pq son todos de la misma cat $estilo_lista = LISTA_NUMERADA_LINKS; $alineado_texto = "left"; $volver_link = "index.php?push={$nombre_wap}"; $home_link = "index.php?push={$nombre_wap}"; $paginado = new Paginado($items_por_pagina, $pagina2, $total, $_GET, "ringtones.php", "p2"); break; case 2: //el tercer paso: mostramos el mensaje con las opciones "SI" o "NO" $datos_cat = obtenerIdCat_mms($db, $idCont, OPERADORA_MCM, NOMBRE_MCM); $titulo = $datos_cat["autor"]; $idCat = $datos_cat["id"]; if ($back == 'c') {