function load($cat = "", $subcat = "") { $sql = "SELECT c.*, p.nombre nombre_proveedor, cc.descripcion as nombre_categoria, gi.descr longdesc, gi.descr_wap shortdesc, gi.screenshots\n\t\tFROM Web.contenidos c\n\t\tINNER JOIN Web.gamesInfo gi ON (c.id=gi.game)\n\t\tINNER JOIN Web.contenidos_proveedores p ON (p.id=c.proveedor)\n\t\tINNER JOIN Web.contenidos_cat cc ON (cc.id=c.categoria)\n\t\tWHERE c.id={$this->code} "; $rs = mysql_query($sql, $this->dbc); if (!$rs) { die("ERROR SQL: {$sql} -> " . mysql_error($this->dbc)); } $obj = mysql_fetch_object($rs); // seteo categorias $search_keywords = "{$obj->nombre}, {$obj->nombre_categoria}, juego, java, imagen, {$obj->autor}, {$obj->nombre_proveedor}"; // list($ruta,$pic1,$pic2,$pic3) = explode(",", $obj->screenshots); $this->icons = "/netuy/java/cajas/" . $obj->id . ".gif"; // descomentar la sgte linea para ftp local (240) // $this->icons = str_replace("/netuy", "", $this->icons); // preparo map al objeto $this->set("nombre_contenido", konvert($obj->nombre)); $this->set("proveedor", "Globalnet"); $this->set("type", "Java"); // list ($cat, $subcat) = $this->get_tigo_categories($obj->id, $this->tipo_cont); $this->set("categoria", konvert($cat)); $this->set("subcategoria", konvert($subcat)); $this->set("operator", ""); $this->set("search_keywords", konvert("{$search_keywords}")); $this->set("shortdesc", konvert($obj->shortdesc)); $this->set("longdesc", konvert($obj->longdesc)); $this->set("cls", "Premium"); $this->set("provider_code", ""); $this->set("cla", ""); $totalCels = 0; $celsNotFound = 0; $sqlErrors = 0; $celsSupported = 0; $celsNotSupported = 0; foreach ($this->devices as $devUA) { $totalCels++; $idCel = obtenerIDCelular($devUA, $this->dbc); if ($idCel == 0) { $celsNotFound++; // echo "$this->code: id Cel no encontrado para ua=$devUA<br/>"; } else { if ($idCel === FALSE) { $sqlErrors++; // echo "$this->code: SQL error buscando idCel para ua=$devUA<br/>"; } else { if (soportaJuego($this->dbc, $idCel, $obj->id)) { $celsSupported++; // echo "$devUA SOPORTA!!!\n"; $sql2 = " SELECT archivo FROM Web.gamecomp WHERE juego={$obj->id} AND celular={$idCel} "; $rs2 = mysql_query($sql2, $this->dbc); if (!$rs2) { echo "ERRORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR SQL"; } $obj2 = mysql_fetch_object($rs2); $this->jads[] = $obj2->archivo; $this->jars[] = str_replace(".jad", ".jar", $obj2->archivo); $kfName = basename($obj2->archivo, ".jad"); $this->uaFiles[$kfName] .= "{$devUA},"; } else { $celsNotSupported++; // echo "$this->code: id Cel no soportado para ua=$devUA (idCel=$idCel) <br/>"; } } } } // muestro resumen del proceso echo "<table>\n\t\t<tr><td>CONTENIDO</td><td>{$obj->id} ({$obj->nombre})</td></tr>\n\t\t<tr><td>TOTAL CELS TIGO </td><td> {$totalCels} <a href='errorDetail.php?d=celstigo&id={$obj->id}' target='blank'>ver detalle</a></td></tr>\n\t\t<tr><td>TOTAL CELS NO ENCONTRADOS </td><td> {$celsNotFound} <a href='errorDetail.php?d=notfound&id={$obj->id}' target='blank'>ver detalle</a></td></tr>\n\t\t<tr><td>TOTAL ERRORES SQL </td><td> {$sqlErrors} </td></tr>\n\t\t<tr><td>TOTAL CELS SOPORTADOS OK </td><td> {$celsSupported} <a href='errorDetail.php?d=supported&id={$obj->id}' target='blank'>ver detalle</a></td></tr>\n\t\t<tr><td>TOTAL CELS ENCONTRADOS PERO NO SOPORTADOS POR EL JUEGO </td><td> {$celsNotSupported} <a href='errorDetail.php?d=notsupported&id={$obj->id}' target='blank'>ver detalle</a></td></tr>\n\t\t</table>\n\t\t"; }
if (empty($gameId)) { die("ERROR"); } include_once dirname(__FILE__) . "/lib/functions.php"; include_once dirname(__FILE__) . "/lib/useragents.php"; include_once dirname(__FILE__) . "/lib/konexion.php"; $dbc = new konexion("Web"); foreach ($uaTigo as $devUA) { $idCel = obtenerIDCelular($devUA, $dbc->db); if ($idCel == 0) { $celsNotFound[] = "{$devUA}"; } else { if ($idCel === FALSE) { $sqlErrors[] = "{$devUA}"; } else { if (soportaJuego($dbc->db, $idCel, $gameId)) { $celsSupported[] = "{$devUA}"; } else { $celsNotSupported[] = "{$devUA}"; } } } } switch ($detailType) { case "celstigo": $title = "LISTA TOTAL DE DEVICES TIGO PARAGUAY"; $arrayToShow = $uaTigo; break; case "notfound": $title = "LISTA DE DEVICES NO ENCONTRADOS PARA EL CONTENIDO {$gameId}"; $arrayToShow = $celsNotFound;
$db = $miC->db; $pagina = isset($_GET['p']) ? $_GET['p'] : 0; $idCat = isset($_GET['cat']) ? $_GET['cat'] : 1; $step = isset($_GET['step']) ? $_GET['step'] : 0; $text_align = "center"; $por_pagina = 4; //$idCat = 1; switch ($step) { case 0: case 1: $juegos = obtenerJuegosPorCat_mms($db, $ua, $idCat, $pagina, $por_pagina, OPERADORA_MCM, NOMBRE_MCM); $total = $juegos['total']; unset($juegos['total']); $lista = array(); foreach ($juegos as $item) { if (soportaJuego($db, $ua, $item['id'])) { $href = "game_desc.php?id=" . $item['id'] . "&p={$pagina}&cat={$idCat}&p={$pagina}"; // . $isFree; $lista[] = new Link($href, $item['nombre'], PREVIEW_HOST . $item['screenshots'], TOP_SIDE); } } $paginado = new Paginado($por_pagina, $pagina, $total, $_GET, "games.php"); $home_link = "home.php"; $tipoLista = LISTA2X2_LINKS; $text_align = "center"; break; } ///////////////////////////////////////////// //// PRESENTACION ///////////////////////////////////////////// $pagina = new Pagina(NOMBRE_PORTAL);