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

Last change on this file since 111 was 111, checked in by niko, 15 years ago

#225
several ImageManager? fixes, see #225 for details

File size: 2.3 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 = "<?php print $IMConfig['backend_url']; ?>";
25</script>
26
27<link href="<?php print $IMConfig['base_url'];?>assets/editorFrame.css" rel="stylesheet" type="text/css" />    
28<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/wz_jsgraphics.js"></script>
29<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/EditorContent.js"></script>
30<script type="text/javascript">
31
32if(window.top)
33        HTMLArea = window.top.HTMLArea;
34
35function i18n(str) {
36    return HTMLArea._lc(str, 'ImageManager');
37};
38       
39        var mode = "<?php echo $editor->getAction(); ?>" //crop, scale, measure
40
41var currentImageFile = "<?php if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>";
42
43<?php if ($editor->isFileSaved() == 1) { ?>
44        alert(i18n('File saved.'));
45<?php } else if ($editor->isFileSaved() == -1) { ?>
46        alert(i18n('File was not saved.'));
47<?php } ?>
48
49</script>
50<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/editorFrame.js"></script>
51</head>
52
53<body>
54<div id="status"></div>
55<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>
56<?php if ($editor->isGDEditable() == -1) { ?>
57        <div style="text-align:center; padding:10px;"><span class="error">GIF format is not supported, image editing not supported.</span></div>
58<?php } ?>
59<table height="100%" width="100%">
60        <tr>
61                <td>
62<?php if(count($imageInfo) > 0 && is_file($imageInfo['fullpath'])) { ?>
63        <span id="imgCanvas" class="crop"><img src="<?php echo $imageInfo['src']; ?>" <?php echo $imageInfo['dimensions']; ?> alt="" id="theImage" name="theImage"></span>
64<?php } else { ?>
65        <span class="error">No Image Available</span>
66<?php } ?>
67                </td>
68        </tr>
69</table>
70</body>
71</html>
Note: See TracBrowser for help on using the repository browser.