drawDirs_Files()   F
last analyzed

Complexity

Conditions 32
Paths 5491

Size

Total Lines 197
Code Lines 175

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 32
eloc 175
c 1
b 0
f 0
nc 5491
nop 2
dl 0
loc 197
rs 0

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

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
 * Version: Updated on 20-01-2008 by Raimund Meyer
9
 * Package: ExtendedFileManager (EFM 1.4)
10
 * http://www.afrusoft.com/htmlarea
11
 */
12
13
if (isset($_REQUEST['mode'])) {
14
    $insertMode = $_REQUEST['mode'];
15
}
16
if (!isset($insertMode)) {
17
    $insertMode = 'image';
18
}
19
20
require_once('config.inc.php');
21
require_once('Classes/ExtendedFileManager.php');
22
$backend_url_enc = htmlspecialchars($IMConfig['backend_url']);
23
//default path is /
24
$relative = '/';
25
$manager  = new ExtendedFileManager($IMConfig, $insertMode);
26
27
//process any file uploads
28
$uploadStatus = $manager->processUploads();
0 ignored issues
show
Bug introduced by
Are you sure the assignment to $uploadStatus is correct as $manager->processUploads() targeting ExtendedFileManager::processUploads() seems to always return null.

This check looks for function or method calls that always return null and whose return value is assigned to a variable.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
$object = $a->getObject();

The method getObject() can return nothing but null, so it makes no sense to assign that value to a variable.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
29
30
//process any file renames
31
$renameStatus = $manager->processRenames();
32
33
//process paste
34
$pasteStatus = (isset($_GET['paste'])) ? $manager->processPaste() : false;
35
36
$refreshFile = ($IMConfig['allow_delete'] && $manager->deleteFiles()) ? true : false;
37
38
$refreshDir = false;
39
//process any directory functions
40
if (($IMConfig['allow_delete'] && $manager->deleteDirs()) || $manager->processNewDir() || $pasteStatus || $renameStatus) {
41
    $refreshDir = true;
42
}
43
44
$diskInfo = $manager->getDiskInfo();
45
46
//check for any sub-directory request
47
//check that the requested sub-directory exists
48
//and valid
49
if (isset($_REQUEST['dir'])) {
50
    $path = rawurldecode($_REQUEST['dir']);
51
    if ($manager->validRelativePath($path)) {
52
        $relative = $path;
53
    }
54
}
55
56
$afruViewType = (isset($_REQUEST['viewtype'])) ? $afruViewType = $_REQUEST['viewtype'] : '';
57
58
if ('thumbview' != $afruViewType && 'listview' != $afruViewType) {
59
    $afruViewType = $IMConfig['view_type'];
60
}
61
//get the list of files and directories
62
$list                            = $manager->getFiles($relative);
63
64
/* ================= OUTPUT/DRAW FUNCTIONS ======================= */
65
66
/**
67
 * Draw folders and files. Changed by Afru
68
 */
69
function drawDirs_Files($list, &$manager)
70
{
71
    global $relative, $afruViewType, $IMConfig, $insertMode, $backend_url_enc;
72
73
    switch ($afruViewType) {
74
        case 'listview':
75
            $maxNameLength = 30;
76
            ?>
77
            <table class="listview" id="listview">
78
                <thead>
79
                <tr>
80
                    <th>Name</th>
81
                    <th>Size</th>
82
                    <th>Image Size</th>
83
                    <th>Date Modified</th>
84
                    <th>&nbsp;</th>
85
                </tr>
86
                </thead>
87
                <tbody>
88
                <?php
89
                // start of foreach for draw listview folders .
90
                foreach ($list[0] as $path => $dir) { ?>
91
                    <tr>
92
                        <td><span style="width:20px;"><img src="<?php print $IMConfig['base_url']; ?>icons/folder_small.gif" alt=""/></span>
93
                            <a href="<?php print $backend_url_enc; ?>__function=images&amp;mode=<?php echo $insertMode; ?>&amp;dir=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>">
94
                                <?php
95
                                if (strlen($dir['entry']) > $maxNameLength) {
96
                                    echo substr($dir['entry'], 0, $maxNameLength) . '...';
97
                                } else {
98
                                    echo $dir['entry'];
99
                                }
100
                                ?>
101
                            </a></td>
102
                        <td colspan="2">Folder</td>
103
104
                        <td><?php echo date($IMConfig['date_format'], $dir['stat']['mtime']); ?></td>
105
106
                        <td class="actions">
107
                            <?php
108
                            if ($IMConfig['allow_delete']) {
109
                                ?>
110
                                <a href="<?php print $backend_url_enc; ?>__function=images&amp;mode=<?php echo $insertMode; ?>&amp;dir=<?php echo $relative; ?>&amp;deld=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash"
111
                                   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>
112
                                <?php
113
                            }
114
                            ?>
115
                            <?php if ($IMConfig['allow_rename']) { ?>
116
                                <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>
117
                            <?php } ?>
118
                            <?php if ($IMConfig['allow_cut_copy_paste']) { ?>
119
                                <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>
120
                                <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>
121
                            <?php } ?>
122
                        </td>
123
                    </tr>
124
                    <?php
125
                } // end of foreach for draw listview folders .
126
127
                clearstatcache();
128
129
                // start of foreach for draw listview files .
130
                foreach ($list[1] as $entry => $file) {
131
                    ?>
132
                    <tr>
133
                        <td>
134
                            <a href="#" class="thumb" style="cursor: pointer;vertical-align:middle;" ondblclick="this.onclick();window.top.onOK();"
135
                               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;"
136
                               title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>" <?php if ('image'
0 ignored issues
show
Bug Best Practice introduced by
The method Files::formatSize() is not static, but was called statically. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

136
                               title="<?php echo $entry; ?> - <?php echo Files::/** @scrutinizer ignore-call */ formatSize($file['stat']['size']); ?>" <?php if ('image'
Loading history...
137
                                                                                                                                 == $insertMode) { ?> onmouseover="showPreview('<?php echo $file['relative']; ?>')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" <?php } ?> >
138
                                <span style="width:20px;vertical-align:middle;"><img src="<?php print $IMConfig['base_url'];
139
                                    if (is_file('icons/' . $file['ext'] . '_small.gif')) {
140
                                        echo 'icons/' . $file['ext'] . '_small.gif';
141
                                    } else {
142
                                        echo $IMConfig['default_listicon'];
143
                                    } ?>" alt="" style="border:none;"/></span><span style="vertical-align:middle;">
144
        			<?php
145
                    if (strlen($entry) > $maxNameLength) {
146
                        echo substr($entry, 0, $maxNameLength) . '...';
147
                    } else {
148
                        echo $entry;
149
                    }
150
                    ?></span>
151
                            </a></td>
152
                        <td><?php echo Files::formatSize($file['stat']['size']); ?></td>
153
                        <td><?php if ($file['image'][0] > 0) {
154
                                echo $file['image'][0] . 'x' . $file['image'][1];
155
                            } ?></td>
156
                        <td><?php echo date($IMConfig['date_format'], $file['stat']['mtime']); ?></td>
157
                        <td class="actions">
158
                            <?php if ($IMConfig['img_library'] && $IMConfig['allow_edit_image'] && $file['image'][0] > 0) { ?>
159
                                <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>
160
                            <?php } ?>
161
                            <?php
162
                            if ($IMConfig['allow_delete']) {
163
                                ?>
164
                                <a href="<?php print $backend_url_enc; ?>__function=images&amp;dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']); ?>&amp;mode=<?php echo $insertMode; ?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash"
165
                                   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>
166
                                <?php
167
                            }
168
                            ?>
169
                            <?php if ($IMConfig['allow_rename']) { ?>
170
                                <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>
171
                            <?php } ?>
172
                            <?php if ($IMConfig['allow_cut_copy_paste']) { ?>
173
                                <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>
174
                                <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>
175
                            <?php } ?>
176
                        </td>
177
                    </tr>
178
                    <?php
179
                }//end of foreach of draw listview files
180
                ?>
181
                </tbody>
182
            </table>
183
            <?php
184
            break;
185
        case 'thumbview': // thumbview is default
186
        default:
187
            $maxFileNameLength = 16;
188
            $maxFolderNameLength = 16;
189
            // start of foreach for draw thumbview folders.
190
            foreach ($list[0] as $path => $dir) { ?>
191
                <div class="dir_holder">
192
                    <a class="dir" href="<?php print $backend_url_enc; ?>__function=images&amp;mode=<?php echo $insertMode; ?>&amp;dir=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>"><img
193
                                src="<?php print $IMConfig['base_url']; ?>img/folder.gif" height="80" width="80" alt="<?php echo $dir['entry']; ?>"/></a>
194
195
                    <div class="fileName">
196
                        <?php if (strlen($dir['entry']) > $maxFolderNameLength) {
197
                            echo substr($dir['entry'], 0, $maxFolderNameLength) . '...';
198
                        } else {
199
                            echo $dir['entry'];
200
                        } ?>
201
                    </div>
202
                    <div class="edit">
203
                        <?php
204
                        if ($IMConfig['allow_delete']) {
205
                            ?>
206
                            <a href="<?php print $backend_url_enc; ?>__function=images&amp;mode=<?php echo $insertMode; ?>&amp;dir=<?php echo $relative; ?>&amp;deld=<?php echo rawurlencode($path); ?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash"
207
                               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>
208
                            <?php
209
                        }
210
                        ?>
211
                        <?php if ($IMConfig['allow_rename']) { ?>
212
                            <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>
213
                        <?php } ?>
214
                        <?php if ($IMConfig['allow_cut_copy_paste']) { ?>
215
                            <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>
216
                            <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>
217
                        <?php } ?>
218
                    </div>
219
                </div>
220
                <?php
221
            } // end of foreach for draw thumbview folders.
222
223
            // start of foreach for draw thumbview files.
224
            foreach ($list[1] as $entry => $file) {
225
                $afruimgdimensions  = $manager->checkImageSize($file['relative']);
0 ignored issues
show
Unused Code introduced by
The assignment to $afruimgdimensions is dead and can be removed.
Loading history...
226
                $thisFileNameLength = $maxFileNameLength;
227
                ?>
228
                <div class="thumb_holder" id="holder_<?php echo asc2hex($entry) ?>">
229
                    <a href="#" class="thumb" style="cursor: pointer;" ondblclick="this.onclick();window.top.onOK();"
230
                       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;"
231
                       title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>">
232
                        <img src="<?php print $manager->getThumbnail($file['relative']); ?>" alt="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"/>
233
                    </a>
234
                    <div class="fileName">
235
                        <?php
236
                        if (strlen($entry) > $thisFileNameLength + 3) {
237
                            echo strtolower(substr($entry, 0, $thisFileNameLength)) . '...';
238
                        } else {
239
                            echo $entry;
240
                        }
241
                        ?>
242
                    </div>
243
                    <div class="edit">
244
                        <?php if ($IMConfig['img_library'] && $IMConfig['allow_edit_image'] && $file['image'][0] > 0) { ?>
245
                            <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>
246
                            <?php $thisFileNameLength -= 3;
247
                        } ?>
248
                        <?php
249
                        if ($IMConfig['allow_delete']) {
250
                            ?>
251
                            <a href="<?php print $backend_url_enc; ?>__function=images&amp;mode=<?php echo $insertMode; ?>&amp;dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']); ?>&amp;viewtype=<?php echo $afruViewType; ?>" title="Trash"
252
                               onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url']; ?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a>
253
                            <?php
254
                        }
255
                        ?>
256
                        <?php if ($IMConfig['allow_rename']) { ?>
257
                            <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>
258
                            <?php $thisFileNameLength -= 3;
259
                        } ?>
260
                        <?php if ($IMConfig['allow_cut_copy_paste']) { ?>
261
                            <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>
262
                            <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>
263
                            <?php $thisFileNameLength -= 6;
264
                        } ?>
265
266
                    </div>
267
                </div>
268
                <?php
269
            }//end of foreach of draw thumbview files
270
271
    }
272
}//end of function drawDirs_Files
273
274
/**
275
 * No directories and no files.
276
 */
277
function drawNoResults()
278
{
279
    ?>
280
    <div class="noResult">No Files Found</div>
281
    <?php
282
}
283
284
/**
285
 * No directories and no files.
286
 */
287
function drawErrorBase(&$manager)
288
{
289
    ?>
290
    <div class="error"><span>Invalid base directory:</span> <?php echo $manager->getImagesDir(); ?></div>
291
    <?php
292
}
293
294
/**
295
 * Utility to convert ascii string to hex
296
 */
297
function asc2hex($temp)
298
{
299
    $data = '';
300
    $len  = strlen($temp);
301
    for ($i = 0; $i < $len; $i++) {
302
        $data .= sprintf('%02x', ord(substr($temp, $i, 1)));
303
    }
304
    return $data;
305
}
306
307
?>
308
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
309
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
310
<html xmlns="http://www.w3.org/1999/xhtml">
311
<head>
312
    <title>File List</title>
313
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
314
    <link href="<?php print $IMConfig['base_url']; ?>assets/imagelist.css" rel="stylesheet" type="text/css"/>
315
    <script type="text/javascript" src="<?php print $IMConfig['base_url']; ?>assets/dialog.js"></script>
316
    <script type="text/javascript">
317
        /*<![CDATA[*/
318
319
        var _backend_url = "<?php print $IMConfig['backend_url']; ?>";
320
321
        if (window.top)
322
            Xinha = window.top.Xinha;
323
324
        function hideMessage() {
325
            var topDoc = window.top.document;
326
            var messages = topDoc.getElementById('messages');
327
            if (messages) {
328
                messages.style.display = "none";
329
            }
330
            //window.parent.resize();
331
        }
332
333
        init = function () {
334
            __dlg_translate('ExtendedFileManager');
335
336
            hideMessage();
337
            <?php if ('listview' == $afruViewType) {
338
            print "var d = new dragTableCols('listview');";
339
        }
340
341
            if (isset($uploadStatus) && !is_numeric($uploadStatus) && !is_bool($uploadStatus)) {
342
                echo "alert(i18n('$uploadStatus'));";
343
            } elseif (isset($uploadStatus) && false == $uploadStatus) {
344
                echo 'alert(i18n("Unable to upload File. \nEither Maximum file size [$max_size=' . ('image' == $insertMode ? $IMConfig['max_filesize_kb_image'] : $IMConfig['max_filesize_kb_link']) . '$ KB] exceeded or\nFolder doesn\'t have write permission."));';
345
            }
346
            ?>
347
348
            <?php
349
            if (isset($renameStatus) && !is_numeric($renameStatus) && !is_bool($renameStatus)) {
0 ignored issues
show
introduced by
The condition is_bool($renameStatus) is always true.
Loading history...
350
                echo 'alert(i18n("' . $renameStatus . '"));';
351
            } elseif (isset($renameStatus) && false === $renameStatus) {
352
                echo 'alert(i18n("Unable to rename file. File of the same name already exists or\nfolder doesn\'t have write permission."));';
353
            }
354
            ?>
355
356
            <?php
357
            if (isset($pasteStatus) && is_numeric($pasteStatus)) {
358
                switch ($pasteStatus) {
359
                    case 100 :
360
                        $pasteStatus = 'Source file/folder not found.';
361
                        break;
362
                    case 101 :
363
                        $pasteStatus = 'Copy failed.\nMaybe folder doesn\'t have write permission.';
364
                        break;
365
                    case 102 :
366
                        $pasteStatus = 'Could not create destination folder.';
367
                        break;
368
                    case 103 :
369
                        $pasteStatus = 'File pasted OK.';
370
                        break;
371
                    case 104 :
372
                        $pasteStatus = 'Destination file/folder already exists.';
373
                        break;
374
                }
375
            }
376
            if (isset($pasteStatus) && !is_bool($pasteStatus)) {
377
                echo 'alert(i18n("' . $pasteStatus . '"));';
378
            }
379
            ?>
380
381
            var topDoc = window.top.document;
382
383
            <?php
384
            //we need to refesh the drop directory list
385
            //save the current dir, delete all select options
386
            //add the new list, re-select the saved dir.
387
            if($refreshDir)
388
            {
389
            $dirs = $manager->getDirs();
390
            ?>
391
            var selection = topDoc.getElementById('dirPath');
392
            var currentDir = selection.options[selection.selectedIndex].text;
393
394
            while (selection.length > 0) {
395
                selection.remove(0);
396
            }
397
398
            selection.options[selection.length] = new Option("/", "<?php echo rawurlencode('/'); ?>");
399
            <?php foreach($dirs as $relative=>$fullpath) { ?>
400
            selection.options[selection.length] = new Option("<?php echo $relative; ?>", "<?php echo rawurlencode($relative); ?>");
401
            <?php } ?>
402
403
            for (var i = 0; i < selection.length; i++) {
404
                var thisDir = selection.options[i].text;
405
                if (thisDir == currentDir) {
406
                    selection.selectedIndex = i;
407
                    break;
408
                }
409
            }
410
            <?php } ?>
411
        }
412
413
        function editImage(image) {
414
            var url = "<?php print $IMConfig['backend_url']; ?>__function=editor&img=" + image + "&mode=<?php print $insertMode ?>";
415
            Dialog(url, function (param) {
416
                if (!param) { // user must have pressed Cancel
417
                    return false;
418
                } else {
419
                    return true;
420
                }
421
            }, null);
422
        }
423
424
        /*]]>*/
425
    </script>
426
    <script type="text/javascript" src="<?php print $IMConfig['base_url']; ?>assets/images.js"></script>
427
    <script type="text/javascript" src="<?php print $IMConfig['base_url']; ?>assets/popup.js"></script>
428
    <script type="text/javascript">
429
        <!--
430
        // Koto: why emptying? commented out
431
        //if(window.top.document.getElementById('manager_mode').value=="image")
432
        //emptyProperties();
433
        <?php if (isset($diskInfo)) {
434
            echo 'updateDiskMesg(i18n(\'' . $diskInfo . '\'));';
435
        } ?>
436
        //-->
437
    </script>
438
    <script type="text/javascript" src="<?php print $IMConfig['base_url']; ?>assets/dragTableCols.js"></script>
439
</head>
440
441
<body>
442
<?php if (false == $manager->isValidBase()) {
0 ignored issues
show
Coding Style Best Practice introduced by
It seems like you are loosely comparing two booleans. Considering using the strict comparison === instead.

When comparing two booleans, it is generally considered safer to use the strict comparison operator.

Loading history...
443
    drawErrorBase($manager);
444
} elseif (count($list[0]) > 0 || count($list[1]) > 0) { ?>
445
    <?php drawDirs_Files($list, $manager); ?>
446
<?php } else {
447
    drawNoResults();
448
} ?>
449
</body>
450
</html>
451