Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/02/2012, 16:25
Avatar de dvbeaumont
dvbeaumont
 
Fecha de Ingreso: marzo-2011
Ubicación: Caracas
Mensajes: 145
Antigüedad: 13 años, 1 mes
Puntos: 1
Exclamación Hacer consulta swf o formato imagen con php

Hola tengo este codigo:

Código PHP:
<?php 
 
if ($handle opendir('upload-php/files')) { 
   while (
false !== ($file readdir($handle))) { 
     if (
$file != "." && $file != "..") { 
       
$my_file[] = $file
     } 
   } 
  
closedir($handle); 


srand((float)microtime() * 1000000); 
shuffle($my_file); 

foreach (
$my_file as $file) { 
echo 
"
<SCRIPT LANGUAGE=\"JavaScript\">
// Comienzo
var banners = 3;
var ahora = new Date()
var segundos = ahora.getSeconds()
var ad = segundos % banners;
ad +=1;
if (ad==1) {
flash=\"upload-php/files/"
.$file."\"
width=\"250\";
height=\"499\";
}
if (ad==2) {
flash=\"upload-php/files/"
.$file."\"
width=\"250\";
height=\"499\";
}
if (ad==3) {
flash=\"upload-php/files/"
.$file."\"
width=\"250\";
height=\"499\";
}

temp=flash.split(\".\");
extension=temp[(temp.length-1)];
document.write('<center>');
if (extension=='swf') {
document.write('<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=' + width + ' height=' + height + ' CODEBASE=\"http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0\">');
document.write('<PARAM NAME=\"MOVIE\" VALUE=\"' + flash + '\">');
document.write('<PARAM NAME=\"PLAY\" VALUE=\"true\">');
document.write('<PARAM NAME=\"LOOP\" VALUE=\"true\">');
document.write('<PARAM NAME=\"QUALITY\" VALUE=\"high\">');
document.write('<EMBED SRC=' + flash + ' width=' + width + ' height=' + height + ' PLAY=\"true\" LOOP=\"true\" QUALITY=\"high\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash\">');
document.write('</EMBED>');
document.write('</OBJECT>');
} else {
 document.write ('<img src=\"'+flash+'\" width=\"'+width+'\" height=\"'+height+'\" border=\"0\">');
 }
document.write('</center>');
// Fin

</SCRIPT>"


    
?>
Las imagenes me las muestra a la perfeccion pero las terminaciones .swf no las está leyendo, aparte no se como hacer que me muestre una sola consulta, en ese codigo me las muestra todas por el while.
__________________
Sé parte de nuestro mundo creativo.

http://bbcreativos.com