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