[111] | 1 | <?php |
---|
[43] | 2 | /** |
---|
| 3 | * The main GUI for the ImageManager. |
---|
[677] | 4 | * @author $Author$ |
---|
| 5 | * @version $Id$ |
---|
[43] | 6 | * @package ImageManager |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | require_once('config.inc.php'); |
---|
| 10 | require_once('ddt.php'); |
---|
| 11 | require_once('Classes/ImageManager.php'); |
---|
| 12 | |
---|
| 13 | $manager = new ImageManager($IMConfig); |
---|
| 14 | $dirs = $manager->getDirs(); |
---|
| 15 | |
---|
| 16 | ?> |
---|
| 17 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 18 | |
---|
| 19 | <html> |
---|
| 20 | <head> |
---|
| 21 | <title>Insert Image</title> |
---|
[256] | 22 | <script type="text/javascript"> |
---|
| 23 | // temporary. An ImageManager rewrite will take care of this kludge. |
---|
| 24 | _backend_url = "<?php print $IMConfig['backend_url']; ?>"; |
---|
| 25 | _resized_prefix = "<?php echo $IMConfig['resized_prefix']; ?>"; |
---|
| 26 | _resized_dir = "<?php echo $IMConfig['resized_dir']; ?>"; |
---|
| 27 | </script> |
---|
[43] | 28 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
[256] | 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> |
---|
[252] | 31 | <script type="text/javascript" src="assets/popup.js"></script> |
---|
[700] | 32 | <script type="text/javascript" src="../../modules/ColorPicker/ColorPicker.js"></script> |
---|
[111] | 33 | <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script> |
---|
[43] | 34 | <script type="text/javascript"> |
---|
| 35 | /*<![CDATA[*/ |
---|
| 36 | if(window.opener) |
---|
[60] | 37 | HTMLArea = window.opener.HTMLArea; |
---|
[43] | 38 | |
---|
[111] | 39 | var thumbdir = "<?php echo $IMConfig['thumbnail_dir']; ?>"; |
---|
| 40 | var base_url = "<?php echo $manager->getImagesURL(); ?>"; |
---|
[43] | 41 | /*]]>*/ |
---|
| 42 | </script> |
---|
[111] | 43 | <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/manager.js"></script> |
---|
[830] | 44 | <?php |
---|
| 45 | if(!$IMConfig['show_full_options']) |
---|
| 46 | { |
---|
| 47 | ?> |
---|
| 48 | <style type="text/css"> |
---|
| 49 | .fullOptions { visibility:hidden; } |
---|
| 50 | </style> |
---|
| 51 | <?php |
---|
| 52 | } |
---|
| 53 | ?> |
---|
[43] | 54 | </head> |
---|
| 55 | <body> |
---|
[493] | 56 | |
---|
[111] | 57 | <form action="<?php print $IMConfig['backend_url'] ?>" id="uploadForm" method="post" enctype="multipart/form-data"> |
---|
[43] | 58 | |
---|
[48] | 59 | <input type="hidden" name="__plugin" value="ImageManager"> |
---|
| 60 | <input type="hidden" name="__function" value="images"> |
---|
[43] | 61 | |
---|
[256] | 62 | <fieldset> |
---|
| 63 | <legend>Image Manager</legend> |
---|
| 64 | <table width="100%"> |
---|
| 65 | <tr> |
---|
| 66 | <th><label for="dirPath">Directory</label></th> |
---|
| 67 | <td> |
---|
| 68 | <select name="dir" class="dirWidth" id="dirPath" onchange="updateDir(this)"> |
---|
| 69 | <option value="/">/</option> |
---|
| 70 | <?php |
---|
| 71 | foreach($dirs as $relative=>$fullpath) |
---|
| 72 | { |
---|
| 73 | ?> |
---|
| 74 | <option value="<?php echo rawurlencode($relative); ?>"><?php echo $relative; ?></option> |
---|
| 75 | <?php |
---|
| 76 | } |
---|
| 77 | ?> |
---|
| 78 | </select> |
---|
| 79 | </td> |
---|
| 80 | <td> |
---|
| 81 | <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> |
---|
| 82 | |
---|
| 83 | <?php |
---|
| 84 | if($IMConfig['safe_mode'] == false && $IMConfig['allow_new_dir']) |
---|
| 85 | { |
---|
| 86 | ?> |
---|
| 87 | <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> |
---|
| 88 | <?php |
---|
| 89 | } |
---|
| 90 | ?> |
---|
| 91 | </td> |
---|
| 92 | </tr> |
---|
| 93 | <?php |
---|
| 94 | if($IMConfig['allow_upload'] == TRUE) |
---|
| 95 | { |
---|
| 96 | ?> |
---|
| 97 | <tr> |
---|
| 98 | <th align="left">Upload:</th> |
---|
| 99 | <td colspan="2"> |
---|
| 100 | <input type="file" name="upload" id="upload" /> |
---|
| 101 | <input name="Upload" type="submit" id="Upload" value="Upload" onclick="doUpload();" /> |
---|
| 102 | </td> |
---|
| 103 | </tr> |
---|
| 104 | <?php |
---|
| 105 | } |
---|
| 106 | ?> |
---|
| 107 | |
---|
| 108 | </table> |
---|
| 109 | |
---|
| 110 | <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> |
---|
| 111 | |
---|
| 112 | <iframe src="<?php print $IMConfig['backend_url']; ?>__function=images" name="imgManager" id="imgManager" class="imageFrame" scrolling="auto" title="Image Selection" frameborder="0"></iframe> |
---|
| 113 | |
---|
[43] | 114 | </fieldset> |
---|
[256] | 115 | |
---|
[43] | 116 | <!-- image properties --> |
---|
[256] | 117 | |
---|
[447] | 118 | <table border="0" cellspacing="0" cellpadding="0" width="100%"> |
---|
[256] | 119 | <tr> |
---|
| 120 | <th align="left">Description:</th> |
---|
| 121 | <td colspan="6"> |
---|
[447] | 122 | <input type="text" id="f_alt" style="width:95%"/> |
---|
[256] | 123 | </td> |
---|
[447] | 124 | <td rowspan="4" width="100" height="100" valign="middle" style="padding:4px;background-color:#CCC;border:1px inset;"> |
---|
| 125 | <img src="" id="f_preview" /> |
---|
| 126 | </td> |
---|
[256] | 127 | </tr> |
---|
| 128 | |
---|
| 129 | <tr> |
---|
| 130 | <th align="left">Width:</th> |
---|
| 131 | <td > |
---|
| 132 | <input id="f_width" type="text" name="f_width" size="4" onchange="javascript:checkConstrains('width');" /> |
---|
| 133 | </td> |
---|
| 134 | <td rowspan="2"> |
---|
| 135 | <div style="position:relative"> |
---|
| 136 | <img src="<?php print $IMConfig['base_url']; ?>img/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" valign="middle" /><input type="checkbox" id="constrain_prop" checked="checked" onclick="javascript:toggleConstrains(this);" style="position:absolute;top:8px;left:0px;" /> |
---|
| 137 | </div> |
---|
| 138 | </td> |
---|
[830] | 139 | <th align="left" class="fullOptions">Margin:</th> |
---|
| 140 | <td colspan="3" class="fullOptions"> |
---|
[256] | 141 | <input name="f_margin" type="text" id="f_margin" size="3" /> |
---|
| 142 | px </td> |
---|
| 143 | </tr> |
---|
| 144 | |
---|
| 145 | <tr> |
---|
| 146 | <th align="left">Height:</th> |
---|
| 147 | <td> |
---|
| 148 | <input name="f_height" type="text" id="f_height" size="4" /> |
---|
| 149 | </td> |
---|
[830] | 150 | <th align="left" class="fullOptions">Padding:</th> |
---|
| 151 | <td class="fullOptions"> |
---|
[256] | 152 | <input name="f_padding" type="text" id="f_padding" size="3" /> |
---|
| 153 | px </td> |
---|
[830] | 154 | <th align="left" class="fullOptions">Color:</th> |
---|
| 155 | <td class="fullOptions"> |
---|
[256] | 156 | <input name="f_backgroundColor" type="text" id="f_backgroundColor" size="7" /> |
---|
[770] | 157 | |
---|
[256] | 158 | </td> |
---|
| 159 | </tr> |
---|
| 160 | |
---|
| 161 | |
---|
[830] | 162 | <tr class="fullOptions"> |
---|
[524] | 163 | <th align="left">Alignment:</th> |
---|
[256] | 164 | <td colspan="2"> |
---|
| 165 | <select size="1" id="f_align" title="Positioning of this image"> |
---|
| 166 | <option value="" >Not set</option> |
---|
| 167 | <option value="left" >Left</option> |
---|
| 168 | <option value="right" >Right</option> |
---|
| 169 | <option value="texttop" >Texttop</option> |
---|
| 170 | <option value="absmiddle" >Absmiddle</option> |
---|
| 171 | <option value="baseline" selected="selected" >Baseline</option> |
---|
| 172 | <option value="absbottom" >Absbottom</option> |
---|
| 173 | <option value="bottom" >Bottom</option> |
---|
| 174 | <option value="middle" >Middle</option> |
---|
| 175 | <option value="top" >Top</option> |
---|
| 176 | </select> |
---|
| 177 | </td> |
---|
| 178 | <th align="left">Border:</th> |
---|
| 179 | <td> |
---|
| 180 | <input name="f_border" type="text" id="f_border" size="3" /> |
---|
| 181 | px </td> |
---|
| 182 | <th align="left">Color:</th> |
---|
| 183 | <td> |
---|
| 184 | <input name="f_borderColor" type="text" id="f_borderColor" size="7" /> |
---|
[770] | 185 | |
---|
[256] | 186 | </td> |
---|
| 187 | </tr> |
---|
| 188 | |
---|
| 189 | </table> |
---|
| 190 | |
---|
| 191 | <div style="text-align: right;"> |
---|
| 192 | <hr /> |
---|
| 193 | <button type="button" class="buttons" onclick="return refresh();">Refresh</button> |
---|
| 194 | <button type="button" class="buttons" onclick="return onOK();">OK</button> |
---|
| 195 | <button type="button" class="buttons" onclick="return onCancel();">Cancel</button> |
---|
| 196 | </div> |
---|
| 197 | |
---|
| 198 | <!--// image properties --> |
---|
| 199 | <input type="hidden" id="orginal_width" /> |
---|
| 200 | <input type="hidden" id="orginal_height" /> |
---|
| 201 | <input type="hidden" id="f_url" class="largelWidth" value="" /> |
---|
[43] | 202 | </form> |
---|
| 203 | </body> |
---|
[256] | 204 | </html> |
---|