<?PHP

/**************************************
    Webutler V3.0 - www.webutler.de
    Copyright (c) 2008 - 2014
    Autor: Sven Zinke
    Free for any use
    Lizenz: GPL
**************************************/

require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))).'/includes/loader.php';

$webutlerckplugin = new WebutlerAdminClass;
$webutlerckplugin->config = $webutler_config;

if(!$webutlerckplugin->checkadmin())
    exit('no access');


header("Pragma:no-cache");
header("Cache-Control:private,no-store,no-cache,must-revalidate");

$swfwidth = '';
$swfheight = '';
if($_GET['movie'] != '')
{
	$dateiname = $_GET['movie'];
	$endung = substr( $dateiname, ( strrpos($dateiname, '.') + 1 ) ) ;
	if($endung == 'swf')
    {
		$file = $webutlerckplugin->config['server_path'].'/'.$dateiname;
		if(file_exists($file))
        {
			$format = GetImageSize($file);
			$wh = explode(' ', $format[3]);
			$swfwidth = preg_replace('/[^0-9]/', '', $wh[0]);
			$swfheight = preg_replace('/[^0-9]/', '', $wh[1]);
		}
	}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<script type="text/javascript">
/* <![CDATA[ */
	var win;
	if(document.all)
		win = parent ;
	else
		win = top ;
//opener
    var CKEopener = win.CKEDITOR;

	if (CKEopener)
	{
        CKEopener.tools.callFunction( <?php echo $_GET['CKEditorFuncNum']; ?>,
        {
            newWidth : <?php echo $swfwidth; ?>,
            newHeight : <?php echo $swfheight; ?>
        });
	}
/* ]]> */
</script>
</head>
<body></body>
</html>
<?PHP } ?>
