Ejemplo n.º 1
0
 $USE_LOCAL_FTP = TRUE;
 $jad_download_ok = FALSE;
 $debug->add("Downloading JADS to {$targetDir}");
 foreach ($g->jads as $file) {
     if (get_preview(str_replace("/netuy", "", $file), "{$targetDir}/all/" . basename($file)) === TRUE) {
         $debug->add(" > " . basename($file) . " JAD Download OK!");
         $jad_download_ok = TRUE;
     } else {
         $debug->add(" > " . basename($file) . " JAD Download ERROR!!!");
         $debug->add("Giving up :( ");
     }
 }
 $jar_download_ok = FALSE;
 $debug->add("Downloading JARS to {$targetDir}");
 foreach ($g->jars as $file) {
     if (get_preview(str_replace("/netuy", "", $file), "{$targetDir}/all/" . basename($file)) === TRUE) {
         $debug->add(" > " . basename($file) . " JAR Download OK!");
         $jar_download_ok = TRUE;
     } else {
         $debug->add(" > " . basename($file) . " JAR Download ERROR!!!");
         $debug->add("Giving up :( ");
     }
 }
 $debug->add("Switching to Remote FTP - USA");
 $USE_LOCAL_FTP = FALSE;
 $uaOnlyOnceh4x = array();
 $moved_first = FALSE;
 foreach ($g->jads as $file) {
     $fname = basename($file, ".jad");
     if (file_exists("{$targetDir}/all/{$fname}.jad") && file_exists("{$targetDir}/all/{$fname}.jar")) {
         $debug->add("JAD/JAR {$fname} OK!!");
Ejemplo n.º 2
0
" class="play-me">
                <i class="icon-control-play i-2x text"></i>
                <i class="icon-control-pause i-2x text-active"></i>
              </a>
            </div>
        </div>
        <?php 
}
?>

        <div class="item-overlay bottom">
            <div class="bottom m-l-sm m-b-sm m-r-sm">
              <?php 
$download = get_post_meta($post->ID, 'download', true);
if ($download) {
    $preview = get_preview($post->ID);
    ?>
              <a href="<?php 
    echo esc_url(reset($preview));
    ?>
" class="item-download pull-right">
                <i class="icon-arrow-down text-white"></i>
              </a>
              <?php 
}
?>
              <?php 
if (show_purchase($post->ID)) {
    ?>
              <div class="inline">
                <?php 
Ejemplo n.º 3
0
 foreach ($wallpaper_dimensions_wap_preview as $dimm => $active) {
     $download_ok = FALSE;
     if ($active == "1") {
         $debug->add("Downloading {$dimm}...");
         $file = str_replace("320x320", $dimm, $wp->icons);
         if (get_preview($file, "{$work_dir}/" . $wp->filename . ".jpg") === TRUE) {
             $debug->add("Download OK!");
             $download_ok = TRUE;
         } else {
             $debug->add("Download ERROR!!!");
             $debug->add("Forcing 128x128...");
             if (file_exists("{$work_dir}/" . $wp->filename . ".jpg")) {
                 $debug->add("Detected previous download.");
                 $debug->add("Using {$work_dir}/" . $wp->filename . ".jpg");
             } else {
                 if (get_preview(str_replace("320x320", "128x128", $wp->icons), "{$work_dir}/" . $wp->filename . ".jpg") === TRUE) {
                     $debug->add("Alternative 128x128 download OK!");
                     $download_ok = TRUE;
                 } else {
                     $debug->add("Alternative download ERROR!!!");
                     $debug->add("Giving up :(");
                 }
             }
         }
         if ($download_ok === TRUE) {
             // FORMATOS - GIF,JPEG,PNG,BMP
             $debug->add("Formatting {$work_dir}/" . $wp->filename . ".jpg");
             foreach ($wallpaper_formats as $format => $factive) {
                 if ($factive == "1") {
                     list($width, $height) = explode("x", $dimm);
                     $debug->add("Creating {$format} {$width}" . "x{$height}");
Ejemplo n.º 4
0
                     $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}.");
         }
     }
 } else {
Ejemplo n.º 5
0
         $archive_name = str_replace(".wma", "", $archive_name);
         if ($dimm == "mp3") {
             $file = $wp->icons;
         } else {
             //                $file =  "/mp3/_wmaPreview/$archive_name.wma";
         }
         //$file = $wp->icons;
         $file_dest = $dimm == "mp3" ? $wp->filename . "_prev.{$dimm}" : $wp->filename . ".{$dimm}";
         $fileToPost = "{$work_dir}/" . $wp->filename . ".mp3";
         echo "{$f2p} => http://10.0.1.36/tools/scripts/convertir_a_WMA.php = <br>";
         $result = postFile($f2p, "http://10.0.1.36/tools/scripts/convertir_a_WMA.php");
         //            $result = postFile($f2p, "http://10.0.0.250/tp.php");
         //            $result = postFile($file, "http://10.0.0.250/tools/");
         var_dump($result);
         die;
         if (get_preview($file, "{$work_dir}/{$file_dest}") === TRUE) {
             $debug->add("Download OK!");
             $download_ok = TRUE;
         } else {
             $debug->add("Download ERROR!!!");
         }
         if ($download_ok === TRUE) {
             $debug->add("Success!!! - {$dimm}");
             $wp->add("wappreview", "<file>{$file_dest}</file>\n");
         } else {
             $debug->add("Skipping processing {$dimm}");
         }
     } else {
         $debug->add("Skipping {$dimm}.");
     }
 }
Ejemplo n.º 6
0
                  . <br />
                  File name is <span class="green"> <?php 
                echo $row->name;
                ?>
</span>&hellip; <?php 
                echo icon($row->type);
                ?>
 :: <?php 
                echo get_dg($row->filesize);
                ?>
 <br />
                  <br />
                  <div class="pull-left" id="preview_panel">
                    <?php 
                $url = base_url() . 'uploads/' . $row->doc_paths . '/' . $row->uploaded_filename;
                echo get_preview($row->type, $row->type, $url);
                ?>
                  </div>
                  <div style="clear:both;"></div>
                </div>
              </div>
            </div>
          </div>
          <?php 
            }
            ?>
        </div>
        <!-- /.timeline-items --> 
      </div>
      <?php 
        }
Ejemplo n.º 7
0
 function edd_media()
 {
     if (!isset($_REQUEST['id'])) {
         die(0);
     }
     $post_id = intval($_REQUEST['id']);
     $plays = get_post_meta($post_id, 'plays', true);
     update_post_meta($post_id, 'plays', $plays + 1);
     $list = edd_get_bundled_products($post_id);
     if (empty($list)) {
         $list = array($post_id);
         $post = get_post($post_id);
         if ($post->post_type == 'playlist') {
             $tracks = get_post_meta($post->ID, 'tracks', true);
             $list = explode(',', trim($tracks));
         }
     }
     $args = array('posts_per_page' => -1, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'download', 'post_mime_type' => '', 'post_parent' => '', 'author' => '', 'post_status' => 'publish', 'suppress_filters' => true, 'post__in' => $list);
     $objs = array();
     $posts = get_posts($args);
     foreach ($posts as $post) {
         $obj = array();
         $obj['id'] = $post->ID;
         $obj['ids'] = $post_id;
         $obj['title'] = '</a><a href="' . get_permalink($post->ID) . '">' . $post->post_title . '</a>';
         $obj = array_merge($obj, get_preview($post->ID));
         $terms = get_the_terms($post->ID, 'download_artist', '', ', ', '');
         if ($terms && !is_wp_error($terms)) {
             $artist = array();
             foreach ($terms as $term) {
                 $artist[] = $term->name;
             }
             $obj['artist'] = join(", ", $artist);
         }
         $obj['poster'] = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
         $objs[] = $obj;
     }
     echo json_encode($objs);
     die;
 }