diff --git a/tinyfilemanager.php b/tinyfilemanager.php index c179cf9..cd80110 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -1,11 +1,11 @@ -
- H3K File manager + H3K File manager
-
-
- - +
+
+
%s created'), $new)); + fm_set_msg(sprintf('File %s created', $new)); } else { - fm_set_msg(sprintf(fm_t('File %s already exists'), $new), 'alert'); + fm_set_msg(sprintf('File %s already exists', $new), 'alert'); } } else { if (fm_mkdir($path . '/' . $new, false) === true) { - fm_set_msg(sprintf(fm_t('Folder %s created'), $new)); + fm_set_msg(sprintf('Folder %s created', $new)); } elseif (fm_mkdir($path . '/' . $new, false) === $path . '/' . $new) { - fm_set_msg(sprintf(fm_t('Folder %s already exists'), $new), 'alert'); + fm_set_msg(sprintf('Folder %s already exists', $new), 'alert'); } else { - fm_set_msg(sprintf(fm_t('Folder %s not created'), $new), 'error'); + fm_set_msg(sprintf('Folder %s not created', $new), 'error'); } } } else { @@ -686,8 +678,8 @@ if (isset($_GET['upload']) && !FM_READONLY) { fm_show_nav_path(FM_PATH); // current path ?>
-

-

+

Uploading files

+

Destination folder:

@@ -698,8 +690,8 @@ if (isset($_GET['upload']) && !FM_READONLY) {

-   - +   + Cancel

@@ -729,15 +721,15 @@ if (isset($_POST['copy']) && !FM_READONLY) { echo '' . PHP_EOL; } ?> -

, ', $copy_files) ?>

-


- +

Files: , ', $copy_files) ?>

+

Source folder:
+ /

-

+

-   - +   + Cancel

@@ -759,17 +751,17 @@ if (isset($_GET['copy']) && !isset($_GET['finish']) && !FM_READONLY) { fm_show_nav_path(FM_PATH); // current path ?>
-

+

Copying

-
- + Source path:
+ Destination folder:

-   -   - + Copy   + Move   + Cancel

-

+

Select folder

    ""

    -
    - = 1000): ?> ()
    -
    + Full path:
    + File size: = 1000): ?> ()
    + MIME-type:

    -   -   + Download   + Open   -   - -   + UnZip   + + UnZip to folder   -   -   + Edit   + Advanced Edit   -   + Mail   - + Back

    @@ -1028,7 +1020,7 @@ if (isset($_GET['edit'])) { } elseif ($is_text) { echo '
    '. htmlspecialchars($content) .'
    '; } else { - fm_set_msg(fm_t('FILE EXTENSION HAS NOT SUPPORTED', $lang), 'error'); + fm_set_msg('FILE EXTENSION HAS NOT SUPPORTED', 'error'); } ?>
    @@ -1057,9 +1049,9 @@ if (isset($_GET['chmod']) && !FM_READONLY && !FM_IS_WIN) { ?>
    -

    +

    -
    +

    @@ -1068,24 +1060,24 @@ if (isset($_GET['chmod']) && !FM_READONLY && !FM_IS_WIN) { - - - + + + - + - + - + @@ -1093,8 +1085,8 @@ if (isset($_GET['chmod']) && !FM_READONLY && !FM_IS_WIN) {
    OwnerGroupOther
    Read
    Write
    Execute

    -   - +   + Cancel

    @@ -1120,11 +1112,11 @@ $all_files_size = 0; - - - - - + + + + + - + - + - - + + - + - +
    NameSizeModifiedPermsOwnerActions
    ' . readlink($path . '/' . $f) . '' : '') ?>
    Folder - - - + + + - +
    ' . readlink($path . '/' . $f) . '' : '') ?>
    ' . readlink($path . '/' . $f) . '' : '') ?>
    - - - + + + - - + +
    - , - , - +Full size: , +files: , +folders:
    - + @@ -1551,43 +1543,6 @@ function scan($dir){ return $files; } -/** - * Send email with file attached - * @param string $msg, $to, $p - */ -function send_mail($path,$filename, $mailto, $message) { - $file = $path.'/'.$filename; - $content = file_get_contents( $file); - $content = chunk_split(base64_encode($content)); - $uid = md5(uniqid(time())); - $name = basename($file); - - // header - $header = "From: H3K File Manager \r\n"; - $header .= "Reply-To: ".$mailto."\r\n"; - $header .= "MIME-Version: 1.0\r\n"; - $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; - - // message & attachment - $subject = "File has attahced"; - $nmessage = "--".$uid."\r\n"; - $nmessage .= "Content-type:text/plain; charset=iso-8859-1\r\n"; - $nmessage .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; - $nmessage .= $message."\r\n\r\n"; - $nmessage .= "--".$uid."\r\n"; - $nmessage .= "Content-Type: application/octet-stream; name=\"".$filename."\"\r\n"; - $nmessage .= "Content-Transfer-Encoding: base64\r\n"; - $nmessage .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n"; - $nmessage .= $content."\r\n\r\n"; - $nmessage .= "--".$uid."--"; - - if (mail($mailto, $subject, $nmessage, $header)) { - return true; // Or do something here - } else { - return false; - } -} - /** * Save message in session * @param string $msg @@ -1622,31 +1577,6 @@ function fm_convert_win($filename) return $filename; } -/** - * Get translated string - * @param string $str - * @param string|null $lang - * @return string - */ -function fm_t($str, $lang = null) -{ - if ($lang === null) { - if (defined('FM_LANG')) { - $lang = FM_LANG; - } else { - return $str; - } - } - $strings = fm_get_strings(); - if (!isset($strings[$lang]) || !is_array($strings[$lang])) { - return $str; - } - if (array_key_exists($str, $strings[$lang])) { - return $strings[$lang][$str]; - } - return $str; -} - /** * Get CSS classname for file * @param string $path @@ -1949,11 +1879,11 @@ function fm_show_nav_path($path)
    - - - + + + - +
    H3K | File Manager - + @@ -1999,7 +1929,7 @@ function fm_show_header()
    -
    X

    -

    -
    X - -

    +
    X

    Create New Item

    + File Folder

    +

    +
    X + +

    Search Results