soibac

xxx

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