· 7 years ago · Oct 23, 2018, 09:24 AM
1GIF89;a
2<?php
3
4/*
5 * webadmin.php - a simple Web-based file manager
6 * Copyright (C) 2004-2011 Daniel Wacker [daniel dot wacker at web dot de]
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 *
22 * -------------------------------------------------------------------------
23 * While using this script, do NOT navigate with your browser's back and
24 * forward buttons! Always open files in a new browser tab!
25 * -------------------------------------------------------------------------
26 *
27 * This is Version 0.9, revision 12
28 * =========================================================================
29 *
30 * Changes of revision 12
31 * [bhb at o2 dot pl]
32 * added Polish translation
33 * [daniel dot wacker at web dot de]
34 * switched to UTF-8
35 * fixed undefined variable
36 *
37 * Changes of revision 11
38 * [daniel dot wacker at web dot de]
39 * fixed handling if folder isn't readable
40 *
41 * Changes of revision 10
42 * [alex dash smirnov at web.de]
43 * added Russian translation
44 * [daniel dot wacker at web dot de]
45 * added </td> to achieve valid XHTML (thanks to Marc Magos)
46 * improved delete function
47 * [ava at asl dot se]
48 * new list order: folders first
49 *
50 * Changes of revision 9
51 * [daniel dot wacker at web dot de]
52 * added workaround for directory listing, if lstat() is disabled
53 * fixed permisson of uploaded files (thanks to Stephan Duffner)
54 *
55 * Changes of revision 8
56 * [okankan at stud dot sdu dot edu dot tr]
57 * added Turkish translation
58 * [j at kub dot cz]
59 * added Czech translation
60 * [daniel dot wacker at web dot de]
61 * improved charset handling
62 *
63 * Changes of revision 7
64 * [szuniga at vtr dot net]
65 * added Spanish translation
66 * [lars at soelgaard dot net]
67 * added Danish translation
68 * [daniel dot wacker at web dot de]
69 * improved rename dialog
70 *
71 * Changes of revision 6
72 * [nederkoorn at tiscali dot nl]
73 * added Dutch translation
74 *
75 * Changes of revision 5
76 * [daniel dot wacker at web dot de]
77 * added language auto select
78 * fixed symlinks in directory listing
79 * removed word-wrap in edit textarea
80 *
81 * Changes of revision 4
82 * [daloan at guideo dot fr]
83 * added French translation
84 * [anders at wiik dot cc]
85 * added Swedish translation
86 *
87 * Changes of revision 3
88 * [nzunta at gabriele dash erba dot it]
89 * improved Italian translation
90 *
91 * Changes of revision 2
92 * [daniel dot wacker at web dot de]
93 * got images work in some old browsers
94 * fixed creation of directories
95 * fixed files deletion
96 * improved path handling
97 * added missing word 'not_created'
98 * [till at tuxen dot de]
99 * improved human readability of file sizes
100 * [nzunta at gabriele dash erba dot it]
101 * added Italian translation
102 *
103 * Changes of revision 1
104 * [daniel dot wacker at web dot de]
105 * webadmin.php completely rewritten:
106 * - clean XHTML/CSS output
107 * - several files selectable
108 * - support for windows servers
109 * - no more treeview, because
110 * - webadmin.php is a >simple< file manager
111 * - performance problems (too much additional code)
112 * - I don't like: frames, java-script, to reload after every treeview-click
113 * - execution of shell scripts
114 * - introduced revision numbers
115 *
116/* ------------------------------------------------------------------------- */
117
118/* Your language:
119 * 'en' - English
120 * 'de' - German
121 * 'fr' - French
122 * 'it' - Italian
123 * 'nl' - Dutch
124 * 'se' - Swedish
125 * 'sp' - Spanish
126 * 'dk' - Danish
127 * 'tr' - Turkish
128 * 'cs' - Czech
129 * 'ru' - Russian
130 * 'pl' - Polish
131 * 'auto' - autoselect
132 */
133$lang = 'auto';
134
135/* Homedir:
136 * For example: './' - the script's directory
137 */
138$homedir = './';
139
140/* Size of the edit textarea
141 */
142$editcols = 80;
143$editrows = 25;
144
145/* -------------------------------------------
146 * Optional configuration (remove # to enable)
147 */
148
149/* Permission of created directories:
150 * For example: 0705 would be 'drwx---r-x'.
151 */
152# $dirpermission = 0705;
153
154/* Permission of created files:
155 * For example: 0604 would be '-rw----r--'.
156 */
157# $filepermission = 0604;
158
159/* Filenames related to the apache web server:
160 */
161$htaccess = '.htaccess';
162$htpasswd = '.htpasswd';
163
164/* ------------------------------------------------------------------------- */
165
166if (get_magic_quotes_gpc()) {
167 array_walk($_GET, 'strip');
168 array_walk($_POST, 'strip');
169 array_walk($_REQUEST, 'strip');
170}
171
172if (array_key_exists('image', $_GET)) {
173 header('Content-Type: image/gif');
174 die(getimage($_GET['image']));
175}
176
177if (!function_exists('lstat')) {
178 function lstat ($filename) {
179 return stat($filename);
180 }
181}
182
183$delim = DIRECTORY_SEPARATOR;
184
185if (function_exists('php_uname')) {
186 $win = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false;
187} else {
188 $win = ($delim == '\\') ? true : false;
189}
190
191if (!empty($_SERVER['PATH_TRANSLATED'])) {
192 $scriptdir = dirname($_SERVER['PATH_TRANSLATED']);
193} elseif (!empty($_SERVER['SCRIPT_FILENAME'])) {
194 $scriptdir = dirname($_SERVER['SCRIPT_FILENAME']);
195} elseif (function_exists('getcwd')) {
196 $scriptdir = getcwd();
197} else {
198 $scriptdir = '.';
199}
200$homedir = relative2absolute($homedir, $scriptdir);
201
202$dir = (array_key_exists('dir', $_REQUEST)) ? $_REQUEST['dir'] : $homedir;
203
204if (array_key_exists('olddir', $_POST) && !path_is_relative($_POST['olddir'])) {
205 $dir = relative2absolute($dir, $_POST['olddir']);
206}
207
208$directory = simplify_path(addslash($dir));
209
210$files = array();
211$action = '';
212if (!empty($_POST['submit_all'])) {
213 $action = $_POST['action_all'];
214 for ($i = 0; $i < $_POST['num']; $i++) {
215 if (array_key_exists("checked$i", $_POST) && $_POST["checked$i"] == 'true') {
216 $files[] = $_POST["file$i"];
217 }
218 }
219} elseif (!empty($_REQUEST['action'])) {
220 $action = $_REQUEST['action'];
221 $files[] = relative2absolute($_REQUEST['file'], $directory);
222} elseif (!empty($_POST['submit_upload']) && !empty($_FILES['upload']['name'])) {
223 $files[] = $_FILES['upload'];
224 $action = 'upload';
225} elseif (array_key_exists('num', $_POST)) {
226 for ($i = 0; $i < $_POST['num']; $i++) {
227 if (array_key_exists("submit$i", $_POST)) break;
228 }
229 if ($i < $_POST['num']) {
230 $action = $_POST["action$i"];
231 $files[] = $_POST["file$i"];
232 }
233}
234if (empty($action) && (!empty($_POST['submit_create']) || (array_key_exists('focus', $_POST) && $_POST['focus'] == 'create')) && !empty($_POST['create_name'])) {
235 $files[] = relative2absolute($_POST['create_name'], $directory);
236 switch ($_POST['create_type']) {
237 case 'directory':
238 $action = 'create_directory';
239 break;
240 case 'file':
241 $action = 'create_file';
242 }
243}
244if (sizeof($files) == 0) $action = ''; else $file = reset($files);
245
246if ($lang == 'auto') {
247 if (array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE']) >= 2) {
248 $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
249 } else {
250 $lang = 'en';
251 }
252}
253
254$words = getwords($lang);
255
256if ($site_charset == 'auto') {
257 $site_charset = $word_charset;
258}
259
260$cols = ($win) ? 4 : 7;
261
262if (!isset($dirpermission)) {
263 $dirpermission = (function_exists('umask')) ? (0777 & ~umask()) : 0755;
264}
265if (!isset($filepermission)) {
266 $filepermission = (function_exists('umask')) ? (0666 & ~umask()) : 0644;
267}
268
269if (!empty($_SERVER['SCRIPT_NAME'])) {
270 $self = html(basename($_SERVER['SCRIPT_NAME']));
271} elseif (!empty($_SERVER['PHP_SELF'])) {
272 $self = html(basename($_SERVER['PHP_SELF']));
273} else {
274 $self = '';
275}
276
277if (!empty($_SERVER['SERVER_SOFTWARE'])) {
278 if (strtolower(substr($_SERVER['SERVER_SOFTWARE'], 0, 6)) == 'apache') {
279 $apache = true;
280 } else {
281 $apache = false;
282 }
283} else {
284 $apache = true;
285}
286
287switch ($action) {
288
289case 'view':
290
291 if (is_script($file)) {
292
293 /* highlight_file is a mess! */
294 ob_start();
295 highlight_file($file);
296 $src = ereg_replace('<font color="([^"]*)">', '<span style="color: \1">', ob_get_contents());
297 $src = str_replace(array('</font>', "\r", "\n"), array('</span>', '', ''), $src);
298 ob_end_clean();
299
300 html_header();
301 echo '<h2 style="text-align: left; margin-bottom: 0">' . html($file) . '</h2>
302
303<hr />
304
305<table>
306<tr>
307<td style="text-align: right; vertical-align: top; color: gray; padding-right: 3pt; border-right: 1px solid gray">
308<pre style="margin-top: 0"><code>';
309
310 for ($i = 1; $i <= sizeof(file($file)); $i++) echo "$i\n";
311
312 echo '</code></pre>
313</td>
314<td style="text-align: left; vertical-align: top; padding-left: 3pt">
315<pre style="margin-top: 0">' . $src . '</pre>
316</td>
317</tr>
318</table>
319
320';
321
322 html_footer();
323
324 } else {
325
326 header('Content-Type: ' . getmimetype($file));
327 header('Content-Disposition: filename=' . basename($file));
328
329 readfile($file);
330
331 }
332
333 break;
334
335case 'download':
336
337 header('Pragma: public');
338 header('Expires: 0');
339 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
340 header('Content-Type: ' . getmimetype($file));
341 header('Content-Disposition: attachment; filename=' . basename($file) . ';');
342 header('Content-Length: ' . filesize($file));
343
344 readfile($file);
345
346 break;
347
348case 'upload':
349
350 $dest = relative2absolute($file['name'], $directory);
351
352 if (@file_exists($dest)) {
353 listing_page(error('already_exists', $dest));
354 } elseif (@move_uploaded_file($file['tmp_name'], $dest)) {
355 @chmod($dest, $filepermission);
356 listing_page(notice('uploaded', $file['name']));
357 } else {
358 listing_page(error('not_uploaded', $file['name']));
359 }
360
361 break;
362
363case 'create_directory':
364
365 if (@file_exists($file)) {
366 listing_page(error('already_exists', $file));
367 } else {
368 $old = @umask(0777 & ~$dirpermission);
369 if (@mkdir($file, $dirpermission)) {
370 listing_page(notice('created', $file));
371 } else {
372 listing_page(error('not_created', $file));
373 }
374 @umask($old);
375 }
376
377 break;
378
379case 'create_file':
380
381 if (@file_exists($file)) {
382 listing_page(error('already_exists', $file));
383 } else {
384 $old = @umask(0777 & ~$filepermission);
385 if (@touch($file)) {
386 edit($file);
387 } else {
388 listing_page(error('not_created', $file));
389 }
390 @umask($old);
391 }
392
393 break;
394
395case 'execute':
396
397 chdir(dirname($file));
398
399 $output = array();
400 $retval = 0;
401 exec('echo "./' . basename($file) . '" | /bin/sh', $output, $retval);
402
403 $error = ($retval == 0) ? false : true;
404
405 if (sizeof($output) == 0) $output = array('<' . $words['no_output'] . '>');
406
407 if ($error) {
408 listing_page(error('not_executed', $file, implode("\n", $output)));
409 } else {
410 listing_page(notice('executed', $file, implode("\n", $output)));
411 }
412
413 break;
414
415case 'delete':
416
417 if (!empty($_POST['no'])) {
418 listing_page();
419 } elseif (!empty($_POST['yes'])) {
420
421 $failure = array();
422 $success = array();
423
424 foreach ($files as $file) {
425 if (del($file)) {
426 $success[] = $file;
427 } else {
428 $failure[] = $file;
429 }
430 }
431
432 $message = '';
433 if (sizeof($failure) > 0) {
434 $message = error('not_deleted', implode("\n", $failure));
435 }
436 if (sizeof($success) > 0) {
437 $message .= notice('deleted', implode("\n", $success));
438 }
439
440 listing_page($message);
441
442 } else {
443
444 html_header();
445
446 echo '<form action="' . $self . '" method="post">
447<table class="dialog">
448<tr>
449<td class="dialog">
450';
451
452 request_dump();
453
454 echo "\t<b>" . word('really_delete') . '</b>
455 <p>
456';
457
458 foreach ($files as $file) {
459 echo "\t" . html($file) . "<br />\n";
460 }
461
462 echo ' </p>
463 <hr />
464 <input type="submit" name="no" value="' . word('no') . '" id="red_button" />
465 <input type="submit" name="yes" value="' . word('yes') . '" id="green_button" style="margin-left: 50px" />
466</td>
467</tr>
468</table>
469</form>
470
471';
472
473 html_footer();
474
475 }
476
477 break;
478
479case 'rename':
480
481 if (!empty($_POST['destination'])) {
482
483 $dest = relative2absolute($_POST['destination'], $directory);
484
485 if (!@file_exists($dest) && @rename($file, $dest)) {
486 listing_page(notice('renamed', $file, $dest));
487 } else {
488 listing_page(error('not_renamed', $file, $dest));
489 }
490
491 } else {
492
493 $name = basename($file);
494
495 html_header();
496
497 echo '<form action="' . $self . '" method="post">
498
499<table class="dialog">
500<tr>
501<td class="dialog">
502 <input type="hidden" name="action" value="rename" />
503 <input type="hidden" name="file" value="' . html($file) . '" />
504 <input type="hidden" name="dir" value="' . html($directory) . '" />
505 <b>' . word('rename_file') . '</b>
506 <p>' . html($file) . '</p>
507 <b>' . substr($file, 0, strlen($file) - strlen($name)) . '</b>
508 <input type="text" name="destination" size="' . textfieldsize($name) . '" value="' . html($name) . '" />
509 <hr />
510 <input type="submit" value="' . word('rename') . '" />
511</td>
512</tr>
513</table>
514
515<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
516
517</form>
518
519';
520
521 html_footer();
522
523 }
524
525 break;
526
527case 'move':
528
529 if (!empty($_POST['destination'])) {
530
531 $dest = relative2absolute($_POST['destination'], $directory);
532
533 $failure = array();
534 $success = array();
535
536 foreach ($files as $file) {
537 $filename = substr($file, strlen($directory));
538 $d = $dest . $filename;
539 if (!@file_exists($d) && @rename($file, $d)) {
540 $success[] = $file;
541 } else {
542 $failure[] = $file;
543 }
544 }
545
546 $message = '';
547 if (sizeof($failure) > 0) {
548 $message = error('not_moved', implode("\n", $failure), $dest);
549 }
550 if (sizeof($success) > 0) {
551 $message .= notice('moved', implode("\n", $success), $dest);
552 }
553
554 listing_page($message);
555
556 } else {
557
558 html_header();
559
560 echo '<form action="' . $self . '" method="post">
561
562<table class="dialog">
563<tr>
564<td class="dialog">
565';
566
567 request_dump();
568
569 echo "\t<b>" . word('move_files') . '</b>
570 <p>
571';
572
573 foreach ($files as $file) {
574 echo "\t" . html($file) . "<br />\n";
575 }
576
577 echo ' </p>
578 <hr />
579 ' . word('destination') . ':
580 <input type="text" name="destination" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
581 <input type="submit" value="' . word('move') . '" />
582</td>
583</tr>
584</table>
585
586<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
587
588</form>
589
590';
591
592 html_footer();
593
594 }
595
596 break;
597
598case 'copy':
599
600 if (!empty($_POST['destination'])) {
601
602 $dest = relative2absolute($_POST['destination'], $directory);
603
604 if (@is_dir($dest)) {
605
606 $failure = array();
607 $success = array();
608
609 foreach ($files as $file) {
610 $filename = substr($file, strlen($directory));
611 $d = addslash($dest) . $filename;
612 if (!@is_dir($file) && !@file_exists($d) && @copy($file, $d)) {
613 $success[] = $file;
614 } else {
615 $failure[] = $file;
616 }
617 }
618
619 $message = '';
620 if (sizeof($failure) > 0) {
621 $message = error('not_copied', implode("\n", $failure), $dest);
622 }
623 if (sizeof($success) > 0) {
624 $message .= notice('copied', implode("\n", $success), $dest);
625 }
626
627 listing_page($message);
628
629 } else {
630
631 if (!@file_exists($dest) && @copy($file, $dest)) {
632 listing_page(notice('copied', $file, $dest));
633 } else {
634 listing_page(error('not_copied', $file, $dest));
635 }
636
637 }
638
639 } else {
640
641 html_header();
642
643 echo '<form action="' . $self . '" method="post">
644
645<table class="dialog">
646<tr>
647<td class="dialog">
648';
649
650 request_dump();
651
652 echo "\n<b>" . word('copy_files') . '</b>
653 <p>
654';
655
656 foreach ($files as $file) {
657 echo "\t" . html($file) . "<br />\n";
658 }
659
660 echo ' </p>
661 <hr />
662 ' . word('destination') . ':
663 <input type="text" name="destination" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
664 <input type="submit" value="' . word('copy') . '" />
665</td>
666</tr>
667</table>
668
669<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
670
671</form>
672
673';
674
675 html_footer();
676
677 }
678
679 break;
680
681case 'create_symlink':
682
683 if (!empty($_POST['destination'])) {
684
685 $dest = relative2absolute($_POST['destination'], $directory);
686
687 if (substr($dest, -1, 1) == $delim) $dest .= basename($file);
688
689 if (!empty($_POST['relative'])) $file = absolute2relative(addslash(dirname($dest)), $file);
690
691 if (!@file_exists($dest) && @symlink($file, $dest)) {
692 listing_page(notice('symlinked', $file, $dest));
693 } else {
694 listing_page(error('not_symlinked', $file, $dest));
695 }
696
697 } else {
698
699 html_header();
700
701 echo '<form action="' . $self . '" method="post">
702
703<table class="dialog" id="symlink">
704<tr>
705 <td style="vertical-align: top">' . word('destination') . ': </td>
706 <td>
707 <b>' . html($file) . '</b><br />
708 <input type="checkbox" name="relative" value="yes" id="checkbox_relative" checked="checked" style="margin-top: 1ex" />
709 <label for="checkbox_relative">' . word('relative') . '</label>
710 <input type="hidden" name="action" value="create_symlink" />
711 <input type="hidden" name="file" value="' . html($file) . '" />
712 <input type="hidden" name="dir" value="' . html($directory) . '" />
713 </td>
714</tr>
715<tr>
716 <td>' . word('symlink') . ': </td>
717 <td>
718 <input type="text" name="destination" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
719 <input type="submit" value="' . word('create_symlink') . '" />
720 </td>
721</tr>
722</table>
723
724<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
725
726</form>
727
728';
729
730 html_footer();
731
732 }
733
734 break;
735
736case 'edit':
737
738 if (!empty($_POST['save'])) {
739
740 $content = str_replace("\r\n", "\n", $_POST['content']);
741
742 if (($f = @fopen($file, 'w')) && @fwrite($f, $content) !== false && @fclose($f)) {
743 listing_page(notice('saved', $file));
744 } else {
745 listing_page(error('not_saved', $file));
746 }
747
748 } else {
749
750 if (@is_readable($file) && @is_writable($file)) {
751 edit($file);
752 } else {
753 listing_page(error('not_edited', $file));
754 }
755
756 }
757
758 break;
759
760case 'permission':
761
762 if (!empty($_POST['set'])) {
763
764 $mode = 0;
765 if (!empty($_POST['ur'])) $mode |= 0400; if (!empty($_POST['uw'])) $mode |= 0200; if (!empty($_POST['ux'])) $mode |= 0100;
766 if (!empty($_POST['gr'])) $mode |= 0040; if (!empty($_POST['gw'])) $mode |= 0020; if (!empty($_POST['gx'])) $mode |= 0010;
767 if (!empty($_POST['or'])) $mode |= 0004; if (!empty($_POST['ow'])) $mode |= 0002; if (!empty($_POST['ox'])) $mode |= 0001;
768
769 if (@chmod($file, $mode)) {
770 listing_page(notice('permission_set', $file, decoct($mode)));
771 } else {
772 listing_page(error('permission_not_set', $file, decoct($mode)));
773 }
774
775 } else {
776
777 html_header();
778
779 $mode = fileperms($file);
780
781 echo '<form action="' . $self . '" method="post">
782
783<table class="dialog">
784<tr>
785<td class="dialog">
786
787 <p style="margin: 0">' . phrase('permission_for', $file) . '</p>
788
789 <hr />
790
791 <table id="permission">
792 <tr>
793 <td></td>
794 <td style="border-right: 1px solid black">' . word('owner') . '</td>
795 <td style="border-right: 1px solid black">' . word('group') . '</td>
796 <td>' . word('other') . '</td>
797 </tr>
798 <tr>
799 <td style="text-align: right">' . word('read') . ':</td>
800 <td><input type="checkbox" name="ur" value="1"'; if ($mode & 00400) echo ' checked="checked"'; echo ' /></td>
801 <td><input type="checkbox" name="gr" value="1"'; if ($mode & 00040) echo ' checked="checked"'; echo ' /></td>
802 <td><input type="checkbox" name="or" value="1"'; if ($mode & 00004) echo ' checked="checked"'; echo ' /></td>
803 </tr>
804 <tr>
805 <td style="text-align: right">' . word('write') . ':</td>
806 <td><input type="checkbox" name="uw" value="1"'; if ($mode & 00200) echo ' checked="checked"'; echo ' /></td>
807 <td><input type="checkbox" name="gw" value="1"'; if ($mode & 00020) echo ' checked="checked"'; echo ' /></td>
808 <td><input type="checkbox" name="ow" value="1"'; if ($mode & 00002) echo ' checked="checked"'; echo ' /></td>
809 </tr>
810 <tr>
811 <td style="text-align: right">' . word('execute') . ':</td>
812 <td><input type="checkbox" name="ux" value="1"'; if ($mode & 00100) echo ' checked="checked"'; echo ' /></td>
813 <td><input type="checkbox" name="gx" value="1"'; if ($mode & 00010) echo ' checked="checked"'; echo ' /></td>
814 <td><input type="checkbox" name="ox" value="1"'; if ($mode & 00001) echo ' checked="checked"'; echo ' /></td>
815 </tr>
816 </table>
817
818 <hr />
819
820 <input type="submit" name="set" value="' . word('set') . '" />
821
822 <input type="hidden" name="action" value="permission" />
823 <input type="hidden" name="file" value="' . html($file) . '" />
824 <input type="hidden" name="dir" value="' . html($directory) . '" />
825
826</td>
827</tr>
828</table>
829
830<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
831
832</form>
833
834';
835
836 html_footer();
837
838 }
839
840 break;
841
842default:
843
844 listing_page();
845
846}
847
848/* ------------------------------------------------------------------------- */
849
850function getlist ($directory) {
851 global $delim, $win;
852
853 if ($d = @opendir($directory)) {
854
855 while (($filename = @readdir($d)) !== false) {
856
857 $path = $directory . $filename;
858
859 if ($stat = @lstat($path)) {
860
861 $file = array(
862 'filename' => $filename,
863 'path' => $path,
864 'is_file' => @is_file($path),
865 'is_dir' => @is_dir($path),
866 'is_link' => @is_link($path),
867 'is_readable' => @is_readable($path),
868 'is_writable' => @is_writable($path),
869 'size' => $stat['size'],
870 'permission' => $stat['mode'],
871 'owner' => $stat['uid'],
872 'group' => $stat['gid'],
873 'mtime' => @filemtime($path),
874 'atime' => @fileatime($path),
875 'ctime' => @filectime($path)
876 );
877
878 if ($file['is_dir']) {
879 $file['is_executable'] = @file_exists($path . $delim . '.');
880 } else {
881 if (!$win) {
882 $file['is_executable'] = @is_executable($path);
883 } else {
884 $file['is_executable'] = true;
885 }
886 }
887
888 if ($file['is_link']) $file['target'] = @readlink($path);
889
890 if (function_exists('posix_getpwuid')) $file['owner_name'] = @reset(posix_getpwuid($file['owner']));
891 if (function_exists('posix_getgrgid')) $file['group_name'] = @reset(posix_getgrgid($file['group']));
892
893 $files[] = $file;
894
895 }
896
897 }
898
899 return $files;
900
901 } else {
902 return false;
903 }
904
905}
906
907function sortlist ($list, $key, $reverse) {
908
909 $dirs = array();
910 $files = array();
911
912 for ($i = 0; $i < sizeof($list); $i++) {
913 if ($list[$i]['is_dir']) $dirs[] = $list[$i];
914 else $files[] = $list[$i];
915 }
916
917 quicksort($dirs, 0, sizeof($dirs) - 1, $key);
918 if ($reverse) $dirs = array_reverse($dirs);
919
920 quicksort($files, 0, sizeof($files) - 1, $key);
921 if ($reverse) $files = array_reverse($files);
922
923 return array_merge($dirs, $files);
924
925}
926
927function quicksort (&$array, $first, $last, $key) {
928
929 if ($first < $last) {
930
931 $cmp = $array[floor(($first + $last) / 2)][$key];
932
933 $l = $first;
934 $r = $last;
935
936 while ($l <= $r) {
937
938 while ($array[$l][$key] < $cmp) $l++;
939 while ($array[$r][$key] > $cmp) $r--;
940
941 if ($l <= $r) {
942
943 $tmp = $array[$l];
944 $array[$l] = $array[$r];
945 $array[$r] = $tmp;
946
947 $l++;
948 $r--;
949
950 }
951
952 }
953
954 quicksort($array, $first, $r, $key);
955 quicksort($array, $l, $last, $key);
956
957 }
958
959}
960
961function permission_octal2string ($mode) {
962
963 if (($mode & 0xC000) === 0xC000) {
964 $type = 's';
965 } elseif (($mode & 0xA000) === 0xA000) {
966 $type = 'l';
967 } elseif (($mode & 0x8000) === 0x8000) {
968 $type = '-';
969 } elseif (($mode & 0x6000) === 0x6000) {
970 $type = 'b';
971 } elseif (($mode & 0x4000) === 0x4000) {
972 $type = 'd';
973 } elseif (($mode & 0x2000) === 0x2000) {
974 $type = 'c';
975 } elseif (($mode & 0x1000) === 0x1000) {
976 $type = 'p';
977 } else {
978 $type = '?';
979 }
980
981 $owner = ($mode & 00400) ? 'r' : '-';
982 $owner .= ($mode & 00200) ? 'w' : '-';
983 if ($mode & 0x800) {
984 $owner .= ($mode & 00100) ? 's' : 'S';
985 } else {
986 $owner .= ($mode & 00100) ? 'x' : '-';
987 }
988
989 $group = ($mode & 00040) ? 'r' : '-';
990 $group .= ($mode & 00020) ? 'w' : '-';
991 if ($mode & 0x400) {
992 $group .= ($mode & 00010) ? 's' : 'S';
993 } else {
994 $group .= ($mode & 00010) ? 'x' : '-';
995 }
996
997 $other = ($mode & 00004) ? 'r' : '-';
998 $other .= ($mode & 00002) ? 'w' : '-';
999 if ($mode & 0x200) {
1000 $other .= ($mode & 00001) ? 't' : 'T';
1001 } else {
1002 $other .= ($mode & 00001) ? 'x' : '-';
1003 }
1004
1005 return $type . $owner . $group . $other;
1006
1007}
1008
1009function is_script ($filename) {
1010 return ereg('\.php$|\.php3$|\.php4$|\.php5$', $filename);
1011}
1012
1013function getmimetype ($filename) {
1014 static $mimes = array(
1015 '\.jpg$|\.jpeg$' => 'image/jpeg',
1016 '\.gif$' => 'image/gif',
1017 '\.png$' => 'image/png',
1018 '\.html$|\.html$' => 'text/html',
1019 '\.txt$|\.asc$' => 'text/plain',
1020 '\.xml$|\.xsl$' => 'application/xml',
1021 '\.pdf$' => 'application/pdf'
1022 );
1023
1024 foreach ($mimes as $regex => $mime) {
1025 if (eregi($regex, $filename)) return $mime;
1026 }
1027
1028 // return 'application/octet-stream';
1029 return 'text/plain';
1030
1031}
1032
1033function del ($file) {
1034 global $delim;
1035
1036 if (!file_exists($file)) return false;
1037
1038 if (@is_dir($file) && !@is_link($file)) {
1039
1040 $success = false;
1041
1042 if (@rmdir($file)) {
1043
1044 $success = true;
1045
1046 } elseif ($dir = @opendir($file)) {
1047
1048 $success = true;
1049
1050 while (($f = readdir($dir)) !== false) {
1051 if ($f != '.' && $f != '..' && !del($file . $delim . $f)) {
1052 $success = false;
1053 }
1054 }
1055 closedir($dir);
1056
1057 if ($success) $success = @rmdir($file);
1058
1059 }
1060
1061 return $success;
1062
1063 }
1064
1065 return @unlink($file);
1066
1067}
1068
1069function addslash ($directory) {
1070 global $delim;
1071
1072 if (substr($directory, -1, 1) != $delim) {
1073 return $directory . $delim;
1074 } else {
1075 return $directory;
1076 }
1077
1078}
1079
1080function relative2absolute ($string, $directory) {
1081
1082 if (path_is_relative($string)) {
1083 return simplify_path(addslash($directory) . $string);
1084 } else {
1085 return simplify_path($string);
1086 }
1087
1088}
1089
1090function path_is_relative ($path) {
1091 global $win;
1092
1093 if ($win) {
1094 return (substr($path, 1, 1) != ':');
1095 } else {
1096 return (substr($path, 0, 1) != '/');
1097 }
1098
1099}
1100
1101function absolute2relative ($directory, $target) {
1102 global $delim;
1103
1104 $path = '';
1105 while ($directory != $target) {
1106 if ($directory == substr($target, 0, strlen($directory))) {
1107 $path .= substr($target, strlen($directory));
1108 break;
1109 } else {
1110 $path .= '..' . $delim;
1111 $directory = substr($directory, 0, strrpos(substr($directory, 0, -1), $delim) + 1);
1112 }
1113 }
1114 if ($path == '') $path = '.';
1115
1116 return $path;
1117
1118}
1119
1120function simplify_path ($path) {
1121 global $delim;
1122
1123 if (@file_exists($path) && function_exists('realpath') && @realpath($path) != '') {
1124 $path = realpath($path);
1125 if (@is_dir($path)) {
1126 return addslash($path);
1127 } else {
1128 return $path;
1129 }
1130 }
1131
1132 $pattern = $delim . '.' . $delim;
1133
1134 if (@is_dir($path)) {
1135 $path = addslash($path);
1136 }
1137
1138 while (strpos($path, $pattern) !== false) {
1139 $path = str_replace($pattern, $delim, $path);
1140 }
1141
1142 $e = addslashes($delim);
1143 $regex = $e . '((\.[^\.' . $e . '][^' . $e . ']*)|(\.\.[^' . $e . ']+)|([^\.][^' . $e . ']*))' . $e . '\.\.' . $e;
1144
1145 while (ereg($regex, $path)) {
1146 $path = ereg_replace($regex, $delim, $path);
1147 }
1148
1149 return $path;
1150
1151}
1152
1153function human_filesize ($filesize) {
1154
1155 $suffices = 'kMGTPE';
1156
1157 $n = 0;
1158 while ($filesize >= 1000) {
1159 $filesize /= 1024;
1160 $n++;
1161 }
1162
1163 $filesize = round($filesize, 3 - strpos($filesize, '.'));
1164
1165 if (strpos($filesize, '.') !== false) {
1166 while (in_array(substr($filesize, -1, 1), array('0', '.'))) {
1167 $filesize = substr($filesize, 0, strlen($filesize) - 1);
1168 }
1169 }
1170
1171 $suffix = (($n == 0) ? '' : substr($suffices, $n - 1, 1));
1172
1173 return $filesize . " {$suffix}B";
1174
1175}
1176
1177function strip (&$str) {
1178 $str = stripslashes($str);
1179}
1180
1181/* ------------------------------------------------------------------------- */
1182
1183function listing_page ($message = null) {
1184 global $self, $directory, $sort, $reverse;
1185
1186 html_header();
1187
1188 $list = getlist($directory);
1189
1190 if (array_key_exists('sort', $_GET)) $sort = $_GET['sort']; else $sort = 'filename';
1191 if (array_key_exists('reverse', $_GET) && $_GET['reverse'] == 'true') $reverse = true; else $reverse = false;
1192
1193 echo '<h1 style="margin-bottom: 0">webadmin.php</h1>
1194
1195<form enctype="multipart/form-data" action="' . $self . '" method="post">
1196
1197<table id="main">
1198';
1199
1200 directory_choice();
1201
1202 if (!empty($message)) {
1203 spacer();
1204 echo $message;
1205 }
1206
1207 if (@is_writable($directory)) {
1208 upload_box();
1209 create_box();
1210 } else {
1211 spacer();
1212 }
1213
1214 if ($list) {
1215 $list = sortlist($list, $sort, $reverse);
1216 listing($list);
1217 } else {
1218 echo error('not_readable', $directory);
1219 }
1220
1221 echo '</table>
1222
1223</form>
1224
1225';
1226
1227 html_footer();
1228
1229}
1230
1231function listing ($list) {
1232 global $directory, $homedir, $sort, $reverse, $win, $cols, $date_format, $self;
1233
1234 echo '<tr class="listing">
1235 <th style="text-align: center; vertical-align: middle"><img src="' . $self . '?image=smiley" alt="smiley" /></th>
1236';
1237
1238 column_title('filename', $sort, $reverse);
1239 column_title('size', $sort, $reverse);
1240
1241 if (!$win) {
1242 column_title('permission', $sort, $reverse);
1243 column_title('owner', $sort, $reverse);
1244 column_title('group', $sort, $reverse);
1245 }
1246
1247 echo ' <th class="functions">' . word('functions') . '</th>
1248</tr>
1249';
1250
1251 for ($i = 0; $i < sizeof($list); $i++) {
1252 $file = $list[$i];
1253
1254 $timestamps = 'mtime: ' . date($date_format, $file['mtime']) . ', ';
1255 $timestamps .= 'atime: ' . date($date_format, $file['atime']) . ', ';
1256 $timestamps .= 'ctime: ' . date($date_format, $file['ctime']);
1257
1258 echo '<tr class="listing">
1259 <td class="checkbox"><input type="checkbox" name="checked' . $i . '" value="true" onfocus="activate(\'other\')" /></td>
1260 <td class="filename" title="' . html($timestamps) . '">';
1261
1262 if ($file['is_link']) {
1263
1264 echo '<img src="' . $self . '?image=link" alt="link" /> ';
1265 echo html($file['filename']) . ' → ';
1266
1267 $real_file = relative2absolute($file['target'], $directory);
1268
1269 if (@is_readable($real_file)) {
1270 if (@is_dir($real_file)) {
1271 echo '[ <a href="' . $self . '?dir=' . urlencode($real_file) . '">' . html($file['target']) . '</a> ]';
1272 } else {
1273 echo '<a href="' . $self . '?action=view&file=' . urlencode($real_file) . '">' . html($file['target']) . '</a>';
1274 }
1275 } else {
1276 echo html($file['target']);
1277 }
1278
1279 } elseif ($file['is_dir']) {
1280
1281 echo '<img src="' . $self . '?image=folder" alt="folder" /> [ ';
1282 if ($win || $file['is_executable']) {
1283 echo '<a href="' . $self . '?dir=' . urlencode($file['path']) . '">' . html($file['filename']) . '</a>';
1284 } else {
1285 echo html($file['filename']);
1286 }
1287 echo ' ]';
1288
1289 } else {
1290
1291 if (substr($file['filename'], 0, 1) == '.') {
1292 echo '<img src="' . $self . '?image=hidden_file" alt="hidden file" /> ';
1293 } else {
1294 echo '<img src="' . $self . '?image=file" alt="file" /> ';
1295 }
1296
1297 if ($file['is_file'] && $file['is_readable']) {
1298 echo '<a href="' . $self . '?action=view&file=' . urlencode($file['path']) . '">' . html($file['filename']) . '</a>';
1299 } else {
1300 echo html($file['filename']);
1301 }
1302
1303 }
1304
1305 if ($file['size'] >= 1000) {
1306 $human = ' title="' . human_filesize($file['size']) . '"';
1307 } else {
1308 $human = '';
1309 }
1310
1311 echo "</td>\n";
1312
1313 echo "\t<td class=\"size\"$human>{$file['size']} B</td>\n";
1314
1315 if (!$win) {
1316
1317 echo "\t<td class=\"permission\" title=\"" . decoct($file['permission']) . '">';
1318
1319 $l = !$file['is_link'] && (!function_exists('posix_getuid') || $file['owner'] == posix_getuid());
1320 if ($l) echo '<a href="' . $self . '?action=permission&file=' . urlencode($file['path']) . '&dir=' . urlencode($directory) . '">';
1321 echo html(permission_octal2string($file['permission']));
1322 if ($l) echo '</a>';
1323
1324 echo "</td>\n";
1325
1326 if (array_key_exists('owner_name', $file)) {
1327 echo "\t<td class=\"owner\" title=\"uid: {$file['owner']}\">{$file['owner_name']}</td>\n";
1328 } else {
1329 echo "\t<td class=\"owner\">{$file['owner']}</td>\n";
1330 }
1331
1332 if (array_key_exists('group_name', $file)) {
1333 echo "\t<td class=\"group\" title=\"gid: {$file['group']}\">{$file['group_name']}</td>\n";
1334 } else {
1335 echo "\t<td class=\"group\">{$file['group']}</td>\n";
1336 }
1337
1338 }
1339
1340 echo ' <td class="functions">
1341 <input type="hidden" name="file' . $i . '" value="' . html($file['path']) . '" />
1342';
1343
1344 $actions = array();
1345 if (function_exists('symlink')) {
1346 $actions[] = 'create_symlink';
1347 }
1348 if (@is_writable(dirname($file['path']))) {
1349 $actions[] = 'delete';
1350 $actions[] = 'rename';
1351 $actions[] = 'move';
1352 }
1353 if ($file['is_file'] && $file['is_readable']) {
1354 $actions[] = 'copy';
1355 $actions[] = 'download';
1356 if ($file['is_writable']) $actions[] = 'edit';
1357 }
1358 if (!$win && function_exists('exec') && $file['is_file'] && $file['is_executable'] && file_exists('/bin/sh')) {
1359 $actions[] = 'execute';
1360 }
1361
1362 if (sizeof($actions) > 0) {
1363
1364 echo ' <select class="small" name="action' . $i . '" size="1">
1365 <option value="">' . str_repeat(' ', 30) . '</option>
1366';
1367
1368 foreach ($actions as $action) {
1369 echo "\t\t<option value=\"$action\">" . word($action) . "</option>\n";
1370 }
1371
1372 echo ' </select>
1373 <input class="small" type="submit" name="submit' . $i . '" value=" > " onfocus="activate(\'other\')" />
1374';
1375
1376 }
1377
1378 echo ' </td>
1379</tr>
1380';
1381
1382 }
1383
1384 echo '<tr class="listing_footer">
1385 <td style="text-align: right; vertical-align: top"><img src="' . $self . '?image=arrow" alt=">" /></td>
1386 <td colspan="' . ($cols - 1) . '">
1387 <input type="hidden" name="num" value="' . sizeof($list) . '" />
1388 <input type="hidden" name="focus" value="" />
1389 <input type="hidden" name="olddir" value="' . html($directory) . '" />
1390';
1391
1392 $actions = array();
1393 if (@is_writable(dirname($file['path']))) {
1394 $actions[] = 'delete';
1395 $actions[] = 'move';
1396 }
1397 $actions[] = 'copy';
1398
1399 echo ' <select class="small" name="action_all" size="1">
1400 <option value="">' . str_repeat(' ', 30) . '</option>
1401';
1402
1403 foreach ($actions as $action) {
1404 echo "\t\t<option value=\"$action\">" . word($action) . "</option>\n";
1405 }
1406
1407 echo ' </select>
1408 <input class="small" type="submit" name="submit_all" value=" > " onfocus="activate(\'other\')" />
1409 </td>
1410</tr>
1411';
1412
1413}
1414
1415function column_title ($column, $sort, $reverse) {
1416 global $self, $directory;
1417
1418 $d = 'dir=' . urlencode($directory) . '&';
1419
1420 $arr = '';
1421 if ($sort == $column) {
1422 if (!$reverse) {
1423 $r = '&reverse=true';
1424 $arr = ' ∧';
1425 } else {
1426 $arr = ' ∨';
1427 }
1428 } else {
1429 $r = '';
1430 }
1431 echo "\t<th class=\"$column\"><a href=\"$self?{$d}sort=$column$r\">" . word($column) . "</a>$arr</th>\n";
1432
1433}
1434
1435function directory_choice () {
1436 global $directory, $homedir, $cols, $self;
1437
1438 echo '<tr>
1439 <td colspan="' . $cols . '" id="directory">
1440 <a href="' . $self . '?dir=' . urlencode($homedir) . '">' . word('directory') . '</a>:
1441 <input type="text" name="dir" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" onfocus="activate(\'directory\')" />
1442 <input type="submit" name="changedir" value="' . word('change') . '" onfocus="activate(\'directory\')" />
1443 </td>
1444</tr>
1445';
1446
1447}
1448
1449function upload_box () {
1450 global $cols;
1451
1452 echo '<tr>
1453 <td colspan="' . $cols . '" id="upload">
1454 ' . word('file') . ':
1455 <input type="file" name="upload" onfocus="activate(\'other\')" />
1456 <input type="submit" name="submit_upload" value="' . word('upload') . '" onfocus="activate(\'other\')" />
1457 </td>
1458</tr>
1459';
1460
1461}
1462
1463function create_box () {
1464 global $cols;
1465
1466 echo '<tr>
1467 <td colspan="' . $cols . '" id="create">
1468 <select name="create_type" size="1" onfocus="activate(\'create\')">
1469 <option value="file">' . word('file') . '</option>
1470 <option value="directory">' . word('directory') . '</option>
1471 </select>
1472 <input type="text" name="create_name" onfocus="activate(\'create\')" />
1473 <input type="submit" name="submit_create" value="' . word('create') . '" onfocus="activate(\'create\')" />
1474 </td>
1475</tr>
1476';
1477
1478}
1479
1480function edit ($file) {
1481 global $self, $directory, $editcols, $editrows, $apache, $htpasswd, $htaccess;
1482
1483 html_header();
1484
1485 echo '<h2 style="margin-bottom: 3pt">' . html($file) . '</h2>
1486
1487<form action="' . $self . '" method="post">
1488
1489<table class="dialog">
1490<tr>
1491<td class="dialog">
1492
1493 <textarea name="content" cols="' . $editcols . '" rows="' . $editrows . '" WRAP="off">';
1494
1495 if (array_key_exists('content', $_POST)) {
1496 echo $_POST['content'];
1497 } else {
1498 $f = fopen($file, 'r');
1499 while (!feof($f)) {
1500 echo html(fread($f, 8192));
1501 }
1502 fclose($f);
1503 }
1504
1505 if (!empty($_POST['user'])) {
1506 echo "\n" . $_POST['user'] . ':' . crypt($_POST['password']);
1507 }
1508 if (!empty($_POST['basic_auth'])) {
1509 if ($win) {
1510 $authfile = str_replace('\\', '/', $directory) . $htpasswd;
1511 } else {
1512 $authfile = $directory . $htpasswd;
1513 }
1514 echo "\nAuthType Basic\nAuthName "Restricted Directory"\n";
1515 echo 'AuthUserFile "' . html($authfile) . ""\n";
1516 echo 'Require valid-user';
1517 }
1518
1519 echo '</textarea>
1520
1521 <hr />
1522';
1523
1524 if ($apache && basename($file) == $htpasswd) {
1525 echo '
1526 ' . word('user') . ': <input type="text" name="user" />
1527 ' . word('password') . ': <input type="password" name="password" />
1528 <input type="submit" value="' . word('add') . '" />
1529
1530 <hr />
1531';
1532
1533 }
1534
1535 if ($apache && basename($file) == $htaccess) {
1536 echo '
1537 <input type="submit" name="basic_auth" value="' . word('add_basic_auth') . '" />
1538
1539 <hr />
1540';
1541
1542 }
1543
1544 echo '
1545 <input type="hidden" name="action" value="edit" />
1546 <input type="hidden" name="file" value="' . html($file) . '" />
1547 <input type="hidden" name="dir" value="' . html($directory) . '" />
1548 <input type="reset" value="' . word('reset') . '" id="red_button" />
1549 <input type="submit" name="save" value="' . word('save') . '" id="green_button" style="margin-left: 50px" />
1550
1551</td>
1552</tr>
1553</table>
1554
1555<p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
1556
1557</form>
1558
1559';
1560
1561 html_footer();
1562
1563}
1564
1565function spacer () {
1566 global $cols;
1567
1568 echo '<tr>
1569 <td colspan="' . $cols . '" style="height: 1em"></td>
1570</tr>
1571';
1572
1573}
1574
1575function textfieldsize ($content) {
1576
1577 $size = strlen($content) + 5;
1578 if ($size < 30) $size = 30;
1579
1580 return $size;
1581
1582}
1583
1584function request_dump () {
1585
1586 foreach ($_REQUEST as $key => $value) {
1587 echo "\t<input type=\"hidden\" name=\"" . html($key) . '" value="' . html($value) . "\" />\n";
1588 }
1589
1590}
1591
1592/* ------------------------------------------------------------------------- */
1593
1594function html ($string) {
1595 global $site_charset;
1596 return htmlentities($string, ENT_COMPAT, $site_charset);
1597}
1598
1599function word ($word) {
1600 global $words, $word_charset;
1601 return htmlentities($words[$word], ENT_COMPAT, $word_charset);
1602}
1603
1604function phrase ($phrase, $arguments) {
1605 global $words;
1606 static $search;
1607
1608 if (!is_array($search)) for ($i = 1; $i <= 8; $i++) $search[] = "%$i";
1609
1610 for ($i = 0; $i < sizeof($arguments); $i++) {
1611 $arguments[$i] = nl2br(html($arguments[$i]));
1612 }
1613
1614 $replace = array('{' => '<pre>', '}' =>'</pre>', '[' => '<b>', ']' => '</b>');
1615
1616 return str_replace($search, $arguments, str_replace(array_keys($replace), $replace, nl2br(html($words[$phrase]))));
1617
1618}
1619
1620function getwords ($lang) {
1621 global $date_format, $word_charset;
1622 $word_charset = 'UTF-8';
1623
1624 switch ($lang) {
1625 case 'de':
1626
1627 $date_format = 'd.m.y H:i:s';
1628
1629 return array(
1630'directory' => 'Verzeichnis',
1631'file' => 'Datei',
1632'filename' => 'Dateiname',
1633
1634'size' => 'Größe',
1635'permission' => 'Rechte',
1636'owner' => 'Eigner',
1637'group' => 'Gruppe',
1638'other' => 'Andere',
1639'functions' => 'Funktionen',
1640
1641'read' => 'lesen',
1642'write' => 'schreiben',
1643'execute' => 'ausführen',
1644
1645'create_symlink' => 'Symlink erstellen',
1646'delete' => 'löschen',
1647'rename' => 'umbenennen',
1648'move' => 'verschieben',
1649'copy' => 'kopieren',
1650'edit' => 'editieren',
1651'download' => 'herunterladen',
1652'upload' => 'hochladen',
1653'create' => 'erstellen',
1654'change' => 'wechseln',
1655'save' => 'speichern',
1656'set' => 'setze',
1657'reset' => 'zurücksetzen',
1658'relative' => 'Pfad zum Ziel relativ',
1659
1660'yes' => 'Ja',
1661'no' => 'Nein',
1662'back' => 'zurück',
1663'destination' => 'Ziel',
1664'symlink' => 'Symbolischer Link',
1665'no_output' => 'keine Ausgabe',
1666
1667'user' => 'Benutzername',
1668'password' => 'Kennwort',
1669'add' => 'hinzufügen',
1670'add_basic_auth' => 'HTTP-Basic-Auth hinzufügen',
1671
1672'uploaded' => '"[%1]" wurde hochgeladen.',
1673'not_uploaded' => '"[%1]" konnte nicht hochgeladen werden.',
1674'already_exists' => '"[%1]" existiert bereits.',
1675'created' => '"[%1]" wurde erstellt.',
1676'not_created' => '"[%1]" konnte nicht erstellt werden.',
1677'really_delete' => 'Sollen folgende Dateien wirklich gelöscht werden?',
1678'deleted' => "Folgende Dateien wurden gelöscht:\n[%1]",
1679'not_deleted' => "Folgende Dateien konnten nicht gelöscht werden:\n[%1]",
1680'rename_file' => 'Benenne Datei um:',
1681'renamed' => '"[%1]" wurde in "[%2]" umbenannt.',
1682'not_renamed' => '"[%1] konnte nicht in "[%2]" umbenannt werden.',
1683'move_files' => 'Verschieben folgende Dateien:',
1684'moved' => "Folgende Dateien wurden nach \"[%2]\" verschoben:\n[%1]",
1685'not_moved' => "Folgende Dateien konnten nicht nach \"[%2]\" verschoben werden:\n[%1]",
1686'copy_files' => 'Kopiere folgende Dateien:',
1687'copied' => "Folgende Dateien wurden nach \"[%2]\" kopiert:\n[%1]",
1688'not_copied' => "Folgende Dateien konnten nicht nach \"[%2]\" kopiert werden:\n[%1]",
1689'not_edited' => '"[%1]" kann nicht editiert werden.',
1690'executed' => "\"[%1]\" wurde erfolgreich ausgeführt:\n{%2}",
1691'not_executed' => "\"[%1]\" konnte nicht erfolgreich ausgeführt werden:\n{%2}",
1692'saved' => '"[%1]" wurde gespeichert.',
1693'not_saved' => '"[%1]" konnte nicht gespeichert werden.',
1694'symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" wurde erstellt.',
1695'not_symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" konnte nicht erstellt werden.',
1696'permission_for' => 'Rechte für "[%1]":',
1697'permission_set' => 'Die Rechte für "[%1]" wurden auf [%2] gesetzt.',
1698'permission_not_set' => 'Die Rechte für "[%1]" konnten nicht auf [%2] gesetzt werden.',
1699'not_readable' => '"[%1]" kann nicht gelesen werden.'
1700 );
1701
1702 case 'fr':
1703
1704 $date_format = 'd.m.y H:i:s';
1705
1706 return array(
1707'directory' => 'Répertoire',
1708'file' => 'Fichier',
1709'filename' => 'Nom fichier',
1710
1711'size' => 'Taille',
1712'permission' => 'Droits',
1713'owner' => 'Propriétaire',
1714'group' => 'Groupe',
1715'other' => 'Autres',
1716'functions' => 'Fonctions',
1717
1718'read' => 'Lire',
1719'write' => 'Ecrire',
1720'execute' => 'Exécuter',
1721
1722'create_symlink' => 'Créer lien symbolique',
1723'delete' => 'Effacer',
1724'rename' => 'Renommer',
1725'move' => 'Déplacer',
1726'copy' => 'Copier',
1727'edit' => 'Ouvrir',
1728'download' => 'Télécharger sur PC',
1729'upload' => 'Télécharger sur serveur',
1730'create' => 'Créer',
1731'change' => 'Changer',
1732'save' => 'Sauvegarder',
1733'set' => 'Exécuter',
1734'reset' => 'Réinitialiser',
1735'relative' => 'Relatif',
1736
1737'yes' => 'Oui',
1738'no' => 'Non',
1739'back' => 'Retour',
1740'destination' => 'Destination',
1741'symlink' => 'Lien symbollique',
1742'no_output' => 'Pas de sortie',
1743
1744'user' => 'Utilisateur',
1745'password' => 'Mot de passe',
1746'add' => 'Ajouter',
1747'add_basic_auth' => 'add basic-authentification',
1748
1749'uploaded' => '"[%1]" a été téléchargé sur le serveur.',
1750'not_uploaded' => '"[%1]" n a pas été téléchargé sur le serveur.',
1751'already_exists' => '"[%1]" existe déjà .',
1752'created' => '"[%1]" a été créé.',
1753'not_created' => '"[%1]" n a pas pu être créé.',
1754'really_delete' => 'Effacer le fichier?',
1755'deleted' => "Ces fichiers ont été détuits:\n[%1]",
1756'not_deleted' => "Ces fichiers n ont pu être détruits:\n[%1]",
1757'rename_file' => 'Renomme fichier:',
1758'renamed' => '"[%1]" a été renommé en "[%2]".',
1759'not_renamed' => '"[%1] n a pas pu être renommé en "[%2]".',
1760'move_files' => 'Déplacer ces fichiers:',
1761'moved' => "Ces fichiers ont été déplacés en \"[%2]\":\n[%1]",
1762'not_moved' => "Ces fichiers n ont pas pu être déplacés en \"[%2]\":\n[%1]",
1763'copy_files' => 'Copier ces fichiers:',
1764'copied' => "Ces fichiers ont été copiés en \"[%2]\":\n[%1]",
1765'not_copied' => "Ces fichiers n ont pas pu être copiés en \"[%2]\":\n[%1]",
1766'not_edited' => '"[%1]" ne peut être ouvert.',
1767'executed' => "\"[%1]\" a été brillamment exécuté :\n{%2}",
1768'not_executed' => "\"[%1]\" n a pas pu être exécuté:\n{%2}",
1769'saved' => '"[%1]" a été sauvegardé.',
1770'not_saved' => '"[%1]" n a pas pu être sauvegardé.',
1771'symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" a été crée.',
1772'not_symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" n a pas pu être créé.',
1773'permission_for' => 'Droits de "[%1]":',
1774'permission_set' => 'Droits de "[%1]" ont été changés en [%2].',
1775'permission_not_set' => 'Droits de "[%1]" n ont pas pu être changés en[%2].',
1776'not_readable' => '"[%1]" ne peut pas être ouvert.'
1777 );
1778
1779 case 'it':
1780
1781 $date_format = 'd-m-Y H:i:s';
1782
1783 return array(
1784'directory' => 'Directory',
1785'file' => 'File',
1786'filename' => 'Nome File',
1787
1788'size' => 'Dimensioni',
1789'permission' => 'Permessi',
1790'owner' => 'Proprietario',
1791'group' => 'Gruppo',
1792'other' => 'Altro',
1793'functions' => 'Funzioni',
1794
1795'read' => 'leggi',
1796'write' => 'scrivi',
1797'execute' => 'esegui',
1798
1799'create_symlink' => 'crea link simbolico',
1800'delete' => 'cancella',
1801'rename' => 'rinomina',
1802'move' => 'sposta',
1803'copy' => 'copia',
1804'edit' => 'modifica',
1805'download' => 'download',
1806'upload' => 'upload',
1807'create' => 'crea',
1808'change' => 'cambia',
1809'save' => 'salva',
1810'set' => 'imposta',
1811'reset' => 'reimposta',
1812'relative' => 'Percorso relativo per la destinazione',
1813
1814'yes' => 'Si',
1815'no' => 'No',
1816'back' => 'indietro',
1817'destination' => 'Destinazione',
1818'symlink' => 'Link simbolico',
1819'no_output' => 'no output',
1820
1821'user' => 'User',
1822'password' => 'Password',
1823'add' => 'aggiungi',
1824'add_basic_auth' => 'aggiungi autenticazione base',
1825
1826'uploaded' => '"[%1]" è stato caricato.',
1827'not_uploaded' => '"[%1]" non è stato caricato.',
1828'already_exists' => '"[%1]" esiste già .',
1829'created' => '"[%1]" è stato creato.',
1830'not_created' => '"[%1]" non è stato creato.',
1831'really_delete' => 'Cancello questi file ?',
1832'deleted' => "Questi file sono stati cancellati:\n[%1]",
1833'not_deleted' => "Questi file non possono essere cancellati:\n[%1]",
1834'rename_file' => 'File rinominato:',
1835'renamed' => '"[%1]" è stato rinominato in "[%2]".',
1836'not_renamed' => '"[%1] non è stato rinominato in "[%2]".',
1837'move_files' => 'Sposto questi file:',
1838'moved' => "Questi file sono stati spostati in \"[%2]\":\n[%1]",
1839'not_moved' => "Questi file non possono essere spostati in \"[%2]\":\n[%1]",
1840'copy_files' => 'Copio questi file',
1841'copied' => "Questi file sono stati copiati in \"[%2]\":\n[%1]",
1842'not_copied' => "Questi file non possono essere copiati in \"[%2]\":\n[%1]",
1843'not_edited' => '"[%1]" non può essere modificato.',
1844'executed' => "\"[%1]\" è stato eseguito con successo:\n{%2}",
1845'not_executed' => "\"[%1]\" non è stato eseguito con successo\n{%2}",
1846'saved' => '"[%1]" è stato salvato.',
1847'not_saved' => '"[%1]" non è stato salvato.',
1848'symlinked' => 'Il link siambolico da "[%2]" a "[%1]" è stato creato.',
1849'not_symlinked' => 'Il link siambolico da "[%2]" a "[%1]" non è stato creato.',
1850'permission_for' => 'Permessi di "[%1]":',
1851'permission_set' => 'I permessi di "[%1]" sono stati impostati [%2].',
1852'permission_not_set' => 'I permessi di "[%1]" non sono stati impostati [%2].',
1853'not_readable' => '"[%1]" non può essere letto.'
1854 );
1855
1856 case 'nl':
1857
1858 $date_format = 'n/j/y H:i:s';
1859
1860 return array(
1861'directory' => 'Directory',
1862'file' => 'Bestand',
1863'filename' => 'Bestandsnaam',
1864
1865'size' => 'Grootte',
1866'permission' => 'Bevoegdheid',
1867'owner' => 'Eigenaar',
1868'group' => 'Groep',
1869'other' => 'Anderen',
1870'functions' => 'Functies',
1871
1872'read' => 'lezen',
1873'write' => 'schrijven',
1874'execute' => 'uitvoeren',
1875
1876'create_symlink' => 'maak symlink',
1877'delete' => 'verwijderen',
1878'rename' => 'hernoemen',
1879'move' => 'verplaatsen',
1880'copy' => 'kopieren',
1881'edit' => 'bewerken',
1882'download' => 'downloaden',
1883'upload' => 'uploaden',
1884'create' => 'aanmaken',
1885'change' => 'veranderen',
1886'save' => 'opslaan',
1887'set' => 'instellen',
1888'reset' => 'resetten',
1889'relative' => 'Relatief pat naar doel',
1890
1891'yes' => 'Ja',
1892'no' => 'Nee',
1893'back' => 'terug',
1894'destination' => 'Bestemming',
1895'symlink' => 'Symlink',
1896'no_output' => 'geen output',
1897
1898'user' => 'Gebruiker',
1899'password' => 'Wachtwoord',
1900'add' => 'toevoegen',
1901'add_basic_auth' => 'add basic-authentification',
1902
1903'uploaded' => '"[%1]" is verstuurd.',
1904'not_uploaded' => '"[%1]" kan niet worden verstuurd.',
1905'already_exists' => '"[%1]" bestaat al.',
1906'created' => '"[%1]" is aangemaakt.',
1907'not_created' => '"[%1]" kan niet worden aangemaakt.',
1908'really_delete' => 'Deze bestanden verwijderen?',
1909'deleted' => "Deze bestanden zijn verwijderd:\n[%1]",
1910'not_deleted' => "Deze bestanden konden niet worden verwijderd:\n[%1]",
1911'rename_file' => 'Bestandsnaam veranderen:',
1912'renamed' => '"[%1]" heet nu "[%2]".',
1913'not_renamed' => '"[%1] kon niet worden veranderd in "[%2]".',
1914'move_files' => 'Verplaats deze bestanden:',
1915'moved' => "Deze bestanden zijn verplaatst naar \"[%2]\":\n[%1]",
1916'not_moved' => "Kan deze bestanden niet verplaatsen naar \"[%2]\":\n[%1]",
1917'copy_files' => 'Kopieer deze bestanden:',
1918'copied' => "Deze bestanden zijn gekopieerd naar \"[%2]\":\n[%1]",
1919'not_copied' => "Deze bestanden kunnen niet worden gekopieerd naar \"[%2]\":\n[%1]",
1920'not_edited' => '"[%1]" kan niet worden bewerkt.',
1921'executed' => "\"[%1]\" is met succes uitgevoerd:\n{%2}",
1922'not_executed' => "\"[%1]\" is niet goed uitgevoerd:\n{%2}",
1923'saved' => '"[%1]" is opgeslagen.',
1924'not_saved' => '"[%1]" is niet opgeslagen.',
1925'symlinked' => 'Symlink van "[%2]" naar "[%1]" is aangemaakt.',
1926'not_symlinked' => 'Symlink van "[%2]" naar "[%1]" is niet aangemaakt.',
1927'permission_for' => 'Bevoegdheid voor "[%1]":',
1928'permission_set' => 'Bevoegdheid van "[%1]" is ingesteld op [%2].',
1929'permission_not_set' => 'Bevoegdheid van "[%1]" is niet ingesteld op [%2].',
1930'not_readable' => '"[%1]" kan niet worden gelezen.'
1931 );
1932
1933 case 'se':
1934
1935 $date_format = 'n/j/y H:i:s';
1936
1937 return array(
1938'directory' => 'Mapp',
1939'file' => 'Fil',
1940'filename' => 'Filnamn',
1941
1942'size' => 'Storlek',
1943'permission' => 'Säkerhetsnivå',
1944'owner' => 'Ägare',
1945'group' => 'Grupp',
1946'other' => 'Andra',
1947'functions' => 'Funktioner',
1948
1949'read' => 'Läs',
1950'write' => 'Skriv',
1951'execute' => 'Utför',
1952
1953'create_symlink' => 'Skapa symlink',
1954'delete' => 'Radera',
1955'rename' => 'Byt namn',
1956'move' => 'Flytta',
1957'copy' => 'Kopiera',
1958'edit' => 'Ändra',
1959'download' => 'Ladda ner',
1960'upload' => 'Ladda upp',
1961'create' => 'Skapa',
1962'change' => 'Ändra',
1963'save' => 'Spara',
1964'set' => 'Markera',
1965'reset' => 'Töm',
1966'relative' => 'Relative path to target',
1967
1968'yes' => 'Ja',
1969'no' => 'Nej',
1970'back' => 'Tillbaks',
1971'destination' => 'Destination',
1972'symlink' => 'Symlink',
1973'no_output' => 'no output',
1974
1975'user' => 'Användare',
1976'password' => 'Lösenord',
1977'add' => 'Lägg till',
1978'add_basic_auth' => 'add basic-authentification',
1979
1980'uploaded' => '"[%1]" har laddats upp.',
1981'not_uploaded' => '"[%1]" kunde inte laddas upp.',
1982'already_exists' => '"[%1]" finns redan.',
1983'created' => '"[%1]" har skapats.',
1984'not_created' => '"[%1]" kunde inte skapas.',
1985'really_delete' => 'Radera dessa filer?',
1986'deleted' => "De här filerna har raderats:\n[%1]",
1987'not_deleted' => "Dessa filer kunde inte raderas:\n[%1]",
1988'rename_file' => 'Byt namn på fil:',
1989'renamed' => '"[%1]" har bytt namn till "[%2]".',
1990'not_renamed' => '"[%1] kunde inte döpas om till "[%2]".',
1991'move_files' => 'Flytta dessa filer:',
1992'moved' => "Dessa filer har flyttats till \"[%2]\":\n[%1]",
1993'not_moved' => "Dessa filer kunde inte flyttas till \"[%2]\":\n[%1]",
1994'copy_files' => 'Kopiera dessa filer:',
1995'copied' => "Dessa filer har kopierats till \"[%2]\":\n[%1]",
1996'not_copied' => "Dessa filer kunde inte kopieras till \"[%2]\":\n[%1]",
1997'not_edited' => '"[%1]" kan inte ändras.',
1998'executed' => "\"[%1]\" har utförts:\n{%2}",
1999'not_executed' => "\"[%1]\" kunde inte utföras:\n{%2}",
2000'saved' => '"[%1]" har sparats.',
2001'not_saved' => '"[%1]" kunde inte sparas.',
2002'symlinked' => 'Symlink från "[%2]" till "[%1]" har skapats.',
2003'not_symlinked' => 'Symlink från "[%2]" till "[%1]" kunde inte skapas.',
2004'permission_for' => 'Rättigheter för "[%1]":',
2005'permission_set' => 'Rättigheter för "[%1]" ändrades till [%2].',
2006'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
2007'not_readable' => '"[%1]" kan inte läsas.'
2008 );
2009
2010 case 'sp':
2011
2012 $date_format = 'j/n/y H:i:s';
2013
2014 return array(
2015'directory' => 'Directorio',
2016'file' => 'Archivo',
2017'filename' => 'Nombre Archivo',
2018
2019'size' => 'Tamaño',
2020'permission' => 'Permisos',
2021'owner' => 'Propietario',
2022'group' => 'Grupo',
2023'other' => 'Otros',
2024'functions' => 'Funciones',
2025
2026'read' => 'lectura',
2027'write' => 'escritura',
2028'execute' => 'ejecución',
2029
2030'create_symlink' => 'crear enlace',
2031'delete' => 'borrar',
2032'rename' => 'renombrar',
2033'move' => 'mover',
2034'copy' => 'copiar',
2035'edit' => 'editar',
2036'download' => 'bajar',
2037'upload' => 'subir',
2038'create' => 'crear',
2039'change' => 'cambiar',
2040'save' => 'salvar',
2041'set' => 'setear',
2042'reset' => 'resetear',
2043'relative' => 'Path relativo',
2044
2045'yes' => 'Si',
2046'no' => 'No',
2047'back' => 'atrás',
2048'destination' => 'Destino',
2049'symlink' => 'Enlace',
2050'no_output' => 'sin salida',
2051
2052'user' => 'Usuario',
2053'password' => 'Clave',
2054'add' => 'agregar',
2055'add_basic_auth' => 'agregar autentificación básica',
2056
2057'uploaded' => '"[%1]" ha sido subido.',
2058'not_uploaded' => '"[%1]" no pudo ser subido.',
2059'already_exists' => '"[%1]" ya existe.',
2060'created' => '"[%1]" ha sido creado.',
2061'not_created' => '"[%1]" no pudo ser creado.',
2062'really_delete' => '¿Borra estos archivos?',
2063'deleted' => "Estos archivos han sido borrados:\n[%1]",
2064'not_deleted' => "Estos archivos no pudieron ser borrados:\n[%1]",
2065'rename_file' => 'Renombra archivo:',
2066'renamed' => '"[%1]" ha sido renombrado a "[%2]".',
2067'not_renamed' => '"[%1] no pudo ser renombrado a "[%2]".',
2068'move_files' => 'Mover estos archivos:',
2069'moved' => "Estos archivos han sido movidos a \"[%2]\":\n[%1]",
2070'not_moved' => "Estos archivos no pudieron ser movidos a \"[%2]\":\n[%1]",
2071'copy_files' => 'Copiar estos archivos:',
2072'copied' => "Estos archivos han sido copiados a \"[%2]\":\n[%1]",
2073'not_copied' => "Estos archivos no pudieron ser copiados \"[%2]\":\n[%1]",
2074'not_edited' => '"[%1]" no pudo ser editado.',
2075'executed' => "\"[%1]\" ha sido ejecutado correctamente:\n{%2}",
2076'not_executed' => "\"[%1]\" no pudo ser ejecutado correctamente:\n{%2}",
2077'saved' => '"[%1]" ha sido salvado.',
2078'not_saved' => '"[%1]" no pudo ser salvado.',
2079'symlinked' => 'Enlace desde "[%2]" a "[%1]" ha sido creado.',
2080'not_symlinked' => 'Enlace desde "[%2]" a "[%1]" no pudo ser creado.',
2081'permission_for' => 'Permisos de "[%1]":',
2082'permission_set' => 'Permisos de "[%1]" fueron seteados a [%2].',
2083'permission_not_set' => 'Permisos de "[%1]" no pudo ser seteado a [%2].',
2084'not_readable' => '"[%1]" no pudo ser leÃdo.'
2085 );
2086
2087 case 'dk':
2088
2089 $date_format = 'n/j/y H:i:s';
2090
2091 return array(
2092'directory' => 'Mappe',
2093'file' => 'Fil',
2094'filename' => 'Filnavn',
2095
2096'size' => 'Størrelse',
2097'permission' => 'Rettighed',
2098'owner' => 'Ejer',
2099'group' => 'Gruppe',
2100'other' => 'Andre',
2101'functions' => 'Funktioner',
2102
2103'read' => 'læs',
2104'write' => 'skriv',
2105'execute' => 'kør',
2106
2107'create_symlink' => 'opret symbolsk link',
2108'delete' => 'slet',
2109'rename' => 'omdøb',
2110'move' => 'flyt',
2111'copy' => 'kopier',
2112'edit' => 'rediger',
2113'download' => 'download',
2114'upload' => 'upload',
2115'create' => 'opret',
2116'change' => 'skift',
2117'save' => 'gem',
2118'set' => 'sæt',
2119'reset' => 'nulstil',
2120'relative' => 'Relativ sti til valg',
2121
2122'yes' => 'Ja',
2123'no' => 'Nej',
2124'back' => 'tilbage',
2125'destination' => 'Distination',
2126'symlink' => 'Symbolsk link',
2127'no_output' => 'ingen resultat',
2128
2129'user' => 'Bruger',
2130'password' => 'Kodeord',
2131'add' => 'tilføj',
2132'add_basic_auth' => 'tilføj grundliggende rettigheder',
2133
2134'uploaded' => '"[%1]" er blevet uploaded.',
2135'not_uploaded' => '"[%1]" kunnu ikke uploades.',
2136'already_exists' => '"[%1]" findes allerede.',
2137'created' => '"[%1]" er blevet oprettet.',
2138'not_created' => '"[%1]" kunne ikke oprettes.',
2139'really_delete' => 'Slet disse filer?',
2140'deleted' => "Disse filer er blevet slettet:\n[%1]",
2141'not_deleted' => "Disse filer kunne ikke slettes:\n[%1]",
2142'rename_file' => 'Omdød fil:',
2143'renamed' => '"[%1]" er blevet omdøbt til "[%2]".',
2144'not_renamed' => '"[%1] kunne ikke omdøbes til "[%2]".',
2145'move_files' => 'Flyt disse filer:',
2146'moved' => "Disse filer er blevet flyttet til \"[%2]\":\n[%1]",
2147'not_moved' => "Disse filer kunne ikke flyttes til \"[%2]\":\n[%1]",
2148'copy_files' => 'Kopier disse filer:',
2149'copied' => "Disse filer er kopieret til \"[%2]\":\n[%1]",
2150'not_copied' => "Disse filer kunne ikke kopieres til \"[%2]\":\n[%1]",
2151'not_edited' => '"[%1]" kan ikke redigeres.',
2152'executed' => "\"[%1]\" er blevet kørt korrekt:\n{%2}",
2153'not_executed' => "\"[%1]\" kan ikke køres korrekt:\n{%2}",
2154'saved' => '"[%1]" er blevet gemt.',
2155'not_saved' => '"[%1]" kunne ikke gemmes.',
2156'symlinked' => 'Symbolsk link fra "[%2]" til "[%1]" er blevet oprettet.',
2157'not_symlinked' => 'Symbolsk link fra "[%2]" til "[%1]" kunne ikke oprettes.',
2158'permission_for' => 'Rettigheder for "[%1]":',
2159'permission_set' => 'Rettigheder for "[%1]" blev sat til [%2].',
2160'permission_not_set' => 'Rettigheder for "[%1]" kunne ikke sættes til [%2].',
2161'not_readable' => '"[%1]" Kan ikke læses.'
2162 );
2163
2164 case 'tr':
2165
2166 $date_format = 'n/j/y H:i:s';
2167
2168 return array(
2169'directory' => 'Klasör',
2170'file' => 'Dosya',
2171'filename' => 'dosya adi',
2172
2173'size' => 'boyutu',
2174'permission' => 'Izin',
2175'owner' => 'sahib',
2176'group' => 'Grup',
2177'other' => 'Digerleri',
2178'functions' => 'Fonksiyonlar',
2179
2180'read' => 'oku',
2181'write' => 'yaz',
2182'execute' => 'çalistir',
2183
2184'create_symlink' => 'yarat symlink',
2185'delete' => 'sil',
2186'rename' => 'ad degistir',
2187'move' => 'tasi',
2188'copy' => 'kopyala',
2189'edit' => 'düzenle',
2190'download' => 'indir',
2191'upload' => 'yükle',
2192'create' => 'create',
2193'change' => 'degistir',
2194'save' => 'kaydet',
2195'set' => 'ayar',
2196'reset' => 'sifirla',
2197'relative' => 'Hedef yola göre',
2198
2199'yes' => 'Evet',
2200'no' => 'Hayir',
2201'back' => 'Geri',
2202'destination' => 'Hedef',
2203'symlink' => 'Kýsa yol',
2204'no_output' => 'çikti yok',
2205
2206'user' => 'Kullanici',
2207'password' => 'Sifre',
2208'add' => 'ekle',
2209'add_basic_auth' => 'ekle basit-authentification',
2210
2211'uploaded' => '"[%1]" yüklendi.',
2212'not_uploaded' => '"[%1]" yüklenemedi.',
2213'already_exists' => '"[%1]" kullanilmakta.',
2214'created' => '"[%1]" olusturuldu.',
2215'not_created' => '"[%1]" olusturulamadi.',
2216'really_delete' => 'Bu dosyalari silmek istediginizden eminmisiniz?',
2217'deleted' => "Bu dosyalar silindi:\n[%1]",
2218'not_deleted' => "Bu dosyalar silinemedi:\n[%1]",
2219'rename_file' => 'Adi degisen dosya:',
2220'renamed' => '"[%1]" adili dosyanin yeni adi "[%2]".',
2221'not_renamed' => '"[%1] adi degistirilemedi "[%2]" ile.',
2222'move_files' => 'Tasinan dosyalar:',
2223'moved' => "Bu dosyalari tasidiginiz yer \"[%2]\":\n[%1]",
2224'not_moved' => "Bu dosyalari tasiyamadiginiz yer \"[%2]\":\n[%1]",
2225'copy_files' => 'Kopyalanan dosyalar:',
2226'copied' => "Bu dosyalar kopyalandi \"[%2]\":\n[%1]",
2227'not_copied' => "Bu dosyalar kopyalanamiyor \"[%2]\":\n[%1]",
2228'not_edited' => '"[%1]" düzenlenemiyor.',
2229'executed' => "\"[%1]\" basariyla çalistirildi:\n{%2}",
2230'not_executed' => "\"[%1]\" çalistirilamadi:\n{%2}",
2231'saved' => '"[%1]" kaydedildi.',
2232'not_saved' => '"[%1]" kaydedilemedi.',
2233'symlinked' => '"[%2]" den "[%1]" e kýsayol oluþturuldu.',
2234'not_symlinked' => '"[%2]"den "[%1]" e kýsayol oluþturulamadý.',
2235'permission_for' => 'Izinler "[%1]":',
2236'permission_set' => 'Izinler "[%1]" degistirildi [%2].',
2237'permission_not_set' => 'Izinler "[%1]" degistirilemedi [%2].',
2238'not_readable' => '"[%1]" okunamiyor.'
2239 );
2240
2241 case 'cs':
2242
2243 $date_format = 'd.m.y H:i:s';
2244
2245 return array(
2246'directory' => 'Adresář',
2247'file' => 'Soubor',
2248'filename' => 'Jméno souboru',
2249
2250'size' => 'Velikost',
2251'permission' => 'Práva',
2252'owner' => 'VlastnÃk',
2253'group' => 'Skupina',
2254'other' => 'OstatnÃ',
2255'functions' => 'Funkce',
2256
2257'read' => 'ÄŒtenÃ',
2258'write' => 'Zápis',
2259'execute' => 'SpouÅ¡tÄ›nÃ',
2260
2261'create_symlink' => 'Vytvořit symbolický odkaz',
2262'delete' => 'Smazat',
2263'rename' => 'Přejmenovat',
2264'move' => 'Přesunout',
2265'copy' => 'ZkopÃrovat',
2266'edit' => 'OtevÅ™Ãt',
2267'download' => 'Stáhnout',
2268'upload' => 'Nahraj na server',
2269'create' => 'Vytvořit',
2270'change' => 'Změnit',
2271'save' => 'Uložit',
2272'set' => 'Nastavit',
2273'reset' => 'zpět',
2274'relative' => 'Relatif',
2275
2276'yes' => 'Ano',
2277'no' => 'Ne',
2278'back' => 'Zpět',
2279'destination' => 'Destination',
2280'symlink' => 'Symbolický odkaz',
2281'no_output' => 'Prázdný výstup',
2282
2283'user' => 'Uživatel',
2284'password' => 'Heslo',
2285'add' => 'Přidat',
2286'add_basic_auth' => 'přidej základnà autentizaci',
2287
2288'uploaded' => 'Soubor "[%1]" byl nahrán na server.',
2289'not_uploaded' => 'Soubor "[%1]" nebyl nahrán na server.',
2290'already_exists' => 'Soubor "[%1]" už exituje.',
2291'created' => 'Soubor "[%1]" byl vytvořen.',
2292'not_created' => 'Soubor "[%1]" nemohl být vytvořen.',
2293'really_delete' => 'Vymazat soubor?',
2294'deleted' => "Byly vymazány tyto soubory:\n[%1]",
2295'not_deleted' => "Tyto soubory nemohly být vytvořeny:\n[%1]",
2296'rename_file' => 'Přejmenuj soubory:',
2297'renamed' => 'Soubor "[%1]" byl přejmenován na "[%2]".',
2298'not_renamed' => 'Soubor "[%1]" nemohl být přejmenován na "[%2]".',
2299'move_files' => 'PÅ™emÃstit tyto soubory:',
2300'moved' => "Tyto soubory byly pÅ™emÃstÄ›ny do \"[%2]\":\n[%1]",
2301'not_moved' => "Tyto soubory nemohly být pÅ™emÃstÄ›ny do \"[%2]\":\n[%1]",
2302'copy_files' => 'ZkopÃrovat tyto soubory:',
2303'copied' => "Tyto soubory byly zkopÃrovány do \"[%2]\":\n[%1]",
2304'not_copied' => "Tyto soubory nemohly být zkopÃrovány do \"[%2]\":\n[%1]",
2305'not_edited' => 'Soubor "[%1]" nemohl být otevřen.',
2306'executed' => "SOubor \"[%1]\" byl spuštěn :\n{%2}",
2307'not_executed' => "Soubor \"[%1]\" nemohl být spuštěn:\n{%2}",
2308'saved' => 'Soubor "[%1]" byl uložen.',
2309'not_saved' => 'Soubor "[%1]" nemohl být uložen.',
2310'symlinked' => 'Byl vyvořen symbolický odkaz "[%2]" na soubor "[%1]".',
2311'not_symlinked' => 'Symbolický odkaz "[%2]" na soubor "[%1]" nemohl být vytvořen.',
2312'permission_for' => 'Práva k "[%1]":',
2313'permission_set' => 'Práva k "[%1]" byla změněna na [%2].',
2314'permission_not_set' => 'Práva k "[%1]" nemohla být změněna na [%2].',
2315'not_readable' => 'Soubor "[%1]" nenà možno pÅ™eÄÃst.'
2316 );
2317
2318 case 'ru':
2319
2320 $date_format = 'd.m.y H:i:s';
2321
2322 return array(
2323'directory' => 'Каталог',
2324'file' => 'Файл',
2325'filename' => 'Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°',
2326
2327'size' => 'Размер',
2328'permission' => 'Права',
2329'owner' => 'ХозÑин',
2330'group' => 'Группа',
2331'other' => 'Другие',
2332'functions' => 'ФункциÑ',
2333
2334'read' => 'читать',
2335'write' => 'пиÑать',
2336'execute' => 'выполнить',
2337
2338'create_symlink' => 'Сделать Ñимлинк',
2339'delete' => 'удалить',
2340'rename' => 'переименовать',
2341'move' => 'передвинуть',
2342'copy' => 'копировать',
2343'edit' => 'редактировать',
2344'download' => 'Ñкачать',
2345'upload' => 'закачать',
2346'create' => 'Ñделать',
2347'change' => 'поменÑть',
2348'save' => 'Ñохранить',
2349'set' => 'уÑтановить',
2350'reset' => 'ÑброÑить',
2351'relative' => 'отноÑительный путь к цели',
2352
2353'yes' => 'да',
2354'no' => 'нет',
2355'back' => 'назад',
2356'destination' => 'цель',
2357'symlink' => 'ÑимволичеÑкий линк',
2358'no_output' => 'нет вывода',
2359
2360'user' => 'Пользователь',
2361'password' => 'Пароль',
2362'add' => 'добавить',
2363'add_basic_auth' => 'Добавить HTTP-Basic-Auth',
2364
2365'uploaded' => '"[%1]" был закачен.',
2366'not_uploaded' => '"[%1]" невозможно было закачÑть.',
2367'already_exists' => '"[%1]" уже ÑущеÑтвует.',
2368'created' => '"[%1]" был Ñделан.',
2369'not_created' => '"[%1]" не возможно Ñделать.',
2370'really_delete' => 'ДейÑтвительно Ñтот файл удалить?',
2371'deleted' => "Следующие файлы были удалены:\n[%1]",
2372'not_deleted' => "Следующие файлы не возможно было удалить:\n[%1]",
2373'rename_file' => 'Переименовываю файл:',
2374'renamed' => '"[%1]" был переименован на "[%2]".',
2375'not_renamed' => '"[%1] невозможно было переименовать на "[%2]".',
2376'move_files' => 'Передвигаю Ñледующие файлы:',
2377'moved' => "Следующие файлы были передвинуты в каталог \"[%2]\":\n[%1]",
2378'not_moved' => "Следующие файлы невозможно было передвинуть в каталог \"[%2]\":\n[%1]",
2379'copy_files' => 'Копирую Ñледущие файлы:',
2380'copied' => "Следущие файлы былы Ñкопированы в каталог \"[%2]\" :\n[%1]",
2381'not_copied' => "Следующие файлы невозможно было Ñкопировать в каталог \"[%2]\" :\n[%1]",
2382'not_edited' => '"[%1]" не может быть отредактирован.',
2383'executed' => "\"[%1]\" был уÑпешно иÑполнен:\n{%2}",
2384'not_executed' => "\"[%1]\" невозможно было запуÑтить на иÑполнение:\n{%2}",
2385'saved' => '"[%1]" был Ñохранен.',
2386'not_saved' => '"[%1]" невозможно было Ñохранить.',
2387'symlinked' => 'Симлинк Ñ "[%2]" на "[%1]" был Ñделан.',
2388'not_symlinked' => 'Ðевозможно было Ñделать Ñимлинк Ñ "[%2]" на "[%1]".',
2389'permission_for' => 'Права доÑтупа "[%1]":',
2390'permission_set' => 'Права доÑтупа "[%1]" были изменены на [%2].',
2391'permission_not_set' => 'Ðевозможно было изменить права доÑтупа к "[%1]" на [%2] .',
2392'not_readable' => '"[%1]" невозможно прочитать.'
2393 );
2394
2395 case 'pl':
2396
2397 $date_format = 'd.m.y H:i:s';
2398
2399 return array(
2400'directory' => 'Katalog',
2401'file' => 'Plik',
2402'filename' => 'Nazwa pliku',
2403'size' => 'Rozmiar',
2404'permission' => 'Uprawnienia',
2405'owner' => 'Właściciel',
2406'group' => 'Grupa',
2407'other' => 'Inni',
2408'functions' => 'Funkcje',
2409
2410'read' => 'odczyt',
2411'write' => 'zapis',
2412'execute' => 'wykonywanie',
2413
2414'create_symlink' => 'utwórz dowiązanie symboliczne',
2415'delete' => 'kasuj',
2416'rename' => 'zamień',
2417'move' => 'przenieÅ›',
2418'copy' => 'kopiuj',
2419'edit' => 'edytuj',
2420'download' => 'pobierz',
2421'upload' => 'Prześlij',
2422'create' => 'Utwórz',
2423'change' => 'Zmień',
2424'save' => 'Zapisz',
2425'set' => 'wykonaj',
2426'reset' => 'wyczyść',
2427'relative' => 'względna ścieżka do celu',
2428
2429'yes' => 'Tak',
2430'no' => 'Nie',
2431'back' => 'cofnij',
2432'destination' => 'miejsce przeznaczenia',
2433'symlink' => 'dowiÄ…zanie symboliczne',
2434'no_output' => 'nie ma wyjścia',
2435
2436'user' => 'Urzytkownik',
2437'password' => 'Hasło',
2438'add' => 'dodaj',
2439'add_basic_auth' => 'dodaj podstawowe uwierzytelnianie',
2440
2441'uploaded' => '"[%1]" został przesłany.',
2442'not_uploaded' => '"[%1]" nie może być przesłane.',
2443'already_exists' => '"[%1]" już istnieje.',
2444'created' => '"[%1]" został utworzony.',
2445'not_created' => '"[%1]" nie można utworzyć.',
2446'really_delete' => 'usunąć te pliki?',
2447'deleted' => "Pliki zostały usunięte:\n[%1]",
2448'not_deleted' => "Te pliki nie mogą być usunięte:\n[%1]",
2449'rename_file' => 'Zmień nazwę pliku:',
2450'renamed' => '"[%1]" zostało zmienione na "[%2]".',
2451'not_renamed' => '"[%1] nie można zmienić na "[%2]".',
2452'move_files' => 'PrzenieÅ› te pliki:',
2453'moved' => "Pliki zostały przeniesione do \"[%2]\":\n[%1]",
2454'not_moved' => "Pliki nie mogą być przeniesione do \"[%2]\":\n[%1]",
2455'copy_files' => 'Skopiuj te pliki:',
2456'copied' => "Pliki zostały skopiowane \"[%2]\":\n[%1]",
2457'not_copied' => "Te pliki nie mogą być kopiowane do \"[%2]\":\n[%1]",
2458'not_edited' => '"[%1]" nie można edytować.',
2459'executed' => "\"[%1]\" zostało wykonane pomyślnie:\n{%2}",
2460'not_executed' => "\"[%1]\" nie może być wykonane:\n{%2}",
2461'saved' => '"[%1]" został zapisany.',
2462'not_saved' => '"[%1]" nie można zapisać.',
2463'symlinked' => 'Dowiązanie symboliczne "[%2]" do "[%1]" zostało utworzone.',
2464'not_symlinked' => 'Dowiązanie symboliczne "[%2]" do "[%1]" nie moze być utworzone.',
2465'permission_for' => 'Uprawnienia "[%1]":',
2466'permission_set' => 'Uprawnienia "[%1]" zostały ustalone na [%2].',
2467'permission_not_set' => 'Uprawnienia "[%1]" nie mogą być ustawione na [%2].',
2468'not_readable' => '"[%1]" nie można odczytać.'
2469 );
2470
2471 case 'en':
2472 default:
2473
2474 $date_format = 'n/j/y H:i:s';
2475
2476 return array(
2477'directory' => 'Directory',
2478'file' => 'File',
2479'filename' => 'Filename',
2480
2481'size' => 'Size',
2482'permission' => 'Permission',
2483'owner' => 'Owner',
2484'group' => 'Group',
2485'other' => 'Others',
2486'functions' => 'Functions',
2487
2488'read' => 'read',
2489'write' => 'write',
2490'execute' => 'execute',
2491
2492'create_symlink' => 'create symlink',
2493'delete' => 'delete',
2494'rename' => 'rename',
2495'move' => 'move',
2496'copy' => 'copy',
2497'edit' => 'edit',
2498'download' => 'download',
2499'upload' => 'upload',
2500'create' => 'create',
2501'change' => 'change',
2502'save' => 'save',
2503'set' => 'set',
2504'reset' => 'reset',
2505'relative' => 'Relative path to target',
2506
2507'yes' => 'Yes',
2508'no' => 'No',
2509'back' => 'back',
2510'destination' => 'Destination',
2511'symlink' => 'Symlink',
2512'no_output' => 'no output',
2513
2514'user' => 'User',
2515'password' => 'Password',
2516'add' => 'add',
2517'add_basic_auth' => 'add basic-authentification',
2518
2519'uploaded' => '"[%1]" has been uploaded.',
2520'not_uploaded' => '"[%1]" could not be uploaded.',
2521'already_exists' => '"[%1]" already exists.',
2522'created' => '"[%1]" has been created.',
2523'not_created' => '"[%1]" could not be created.',
2524'really_delete' => 'Delete these files?',
2525'deleted' => "These files have been deleted:\n[%1]",
2526'not_deleted' => "These files could not be deleted:\n[%1]",
2527'rename_file' => 'Rename file:',
2528'renamed' => '"[%1]" has been renamed to "[%2]".',
2529'not_renamed' => '"[%1] could not be renamed to "[%2]".',
2530'move_files' => 'Move these files:',
2531'moved' => "These files have been moved to \"[%2]\":\n[%1]",
2532'not_moved' => "These files could not be moved to \"[%2]\":\n[%1]",
2533'copy_files' => 'Copy these files:',
2534'copied' => "These files have been copied to \"[%2]\":\n[%1]",
2535'not_copied' => "These files could not be copied to \"[%2]\":\n[%1]",
2536'not_edited' => '"[%1]" can not be edited.',
2537'executed' => "\"[%1]\" has been executed successfully:\n{%2}",
2538'not_executed' => "\"[%1]\" could not be executed successfully:\n{%2}",
2539'saved' => '"[%1]" has been saved.',
2540'not_saved' => '"[%1]" could not be saved.',
2541'symlinked' => 'Symlink from "[%2]" to "[%1]" has been created.',
2542'not_symlinked' => 'Symlink from "[%2]" to "[%1]" could not be created.',
2543'permission_for' => 'Permission of "[%1]":',
2544'permission_set' => 'Permission of "[%1]" was set to [%2].',
2545'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
2546'not_readable' => '"[%1]" can not be read.'
2547 );
2548
2549 }
2550
2551}
2552
2553function getimage ($image) {
2554 switch ($image) {
2555 case 'file':
2556 return base64_decode('R0lGODlhEQANAJEDAJmZmf///wAAAP///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
2557 case 'folder':
2558 return base64_decode('R0lGODlhEQANAJEDAJmZmf///8zMzP///yH5BAHoAwMALAAAAAARAA0AAAIqnI+ZwKwbYgTPtIudlbwLOgCBQJYmCYrn+m3smY5vGc+0a7dhjh7ZbygAADsA');
2559 case 'hidden_file':
2560 return base64_decode('R0lGODlhEQANAJEDAMwAAP///5mZmf///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
2561 case 'link':
2562 return base64_decode('R0lGODlhEQANAKIEAJmZmf///wAAAMwAAP///wAAAAAAAAAAACH5BAHoAwQALAAAAAARAA0AAAM5SArcrDCCQOuLcIotwgTYUllNOA0DxXkmhY4shM5zsMUKTY8gNgUvW6cnAaZgxMyIM2zBLCaHlJgAADsA');
2563 case 'smiley':
2564 return base64_decode('R0lGODlhEQANAJECAAAAAP//AP///wAAACH5BAHoAwIALAAAAAARAA0AAAIslI+pAu2wDAiz0jWD3hqmBzZf1VCleJQch0rkdnppB3dKZuIygrMRE/oJDwUAOwA=');
2565 case 'arrow':
2566 return base64_decode('R0lGODlhEQANAIABAAAAAP///yH5BAEKAAEALAAAAAARAA0AAAIdjA9wy6gNQ4pwUmav0yvn+hhJiI3mCJ6otrIkxxQAOw==');
2567 }
2568}
2569
2570function html_header () {
2571 global $site_charset;
2572
2573 echo <<<END
2574<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2575 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2576<html xmlns="http://www.w3.org/1999/xhtml">
2577<head>
2578
2579<meta http-equiv="Content-Type" content="text/html; charset=$site_charset" />
2580
2581<title>webadmin.php</title>
2582
2583<style type="text/css">
2584body { font: small sans-serif; text-align: center }
2585img { width: 17px; height: 13px }
2586a, a:visited { text-decoration: none; color: navy }
2587hr { border-style: none; height: 1px; background-color: silver; color: silver }
2588#main { margin-top: 6pt; margin-left: auto; margin-right: auto; border-spacing: 1px }
2589#main th { background: #eee; padding: 3pt 3pt 0pt 3pt }
2590.listing th, .listing td { padding: 1px 3pt 0 3pt }
2591.listing th { border: 1px solid silver }
2592.listing td { border: 1px solid #ddd; background: white }
2593.listing .checkbox { text-align: center }
2594.listing .filename { text-align: left }
2595.listing .size { text-align: right }
2596.listing th.permission { text-align: left }
2597.listing td.permission { font-family: monospace }
2598.listing .owner { text-align: left }
2599.listing .group { text-align: left }
2600.listing .functions { text-align: left }
2601.listing_footer td { background: #eee; border: 1px solid silver }
2602#directory, #upload, #create, .listing_footer td, #error td, #notice td { text-align: left; padding: 3pt }
2603#directory { background: #eee; border: 1px solid silver }
2604#upload { padding-top: 1em }
2605#create { padding-bottom: 1em }
2606.small, .small option { font-size: x-small }
2607textarea { border: none; background: white }
2608table.dialog { margin-left: auto; margin-right: auto }
2609td.dialog { background: #eee; padding: 1ex; border: 1px solid silver; text-align: center }
2610#permission { margin-left: auto; margin-right: auto }
2611#permission td { padding-left: 3pt; padding-right: 3pt; text-align: center }
2612td.permission_action { text-align: right }
2613#symlink { background: #eee; border: 1px solid silver }
2614#symlink td { text-align: left; padding: 3pt }
2615#red_button { width: 120px; color: #400 }
2616#green_button { width: 120px; color: #040 }
2617#error td { background: maroon; color: white; border: 1px solid silver }
2618#notice td { background: green; color: white; border: 1px solid silver }
2619#notice pre, #error pre { background: silver; color: black; padding: 1ex; margin-left: 1ex; margin-right: 1ex }
2620code { font-size: 12pt }
2621td { white-space: nowrap }
2622</style>
2623
2624<script type="text/javascript">
2625<!--
2626function activate (name) {
2627 if (document && document.forms[0] && document.forms[0].elements['focus']) {
2628 document.forms[0].elements['focus'].value = name;
2629 }
2630}
2631//-->
2632</script>
2633
2634</head>
2635<body>
2636
2637
2638END;
2639
2640}
2641
2642function html_footer () {
2643
2644 echo <<<END
2645</body>
2646</html>
2647END;
2648
2649}
2650
2651function notice ($phrase) {
2652 global $cols;
2653
2654 $args = func_get_args();
2655 array_shift($args);
2656
2657 return '<tr id="notice">
2658 <td colspan="' . $cols . '">' . phrase($phrase, $args) . '</td>
2659</tr>
2660';
2661
2662}
2663
2664function error ($phrase) {
2665 global $cols;
2666
2667 $args = func_get_args();
2668 array_shift($args);
2669
2670 return '<tr id="error">
2671 <td colspan="' . $cols . '">' . phrase($phrase, $args) . '</td>
2672</tr>
2673';
2674
2675}
2676
2677?>