Beispiel #1
0
<?php

include "includes.php";
$miC = new coneXion("Web", true);
$db = $miC->db;
logearAcceso($db, $celular, $ua, NOMBRE_PORTAL_DESCARGA, $_SERVER['HTTP_REFERER']);
$nombre_wap = isset($_GET["push"]) ? $_GET['push'] : NOMBRE_PORTAL_DESCARGA;
$menu = array();
$soportaAlgo = false;
if (soportaContenidoPorTipo($db, $ua, 23)) {
    $soportaAlgo = true;
    $cant_por_pagina = 5;
    $cats = obtenerCategorias_mms($pagina, 9, 23, false);
    unset($cats['total']);
    foreach ($cats as $cat) {
        $nombre_cat = str_replace("&", "&amp;", $cat['descripcion']);
        $menu[] = new Link("ringtones.php?cat=" . $cat['id'] . "&amp;push={$nombre_wap}&amp;tipoCat=23&amp;step=1", $nombre_cat);
    }
    //$menu[] = array("href" => "ringtones.php?push=$nombre_wap&amp;tipoCat=23&amp;step=1&amp;cat=3", "nombre" => "Truetones");
}
/////////////////////////////////////////////
//// PRESENTACION
/////////////////////////////////////////////
$pagina = new Pagina(NOMBRE_PORTAL);
$seccion = new Seccion("", "center", SMALL_FONT_SIZE, SECCION_SIN_TITULO);
$seccion->AddComponent("CDs de regalo a los que más descarguen!");
$pagina->AddComponent($seccion);
$pagina->AddComponent(new Top($db, WEED, 1, $ua, 0));
$pagina->AddComponent(new Top($db, WEED, 2, $ua, 0));
$pagina->AddComponent(new Top($db, WEED, 3, $ua, 0));
$pagina->AddComponent(new Top($db, WEED, 4, $ua, 0));
Beispiel #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;
    }
Beispiel #4
0
<?php

include "includes.php";
//------------------------------------
// Conexion con DB
//------------------------------------
$miC = new coneXion("Web", true);
$db = $miC->db;
$soportaAlgo = false;
if (soportaContenidoPorTipo($db, $ua, 31)) {
    $soportaAlgo = true;
}
//Top Juegos//Top Juegos//Top Juegos
if (soportaContenidoPorTipo($db, $ua, "31")) {
    $juegos = obtenerTopDeJuegos_mms($db, $ua, 0, 0, OPERADORA_MCM, NOMBRE_MCM);
    $cantCajas = $juegos['cantCajas'];
    unset($juegos['cantCajas']);
    $lista_j = array();
    $cont = 0;
    foreach ($juegos as $item) {
        $href = "game_desc.php?id=" . $item['id'];
        if ($cont < $cantCajas) {
            $link = new Link($href, $item['nombre'], PREVIEW_HOST . "/netuy/java/cajas/" . $item['id'] . ".gif", TOP_SIDE);
            switch ($item['attr']) {
                case "hot":
                    $link->setHot(true);
                    break;
                case "hit":
                    $link->setHit(true);
                    break;
                case "new":
Beispiel #5
0
    /**
     * Muestra un top en la wap
     *
     * @param dblink $db
     * @param int $num_top
     */
    function Display() {
        $id_top = $this->array_tops[$this->num_top]; // id del top
        if ($this->debug == 2) $this->debug_msg .= "[DEBUG] ID Top: $id_top.\n";
        if ($id_top>0) {
            $titulo_top = $this->array_titulos_tops[$id_top]; // titulo del top
            $cant_items = sizeof($this->array_contenidos[$id_top]); // cantidad de contenidos en el top
            $tipo_top = $this->array_tipos_tops[$id_top];

            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Titulo Top: $titulo_top\n";
            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Tipo Top: $tipo_top.\n";
            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Items en Top: $cant_items.\n";
            
            if ($cant_items > 0) {
                if (soportaContenidoPorTipo($this->db, $this->ua, $tipo_top)) {
                    if ($this->debug == 2) $this->debug_msg .= "[DEBUG] El celular $this->ua soporta el tipo de contenido $tipo_top.\n";
                    switch ($tipo_top) {
                        case 31:
                            // Juegos
                            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Tipo Detectado: $tipo_top-Juegos.\n";
                            return $this->displayTopJuegos($id_top);
                            break;
                        case 28:
                            // Monofonicos
                            $this->debug_msg .= "[CRIT] Tipo No soportado por el sistema: $tipo_top-Monofonicos.\n";
                            return "";
                            break;
                        case 23:
                            // MP3/Truetones
                            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Tipo Detectado: $tipo_top-MP3/Truetones.\n";
                            return $this->displayTopMP3Truetones($id_top);
                            break;
                        case 29:
                            // Polifonicos
                            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Tipo Detectado: $tipo_top-Polifonicos.\n";
                            return $this->displayTopPolifonicos($id_top);
                            break;
                        case 5:
                            // Screensavers
                            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Tipo Detectado: $tipo_top-Screensavers.\n";
                            return $this->displayTopScreensavers($id_top);
                            break;
                        case 17:
                            // Sounds FX
                            $this->debug_msg .= "[CRIT] Tipo No soportado por el sistema: $tipo_top-Sound FX.\n";
                            return "";
                            break;
                        case 62:
                            // Videos
                            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Tipo Detectado: $tipo_top-Videos.\n";
                            return $this->displayTopVideos($id_top);
                            break;
                        case 65:
                            // VideoTones
                            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Tipo Detectado: $tipo_top-VideoTones.\n";
                            return $this->displayTopVideoTones($id_top);
                            break;
                        case 7:
                            // Wallpapers
                            if ($this->debug == 2) $this->debug_msg .= "[DEBUG] Tipo Detectado: $tipo_top-Wallpapers.\n";
                            return $this->displayTopWallpapers($id_top);
                            break;
                        default:
                            // otro error, tipo no soportado
                            if ($this->debug > 0) $this->debug_msg .= "[WARN] El top $id_top contiene tipos no soportados: $tipo_top.\n";
                    }
                } else {
                    // el celular no soporta el tipo de contenido
                    if ($this->debug > 0) $this->debug_msg .= "El celular $ua no soportada el tipo de contenido $tipo_top.\n";
                }
            } else {
                // no hay elementos a mostrar en este top
                if ($this->debug > 0) $this->debug_msg .= "[WARN] El top $id_top no contiene elementos.\n";
            }
        } else {
            // no existe el top especificado
            if ($this->debug > 0) $this->debug_msg .= "[WARN] No existe el top especificado: $id_top.\n";
        }
    }