//******************************************************************************************************
// ATTENTION: THIS FILE HEADER MUST REMAIN INTACT. DO NOT DELETE OR MODIFY THIS FILE HEADER.
//
// Name: uu_finished.php
// Revision: 4.1
// Date: 24/03/2007 4:22PM
// Link: http://uber-uploader.sourceforge.net
// Initial Developer: Peter Schmandra http://www.webdice.org
// Description: Show successful file uploads.
// Note: Pop ups may need to be enabled in the browser in order for this file to close the progress bar
//
// Licence:
// The contents of this file are subject to the Mozilla Public
// License Version 1.1 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of
// the License at http://www.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS
// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
// implied. See the License for the specific language governing
// rights and limitations under the License.
//
//
// NOTE: THIS FILE IS ONLY NECESSARY IF YOU ARE USING RE-DIRECT AFTER UPLOAD.
//
//***************************************************************************************************************
header('Content-type: text/html; charset=UTF-8');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.date('r'));
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
require "uu_conlib.php";
$THIS_VERSION = "4.0";
/////////////////////////////////////////////////////////////////
// The following possible query string formats are assumed
//
// 1. ?upload_dir=tmp_sid&path_to_upload_dir
// 2. ?cmd=about
/////////////////////////////////////////////////////////////////
if(isset($_GET['cmd']) && $_GET['cmd'] == 'about'){ kak("UBER UPLOADER FINISHED PAGE UBER UPLOADER VERSION = " . $UBER_VERSION . " UU_FINISHED = " . $THIS_VERSION . " \n"); }
elseif(!isset($_REQUEST['tmp_sid']) || strlen($_REQUEST['tmp_sid']) != 32){ kak("WARNING: Invalid session-id. \n"); }
// Hard-code the 'temp_dir' value here instead of passing it in the address bar.
$temp_dir = $_REQUEST['temp_dir'];
// Get all the posted values from the .param file
$_POST_DATA = getPostData($temp_dir, $_REQUEST['tmp_sid']);
////////////////////////////////////////////////////////////////////////////////////////////
// You can now access all the post values from the .param file. eg. $_POST_DATA['email']; //
////////////////////////////////////////////////////////////////////////////////////////////
// We must force flush incase email hangs
if(isset($_POST_DATA['send_email_on_upload']) && $_POST_DATA['send_email_on_upload'] == 1){ ob_implicit_flush(1); }
$i = 0;
$file_list = "";
$email_file_list = "";
# Loop over the post data looking for files and create table elements
foreach($_POST_DATA as $post_key => $post_value){
if(preg_match("/^upfile_/i", $post_key)){
$uploaded_file_name = $post_value;
$uploaded_file_path = $_POST_DATA['upload_dir'] . $uploaded_file_name;
if(is_file($uploaded_file_path)){
$file_size = @filesize($uploaded_file_path);
$file_size = formatBytes($file_size);
if($i%=2){ $bg_col = "cccccc"; }
else{ $bg_col = "dddddd"; }
if(isset($_POST_DATA['link_to_upload']) && $_POST_DATA['link_to_upload'] == 1){
$path_to_upload = $_POST_DATA['path_to_upload'];
$file_list .= "