1 | <?php
|
---|
2 | /**
|
---|
3 | * ExtendedFileManager images.php file. Shows folders and files.
|
---|
4 | * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz, Raimund Meyer
|
---|
5 | * Version: Updated on 08-01-2005 by Afru
|
---|
6 | * Version: Updated on 04-07-2006 by Krzysztof Kotowicz
|
---|
7 | * Version: Updated on 29-10-2006 by Raimund Meyer
|
---|
8 | * Package: ExtendedFileManager (EFM 1.1.3)
|
---|
9 | * http://www.afrusoft.com/htmlarea
|
---|
10 | */
|
---|
11 |
|
---|
12 | if(isset($_REQUEST['mode'])) $insertMode=$_REQUEST['mode'];
|
---|
13 | if(!isset($insertMode)) $insertMode="image";
|
---|
14 |
|
---|
15 | require_once('config.inc.php');
|
---|
16 | require_once('Classes/ExtendedFileManager.php');
|
---|
17 |
|
---|
18 | //default path is /
|
---|
19 | $relative = '/';
|
---|
20 | $manager = new ExtendedFileManager($IMConfig, $insertMode);
|
---|
21 |
|
---|
22 | //process any file uploads
|
---|
23 | $uploadStatus=$manager->processUploads();
|
---|
24 |
|
---|
25 | //process any file renames
|
---|
26 | $renameStatus=$manager->processRenames();
|
---|
27 |
|
---|
28 | //process paste
|
---|
29 | if (isset($_GET['paste']))
|
---|
30 | $pasteStatus = $manager->processPaste();
|
---|
31 |
|
---|
32 | if ($manager->deleteFiles())
|
---|
33 | $refreshFile = true;
|
---|
34 |
|
---|
35 | $refreshDir = false;
|
---|
36 | //process any directory functions
|
---|
37 | if($manager->deleteDirs() || $manager->processNewDir() || $pasteStatus || $renameStatus )
|
---|
38 | $refreshDir = true;
|
---|
39 |
|
---|
40 |
|
---|
41 | $diskInfo=$manager->getDiskInfo();
|
---|
42 |
|
---|
43 | //check for any sub-directory request
|
---|
44 | //check that the requested sub-directory exists
|
---|
45 | //and valid
|
---|
46 | if(isset($_REQUEST['dir']))
|
---|
47 | {
|
---|
48 | $path = rawurldecode($_REQUEST['dir']);
|
---|
49 | if($manager->validRelativePath($path))
|
---|
50 | $relative = $path;
|
---|
51 | }
|
---|
52 |
|
---|
53 |
|
---|
54 | $afruViewType="";
|
---|
55 | if(isset($_REQUEST['viewtype']))
|
---|
56 | {
|
---|
57 | $afruViewType=$_REQUEST['viewtype'];
|
---|
58 | }
|
---|
59 | if($afruViewType!="thumbview" && $afruViewType!="listview")
|
---|
60 |
|
---|
61 | $afruViewType=$IMConfig['view_type'];
|
---|
62 |
|
---|
63 | //get the list of files and directories
|
---|
64 | $list = $manager->getFiles($relative);
|
---|
65 |
|
---|
66 |
|
---|
67 | /* ================= OUTPUT/DRAW FUNCTIONS ======================= */
|
---|
68 |
|
---|
69 |
|
---|
70 | /**
|
---|
71 | * Draw folders and files. Changed by Afru
|
---|
72 | */
|
---|
73 | function drawDirs_Files($list, &$manager)
|
---|
74 | {
|
---|
75 | global $relative, $afruViewType, $IMConfig, $insertMode;
|
---|
76 |
|
---|
77 | switch ($afruViewType) {
|
---|
78 | case 'listview':
|
---|
79 | $maxNameLength = 30;
|
---|
80 | ?>
|
---|
81 | <table class="listview">
|
---|
82 | <thead>
|
---|
83 | <tr><th colspan="2">Name</th><th>Size</th><th>Image Size</th><th>Date Modified</th><th> </th></tr></thead>
|
---|
84 | <tbody>
|
---|
85 | <?php
|
---|
86 | // start of foreach for draw listview folders .
|
---|
87 | foreach($list[0] as $path => $dir)
|
---|
88 | { ?>
|
---|
89 | <tr>
|
---|
90 | <td><img src="<?php print $IMConfig['base_url'];?>icons/folder_small.gif" alt="" /></td>
|
---|
91 | <th nowrap="nowrap"><a href="<?php print $IMConfig['backend_url']; ?>__function=images&mode=<?php echo $insertMode;?>&dir=<?php echo rawurlencode($path); ?>&viewtype=<?php echo $afruViewType; ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>">
|
---|
92 | <?php
|
---|
93 | if(strlen($dir['entry'])>$maxNameLength) echo substr($dir['entry'],0,$maxNameLength)."..."; else echo $dir['entry'];
|
---|
94 | ?>
|
---|
95 | </a></th>
|
---|
96 | <td colspan="2" nowrap="nowrap">Folder</td>
|
---|
97 |
|
---|
98 | <td nowrap="nowrap"><?php echo date("d.m.y H:i",$dir['stat']['mtime']); ?></td>
|
---|
99 |
|
---|
100 | <td class="actions" nowrap="nowrap">
|
---|
101 | <a href="<?php print $IMConfig['backend_url']; ?>__function=images&mode=<?php echo $insertMode;?>&dir=<?php echo $relative; ?>&deld=<?php echo rawurlencode($path); ?>&viewtype=<?php echo $afruViewType; ?>" title="Trash" onclick="return confirmDeleteDir('<?php echo $dir['entry']; ?>', <?php echo $dir['count']; ?>);" style="border:0px;"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash" border="0" /></a>
|
---|
102 | <?php if ($IMConfig['allow_rename']) { ?>
|
---|
103 | <a href="#" title="Rename" onclick="renameDir('<?php echo rawurlencode($dir['entry']);?>'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_rename.gif" height="15" width="15" alt="Rename" border="0" /></a>
|
---|
104 | <?php } ?>
|
---|
105 | <?php if ($IMConfig['allow_cut_copy_paste']) { ?>
|
---|
106 | <a href="#" title="Cut" onclick="copyDir('<?php echo rawurlencode($dir['entry']);?>','move'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_cut.gif" height="15" width="15" alt="Cut" /></a>
|
---|
107 | <a href="#" title="Copy" onclick="copyDir('<?php echo rawurlencode($dir['entry']);?>','copy'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_copy.gif" height="15" width="15" alt="Copy" /></a>
|
---|
108 | <?php } ?>
|
---|
109 | </td>
|
---|
110 | </tr>
|
---|
111 | <?php
|
---|
112 | } // end of foreach for draw listview folders .
|
---|
113 |
|
---|
114 | clearstatcache();
|
---|
115 |
|
---|
116 | // start of foreach for draw listview files .
|
---|
117 | foreach($list[1] as $entry => $file)
|
---|
118 | {
|
---|
119 | ?>
|
---|
120 | <tr>
|
---|
121 | <td><img src="<?php print $IMConfig['base_url']; if(is_file('icons/'.$file['ext'].'_small.gif')) echo "icons/".$file['ext']."_small.gif"; else echo $IMConfig['default_listicon']; ?>" alt="" /></td>
|
---|
122 | <th><a href="#" class="thumb" style="cursor: pointer;" ondblclick="this.onclick();window.top.onOK();" onclick="selectImage('<?php echo $file['relative'];?>', '<?php echo preg_replace('#\..{3,4}$#', '', $entry); ?>', <?php echo $file['image'][0];?>, <?php echo $file['image'][1]; ?>);return false;" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>" <?php if ($insertMode == 'image') { ?> onmouseover="showPreview('<?php echo $file['relative'];?>')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" <?php } ?> >
|
---|
123 | <?php
|
---|
124 | if(strlen($entry)>$maxNameLength) echo substr($entry,0,$maxNameLength)."..."; else echo $entry;
|
---|
125 | ?>
|
---|
126 | </a></th>
|
---|
127 | <td><?php echo Files::formatSize($file['stat']['size']); ?></td>
|
---|
128 | <td><?php if($file['image'][0] > 0){ echo $file['image'][0].'x'.$file['image'][1]; } ?></td>
|
---|
129 | <td nowrap="nowrap"><?php echo date("d.m.y H:i",$file['stat']['mtime']); ?></td>
|
---|
130 | <td class="actions">
|
---|
131 | <?php if($IMConfig['img_library'] && $IMConfig['allow_edit_image'] && $file['image'][0] > 0) { ?>
|
---|
132 | <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" border="0" /></a>
|
---|
133 | <?php } ?>
|
---|
134 | <a href="<?php print $IMConfig['backend_url']; ?>__function=images&dir=<?php echo $relative; ?>&delf=<?php echo rawurlencode($file['relative']);?>&mode=<?php echo $insertMode;?>&viewtype=<?php echo $afruViewType; ?>" 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" border="0" /></a>
|
---|
135 | <?php if ($IMConfig['allow_rename']) { ?>
|
---|
136 | <a href="#" title="Rename" onclick="renameFile('<?php echo rawurlencode($file['relative']);?>'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_rename.gif" height="15" width="15" alt="Rename" border="0" /></a>
|
---|
137 | <?php } ?>
|
---|
138 | <?php if ($IMConfig['allow_cut_copy_paste']) { ?>
|
---|
139 | <a href="#" title="Cut" onclick="copyFile('<?php echo rawurlencode($entry);?>','move'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_cut.gif" height="15" width="15" alt="Cut" /></a>
|
---|
140 | <a href="#" title="Copy" onclick="copyFile('<?php echo rawurlencode($entry);?>','copy'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_copy.gif" height="15" width="15" alt="Copy" /></a>
|
---|
141 | <?php $thisFileNameLength -= 6; } ?>
|
---|
142 | </td>
|
---|
143 | </tr>
|
---|
144 | <?php
|
---|
145 | }//end of foreach of draw listview files
|
---|
146 | ?>
|
---|
147 | </tbody>
|
---|
148 | </table>
|
---|
149 | <?php
|
---|
150 | break;
|
---|
151 | case 'thumbview': // thumbview is default
|
---|
152 | default:
|
---|
153 | $maxFileNameLength=16;
|
---|
154 | $maxFolderNameLength=16;
|
---|
155 | // start of foreach for draw thumbview folders.
|
---|
156 | foreach($list[0] as $path => $dir)
|
---|
157 | { ?>
|
---|
158 | <div class="dir_holder">
|
---|
159 | <a class="dir" href="<?php print $IMConfig['backend_url'];?>__function=images&mode=<?php echo $insertMode;?>&dir=<?php echo rawurlencode($path); ?>&viewtype=<?php echo $afruViewType; ?>" 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>
|
---|
160 |
|
---|
161 | <div class="fileName">
|
---|
162 | <?php if(strlen($dir['entry']) > $maxFolderNameLength)
|
---|
163 | echo substr($dir['entry'], 0, $maxFolderNameLength) . "...";
|
---|
164 | else
|
---|
165 | echo $dir['entry']; ?>
|
---|
166 | </div>
|
---|
167 | <div class="edit">
|
---|
168 | <a href="<?php print $IMConfig['backend_url'];?>__function=images&mode=<?php echo $insertMode;?>&dir=<?php echo $relative; ?>&deld=<?php echo rawurlencode($path); ?>&viewtype=<?php echo $afruViewType; ?>" 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>
|
---|
169 | <?php if ($IMConfig['allow_rename']) { ?>
|
---|
170 | <a href="#" title="Rename" onclick="renameDir('<?php echo rawurlencode($dir['entry']);?>'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_rename.gif" height="15" width="15" alt="Rename" border="0" /></a>
|
---|
171 | <?php } ?>
|
---|
172 | <?php if ($IMConfig['allow_cut_copy_paste']) { ?>
|
---|
173 | <a href="#" title="Cut" onclick="copyDir('<?php echo rawurlencode($dir['entry']);?>','move'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_cut.gif" height="15" width="15" alt="Cut" /></a>
|
---|
174 | <a href="#" title="Copy" onclick="copyDir('<?php echo rawurlencode($dir['entry']);?>','copy'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_copy.gif" height="15" width="15" alt="Copy" /></a>
|
---|
175 | <?php } ?>
|
---|
176 | </div>
|
---|
177 | </div>
|
---|
178 | <?php
|
---|
179 | } // end of foreach for draw thumbview folders.
|
---|
180 |
|
---|
181 |
|
---|
182 | // start of foreach for draw thumbview files.
|
---|
183 | foreach($list[1] as $entry => $file)
|
---|
184 | {
|
---|
185 | $afruimgdimensions=$manager->checkImageSize($file['relative']);
|
---|
186 | $thisFileNameLength = $maxFileNameLength;
|
---|
187 | ?>
|
---|
188 | <div class="thumb_holder" id="holder_<?php echo asc2hex($entry) ?>">
|
---|
189 | <a href="#" class="thumb" style="cursor: pointer;" ondblclick="this.onclick();window.top.onOK();" onclick="selectImage('<?php echo $file['relative'];?>', '<?php echo preg_replace('#\..{3,4}$#', '', $entry); ?>', <?php echo $file['image'][0];?>, <?php echo $file['image'][1]; ?>);return false;" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>">
|
---|
190 | <img src="<?php print $manager->getThumbnail($file['relative']); ?>" alt="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>" />
|
---|
191 | </a>
|
---|
192 | <div class="fileName">
|
---|
193 | <?php
|
---|
194 | if(strlen($entry) > $thisFileNameLength + 3) echo strtolower(substr($entry,0,$thisFileNameLength))."..."; else echo $entry;
|
---|
195 | ?>
|
---|
196 | </div>
|
---|
197 | <div class="edit">
|
---|
198 | <?php if($IMConfig['img_library'] && $IMConfig['allow_edit_image'] && $file['image'][0] > 0 )
|
---|
199 | { ?>
|
---|
200 | <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>
|
---|
201 | <?php $thisFileNameLength -= 3; } ?>
|
---|
202 | <a href="<?php print $IMConfig['backend_url']; ?>__function=images&mode=<?php echo $insertMode;?>&dir=<?php echo $relative; ?>&delf=<?php echo rawurlencode($file['relative']);?>&viewtype=<?php echo $afruViewType; ?>" 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>
|
---|
203 | <?php if ($IMConfig['allow_rename']) { ?>
|
---|
204 | <a href="#" title="Rename" onclick="renameFile('<?php echo rawurlencode($file['relative']);?>'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_rename.gif" height="15" width="15" alt="Rename" /></a>
|
---|
205 | <?php $thisFileNameLength -= 3; } ?>
|
---|
206 | <?php if ($IMConfig['allow_cut_copy_paste']) { ?>
|
---|
207 | <a href="#" title="Cut" onclick="copyFile('<?php echo rawurlencode($entry);?>','move'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_cut.gif" height="15" width="15" alt="Cut" /></a>
|
---|
208 | <a href="#" title="Copy" onclick="copyFile('<?php echo rawurlencode($entry);?>','copy'); return false;"><img src="<?php print $IMConfig['base_url'];?>img/edit_copy.gif" height="15" width="15" alt="Copy" /></a>
|
---|
209 | <?php $thisFileNameLength -= 6; } ?>
|
---|
210 |
|
---|
211 | </div>
|
---|
212 | </div>
|
---|
213 | <?php
|
---|
214 | }//end of foreach of draw thumbview files
|
---|
215 |
|
---|
216 | }
|
---|
217 | }//end of function drawDirs_Files
|
---|
218 |
|
---|
219 |
|
---|
220 | /**
|
---|
221 | * No directories and no files.
|
---|
222 | */
|
---|
223 | function drawNoResults()
|
---|
224 | {
|
---|
225 | ?>
|
---|
226 | <div class="noResult">No Files Found</div>
|
---|
227 | <?php
|
---|
228 | }
|
---|
229 |
|
---|
230 | /**
|
---|
231 | * No directories and no files.
|
---|
232 | */
|
---|
233 | function drawErrorBase(&$manager)
|
---|
234 | {
|
---|
235 | ?>
|
---|
236 | <div class="error"><span>Invalid base directory:</span> <?php echo $manager->getImagesDir(); ?></div>
|
---|
237 | <?php
|
---|
238 | }
|
---|
239 |
|
---|
240 | /**
|
---|
241 | * Utility to convert ascii string to hex
|
---|
242 | */
|
---|
243 | function asc2hex ($temp)
|
---|
244 | {
|
---|
245 | $data = '';
|
---|
246 | $len = strlen($temp);
|
---|
247 | for ($i=0; $i<$len; $i++) $data.=sprintf("%02x",ord(substr($temp,$i,1)));
|
---|
248 | return $data;
|
---|
249 | }
|
---|
250 |
|
---|
251 | ?>
|
---|
252 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
---|
253 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|
254 | <html xmlns="http://www.w3.org/1999/xhtml">
|
---|
255 | <head>
|
---|
256 | <title>File List</title>
|
---|
257 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
---|
258 | <link href="<?php print $IMConfig['base_url'];?>assets/imagelist.css" rel="stylesheet" type="text/css" />
|
---|
259 | <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script>
|
---|
260 | <script type="text/javascript">
|
---|
261 | /*<![CDATA[*/
|
---|
262 |
|
---|
263 | var _backend_url = "<?php print $IMConfig['backend_url']; ?>";
|
---|
264 |
|
---|
265 | if(window.top)
|
---|
266 | HTMLArea = window.top.HTMLArea;
|
---|
267 |
|
---|
268 | function hideMessage()
|
---|
269 | {
|
---|
270 | var topDoc = window.top.document;
|
---|
271 | var messages = topDoc.getElementById('messages');
|
---|
272 | if(messages)
|
---|
273 | messages.style.display = "none";
|
---|
274 | }
|
---|
275 |
|
---|
276 | init = function()
|
---|
277 | {
|
---|
278 | __dlg_translate('ExtendedFileManager');
|
---|
279 |
|
---|
280 | hideMessage();
|
---|
281 |
|
---|
282 | <?php
|
---|
283 | if(isset($uploadStatus) && !is_numeric($uploadStatus) && !is_bool($uploadStatus))
|
---|
284 | echo "alert(i18n('$uploadStatus'));";
|
---|
285 | else if(isset($uploadStatus) && $uploadStatus==false)
|
---|
286 | echo 'alert(i18n("Unable to upload File. \nEither Maximum file size [$max_size='.($insertMode == 'image' ? $IMConfig['max_filesize_kb_image'] : $IMConfig['max_filesize_kb_link'] ).'$ KB] exceeded or\nFolder doesn\'t have write permission."));';
|
---|
287 | ?>
|
---|
288 |
|
---|
289 | <?php
|
---|
290 | if(isset($renameStatus) && !is_numeric($renameStatus) && !is_bool($renameStatus))
|
---|
291 | echo 'alert(i18n("'.$renameStatus.'"));';
|
---|
292 | else if(isset($renameStatus) && $renameStatus===false)
|
---|
293 | echo 'alert(i18n("Unable to rename file. File of the same name already exists or\nfolder doesn\'t have write permission."));';
|
---|
294 | ?>
|
---|
295 |
|
---|
296 | <?php
|
---|
297 | if (isset($pasteStatus) && is_numeric($pasteStatus))
|
---|
298 | {
|
---|
299 | switch ($pasteStatus)
|
---|
300 | {
|
---|
301 | case 100 :
|
---|
302 | $pasteStatus = 'Source file/folder not found.';
|
---|
303 | break;
|
---|
304 | case 101 :
|
---|
305 | $pasteStatus = 'Copy failed.\nMaybe folder doesn\'t have write permission.';
|
---|
306 | break;
|
---|
307 | case 102 :
|
---|
308 | $pasteStatus = 'Could not create destination folder.';
|
---|
309 | break;
|
---|
310 | case 104 :
|
---|
311 | $pasteStatus = 'Destination file/folder already exists.';
|
---|
312 | break;
|
---|
313 | }
|
---|
314 | }
|
---|
315 | if(isset($pasteStatus) && !is_bool($pasteStatus))
|
---|
316 | {
|
---|
317 | echo 'alert(i18n("'.$pasteStatus.'"));';
|
---|
318 | }
|
---|
319 | ?>
|
---|
320 |
|
---|
321 | var topDoc = window.top.document;
|
---|
322 |
|
---|
323 | <?php
|
---|
324 | //we need to refesh the drop directory list
|
---|
325 | //save the current dir, delete all select options
|
---|
326 | //add the new list, re-select the saved dir.
|
---|
327 | if($refreshDir)
|
---|
328 | {
|
---|
329 | $dirs = $manager->getDirs();
|
---|
330 | ?>
|
---|
331 | var selection = topDoc.getElementById('dirPath');
|
---|
332 | var currentDir = selection.options[selection.selectedIndex].text;
|
---|
333 |
|
---|
334 | while(selection.length > 0)
|
---|
335 | { selection.remove(0); }
|
---|
336 |
|
---|
337 | selection.options[selection.length] = new Option("/","<?php echo rawurlencode('/'); ?>");
|
---|
338 | <?php foreach($dirs as $relative=>$fullpath) { ?>
|
---|
339 | selection.options[selection.length] = new Option("<?php echo $relative; ?>","<?php echo rawurlencode($relative); ?>");
|
---|
340 | <?php } ?>
|
---|
341 |
|
---|
342 | for(var i = 0; i < selection.length; i++)
|
---|
343 | {
|
---|
344 | var thisDir = selection.options[i].text;
|
---|
345 | if(thisDir == currentDir)
|
---|
346 | {
|
---|
347 | selection.selectedIndex = i;
|
---|
348 | break;
|
---|
349 | }
|
---|
350 | }
|
---|
351 | <?php } ?>
|
---|
352 | }
|
---|
353 |
|
---|
354 | function editImage(image)
|
---|
355 | {
|
---|
356 | var url = "<?php print $IMConfig['backend_url']; ?>__function=editor&img="+image+"&mode=<?php print $insertMode ?>";
|
---|
357 | Dialog(url, function(param)
|
---|
358 | {
|
---|
359 | if (!param) { // user must have pressed Cancel
|
---|
360 | return false;
|
---|
361 | } else
|
---|
362 | {
|
---|
363 | return true;
|
---|
364 | }
|
---|
365 | }, null);
|
---|
366 | }
|
---|
367 |
|
---|
368 | /*]]>*/
|
---|
369 | </script>
|
---|
370 | <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/images.js"></script>
|
---|
371 | <script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/popup.js"></script>
|
---|
372 | <script type="text/javascript">
|
---|
373 | <!--
|
---|
374 | // Koto: why emptying? commented out
|
---|
375 | //if(window.top.document.getElementById('manager_mode').value=="image")
|
---|
376 | //emptyProperties();
|
---|
377 | <?php if(isset($diskInfo)) echo 'updateDiskMesg(i18n(\''.$diskInfo.'\'));'; ?>
|
---|
378 | //-->
|
---|
379 | </script>
|
---|
380 |
|
---|
381 | </head>
|
---|
382 |
|
---|
383 | <body>
|
---|
384 | <?php if ($manager->isValidBase() == false) { drawErrorBase($manager); }
|
---|
385 | elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?>
|
---|
386 | <?php drawDirs_Files($list, $manager); ?>
|
---|
387 | <?php } else { drawNoResults(); } ?>
|
---|
388 | </body>
|
---|
389 | </html>
|
---|