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