source: trunk/plugins/ImageManager/editorFrame.php @ 43

Last change on this file since 43 was 43, checked in by yermol, 15 years ago

adding modified version of Xiang Wei Zhuo's ImageManager? plugin that
now features a unified single entry-point backend.

Updated full_example to include ImageManager? checkbox.

File size: 2.2 KB
Line 
1<?
2
3/**
4 * The frame that contains the image to be edited.
5 * @author $Author: Wei Zhuo $
6 * @version $Id: editorFrame.php 26 2004-03-31 02:35:21Z Wei Zhuo $
7 * @package ImageManager
8 */
9
10require_once('config.inc.php');
11require_once('Classes/ImageManager.php');
12require_once('Classes/ImageEditor.php');
13
14$manager = new ImageManager($IMConfig);
15$editor = new ImageEditor($manager);
16$imageInfo = $editor->processImage();
17
18?>
19
20<html>
21<head>
22        <title></title>
23<script type="text/javascript">
24_backend_url = "<? print $IMConfig['backend_url']; ?>";
25</script>
26
27<link href="<? print $IMConfig['base_url'];?>assets/editorFrame.css" rel="stylesheet" type="text/css" />        
28<script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/wz_jsgraphics.js"></script>
29<script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/EditorContent.js"></script>
30<script type="text/javascript">
31
32if(window.top)
33        I18N = window.top.I18N;
34
35function i18n(str) {
36        if(I18N)
37                return (I18N[str] || str);
38        else
39                return str;
40};
41       
42        var mode = "<? echo $editor->getAction(); ?>" //crop, scale, measure
43
44var currentImageFile = "<? if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>";
45
46<? if ($editor->isFileSaved() == 1) { ?>
47        alert(i18n('File saved.'));
48<? } else if ($editor->isFileSaved() == -1) { ?>
49        alert(i18n('File was not saved.'));
50<? } ?>
51
52</script>
53<script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/editorFrame.js"></script>
54</head>
55
56<body>
57<div id="status"></div>
58<div id="ant" class="selection" style="visibility:hidden"><img src="<? print $IMConfig['base_url'];?>img/spacer.gif" width="0" height="0" border="0" alt="" id="cropContent"></div>
59<? if ($editor->isGDEditable() == -1) { ?>
60        <div style="text-align:center; padding:10px;"><span class="error">GIF format is not supported, image editing not supported.</span></div>
61<? } ?>
62<table height="100%" width="100%">
63        <tr>
64                <td>
65<? if(count($imageInfo) > 0 && is_file($imageInfo['fullpath'])) { ?>
66        <span id="imgCanvas" class="crop"><img src="<? echo $imageInfo['src']; ?>" <? echo $imageInfo['dimensions']; ?> alt="" id="theImage" name="theImage"></span>
67<? } else { ?>
68        <span class="error">No Image Available</span>
69<? } ?>
70                </td>
71        </tr>
72</table>
73</body>
74</html>
Note: See TracBrowser for help on using the repository browser.