51 lines
2.3 KiB
PHP
51 lines
2.3 KiB
PHP
<?php
|
|
/*
|
|
+--------------------------------------------------------------------------
|
|
| CubeCart 4
|
|
| ========================================
|
|
| CubeCart is a registered trade mark of Devellion Limited
|
|
| Copyright Devellion Limited 2006. All rights reserved.
|
|
| Devellion Limited,
|
|
| 5 Bridge Street,
|
|
| Bishops Stortford,
|
|
| HERTFORDSHIRE.
|
|
| CM23 2JU
|
|
| UNITED KINGDOM
|
|
| http://www.devellion.com
|
|
| UK Private Limited Company No. 5323904
|
|
| ========================================
|
|
| Web: http://www.cubecart.com
|
|
| Email: info (at) cubecart (dot) com
|
|
| License Type: CubeCart is NOT Open Source Software and Limitations Apply
|
|
| Licence Info: http://www.cubecart.com/site/faq/license.php
|
|
+--------------------------------------------------------------------------
|
|
| preview.inc.php
|
|
| ========================================
|
|
| Preview Image
|
|
+--------------------------------------------------------------------------
|
|
*/
|
|
$lang = getLang("admin".CC_DS."admin_filemanager.inc.php");
|
|
$imagePath = str_replace($glob['rootRel'],"",$_GET['file']);
|
|
## Windows Friendly path
|
|
$imagePath = CC_ROOT_DIR.CC_DS.str_replace("/",CC_DS,$imagePath);
|
|
$size = @getimagesize($imagePath);
|
|
$pageWidth = $size[0]+12;
|
|
$pageHeight = $size[1]+12;
|
|
$skipFooter = true;
|
|
?>
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<title><?php echo $lang['admin']['filemanager_prev_file'];?></title>
|
|
<link href="<?php echo $glob['adminFolder']; ?>/styles/style.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
|
|
<body class="greyBg" <?php echo "onload=\"resizeOuterTo(".$pageWidth.",".$pageHeight.");\""; ?>>
|
|
<?php if(isset($_GET['file'])){ ?>
|
|
<div class="imgPreview" align="center" style="width:<?php echo $size[0];?>px; height:<?php echo $size[1];?>px;"><a href="javascript:window.close();"><img src="<?php echo sanitizeVar($_GET['file']); ?>" alt="<?php echo $lang['admin']['filemanager_close_window'];?>" title="<?php echo $lang['admin']['filemanager_close_window'];?>" border="0" /></a></div>
|
|
<?php } else { ?>
|
|
<span class="copyText"><?php echo $lang['admin']['filemanager_no_image_selected'];?></span>
|
|
<?php } ?>
|
|
</body>
|
|
</html>
|