Beispiel #1
0
             @chmod($filename, 0777);
             // we change the file to 777 - if you like more restrictions - change the mode here!
             array_push($_SESSION["TFU_LAST_UPLOADS"], $filename);
             removeCacheThumb($filename);
             // this actually generates the two thumbnails ... set this to true if you like this ;).
             if (false) {
                 send_thumb($filename, 90, 400, 275, true);
                 send_thumb($filename, 90, 80, 55, true);
             }
         }
     }
 }
 if (count($_SESSION["TFU_LAST_UPLOADS"]) > 0 && $remaining == 0 && $_SESSION["TFU_SPLIT_EXTENSION"] != "FALSE") {
     // last item in the upload AND we have stored stuff!
     restore_split_files($_SESSION["TFU_LAST_UPLOADS"]);
     resize_merged_files($_SESSION["TFU_LAST_UPLOADS"], $size);
 }
 // we only send an email for the last item of an upload cycle
 if (isset($_SESSION["TFU_NOT_EMAIL"]) && $_SESSION["TFU_NOT_EMAIL"] != "" && $remaining == 0) {
     $youremail = $_SESSION["TFU_NOT_EMAIL_FROM"];
     $email = $_SESSION["TFU_NOT_EMAIL"];
     $submailheaders = "From: {$youremail}\n";
     $submailheaders .= "Reply-To: {$youremail}\n";
     $subject = $_SESSION["TFU_NOT_EMAIL_SUBJECT"];
     $filestr = "\n\n";
     foreach ($_SESSION["TFU_LAST_UPLOADS"] as $filename) {
         $filestr = $filestr . str_replace("./", "", str_replace("../", "", $filename)) . "\n";
     }
     if ($filestr == "\n\n") {
         $filestr .= "Please check your setup. No files where uploaded.";
     }
             // plugins can be found on the website.
             $plugins = glob("*_plugin.php");
             if ($plugins) {
                 foreach ($plugins as $f) {
                     include_once $f;
                     call_user_func(basename($f, ".php") . "_process_upload_file", $dir, $filename, $image);
                 }
             }
             // end plugin
         }
     }
 }
 if (count($_SESSION['TFU_LAST_UPLOADS']) > 0 && $remaining == 0 && $split_extension != 'FALSE') {
     // last item in the upload AND we have stored stuff!
     restore_split_files($_SESSION['TFU_LAST_UPLOADS']);
     resize_merged_files($_SESSION['TFU_LAST_UPLOADS'], $size);
 }
 // E-mail section
 // we only send an email for the last item of an upload cycle
 if ($upload_notification_email != '' && $remaining == 0) {
     $youremail = $upload_notification_email_from;
     $email = $upload_notification_email;
     $submailheaders = "From: {$youremail}\n";
     $submailheaders .= "Reply-To: {$youremail}\n";
     $submailheaders .= 'Content-Type: text/plain; charset=UTF-8';
     $subject = $upload_notification_email_subject;
     $filestr = "\n\n";
     foreach ($_SESSION['TFU_LAST_UPLOADS'] as $filename) {
         if ($upload_notification_use_full_path) {
             $filestr = $filestr . tfu_urlencode(fixUrl(getRootUrl() . $path_fix . $filename)) . "\n";
         } else {