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