Code: Alles auswählen
/**
* CMS_SWF
*
*/
if ( !is_object($db2) ) $db2 = new DB_Contenido;
// read xhtml setting for client
$bGenerateXHTML = false;
$sql = "SELECT value FROM ".$cfg["tab"]["properties"]." WHERE idclient='".$client."' AND itemtype = 'clientsetting' AND type = 'generator' AND name = 'xhtml'";
$db2->query($sql);
if ( $db2->next_record() ) {
$bGenerateXHTML = (bool) $db2->f("value");
}
if ( $edit ) {
$tmp_id = $a_content['CMS_SWF'][$val];
$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient='".$client."' AND idupl='".$tmp_id."' AND filetype = 'swf'";
$db2->query($sql);
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];
$objectcode = '';
if (false == $bGenerateXHTML ) {
// non-xhtml
$objectcode = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com
/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="'.$width.'" height="'.$height.'" id="movie" align="">
<param name="movie" value="'.$tmp_swf.'">
<embed src="'.$tmp_swf.'" quality="high" width="'.$width.'"
height="'.$height.'" name="movie" align="" type="application/x-shockwave-flash"
plug inspage="http://www.macromedia.com/go/getflashplayer">
</object>';
}
else
{
// xhtml compliant
$objectcode = '<object type="application/x-shockwave-flash"
data="'.$tmp_swf.'" width="'.$width.'" height="'.$height.'">
<param name="movie" value="'.$tmp_swf.'" />
</object> ';
}
$tmp = '<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>'.$objectcode.'
</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 {
$tmp = '<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>';
}
} else {
$tmp_id = $a_content['CMS_SWF'][$val];
$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient='".$client."' AND idupl='".$tmp_id."' AND filetype = 'swf'";
$db2->query($sql);
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 (false == $bGenerateXHTML ) {
// non-xhtml
$tmp = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com
/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="'.$width.'" height="'.$height.'" id="movie" align="">
<param name="movie" value="'.$tmp_swf.'">
<embed src="'.$tmp_swf.'" quality="high" width="'.$width.'"
height="'.$height.'" name="movie" align="" type="application/x-shockwave-flash"
plug inspage="http://www.macromedia.com/go/getflashplayer">
</object>';
}
else
{
// xhtml compliant
$tmp = '<object type="application/x-shockwave-flash"
data="'.$tmp_swf.'" width="'.$width.'" height="'.$height.'">
<param name="movie" value="'.$tmp_swf.'" />
</object> ';
}
} else {
$tmp = "";
}
}
Ciao, Ab7zCh3kR