Ejemplo n.º 1
0
     $bajado = $ftpCon->bajar($from, $to);
 }
 if ($bajado !== TRUE) {
     $bajado = $ftpCon->bajar($from, $to);
 }
 if ($bajado !== TRUE) {
     $bajado = $ftpCon->bajar($from, $to);
 }
 if ($bajado === TRUE) {
     $log .= "\tdescargando preview...\n";
     $to = TMP_DIR . "/preview_tmp.gif";
     $from = $screensaver->getPreview();
     $bajado = $ftpCon->bajar($from, $to);
     if ($bajado === TRUE) {
         $origen_file = $to;
         $destino_file = TMP_DIR . "/" . $screensaver->getPreviewFilename();
         $width = 100;
         $height = 100;
         $background = FALSE;
         $extension = ".gif";
         crearImagen($to, $destino_file, $width, $height, $background, $extension);
         unlink($origen_file);
         $content_download = TRUE;
     } else {
         echo "ERROR: descargando el preview del ftp\n";
         exit;
     }
 } else {
     echo "ERROR: descargando el contenido {$from} del ftp a {$to}\n";
     exit;
 }
Ejemplo n.º 2
0
     $bajado = $ftpCon->bajar($from, $to);
 }
 if ($bajado !== TRUE) {
     $bajado = $ftpCon->bajar($from, $to);
 }
 if ($bajado !== TRUE) {
     $bajado = $ftpCon->bajar($from, $to);
 }
 if ($bajado === TRUE) {
     $log .= "\tdescargando preview...\n";
     $to = $tmpDir . "/preview_tmp.gif";
     $from = $screensaver->getPreview();
     $bajado = $ftpCon->bajar($from, $to);
     if ($bajado === TRUE) {
         $origen_file = $to;
         $destino_file = $tmpDir . "/" . $screensaver->getPreviewFilename();
         $width = 100;
         $height = 100;
         $background = FALSE;
         $extension = ".gif";
         crearImagen($to, $destino_file, $width, $height, $background, $extension);
         unlink($origen_file);
         $content_download = TRUE;
     } else {
         echo "ERROR: descargando el preview del ftp\n";
         exit;
     }
 } else {
     echo "ERROR: descargando el contenido {$from} del ftp a {$to}\n";
     exit;
 }