Noticias Weblogs Foros Wiki Código

RecorteX

458 usuarios y 235 recortes de código
Usuario

Contraseña
Crear cuenta
asp csharp css fechas Flash html imagenes java javascript linux mysql oracle php sql SQLServer url vbnet web xhtml xml
Top Usuarios
fjmp76 (35)
albin (31)
josuebasurto (31)
juanjo (29)
pedrocaro (9)
stanz (8)
AndiXTRM (7)
Joserra (7)
miiglesi (6)
aplyca (5)
Top Etiquetas
php (38)
vbnet (27)
javascript (26)
html (25)
java (23)
csharp (18)
sql (17)
mysql (13)
xml (13)
css (10)
Flash (7)
imagenes (7)
xhtml (7)
asp (6)
linux (6)
fechas (6)
SQLServer (5)
oracle (5)
url (5)
web (5)

Escribe el código HTML para una imágen o un flash

Según la extensión del fichero, escribe el HTML correspondiente a un tag "img" o a los tags "object" y "embed" para un fichero Flash.
 
function f_ImageFlash($file, $alt = "", $w = 0, $h = 0, $id = "src") {
	if(substr($file, -3)=="swf") {
		echo "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"".$w."\" height=\"".$h."\" VIEWASTEXT><param name=\"menu\" value=\"false\"><param name=\"movie\" value=\"".$file."\" /><param name=\"quality\" value=\"high\" /><embed src=\"".$file."\" menu=\"false\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"".$w."\" height=\"".$h."\"></embed></object>";
	} else {
		echo "<img id=\"".$id."\" src=\"".$file."\" alt=\"\" />";
	}
}
 
Identifícate para dejar un comentario.
info@recortex.com - Proyecto: Juanjo Navarro, 2006 - Diseño: Albin - Información legal y técnica