<?php
global $fm, $config, $str;

if ($_GET['stream']) {
	$fm->sendFileToBrowser($data['filePath']);
} else {
	$URL = $config['url']['root']."/";
	$URL .= "?module=fileman";
	$URL .= "&section=utils";
	$URL .= "&page=file_preview";
	$URL .= "&path=".$str->forURL($data['relativePath']);
	$URL .= "&stream=1";
?>
<html>
<head>
	<title></title>
	<style>
		body {
			border: 0px;
			margin: 0px;
			padding: 0px;
			overflow:hidden;
		}

	</style>
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" style="height:100%" border="0">
<tr>
	<td align="center" valign="middle">
	<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="100%" width="100%" align="center">
	<param name="src" value="<?php echo $URL?>">
	<param name="autoplay" value="true">
	<param name="controller" value="true">
	<embed height="100%" width="100%" align="center" src="<?php echo $URL?>" autoplay="true" controller="true">
	</embed>
	</object>
	<!-- <iframe src="<?php echo $URL?>" width="100%" height="100%" border="0" frameborder="0" marginwidth="0" marginheight="0" /> -->
	</td>
</tr>
</table>
</body>
</html>
<?php }?>