<?php
global $app, $settings, $str, $locale, $fm, $config;
?>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title></title>
	<link rel="stylesheet" type="text/css" href="customizables/custom_actions/cloudconvert/style.css?v=<?php echo $settings->currentVersion;?>" />
	<link rel="stylesheet" type="text/css" href="css/ext.php?v=<?php echo $settings->currentVersion;?>" />
	<script type="text/javascript" src="js/min.php?extjs=1&v=<?php echo $settings->currentVersion;?>"></script>
	<script src="customizables/custom_actions/cloudconvert/app.js?v=<?php echo $settings->currentVersion;?>"></script>
	<script src="?module=fileman&section=utils&page=translation.js&sec=<?php echo $str->forURL("Custom Actions: CloudConvert")?>&lang=<?php echo $str->forURL($GLOBALS['currentLanguage'])?>"></script>
	<script>
		var URLRoot = '<?php echo $str->safeJS($config['url']['root'])?>';
		var path = '<?php echo $str->safeJS($this->data['relativePath'])?>';
	</script>
</head>

<body>
<div id="selectFormat">
	<div style="clear:both;margin:10px;">
		<?php
		if (sizeof($rs) > 0){
			$locale->display('Convert "%1" to:', $this->localeSection, array($str->safeHTML($this->data['fileName'])));
		} else {
			$locale->display('No conversion option found for the "%1" file type.', $this->localeSection, array(strtoupper($str->safeHTML($fm->getExtension($this->data['fileName'])))));
		}
		?>
	</div>
	<div style="max-width:600px">
	<?php
	foreach ($rs as $format) {
		$fileTypeInfo = $fm->fileTypeInfo(false, $format['outputformat']);
		?>
		<div class="format" data-format="<?php echo $str->safeHTML($format['outputformat']);?>">
		<img src="images/fico/<?php echo $fileTypeInfo['icon'];?>" width="96" height="96" border="0" />
			<?php echo $str->safeHTML(strtoupper($format['outputformat']))?>
		</div>
	<?php
	}
	?>
	</div>
</div>
</body>
</html>