示例#1
0
             break;
         case "128x96":
             $folder = calcularCarpeta(basename($vid->video, ".3gp"));
             $file = "/videos/128x96/{$folder}/" . basename($vid->video);
             break;
         default:
             // jamas deberia entrar aca
             echo "OOPS! :S\n";
     }
     if (get_preview($file, "{$work_dir}/" . basename($vid->filename) . "_{$dimm}.3gp") === TRUE) {
         $debug->add(" > {$dimm} " . basename($vid->filename) . " 3gp Download OK!");
         $debug->add("Video ok, adding objects...");
         $vid->add("objects", "<file_{$dimm}>" . $vid->filename . "_{$dimm}.3gp</file_{$dimm}>\n");
     } else {
         // hax0r para 128x96, contenidos viejos video_tones
         $folder = calcularCarpeta($id);
         $file = "/videos/128x96/{$folder}/{$id}.3gp";
         if (get_preview($file, "{$work_dir}/" . basename($vid->filename) . "_{$dimm}.3gp") === TRUE) {
             $debug->add(" > {$dimm} " . basename($vid->filename) . " 3gp Download OK!");
             $debug->add("Video ok, adding objects...");
             $vid->add("objects", "<file_{$dimm}>" . $vid->filename . "_{$dimm}.3gp</file_{$dimm}>\n");
         } else {
             $video_download_ok = FALSE;
             $debug->add(" > {$dimm} " . basename($vid->filename) . " 3gp Download ERROR - {$id} -> {$dimm}!!!");
             echo "'{$id}' => '{$dimm}',\n";
             $debug->add("Giving up :( ");
         }
     }
 } else {
     $debug->add("Skipping {$dimm}.");
 }
示例#2
0
function updateContenidos($newId)
{
    $db_archivo = "/netuy/wp/128x128/" . calcularCarpeta($newId) . "/" . $newId . ".gif";
    $db_referencia = "/netuy/wp/62x62/" . calcularCarpeta($newId) . "/" . $newId . ".gif";
    //die("db_archivo: $db_archivo -- db_referencia: $db_referencia");
    print "\n<b>Completando registros en base de datos.</b><br />";
    extract($GLOBALS);
    $sql = "UPDATE contenidos SET archivo='" . $db_archivo . "' , referencia='" . $db_referencia . "' WHERE id={$newId}  LIMIT 1; ";
    //print $sql . "<br />";
    $result = mysql_query($sql, $db);
    if (!$result) {
        print "Error insertando archivo y referencia en el contenido {$newId}- " . mysql_error($db);
        limpiarCagadas($newId);
        return false;
    }
    $portales = array();
    $sql = "UPDATE Web.contcol_whitelist SET  ";
    foreach ($_SESSION['portales'] as $portal) {
        $portales[] = $portal . "=1";
    }
    $sql .= implode(",", $portales);
    $sql .= " WHERE contenido={$newId} LIMIT 1; ";
    //print $sql . "<br />";
    $result = mysql_query($sql, $db) or die("Error publicando en whitelist - " . mysql_error($db));
    if (!$result) {
        print "Error publicando en whitelist - " . mysql_error($db);
        limpiarCagadas($newId);
        return false;
    }
    print "\nContenido publicado en:\n";
    foreach ($_SESSION['portales'] as $port) {
        print "{$port}\n";
    }
    return true;
}
示例#3
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;
    }