Example #1
0
$idCat = $_GET['cat'];
$pagina = $_GET['p'];
$step = $_GET['step'];
$back = $_GET['b'];
switch ($step) {
    case 0:
        $info = obtenerDescJuego($db, $idGlobalnet);
        $texto = str_replace("&", "&", $info['texto']);
        $screen = $info['screen'];
        $nombre_juego = $info['nombre'];
        $href = "game_desc.php?p={$pagina}&step=1&cat={$idCat}&id=" . $idGlobalnet;
        $link_descarga = new Link($href, "Descargar");
        $volver_link = "games.php?p={$pagina}&step=1&cat={$idCat}";
        break;
    case 1:
        $datos = obtenerDatosContenido($db, $idGlobalnet, true);
        if ($back == 'c') {
            $volver_link = "games.php?p={$pagina}&step=1&cat={$idCat}";
        } else {
            $volver_link = "home.php";
        }
        $url = "hacer_descarga.php?tipoCat=" . $datos['tipo'] . "&id={$idGlobalnet}";
        $url_no = "url_no.php?b={$back}&p={$pagina}&cat={$idCat}&tipoCat=31&id={$idGlobalnet}";
        $texto = new MensajeDescarga($url, $url_no, 31, $idGlobalnet);
        $texto->forceSiUrl($url);
        $texto->setWapName("halloween_wap");
        $home_link = "home.php";
        break;
}
/////////////////////////////////////////////
//// PRESENTACION
Example #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;
    }
    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&#225; disponible para su m&#243;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;
    }
Example #4
0
         break;
     case 62:
         $only_cont = array(14419, 14424);
         break;
 }
 $resultados = buscarContenidos_mcm($db, $pagina, $items_por_pagina, $busqueda, $tipo, $only_cont, OPERADORA_MCM, NOMBRE_MCM);
 $cont = 0;
 foreach ($resultados as $res) {
     $id = $res['id'];
     $nombre = $res['nombre'];
     $idCat = $res['idCat'];
     $cont++;
     if ($cont != 1) {
         switch ($tipo) {
             case 7:
                 $datos = obtenerDatosContenido($db, $id);
                 $url = "images.php";
                 $lista[] = new Link($url . "?push={$nombre_wap}&amp;b=ba&amp;step=2&amp;cat={$idCat}&amp;tipoCat=" . $tipo . "&amp;id=" . $id, utf8_encode(str_replace("&", "&amp;", stripslashes($nombre))), PATH_PREVIEW . "/" . $datos['screenshots'], TOP_SIDE);
                 break;
             case 23:
             case 29:
                 $url = "ringtones.php";
                 $lista[] = new Link($url . "?push={$nombre_wap}&amp;b=ba&amp;step=2&amp;cat={$idCat}&amp;tipoCat=" . $tipo . "&amp;id=" . $id, utf8_encode(str_replace("&", "&amp;", stripslashes($nombre))));
                 break;
             case 62:
                 $url = "videos.php";
                 $lista[] = new Link($url . "?push={$nombre_wap}&amp;b=ba&amp;step=2&amp;cat={$idCat}&amp;tipoCat=" . $tipo . "&amp;id=" . $id, utf8_encode(str_replace("&", "&amp;", stripslashes($nombre))));
                 break;
         }
     }
 }
Example #5
0
    /**
     * Muestra el top de VideoTones
     *
     * @param unknown_type $id_top
     * @return unknown
     */
    function displayTopVideoTones($id_top) {
        $ids_tops = $this->array_contenidos[$id_top]; // array con los id a mostrar

        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) {
    		$datos = obtenerDatosContenido($this->db, $id);
    		$cat = $datos['categoria'];
    		$id = $datos['id'];
    		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;cat=$cat&amp;tipoCat=65&amp;id=".$id."&amp;b=h";
    		} else {
        		$href = "videos.php?xxx={$this->array_xxx[$id]}&amp;b=h&amp;step=2{$this->universal_push}&amp;cat=$cat&amp;tipoCat=65&amp;id=".$id."&amp;b=h";
    		}
    		$ruta = $datos['screenshots'];
    		$carpeta = calcularCarpeta($id);
    		($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);
    		} else {
                if ($this->array_show_preview[$id_top] == "1") {
		    if (file_exists("getimage.php")) $link = new Link($href, $nombre, "getimage.php?path=http://www.wazzup.com.uy/$ruta", TOP_SIDE, null, $autor); 
                    else $link = new Link($href, $nombre, "http://www.wazzup.com.uy/$ruta", 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);
    	}
    	$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 ("videos.php?step=0{$this->universal_push}&amp;tipoCat=65", $this->array_text_notitle[$id_top]));
        	$this->html .= $seccionVerMas->Display();
    	}
        	
    	if ($this->debug == "2") $this->logMyDebug();
    	return $this->html;
    }