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