| [ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 3 /** 4 * The frame that contains the image to be edited. 5 * @author $Author: Wei Zhuo $ 6 * @version $Id: editorFrame.php 2755 2006-05-10 00:51:46Z wishy $ 7 * @package ImageManager 8 */ 9 require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/include.php'); 10 check_login(); 11 $userid = get_userid(); 12 if (!check_permission($userid, 'Modify Files')) die(); 13 14 require_once ('config.inc.php'); 15 require_once ('Classes/ImageManager.php'); 16 require_once ('Classes/ImageEditor.php'); 17 18 $manager = new ImageManager($IMConfig); 19 $editor = new ImageEditor($manager); 20 $imageInfo = $editor->processImage(); 21 22 ?> 23 24 <html> 25 <head> 26 <title></title> 27 <link href="assets/editorFrame.css" rel="stylesheet" type="text/css" /> 28 <script type="text/javascript" src="assets/wz_jsgraphics.js"></script> 29 <script type="text/javascript" src="assets/EditorContent.js"></script> 30 <script type="text/javascript"> 31 if(window.top) 32 I18N = window.top.I18N; 33 34 function i18n(str) { 35 if(I18N) 36 return (I18N[str] || str); 37 else 38 return str; 39 }; 40 41 var mode = "<?php echo $editor->getAction(); ?>" //crop, scale, measure 42 43 var currentImageFile = "<?php if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>"; 44 45 <?php if ($editor->isFileSaved() == 1) { ?> 46 alert(i18n('File saved.')); 47 <?php } else if ($editor->isFileSaved() == -1) { ?> 48 alert(i18n('File was not saved.')); 49 <?php } ?> 50 51 </script> 52 <script type="text/javascript" src="assets/editorFrame.js"></script> 53 </head> 54 55 <body> 56 <div id="status"></div> 57 <div id="ant" class="selection" style="visibility:hidden"><img src="img/spacer.gif" width="0" height="0" border="0" alt="" id="cropContent"></div> 58 <?php if ($editor->isGDEditable() == -1) { ?> 59 <div style="text-align:center; padding:10px;"><span class="error">GIF format is not supported, image editing not supported.</span></div> 60 <?php } ?> 61 <table height="100%" width="100%"> 62 <tr> 63 <td> 64 <?php if(count($imageInfo) > 0 && is_file($imageInfo['fullpath'])) { ?> 65 <span id="imgCanvas" class="crop"><img src="<?php echo $imageInfo['src']; ?>" <?php echo $imageInfo['dimensions']; ?> alt="" id="theImage" name="theImage"></span> 66 <?php } else { ?> 67 <span class="error">No Image Available</span> 68 <?php } ?> 69 </td> 70 </tr> 71 </table> 72 </body> 73 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Tue Apr 3 18:50:37 2007 | par Balluche grâce à PHPXref 0.7 |