der alte code war mir ne spur zu umständlich und funktionierte nicht innerhalb von <?php echo "CMS_SWF[CMS_VAR[0]]"; ?> abgesehen davon, zu kompliziert um den object code jedesmal 2x upzudaten - diese version unterstützt Flash 7.0.14.0
also hier der neue code für die dbtabelle: con_type | zeile: CMS_SWF | wert: code
Code: Alles auswählen
/**
* CMS_SWF
*/
$tmp = $a_content['CMS_SWF'][$val];
$tmp = urldecode($tmp);
$tmp = AddSlashes(AddSlashes($tmp));
$tmp = str_replace("\\\'","'",$tmp);
$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient='".$client."' AND idupl='".$tmp."' AND filetype = 'swf'";
if ( !is_object($db2) ) $db2 = new DB_Contenido;
$db2->query($sql);
$tmp = '';
if ( $db2->next_record() ) {
$tmp_swf = $cfgClient[$client]["upload"] . $db2->f("dirname") . $db2->f("filename");
$aImgSize = @getimagesize($tmp_swf);
$width = $aImgSize[0];
$height = $aImgSize[1];
if ( $edit ) { $tmp .= '<table cellspacing="0" cellpadding="0" border="0"><tr><td>'; }
$tmp .='
<object id="swf_object"
name="movie"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,14,0"';
if (!($width == "" | $height == "")) {
$tmp .='
width="'.$width.'"
height="'.$height.'"';
}
$tmp .='>
<param name="movie" value="'.$tmp_swf.'">
<param name="quality" value="high">
<param name="menu" value="0">
<param name="bgcolor" value="#FFFFFF">
<embed id="swf_object"
name="movie"
type="application/x-shockwave-flash"
src="'.$tmp_swf.'"
quality="high"
bgcolor="#FFFFFF"
menu="0"';
if (!($width == "" | $height == "")) {
$tmp .='
width="'.$width.'"
height="'.$height.'"';
}
$tmp .='
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
';
if ( $edit ) {
$tmp .= '</td></tr><tr><td><a href="'.$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val").'"><img src="'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].'but_editswf.gif" border="0"></a></td></tr></table>';
}
} else {
if ( $edit ) {
$tmp = '<br><a href="'.$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val").'"><img src="'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].'but_editswf.gif" border="0"></a>';
}
}
$tmp = urldecode($tmp);
$tmp = AddSlashes(AddSlashes($tmp));
$tmp = str_replace("\\\'","'",$tmp);
ach ja der aufruf im output bereich sieht jetzt so aus:
Code: Alles auswählen
<? echo "CMS_SWF[1]"; ?>
temporär schreibe ich einfach keine width und height in den object code wenn getimagesize keinen wert liefert...
soweit ich bis jetzt gesehen habe wird flash 6 erst ab version php 4.3.2 unterstützt (nicht ganz sicher bin ich mir aber ob die swf datei komprimiert sein darf)
beim datei format für flash 7 habe ich noch überhaupt keine infos wie getimagesize reagiert.
vielleicht kann dies ja jemand testen. (ich habe leider nur zugriff auf eine ältere php version)