示例#1
0
 // obtengo lista de archivos y celulares en gamecomp
 echo "<li> loading jad/jar...</li>";
 $juegos = array();
 $sql = "SELECT c.id, gc.archivo, CONCAT(m.descripcion, ' ', cels.modelo) as marca_modelo, gc.celular idCel\n\t\tFROM Web.contenidos c\n\t\tINNER JOIN Web.gamecomp gc ON c.id = gc.juego\n\t\tINNER JOIN Web.celulares cels ON cels.id = gc.celular\n\t\tINNER JOIN Web.marcas m ON cels.marca = m.id\n\t\tWHERE c.id='{$contentId}' ";
 $sql = "SELECT DISTINCT gc.archivo FROM Web.gamecomp gc WHERE gc.juego='{$contentId}' ";
 echo $sql;
 $rs = mysql_query($sql, $dbc->db);
 while ($obj = mysql_fetch_object($rs)) {
     //		$jad = explode("/", $obj->archivo);
     //		$jad = $jad[count($jad) - 1];
     //		$juegos[$obj->id][$jad] = array("modelo" => $obj->marca_modelo, "archivo" => $obj->archivo, "idcel" => $obj->idCel);
     $juegos[] = $obj->archivo;
 }
 // creo el objeto
 echo "<li> creating objects...</li>";
 $game = new migGame($dbc, $debug, $catLvl, $webCat);
 $game->addFiles($contentId, $juegos);
 try {
     // cargo el contenido
     echo "<li> loading content...</li>";
     $game->loadContent($contentId);
 } catch (Exception $e) {
     $log .= "loadContent: " . $e->getMessage() . "<br/>";
 }
 $game->setTag($catmig);
 $game->setSubTag($subcatmig);
 $game->setKeywords($keywords[$i]);
 //$game->setShortDesc($shortDesc[$i]);
 //	$game->setLongDesc($longDesc[$i]);
 $uniqueId = $game->getUniqueId();
 // creo carpeta destino
示例#2
0
        echo "<tr><td>{$id}</td><td>";
        if (in_array($id, $devices_compatibles)) {
            echo 'Y';
        }
        echo '</td></tr>';
    }
    echo '</table>';
} else {
    if ($tipoCarga == "update") {
        //------------------------
        // si es update
        //------------------------
        foreach ($listaIds as $i => $contentId) {
            $contentId = trim($contentId);
            $log .= "\tprocessando {$contentId}  \n";
            $game = new migGame($dbc, $debug, "", $webCat, $rating, "", "");
            try {
                $game->loadContent($contentId);
            } catch (Exception $e) {
                $log .= "loadContent: " . $e->getMessage() . "\n";
            }
            try {
                $game->setLangs(array_keys($idiomas_elegidos));
                $game->setMerchants(array_keys($paises_elegidos));
                $game->setTag($catmig);
                $game->setSubTag($subcatmig);
                $game->setTag($catmigen, 'en');
                $game->setSubTag($subcatmigen, 'en');
                $xmlContent = $game->updateXML();
                $arrayMuestra[] = $game->getArraySubForm();
                $total++;