Changeset 111
- Timestamp:
- 05/04/05 07:08:32 (8 years ago)
- Location:
- trunk/plugins/ImageManager
- Files:
-
- 10 modified
-
Classes/Files.php (modified) (1 diff)
-
Classes/ImageEditor.php (modified) (1 diff)
-
Classes/ImageManager.php (modified) (1 diff)
-
Classes/Thumbnail.php (modified) (1 diff)
-
assets/manager.js (modified) (1 diff)
-
editor.php (modified) (9 diffs)
-
editorFrame.php (modified) (2 diffs)
-
images.php (modified) (8 diffs)
-
manager.php (modified) (7 diffs)
-
thumbs.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/ImageManager/Classes/Files.php
r43 r111 1 <? 1 <?php 2 2 /** 3 3 * File Utilities. -
trunk/plugins/ImageManager/Classes/ImageEditor.php
r43 r111 1 <? 1 <?php 2 2 /** 3 3 * Image Editor. Editing tools, crop, rotate, scale and save. -
trunk/plugins/ImageManager/Classes/ImageManager.php
r48 r111 1 <? 1 <?php 2 2 /** 3 3 * ImageManager, list images, directories, and thumbnails. -
trunk/plugins/ImageManager/Classes/Thumbnail.php
r43 r111 1 <? 1 <?php 2 2 /** 3 3 * Create thumbnails. -
trunk/plugins/ImageManager/assets/manager.js
r60 r111 32 32 33 33 __dlg_translate('ImageManager'); 34 34 35 // This is so the translated string shows up in the drop down. 36 document.getElementById("f_align").selectedIndex = 1; 37 document.getElementById("f_align").selectedIndex = 0; 38 35 39 var uploadForm = document.getElementById('uploadForm'); 36 40 if(uploadForm) uploadForm.target = 'imgManager'; -
trunk/plugins/ImageManager/editor.php
r60 r111 21 21 <title></title> 22 22 <script type="text/javascript"> 23 _backend_url = "<? print $IMConfig['backend_url']; ?>";23 _backend_url = "<?php print $IMConfig['backend_url']; ?>"; 24 24 </script> 25 <link href="<? print $IMConfig['base_url'];?>assets/editor.css" rel="stylesheet" type="text/css" />26 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/slider.js"></script>27 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/popup.js"></script>25 <link href="<?php print $IMConfig['base_url'];?>assets/editor.css" rel="stylesheet" type="text/css" /> 26 <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/slider.js"></script> 27 <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/popup.js"></script> 28 28 <script type="text/javascript"> 29 29 /*<![CDATA[*/ … … 34 34 /*]]>*/ 35 35 </script> 36 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/editor.js"></script>36 <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/editor.js"></script> 37 37 </head> 38 38 39 39 <body> 40 40 <div id="indicator"> 41 <img src="<? print $IMConfig['base_url'];?>img/spacer.gif" id="indicator_image" height="20" width="20" alt="" />41 <img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" id="indicator_image" height="20" width="20" alt="" /> 42 42 </div> 43 43 <div id="tools"> … … 48 48 <label for="cw">Width:</label><input type="text" id="cw" class="textInput" onchange="updateMarker('crop')"/> 49 49 <label for="ch">Height:</label><input type="text" id="ch" class="textInput" onchange="updateMarker('crop')"/> 50 <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />50 <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 51 51 </div> 52 <a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a>53 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>52 <a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 53 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a> 54 54 </div> 55 55 <div id="tools_scale" style="display:none;"> 56 56 <div id="tool_inputs"> 57 57 <label for="sw">Width:</label><input type="text" id="sw" class="textInput" onchange="checkConstrains('width')"/> 58 <a href="javascript:toggleConstraints();" title="Lock"><img src="<? print $IMConfig['base_url'];?>img/islocked2.gif" id="scaleConstImg" height="14" width="8" alt="Lock" class="div" /></a><label for="sh">Height:</label>58 <a href="javascript:toggleConstraints();" title="Lock"><img src="<?php print $IMConfig['base_url'];?>img/islocked2.gif" id="scaleConstImg" height="14" width="8" alt="Lock" class="div" /></a><label for="sh">Height:</label> 59 59 <input type="text" id="sh" class="textInput" onchange="checkConstrains('height')"/> 60 60 <input type="checkbox" id="constProp" value="1" checked="checked" onclick="toggleConstraints()"/> 61 61 <label for="constProp">Constrain Proportions</label> 62 <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />62 <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 63 63 </div> 64 <a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a>65 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>64 <a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 65 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a> 66 66 </div> 67 67 <div id="tools_rotate" style="display:none;"> … … 82 82 </select> 83 83 <label for="ra">Angle:</label><input type="text" id="ra" class="textInput" /> 84 <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />84 <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 85 85 </div> 86 <a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a>87 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>86 <a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 87 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a> 88 88 </div> 89 89 <div id="tools_measure" style="display:none;"> … … 91 91 <label>X:</label><input type="text" class="measureStats" id="sx" /> 92 92 <label>Y:</label><input type="text" class="measureStats" id="sy" /> 93 <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />93 <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 94 94 <label>W:</label><input type="text" class="measureStats" id="mw" /> 95 95 <label>H:</label><input type="text" class="measureStats" id="mh" /> 96 <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />96 <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 97 97 <label>A:</label><input type="text" class="measureStats" id="ma" /> 98 98 <label>D:</label><input type="text" class="measureStats" id="md" /> 99 <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />99 <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 100 100 <button type="button" onclick="editor.reset();" >Clear</button> 101 101 </div> … … 103 103 <div id="tools_save" style="display:none;"> 104 104 <div id="tool_inputs"> 105 <label for="save_filename">Filename:</label><input type="text" id="save_filename" value="<? echo $editor->getDefaultSaveFile();?>"/>105 <label for="save_filename">Filename:</label><input type="text" id="save_filename" value="<?php echo $editor->getDefaultSaveFile();?>"/> 106 106 <select name="format" id="save_format" style="margin-left: 10px; vertical-align: middle;" onchange="updateFormat(this)"> 107 107 <option value="" selected>Image Format</option> … … 111 111 <option value="jpeg,35">JPEG Low</option> 112 112 <option value="png">PNG</option> 113 <? if($editor->isGDGIFAble() != -1) { ?>113 <?php if($editor->isGDGIFAble() != -1) { ?> 114 114 <option value="gif">GIF</option> 115 <? } ?>115 <?php } ?> 116 116 </select> 117 117 <label>Quality:</label> … … 120 120 <td> 121 121 <div id="slidercasing"> 122 <div id="slidertrack" style="width:100px"><img src="<? print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div>123 <div id="sliderbar" style="left:85px" onmousedown="captureStart();"><img src="<? print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div>122 <div id="slidertrack" style="width:100px"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 123 <div id="sliderbar" style="left:85px" onmousedown="captureStart();"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 124 124 </div> 125 125 </td> … … 127 127 </table> 128 128 <input type="text" id="quality" onchange="updateSlider(this.value)" style="width: 2em;" value="85"/> 129 <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" />129 <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 130 130 </div> 131 <a href="javascript: editor.doSubmit('save');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a>132 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>131 <a href="javascript: editor.doSubmit('save');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 132 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a> 133 133 </div> 134 134 </div> 135 135 <div id="toolbar"> 136 <a href="javascript:toggle('crop')" id="icon_crop" title="Crop"><img src="<? print $IMConfig['base_url'];?>img/crop.gif" height="20" width="20" alt="Crop" /><span>Crop</span></a>137 <a href="javascript:toggle('scale')" id="icon_scale" title="Resize"><img src="<? print $IMConfig['base_url'];?>img/scale.gif" height="20" width="20" alt="Resize" /><span>Resize</span></a>138 <a href="javascript:toggle('rotate')" id="icon_rotate" title="Rotate"><img src="<? print $IMConfig['base_url'];?>img/rotate.gif" height="20" width="20" alt="Rotate" /><span>Rotate</span></a>139 <a href="javascript:toggle('measure')" id="icon_measure" title="Measure"><img src="<? print $IMConfig['base_url'];?>img/measure.gif" height="20" width="20" alt="Measure" /><span>Measure</span></a>140 <a href="javascript: toggleMarker();" title="Marker"><img id="markerImg" src="<? print $IMConfig['base_url'];?>img/t_black.gif" height="20" width="20" alt="Marker" /><span>Marker</span></a>141 <a href="javascript:toggle('save')" id="icon_save" title="Save"><img src="<? print $IMConfig['base_url'];?>img/save.gif" height="20" width="20" alt="Save" /><span>Save</span></a>136 <a href="javascript:toggle('crop')" id="icon_crop" title="Crop"><img src="<?php print $IMConfig['base_url'];?>img/crop.gif" height="20" width="20" alt="Crop" /><span>Crop</span></a> 137 <a href="javascript:toggle('scale')" id="icon_scale" title="Resize"><img src="<?php print $IMConfig['base_url'];?>img/scale.gif" height="20" width="20" alt="Resize" /><span>Resize</span></a> 138 <a href="javascript:toggle('rotate')" id="icon_rotate" title="Rotate"><img src="<?php print $IMConfig['base_url'];?>img/rotate.gif" height="20" width="20" alt="Rotate" /><span>Rotate</span></a> 139 <a href="javascript:toggle('measure')" id="icon_measure" title="Measure"><img src="<?php print $IMConfig['base_url'];?>img/measure.gif" height="20" width="20" alt="Measure" /><span>Measure</span></a> 140 <a href="javascript: toggleMarker();" title="Marker"><img id="markerImg" src="<?php print $IMConfig['base_url'];?>img/t_black.gif" height="20" width="20" alt="Marker" /><span>Marker</span></a> 141 <a href="javascript:toggle('save')" id="icon_save" title="Save"><img src="<?php print $IMConfig['base_url'];?>img/save.gif" height="20" width="20" alt="Save" /><span>Save</span></a> 142 142 </div> 143 143 <div id="contents"> 144 <iframe src="<? print $IMConfig['backend_url']; ?>__function=editorFrame&img=<?if(isset($_GET['img'])) echo rawurlencode($_GET['img']); ?>" name="editor" id="editor" scrolling="auto" title="Image Editor" frameborder="0"></iframe>144 <iframe src="<?php print $IMConfig['backend_url']; ?>__function=editorFrame&img=<?php if(isset($_GET['img'])) echo rawurlencode($_GET['img']); ?>" name="editor" id="editor" scrolling="auto" title="Image Editor" frameborder="0"></iframe> 145 145 </div> 146 146 <div id="bottom"></div> -
trunk/plugins/ImageManager/editorFrame.php
r60 r111 22 22 <title></title> 23 23 <script type="text/javascript"> 24 _backend_url = "<? print $IMConfig['backend_url']; ?>";24 _backend_url = "<?php print $IMConfig['backend_url']; ?>"; 25 25 </script> 26 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>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 30 <script type="text/javascript"> 31 31 … … 37 37 }; 38 38 39 var mode = "<? echo $editor->getAction(); ?>" //crop, scale, measure39 var mode = "<?php echo $editor->getAction(); ?>" //crop, scale, measure 40 40 41 var currentImageFile = "<? if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>";41 var currentImageFile = "<?php if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>"; 42 42 43 <? if ($editor->isFileSaved() == 1) { ?>43 <?php if ($editor->isFileSaved() == 1) { ?> 44 44 alert(i18n('File saved.')); 45 <? } else if ($editor->isFileSaved() == -1) { ?>45 <?php } else if ($editor->isFileSaved() == -1) { ?> 46 46 alert(i18n('File was not saved.')); 47 <? } ?>47 <?php } ?> 48 48 49 49 </script> 50 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/editorFrame.js"></script>50 <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/editorFrame.js"></script> 51 51 </head> 52 52 53 53 <body> 54 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) { ?>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 57 <div style="text-align:center; padding:10px;"><span class="error">GIF format is not supported, image editing not supported.</span></div> 58 <? } ?>58 <?php } ?> 59 59 <table height="100%" width="100%"> 60 60 <tr> 61 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 { ?>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 65 <span class="error">No Image Available</span> 66 <? } ?>66 <?php } ?> 67 67 </td> 68 68 </tr> -
trunk/plugins/ImageManager/images.php
r60 r111 62 62 <td> 63 63 64 <? _ddt( __FILE__, __LINE__, "drawFiles(): relative is '" . $file['relative'] . "' thumbnail '" . $manager->getThumbnail($file['relative']) . "'" ); ?>64 <?php _ddt( __FILE__, __LINE__, "drawFiles(): relative is '" . $file['relative'] . "' thumbnail '" . $manager->getThumbnail($file['relative']) . "'" ); ?> 65 65 66 66 <table width="100" cellpadding="0" cellspacing="0"><tr><td class="block"> 67 68 <a href="javascript:;" onclick="selectImage('<? echo $file['relative'];?>', '<? echo $entry; ?>', <? echo $file['image'][0];?>, <? echo $file['image'][1]; ?>);"title="<? echo $entry; ?> - <? echo Files::formatSize($file['stat']['size']); ?>"><img src="<? print $manager->getThumbnail($file['relative']); ?>" alt="<? echo $entry; ?> - <? echo Files::formatSize($file['stat']['size']); ?>"/></a> 67 <table width="100" cellpadding="0" cellspacing="0"><tr><td class="block" style="cursor: pointer;" onclick="selectImage('<? echo $file['relative'];?>', '<? echo $entry; ?>', <? echo $file['image'][0];?>, <? echo $file['image'][1]; ?>);" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"> 68 69 <img src="<?php print $manager->getThumbnail($file['relative']); ?>" alt="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"/> 69 70 </td></tr><tr><td class="edit"> 70 <a href="<? print $IMConfig['backend_url']; ?>__function=images&dir=<? echo $relative; ?>&delf=<? echo rawurlencode($file['relative']);?>" title="Trash" onclick="return confirmDeleteFile('<? echo $entry; ?>');"><img src="<? print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a><a href="javascript:;" title="Edit" onclick="editImage('<? echo rawurlencode($file['relative']);?>');"><img src="<?print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit"/></a>71 <? if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } else echo $entry;?>71 <a href="<?php print $IMConfig['backend_url']; ?>__function=images&dir=<?php echo $relative; ?>&delf=<?php echo rawurlencode($file['relative']);?>" title="Trash" onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a><a href="javascript:;" title="Edit" onclick="editImage('<?php echo rawurlencode($file['relative']);?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit"/></a> 72 <?php if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } else echo $entry;?> 72 73 </td></tr></table></td> 73 <? 74 <?php 74 75 }//foreach 75 76 }//function drawFiles … … 87 88 { ?> 88 89 <td><table width="100" cellpadding="0" cellspacing="0"><tr><td class="block"> 89 <a href="images.php?dir=<? echo rawurlencode($path); ?>" onclick="updateDir('<? echo $path; ?>')" title="<? echo $dir['entry']; ?>"><img src="<? print $IMConfig['base_url'];?>img/folder.gif" height="80" width="80" alt="<?echo $dir['entry']; ?>" /></a>90 <a href="images.php?dir=<?php echo rawurlencode($path); ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>"><img src="<?php print $IMConfig['base_url'];?>img/folder.gif" height="80" width="80" alt="<?php echo $dir['entry']; ?>" /></a> 90 91 </td></tr><tr> 91 92 <td class="edit"> 92 <a href="images.php?dir=<? echo $relative; ?>&deld=<? echo rawurlencode($path); ?>" title="Trash" onclick="return confirmDeleteDir('<? echo $dir['entry']; ?>', <? echo $dir['count']; ?>);"><img src="<?print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a>93 <? echo $dir['entry']; ?>93 <a href="images.php?dir=<?php echo $relative; ?>&deld=<?php echo rawurlencode($path); ?>" title="Trash" onclick="return confirmDeleteDir('<?php echo $dir['entry']; ?>', <?php echo $dir['count']; ?>);"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a> 94 <?php echo $dir['entry']; ?> 94 95 </td> 95 96 </tr></table></td> 96 <? 97 <?php 97 98 } //foreach 98 99 }//function drawDirs … … 121 122 <table width="100%"> 122 123 <tr> 123 <td class="error">Invalid base directory: <? echo $manager->config['images_dir']; ?></td>124 <td class="error">Invalid base directory: <?php echo $manager->config['images_dir']; ?></td> 124 125 </tr> 125 126 </table> … … 134 135 <title>Image List</title> 135 136 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 136 <link href="<? print $IMConfig['base_url'];?>assets/imagelist.css" rel="stylesheet" type="text/css" />137 <link href="<?php print $IMConfig['base_url'];?>assets/imagelist.css" rel="stylesheet" type="text/css" /> 137 138 <script type="text/javascript"> 138 _backend_url = "<? print $IMConfig['backend_url']; ?>";139 _backend_url = "<?php print $IMConfig['backend_url']; ?>"; 139 140 </script> 140 141 141 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/dialog.js"></script>142 <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script> 142 143 <script type="text/javascript"> 143 144 /*<![CDATA[*/ … … 159 160 var topDoc = window.top.document; 160 161 161 <? 162 <?php 162 163 //we need to refesh the drop directory list 163 164 //save the current dir, delete all select options … … 173 174 { selection.remove(0); } 174 175 175 selection.options[selection.length] = new Option("/","<? echo rawurlencode('/'); ?>");176 <? foreach($dirs as $relative=>$fullpath) { ?>177 selection.options[selection.length] = new Option("<? echo $relative; ?>","<?echo rawurlencode($relative); ?>");178 <? } ?>176 selection.options[selection.length] = new Option("/","<?php echo rawurlencode('/'); ?>"); 177 <?php foreach($dirs as $relative=>$fullpath) { ?> 178 selection.options[selection.length] = new Option("<?php echo $relative; ?>","<?php echo rawurlencode($relative); ?>"); 179 <?php } ?> 179 180 180 181 for(var i = 0; i < selection.length; i++) … … 187 188 } 188 189 } 189 <? } ?>190 <?php } ?> 190 191 } 191 192 192 193 function editImage(image) 193 194 { 194 var url = "<? print $IMConfig['backend_url']; ?>__function=editor&img="+image;195 var url = "<?php print $IMConfig['backend_url']; ?>__function=editor&img="+image; 195 196 Dialog(url, function(param) 196 197 { … … 206 207 /*]]>*/ 207 208 </script> 208 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/images.js"></script>209 <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/images.js"></script> 209 210 </head> 210 211 211 212 <body> 212 <? if ($manager->isValidBase() == false) { drawErrorBase($manager); }213 <?php if ($manager->isValidBase() == false) { drawErrorBase($manager); } 213 214 elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?> 214 215 <table> 215 216 <tr> 216 <? drawDirs($list[0], $manager); ?>217 <? drawFiles($list[1], $manager); ?>217 <?php drawDirs($list[0], $manager); ?> 218 <?php drawFiles($list[1], $manager); ?> 218 219 </tr> 219 220 </table> 220 <? } else { drawNoResults(); } ?>221 <?php } else { drawNoResults(); } ?> 221 222 </body> 222 223 </html> -
trunk/plugins/ImageManager/manager.php
r60 r111 1 <? 1 <?php 2 2 /** 3 3 * The main GUI for the ImageManager. … … 22 22 <script type="text/javascript"> 23 23 24 <? // temporary. An ImageManager rewrite will take care of this kludge. ?>24 <?php // temporary. An ImageManager rewrite will take care of this kludge. ?> 25 25 26 _backend_url = "<? print $IMConfig['backend_url']; ?>";26 _backend_url = "<?php print $IMConfig['backend_url']; ?>"; 27 27 </script> 28 28 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 29 <link href="<? print $IMConfig['base_url'];?>assets/manager.css" rel="stylesheet" type="text/css" />30 <script type="text/javascript" src=" <? print $IMConfig['base_url'];?>assets/popup.js"></script>31 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/dialog.js"></script>29 <link href="<?php print $IMConfig['base_url'];?>assets/manager.css" rel="stylesheet" type="text/css" /> 30 <script type="text/javascript" src="../../popups/popup.js"></script> 31 <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script> 32 32 <script type="text/javascript"> 33 33 /*<![CDATA[*/ … … 37 37 HTMLArea = window.opener.HTMLArea; 38 38 39 var thumbdir = "<? echo $IMConfig['thumbnail_dir']; ?>";40 var base_url = "<? echo $manager->getImagesURL(); ?>";39 var thumbdir = "<?php echo $IMConfig['thumbnail_dir']; ?>"; 40 var base_url = "<?php echo $manager->getImagesURL(); ?>"; 41 41 /*]]>*/ 42 42 </script> 43 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/manager.js"></script>43 <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/manager.js"></script> 44 44 </head> 45 45 <body> 46 46 <div class="title">Insert Image</div> 47 <form action="<? print $IMConfig['backend_url'] ?>" id="uploadForm" method="post" enctype="multipart/form-data">47 <form action="<?php print $IMConfig['backend_url'] ?>" id="uploadForm" method="post" enctype="multipart/form-data"> 48 48 49 <? // we have to propagate our values through forms ?>49 <?php // we have to propagate our values through forms ?> 50 50 51 51 <input type="hidden" name="__plugin" value="ImageManager"> … … 57 57 <select name="dir" class="dirWidth" id="dirPath" onchange="updateDir(this)"> 58 58 <option value="/">/</option> 59 <? foreach($dirs as $relative=>$fullpath) { ?>60 <option value="<? echo rawurlencode($relative); ?>"><?echo $relative; ?></option>61 <? } ?>59 <?php foreach($dirs as $relative=>$fullpath) { ?> 60 <option value="<?php echo rawurlencode($relative); ?>"><?php echo $relative; ?></option> 61 <?php } ?> 62 62 </select> 63 <a href="#" onclick="javascript: goUpDir();" title="Directory Up"><img src="<? print $IMConfig['base_url']; ?>img/btnFolderUp.gif" height="15" width="15" alt="Directory Up" /></a>64 <? if($IMConfig['safe_mode'] == false && $IMConfig['allow_new_dir']) { ?>65 <a href="#" onclick="newFolder();" title="New Folder"><img src="<? print $IMConfig['base_url']; ?>img/btnFolderNew.gif" height="15" width="15" alt="New Folder" /></a>66 <? } ?>67 <div id="messages" style="display: none;"><span id="message"></span><img SRC="<? print $IMConfig['base_url']; ?>img/dots.gif" width="22" height="12" alt="..." /></div>68 <iframe src="<? print $IMConfig['backend_url']; ?>__function=images" name="imgManager" id="imgManager" class="imageFrame" scrolling="auto" title="Image Selection" frameborder="0"></iframe>63 <a href="#" onclick="javascript: goUpDir();" title="Directory Up"><img src="<?php print $IMConfig['base_url']; ?>img/btnFolderUp.gif" height="15" width="15" alt="Directory Up" /></a> 64 <?php if($IMConfig['safe_mode'] == false && $IMConfig['allow_new_dir']) { ?> 65 <a href="#" onclick="newFolder();" title="New Folder"><img src="<?php print $IMConfig['base_url']; ?>img/btnFolderNew.gif" height="15" width="15" alt="New Folder" /></a> 66 <?php } ?> 67 <div id="messages" style="display: none;"><span id="message"></span><img SRC="<?php print $IMConfig['base_url']; ?>img/dots.gif" width="22" height="12" alt="..." /></div> 68 <iframe src="<?php print $IMConfig['backend_url']; ?>__function=images" name="imgManager" id="imgManager" class="imageFrame" scrolling="auto" title="Image Selection" frameborder="0"></iframe> 69 69 </div> 70 70 </fieldset> … … 77 77 <td align="right"><label for="f_width">Width</label></td> 78 78 <td><input type="text" id="f_width" class="smallWidth" value="" onchange="javascript:checkConstrains('width');"/></td> 79 <td rowspan="2" align="right"><img src="<? print $IMConfig['base_url']; ?>img/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" /></td>79 <td rowspan="2" align="right"><img src="<?php print $IMConfig['base_url']; ?>img/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" /></td> 80 80 <td rowspan="3" align="right"> </td> 81 81 <td align="right"><label for="f_vert">V Space</label></td> … … 91 91 </tr> 92 92 <tr> 93 <? if($IMConfig['allow_upload'] == true) { ?>93 <?php if($IMConfig['allow_upload'] == true) { ?> 94 94 <td align="right"><label for="upload">Upload</label></td> 95 95 <td> … … 101 101 </table> 102 102 </td> 103 <? } else { ?>103 <?php } else { ?> 104 104 <td colspan="2"></td> 105 <? } ?>106 <td align="right"><label for="f_align">Align </label></td>105 <?php } ?> 106 <td align="right"><label for="f_align">Alignment:</label></td> 107 107 <td colspan="2"> 108 108 <select size="1" id="f_align" title="Positioning of this image"> 109 <option value="" >Not Set</option>109 <option value="" >Not set</option> 110 110 <option value="left" >Left</option> 111 111 <option value="right" >Right</option> -
trunk/plugins/ImageManager/thumbs.php
r43 r111 1 <? 1 <?php 2 2 /** 3 3 * On the fly Thumbnail generation.
