Esempio n. 1
0
    function Display()
    {
        global $msisdn;
        //Esto es chancho, lo sé... pido perdón... :(
        global $ua;
        global $db;
        if ($msisdn != "" || IDEAS == 1) {
            $contenidoTpl = $this->_loadTemplate();
            $url_descarga = $this->href_si;
            $html = str_replace("#RESPUESTASI#", $url_descarga, $contenidoTpl);
            if (IDEAS == 1) {
                //Para el caso de IDEAS, se debe obtener el ID del tipo de contenidos de WAZZUP en lugar del de Ideas
                $datos_ideas = obtenerDatosCont($db, $this->idCont);
                $tipo_ideas = $datos_ideas['tipo_ideas'];
                $this->tipo = $datos_ideas['tipo'];
            }
            //echo $this->tipo."..";
            if (soportaContenidoPorTipo($db, $ua, $this->tipo)) {
                if ($this->idCont != 0) {
                    $datos = obtenerDatosCompra($this->tipo, $this->idCont);
                    //Nuevo super-multi-loco sistema para obtener precio de los contenidos
                    $id_wap = obtenerIDInteraccionWap($db, NOMBRE_MCM, OPERADORA_MCM);
                    $pc = new BillingContenido($db, $this->idCont, $id_wap);
                    $pc->ProcesarWap();
                    $precio_contenido = $pc->ObtenerPrecio();
                    if ($precio_contenido == "") {
                        //Si no tenemos un precio seteado para el precio, lo buscamos como lo haciamos antes.
                        if (IDEAS == 1) {
                            $datos = obtenerDatosCompra($tipo_ideas, $this->idCont);
                        } else {
                            $datos = obtenerDatosCompra($this->tipo, $this->idCont);
                            if (TIGO_CO == 1) {
                                $oPrecio = new PreciosContenidos($db);
                                $precio_contenido = $oPrecio->devolverPrecio("tigo_co", $this->idCont);
                            } else {
                                $precio_contenido = $datos["precio"];
                            }
                        }
                    }
                    if ($datos['nombre_cont'] == "Juego" && !check_game_compat($db, $ua, $this->idCont)) {
                        $html = "Este contenido no est�� disponible para su m�vil.";
                    } else {
                        $datos_cont = obtenerDatosContenido(null, $this->idCont, $datos['nombre_cont'] == "Juego");
                        if ($datos_cont['screenshots'] && $this->show_preview) {
                            $imgPreview = new Imagen("getimage.php?path=http://www.wazzup.com.uy/" . $datos_cont['screenshots'], $datos_cont['nombre']);
                            $html = str_replace("#IMG_PREVIEW#", $imgPreview->Display(), $html);
                        } else {
                            $html = str_replace("#IMG_PREVIEW#", "", $html);
                        }
                        $html = str_replace("#NOMBRE_CONTENIDO#", $datos_cont['nombre'], $html);
                    }
                }
                $html = str_replace("#IMG_PREVIEW#", "", $html);
                $html = str_replace("#RESPUESTANO#", $this->href_no, $html);
                if (TIGO_CO == 1) {
                    $html = str_replace("#PRECIO#", $precio_contenido, $html);
                } else {
                    $version_wap = $this->_soportaXHTML() ? "xhtml" : "wml";
                    $precio = isset($datos["precio_{$version_wap}"]) ? $datos["precio_{$version_wap}"] : $datos['precio'];
                    $html = str_replace("#PRECIO#", $precio, $html);
                }
                $html = str_replace("#NOMBRETIPO#", $datos['nombre_cont'], $html);
            } else {
                $html = "Este contenido no está disponible para su móvil.";
            }
        } else {
            $html = <<<HTML
\t\t\t\tEl contenido no se puede descargar en este momento, por favor intentelo m&#225;s tarde
HTML;
        }
        return $html;
    }
Esempio n. 2
0
    function Display()
    {
        global $msisdn;
        //Esto es chancho, lo sé... pido perdón... :(
        global $ua;
        global $db;
        if ($msisdn != "" || IDEAS == 1) {
            $contenidoTpl = $this->_loadTemplate();
            /*
            if(!$this->force_si) {
            	$url_descarga = urlWapPushAncel($msisdn, $this->idCont, false, servicio3G(), $this->nombre_wap);
            } else {
            	$url_descarga = $this->href_si;
            }
            */
            $url_descarga = $this->href_si;
            $html = str_replace("#RESPUESTASI#", $url_descarga, $contenidoTpl);
            if (IDEAS == 1) {
                //Para el caso de IDEAS, se debe obtener el ID del tipo de contenidos de WAZZUP en lugar del de Ideas
                $datos_ideas = obtenerDatosCont($db, $this->idCont);
                $tipo_ideas = $datos_ideas['tipo_ideas'];
                $this->tipo = $datos_ideas['tipo'];
            }
            //echo $this->tipo."..";
            if (soportaContenidoPorTipo($db, $ua, $this->tipo)) {
                if ($this->idCont != 0) {
                    if (IDEAS == 1) {
                        $datos = obtenerDatosCompra($tipo_ideas, $this->idCont);
                    } else {
                        $datos = obtenerDatosCompra($this->tipo, $this->idCont);
                        if (TIGO_CO == 1) {
                            $oPrecio = new PreciosContenidos($db);
                            $precio_contenido = $oPrecio->devolverPrecio("tigo_co", $this->idCont);
                        } else {
                            $precio_contenido = $datos["precio"];
                        }
                    }
                    if ($datos['nombre_cont'] == "Juego" && !check_game_compat($db, $ua, $this->idCont)) {
                        $html = "Este contenido no es compatible con\t su móvil.";
                    } else {
                        $datos_cont = obtenerDatosContenido(null, $this->idCont, $datos['nombre_cont'] == "Juego");
                        if ($datos_cont['screenshots'] && $this->show_preview) {
                            $imgPreview = new Imagen("getimage.php?path=http://www.wazzup.com.uy/" . $datos_cont['screenshots'], $datos_cont['nombre']);
                            $html = str_replace("#IMG_PREVIEW#", $imgPreview->Display(), $html);
                        } else {
                            $html = str_replace("#IMG_PREVIEW#", "", $html);
                        }
                        $html = str_replace("#NOMBRE_CONTENIDO#", $datos_cont['nombre'], $html);
                    }
                }
                $html = str_replace("#IMG_PREVIEW#", "", $html);
                $html = str_replace("#RESPUESTANO#", $this->href_no, $html);
                if (TIGO_CO == 1) {
                    $html = str_replace("#PRECIO#", $precio_contenido, $html);
                } else {
                    $version_wap = $this->_soportaXHTML() ? "xhtml" : "wml";
                    $precio = isset($datos["precio_{$version_wap}"]) ? $datos["precio_{$version_wap}"] : $datos['precio'];
                    $html = str_replace("#PRECIO#", $precio, $html);
                }
                $html = str_replace("#NOMBRETIPO#", $datos['nombre_cont'], $html);
            } else {
                $html = "Este contenido no está disponible para su móvil.";
            }
        } else {
            $html = <<<HTML
\t\t\t\tEl contenido no se puede descargar en este momento, por favor intentelo más tarde
HTML;
        }
        return $html;
    }
Esempio n. 3
0
    /**
     * Muestra el Top de Juegos
     *
     * @param Iint $id_top
     */
    function displayTopJuegos($id_top) {
        $ids_tops = $this->array_contenidos[$id_top]; // array con los id a mostrar
        $i=0;
        
        if (!$this->array_titulos_tops[$id_top]) {
            $extraparam = "SECCION_SIN_TITULO";
        	$seccionTop = new Seccion ($this->array_titulos_tops[$id_top], $this->getStyle($this->array_align_items[$id_top]), $this->getStyle($this->array_font_size[$id_top]), $extraparam);
        } else {
        	$seccionTop = new Seccion ($this->array_titulos_tops[$id_top], $this->getStyle($this->array_align_items[$id_top]), $this->getStyle($this->array_font_size[$id_top]));
        }
    	$listaTop = new ListaLinks();
    	if ($this->array_style_items[$id_top] != "BULLETS") $listaTop->SetStyle($this->getStyle($this->array_style_items[$id_top]));
    	foreach ($ids_tops as $id) {
    	    if(check_game_compat($this->db, $this->ua, $id)) {
    			$datos = obtenerDatosContenido($this->db, $id, true);
        		if ($this->operadora == "ancel") $img =  "getimage.php?path=".PREVIEW_HOST."/netuy/java/cajas/".$id.".gif";
			else $img = PATH_PREVIEW."/netuy/java/cajas/".$id.".gif";
        		if ($this->operadora == "claro" || $this->operadora == "porta") {
            			$href = "hacer_descarga.php?xxx={$this->array_xxx[$id]}&amp;b=h&amp;step=2{$this->universal_push}&amp;id=".$id."&amp;cat=".$datos['categoria']."&amp;tipoCat=".$datos['tipo'];
        		} else {
        			$href = "games.php?xxx={$this->array_xxx[$id]}&amp;b=h&amp;step=2{$this->universal_push}&amp;id=".$id."&amp;cat=".$datos['categoria']."&amp;tipoCat=".$datos['tipo'];
        		}
        		($this->array_textos_links_dl[$id_top] != "") ? $nombre = $this->array_textos_links_dl[$id_top] : $nombre = $this->escape4Wap($datos['nombre']);
        		($this->array_subtexto[$id_top] == "1") ? $autor = "<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$this->escape4Wap($datos["autor"]) : $autor = "";
        		if ($this->array_style_items[$id_top] == "BULLETS") {
        		    $link = new MenuItem("images/bullet.gif", $nombre, $href, $autor);
        		} else {
				if ($this->array_show_preview[$id_top] == "1") {
					$link = new Link($href, $nombre, $img, TOP_SIDE, null, $autor);
				} else {
					$link = new Link($href, $nombre, null, null, null, $autor);
				}
			}
                switch($this->array_marcas[$id]) {
    				case 'new':
    					$link->setNew(true);
    					break;
    				case 'hot':
    					$link->setHot(true);
    					break;
    				case 'hit':
    					$link->setHit(true);
    					break;
    			}
        		$listaTop->AddComponent($link);
        		$i++;
    	    } else {
    	        // debug
    	        
    	    }
    	}
    	
    	if ($i>0) {
        	$seccionTop->AddComponent ($listaTop);
        	$this->html .= $seccionTop->Display();
    	
        	if (($this->array_text_notitle[$id_top] != "")) {
            	$seccionVerMas = new Seccion ("", $this->getStyle($this->array_align_notitle[$id_top]), $this->getStyle($this->array_font_size[$id_top]), SECCION_SIN_TITULO);
            	$seccionVerMas->AddComponent (new Link ("games.php?step=0{$this->universal_push}&amp;tipoCat=31", $this->array_text_notitle[$id_top]));
            	$this->html .= $seccionVerMas->Display();
        	}

        }
            	
    	if ($this->debug == "2") $this->logMyDebug();
    	return $this->html;
    }