$debug->add("oDbc: " . var_export($oDbc, TRUE)); $DEBUG_LVL = 2; $todo = count($ids); $USE_LOCAL_FTP === TRUE ? $debug->add("Using Local FTP - 241") : $debug->add("Using Remote FTP - USA"); $debug->add("Preparing to process {$todo} contents..."); $i = 0; $j = 0; foreach ($ids as $id) { // borro work_dir $debug->add("Cleaning working dir {$work_dir}..."); exec("rm -rf {$work_dir}/*"); $i++; $debug->add("******* Processing content #{$id}, {$i} of {$todo}..."); $map = $xml_map["game_tpl"]; $g = new game($oDbc, $id, $uaTigo); $g->load($workingCat, $workingSubCat); $debug->add("Preparing directory structure..."); $targetDir = "{$work_dir}/" . $g->filename; mkdir($targetDir); // mkdir("$targetDir/".$g->filename); mkdir("{$targetDir}/all"); // $targetDir = "$targetDir/".$g->filename; // copio archivos $debug->add("## Copying img sources..."); $download_ok = FALSE; $debug->add("Downloading source img..."); $file = $g->icons; if (get_preview($file, "{$targetDir}/" . $g->filename . ".gif") === TRUE) { $debug->add("Download OK!"); $download_ok = TRUE; } else {