source: trunk/plugins/ExtendedFileManager/editorFrame.php @ 521

Last change on this file since 521 was 521, checked in by koto, 13 years ago

Ticket #811: Added ExtendedFileManager? plugin ver 1.1.1 (with Polish translation)
Currently the plugin depends on ImageManager? class files.
Added dirSize() method used by ExtendedFileManager? to ImageManager/Classes/Files?.php

File size: 2.8 KB
RevLine 
[521]1<?php
2/**
3 * ExtendedFileManager editorframe.php file.
4 * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz
5 * Version: Updated on 08-01-2005 by Afru
6 * Version: Updated on 21-06-2006 by Krzysztof Kotowicz
7 * Package: ExtendedFileManager (EFM 1.1.1)
8 * http://www.afrusoft.com/htmlarea
9 */
10
11require_once('config.inc.php');
12require_once('Classes/ExtendedFileManager.php');
13require_once('../ImageManager/Classes/ImageEditor.php');
14
15$manager = new ExtendedFileManager($IMConfig);
16$editor = new ImageEditor($manager);
17$imageInfo = $editor->processImage();
18
19?>
20
21<html>
22<head>
23        <title></title>
24<link href="<?php print $IMConfig['base_url'];?>assets/editorFrame.css" rel="stylesheet" type="text/css" />
25<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/wz_jsgraphics.js"></script>
26<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/EditorContent.js"></script>
27<script type="text/javascript">
28    var _backend_url = "<?php print $IMConfig['backend_url']; ?>";
29
30    if(window.top)
31        HTMLArea = window.top.HTMLArea;
32
33    function i18n(str) {
34        return HTMLArea._lc(str, 'ImageManager');
35    }
36
37        var mode = "<?php echo $editor->getAction(); ?>" //crop, scale, measure
38
39var currentImageFile = "<?php if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>";
40
41<?php if ($editor->isFileSaved() == 1) { ?>
42        alert(i18n('File saved.'));
43
44    window.parent.opener.parent.refresh();
45    window.parent.opener.selectImage
46    (
47        '<?php echo $imageInfo['saveFile'] ?>',
48        '<?php echo $imageInfo['saveFile'] ?>'.replace(/^.*\/?([^\/]*)$/, '$1'),
49        <?php echo $imageInfo['width'] ?>,
50        <?php echo $imageInfo['height'] ?>
51        );
52        window.parent.close();
53       
54<?php } else if ($editor->isFileSaved() == -1) { ?>
55        alert(i18n('File was not saved.'));
56<?php } ?>
57
58</script>
59<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/editorFrame.js"></script>
60</head>
61
62<body>
63<div id="status"></div>
64<div id="ant" class="selection" style="visibility:hidden"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="0" height="0" border="0" alt="" id="cropContent"></div>
65<?php if ($editor->isGDEditable() == -1) { ?>
66        <div style="text-align:center; padding:10px;"><span class="error">GIF format is not supported, image editing not supported.</span></div>
67<?php } ?>
68<table height="100%" width="100%">
69        <tr>
70                <td>
71<?php if(count($imageInfo) > 0 && is_file($imageInfo['fullpath'])) { ?>
72        <span id="imgCanvas" class="crop"><img src="<?php echo $imageInfo['src']; ?>" <?php echo $imageInfo['dimensions']; ?> alt="" id="theImage" name="theImage"></span>
73<?php } else { ?>
74        <span class="error">No Image Available</span>
75<?php } ?>
76                </td>
77        </tr>
78</table>
79</body>
80</html>
Note: See TracBrowser for help on using the repository browser.