示例#1
0
 } else {
     if ($action == 'preview') {
         // preview image
         tfu_preview($file);
     } else {
         if ($action == 'info') {
             // checks if a preview can be done and the file size is returned.
             tfu_info($file);
         } else {
             if ($action == 'text') {
                 // get infos about a file
                 tfu_text($file);
             } else {
                 if ($action == 'savetext') {
                     // save a textfile
                     tfu_savetext($file);
                 } else {
                     if ($action == 'download') {
                         // download a file - we set the header !
                         tfu_download($file, $enable_file_download);
                     } else {
                         if ($action == 'zipdownload') {
                             // download multipe files as zip!
                             tfu_zip_download($file, $enable_file_download);
                         }
                     }
                 }
             }
         }
     }
 }
示例#2
0
                                     // download a file - we set the header !
                                     tfu_download($file, $enable_file_download);
                                 } else {
                                     if ($action == 'createThumb') {
                                         // create a thumbnail
                                         tfu_createThumb($file);
                                     } else {
                                         if ($action == 'zipdownload') {
                                             // download multipe files as zip!
                                             tfu_zip_download($file, $enable_file_download);
                                         } else {
                                             if ($action == 'createfile') {
                                                 // creates an empty file during upload - if createfile is set an empty file is created + the directory has to be sent.
                                                 $file = $dir . "/" . parseInputParameterFile(trim(my_basename(' ' . $_GET['newfile'])));
                                                 $overwrite = !isset($_GET['createfile']);
                                                 tfu_savetext($file, $overwrite);
                                                 if ($overwrite) {
                                                     $_SESSION["TFU_LAST_UPLOADS"][] = $file;
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }