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

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

ticket #98: new i18n-system:

  • changed every use of HTMLArea.I18N to HTMLArea._lc-function
  • implemented HTMLArea._loadlang
  • converted all language-files into the new system
  • converted all language-files into utf-8
  • removed all jp-* language-files except jp-utf8.js (and renamed it into jp.js)
  • removed all en.js-files (not needed by the new system)
  • removed all empty i18n-files
File size: 2.2 KB
RevLine 
[43]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)
[60]33        HTMLArea = window.top.HTMLArea;
[43]34
35function i18n(str) {
[60]36    return HTMLArea._lc(str, 'ImageManager');
[43]37};
38       
39        var mode = "<? echo $editor->getAction(); ?>" //crop, scale, measure
40
41var currentImageFile = "<? if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>";
42
43<? if ($editor->isFileSaved() == 1) { ?>
44        alert(i18n('File saved.'));
45<? } else if ($editor->isFileSaved() == -1) { ?>
46        alert(i18n('File was not saved.'));
47<? } ?>
48
49</script>
50<script type="text/javascript" src="<? 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="<? print $IMConfig['base_url'];?>img/spacer.gif" width="0" height="0" border="0" alt="" id="cropContent"></div>
56<? 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<? } ?>
59<table height="100%" width="100%">
60        <tr>
61                <td>
62<? if(count($imageInfo) > 0 && is_file($imageInfo['fullpath'])) { ?>
63        <span id="imgCanvas" class="crop"><img src="<? echo $imageInfo['src']; ?>" <? echo $imageInfo['dimensions']; ?> alt="" id="theImage" name="theImage"></span>
64<? } else { ?>
65        <span class="error">No Image Available</span>
66<? } ?>
67                </td>
68        </tr>
69</table>
70</body>
71</html>
Note: See TracBrowser for help on using the repository browser.