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