From 7e9b6530ecea9fc2f57b748df3a445fa7a3c88e6 Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 2 Jul 2014 13:34:46 +0000 Subject: feature 2616: remove useless code (photos_add_direct_process or uploadify related variables) git-svn-id: http://piwigo.org/svn/trunk@28919 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/photos_add_direct_prepare.inc.php | 56 +---- admin/include/photos_add_direct_process.inc.php | 242 --------------------- admin/include/uploadify/cancel.png | Bin 778 -> 0 bytes .../uploadify/jquery.uploadify.v3.0.0.min.js | 38 ---- admin/include/uploadify/uploadify.css | 119 ---------- admin/include/uploadify/uploadify.php | 100 --------- admin/include/uploadify/uploadify.swf | Bin 12787 -> 0 bytes admin/include/uploadify/uploadifyLang_en.js | 32 --- 8 files changed, 3 insertions(+), 584 deletions(-) delete mode 100644 admin/include/photos_add_direct_process.inc.php delete mode 100644 admin/include/uploadify/cancel.png delete mode 100644 admin/include/uploadify/jquery.uploadify.v3.0.0.min.js delete mode 100644 admin/include/uploadify/uploadify.css delete mode 100644 admin/include/uploadify/uploadify.php delete mode 100644 admin/include/uploadify/uploadify.swf delete mode 100644 admin/include/uploadify/uploadifyLang_en.js (limited to 'admin/include') diff --git a/admin/include/photos_add_direct_prepare.inc.php b/admin/include/photos_add_direct_prepare.inc.php index 44b63082d..c917d12bd 100644 --- a/admin/include/photos_add_direct_prepare.inc.php +++ b/admin/include/photos_add_direct_prepare.inc.php @@ -21,40 +21,10 @@ // | USA. | // +-----------------------------------------------------------------------+ - -// +-----------------------------------------------------------------------+ -// | Uploaded photos | -// +-----------------------------------------------------------------------+ - -if (isset($page['thumbnails'])) -{ - $template->assign( - array( - 'thumbnails' => $page['thumbnails'], - ) - ); - - // only display the batch link if we have more than 1 photo - if (count($page['thumbnails']) > 1) - { - $template->assign( - array( - 'batch_link' => $page['batch_link'], - 'batch_label' => sprintf( - l10n('Manage this set of %d photos'), - count($page['thumbnails']) - ), - ) - ); - } -} - // +-----------------------------------------------------------------------+ // | Photo selection | // +-----------------------------------------------------------------------+ -$uploadify_path = PHPWG_ROOT_PATH.'admin/include/uploadify'; - $upload_max_filesize = min( get_ini_size('upload_max_filesize'), get_ini_size('post_max_size') @@ -72,7 +42,6 @@ else $template->assign( array( 'F_ADD_ACTION'=> PHOTOS_ADD_BASE_URL, - 'uploadify_path' => $uploadify_path, 'upload_max_filesize' => $upload_max_filesize, 'upload_max_filesize_shorthand' => $upload_max_filesize_shorthand, ) @@ -117,29 +86,10 @@ if ($conf['original_resize']) } -$upload_modes = array('html', 'multiple'); -$upload_mode = isset($conf['upload_mode']) ? $conf['upload_mode'] : 'multiple'; - -if (isset($_GET['upload_mode']) and $upload_mode != $_GET['upload_mode'] and in_array($_GET['upload_mode'], $upload_modes)) -{ - $upload_mode = $_GET['upload_mode']; - conf_update_param('upload_mode', $upload_mode); -} - -// what is the upload switch mode -$index_of_upload_mode = array_flip($upload_modes); -$upload_mode_index = $index_of_upload_mode[$upload_mode]; -$upload_switch = $upload_modes[ ($upload_mode_index + 1) % 2 ]; - $template->assign( array( - 'upload_mode' => $upload_mode, - 'form_action' => PHOTOS_ADD_BASE_URL.'&upload_mode='.$upload_mode.'&processed=1', - 'switch_url' => PHOTOS_ADD_BASE_URL.'&upload_mode='.$upload_switch, - 'upload_id' => md5(rand()), - 'session_id' => session_id(), + 'form_action' => PHOTOS_ADD_BASE_URL, 'pwg_token' => get_pwg_token(), - 'another_upload_link' => PHOTOS_ADD_BASE_URL.'&upload_mode='.$upload_mode, ) ); @@ -151,7 +101,7 @@ if (pwg_image::get_library() == 'ext_imagick') $template->assign('tif_enabled', true); } -if ('html' == $upload_mode) +if (false) // TODO manage zip files in pwg.images.upload { $upload_file_types.= ', zip'; } @@ -278,7 +228,7 @@ if (!isset($_SESSION['upload_hide_warnings'])) $template->assign( array( 'setup_warnings' => $setup_warnings, - 'hide_warnings_link' => PHOTOS_ADD_BASE_URL.'&upload_mode='.$upload_mode.'&hide_warnings=1' + 'hide_warnings_link' => PHOTOS_ADD_BASE_URL.'&hide_warnings=1' ) ); } diff --git a/admin/include/photos_add_direct_process.inc.php b/admin/include/photos_add_direct_process.inc.php deleted file mode 100644 index e0a6cba22..000000000 --- a/admin/include/photos_add_direct_process.inc.php +++ /dev/null @@ -1,242 +0,0 @@ -POST'."\n"; print_r($_POST); echo ''; -// echo '
FILES'."\n"; print_r($_FILES); echo '
'; -// echo '
SESSION'."\n"; print_r($_SESSION); echo '
'; -// exit(); - - // sometimes, you have submitted the form but you have nothing in $_POST - // and $_FILES. This may happen when you have an HTML upload and you - // exceeded the post_max_size (but not the upload_max_size) - if (!isset($_POST['submit_upload'])) - { - $page['errors'][] = l10n( - 'The uploaded files exceed the post_max_size directive in php.ini: %sB', - ini_get('post_max_size') - ); - } - else - { - $category_id = $_POST['category']; - } - - if (isset($_POST['onUploadError']) and is_array($_POST['onUploadError']) and count($_POST['onUploadError']) > 0) - { - foreach ($_POST['onUploadError'] as $error) - { - $page['errors'][] = $error; - } - } - - $image_ids = array(); - - if (isset($_FILES) and !empty($_FILES['image_upload'])) - { - $starttime = get_moment(); - - foreach ($_FILES['image_upload']['error'] as $idx => $error) - { - if (UPLOAD_ERR_OK == $error) - { - $images_to_add = array(); - - $extension = pathinfo($_FILES['image_upload']['name'][$idx], PATHINFO_EXTENSION); - if ('zip' == strtolower($extension)) - { - $upload_dir = $conf['upload_dir'].'/buffer'; - prepare_directory($upload_dir); - - $temporary_archive_name = date('YmdHis').'-'.generate_key(10); - $archive_path = $upload_dir.'/'.$temporary_archive_name.'.zip'; - - move_uploaded_file( - $_FILES['image_upload']['tmp_name'][$idx], - $archive_path - ); - - define('PCLZIP_TEMPORARY_DIR', $upload_dir.'/'); - include_once(PHPWG_ROOT_PATH.'admin/include/pclzip.lib.php'); - $zip = new PclZip($archive_path); - if ($list = $zip->listContent()) - { - $indexes_to_extract = array(); - - foreach ($list as $node) - { - if (1 == $node['folder']) - { - continue; - } - - if (is_valid_image_extension(pathinfo($node['filename'], PATHINFO_EXTENSION))) - { - $indexes_to_extract[] = $node['index']; - - $images_to_add[] = array( - 'source_filepath' => $upload_dir.'/'.$temporary_archive_name.'/'.$node['filename'], - 'original_filename' => basename($node['filename']), - ); - } - } - - if (count($indexes_to_extract) > 0) - { - $zip->extract( - PCLZIP_OPT_PATH, $upload_dir.'/'.$temporary_archive_name, - PCLZIP_OPT_BY_INDEX, $indexes_to_extract, - PCLZIP_OPT_ADD_TEMP_FILE_ON - ); - } - } - } - elseif (is_valid_image_extension($extension)) - { - $images_to_add[] = array( - 'source_filepath' => $_FILES['image_upload']['tmp_name'][$idx], - 'original_filename' => $_FILES['image_upload']['name'][$idx], - ); - } - - foreach ($images_to_add as $image_to_add) - { - $image_id = add_uploaded_file( - $image_to_add['source_filepath'], - $image_to_add['original_filename'], - array($category_id), - $_POST['level'] - ); - - $image_ids[] = $image_id; - - // TODO: if $image_id is not an integer, something went wrong - } - } - else - { - $error_message = file_upload_error_message($error); - - $page['errors'][] = l10n( - 'Error on file "%s" : %s', - $_FILES['image_upload']['name'][$idx], - $error_message - ); - } - } - - $endtime = get_moment(); - $elapsed = ($endtime - $starttime) * 1000; - // printf('%.2f ms', $elapsed); - - } // if (!empty($_FILES)) - - if (isset($_POST['upload_id'])) - { - // we're on a multiple upload, with uploadify and so on - if (isset($_SESSION['uploads_error'][ $_POST['upload_id'] ])) - { - foreach ($_SESSION['uploads_error'][ $_POST['upload_id'] ] as $error) - { - $page['errors'][] = $error; - } - } - - if (isset($_SESSION['uploads'][ $_POST['upload_id'] ])) - { - $image_ids = $_SESSION['uploads'][ $_POST['upload_id'] ]; - } - } - - $page['thumbnails'] = array(); - foreach ($image_ids as $image_id) - { - // we could return the list of properties from the add_uploaded_file - // function, but I like the "double check". And it costs nothing - // compared to the upload process. - $thumbnail = array(); - - $query = ' -SELECT - id, - file, - path - FROM '.IMAGES_TABLE.' - WHERE id = '.$image_id.' -;'; - $image_infos = pwg_db_fetch_assoc(pwg_query($query)); - - $thumbnail['file'] = $image_infos['file']; - - $thumbnail['src'] = DerivativeImage::thumb_url($image_infos); - - // TODO: when implementing this plugin in Piwigo core, we should have - // a function get_image_name($name, $file) (if name is null, then - // compute a temporary name from filename) that would be also used in - // picture.php. UPDATE: in fact, "get_name_from_file($file)" already - // exists and is used twice (batch_manager_unit + comments, but not in - // picture.php I don't know why) with the same pattern if - // (empty($name)) {$name = get_name_from_file($file)}, a clean - // function get_image_name($name, $file) would be better - $thumbnail['title'] = get_name_from_file($image_infos['file']); - - $thumbnail['link'] = get_root_url().'admin.php?page=photo-'.$image_id.'&cat_id='.$category_id; - - $page['thumbnails'][] = $thumbnail; - } - - if (!empty($page['thumbnails'])) - { - $page['infos'][] = l10n('%d photos uploaded', count($page['thumbnails'])); - - if (0 != $_POST['level']) - { - $page['infos'][] = l10n( - 'Privacy level set to "%s"', - l10n(sprintf('Level %d', $_POST['level'])) - ); - } - - $query = ' -SELECT - COUNT(*) - FROM '.IMAGE_CATEGORY_TABLE.' - WHERE category_id = '.$category_id.' -;'; - list($count) = pwg_db_fetch_row(pwg_query($query)); - $category_name = get_cat_display_name_from_id($category_id, 'admin.php?page=album-'); - - // information - $page['infos'][] = l10n( - 'Album "%s" now contains %d photos', - ''.$category_name.'', - $count - ); - - $page['batch_link'] = PHOTOS_ADD_BASE_URL.'&batch='.implode(',', $image_ids); - } -} - -?> \ No newline at end of file diff --git a/admin/include/uploadify/cancel.png b/admin/include/uploadify/cancel.png deleted file mode 100644 index 1c7d627c3..000000000 Binary files a/admin/include/uploadify/cancel.png and /dev/null differ diff --git a/admin/include/uploadify/jquery.uploadify.v3.0.0.min.js b/admin/include/uploadify/jquery.uploadify.v3.0.0.min.js deleted file mode 100644 index e85d86426..000000000 --- a/admin/include/uploadify/jquery.uploadify.v3.0.0.min.js +++ /dev/null @@ -1,38 +0,0 @@ -/* -SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com - -mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/ - -SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License: -http://www.opensource.org/licenses/mit-license.php - -SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License: -http://www.opensource.org/licenses/mit-license.php -*/ - -var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(a){this.initSWFUpload(a)}}SWFUpload.prototype.initSWFUpload=function(b){try{this.customSettings={};this.settings=b;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(a){delete SWFUpload.instances[this.movieName];throw a}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(a){if(typeof(a)!=="string"||a.match(/^https?:\/\//i)||a.match(/^\//)){return a}var c=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var b=window.location.pathname.lastIndexOf("/");if(b<=0){path="/"}else{path=window.location.pathname.substr(0,b)+"/"}return path+a};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(b,a){this.settings[b]=(this.settings[b]==undefined)?a:this.settings[b]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var a,b;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}a=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(a==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id}b=document.createElement("div");b.innerHTML=this.getFlashHTML();a.parentNode.replaceChild(b.firstChild,a);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['','','','','','','',""].join("")};SWFUpload.prototype.getFlashVars=function(){var b=this.buildParamString();var a=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&uploadURL=",encodeURIComponent(this.settings.upload_url),"&useQueryString=",encodeURIComponent(this.settings.use_query_string),"&requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&httpSuccess=",encodeURIComponent(a),"&assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&params=",encodeURIComponent(b),"&filePostName=",encodeURIComponent(this.settings.file_post_name),"&fileTypes=",encodeURIComponent(this.settings.file_types),"&fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&buttonWidth=",encodeURIComponent(this.settings.button_width),"&buttonHeight=",encodeURIComponent(this.settings.button_height),"&buttonText=",encodeURIComponent(this.settings.button_text),"&buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&buttonAction=",encodeURIComponent(this.settings.button_action),"&buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var c=this.settings.post_params;var b=[];if(typeof(c)==="object"){for(var a in c){if(c.hasOwnProperty(a)){b.push(encodeURIComponent(a.toString())+"="+encodeURIComponent(c[a].toString()))}}}return b.join("&")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var a=null;a=this.getMovieElement();if(a&&typeof(a.CallFunction)==="unknown"){for(var c in a){try{if(typeof(a[c])==="function"){a[c]=null}}catch(e){}}try{a.parentNode.removeChild(a)}catch(b){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(d){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url: ",this.settings.upload_url,"\n","\t","flash_url: ",this.settings.flash_url,"\n","\t","use_query_string: ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error: ",this.settings.requeue_on_error.toString(),"\n","\t","http_success: ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout: ",this.settings.assume_success_timeout,"\n","\t","file_post_name: ",this.settings.file_post_name,"\n","\t","post_params: ",this.settings.post_params.toString(),"\n","\t","file_types: ",this.settings.file_types,"\n","\t","file_types_description: ",this.settings.file_types_description,"\n","\t","file_size_limit: ",this.settings.file_size_limit,"\n","\t","file_upload_limit: ",this.settings.file_upload_limit,"\n","\t","file_queue_limit: ",this.settings.file_queue_limit,"\n","\t","debug: ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching: ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id: ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder: ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url: ",this.settings.button_image_url.toString(),"\n","\t","button_width: ",this.settings.button_width.toString(),"\n","\t","button_height: ",this.settings.button_height.toString(),"\n","\t","button_text: ",this.settings.button_text.toString(),"\n","\t","button_text_style: ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding: ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action: ",this.settings.button_action.toString(),"\n","\t","button_disabled: ",this.settings.button_disabled.toString(),"\n","\t","custom_settings: ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned: ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned: ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned: ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned: ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned: ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned: ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned: ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned: ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned: ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(b,c,a){if(c==undefined){return(this.settings[b]=a)}else{return(this.settings[b]=c)}};SWFUpload.prototype.getSetting=function(a){if(this.settings[a]!=undefined){return this.settings[a]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction(''+__flash__argumentsToXML(argumentArray,0)+"");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(a){this.callFlash("StartUpload",[a])};SWFUpload.prototype.cancelUpload=function(a,b){if(b!==false){b=true}this.callFlash("CancelUpload",[a,b])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(a){this.callFlash("SetStats",[a])};SWFUpload.prototype.getFile=function(a){if(typeof(a)==="number"){return this.callFlash("GetFileByIndex",[a])}else{return this.callFlash("GetFile",[a])}};SWFUpload.prototype.addFileParam=function(a,b,c){return this.callFlash("AddFileParam",[a,b,c])};SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash("RemoveFileParam",[a,b])};SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString();this.callFlash("SetUploadURL",[a])};SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a;this.callFlash("SetPostParams",[a])};SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a;this.settings.file_types_description=b;this.callFlash("SetFileTypes",[a,b])};SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a;this.callFlash("SetFileSizeLimit",[a])};SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a;this.callFlash("SetFileUploadLimit",[a])};SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a;this.callFlash("SetFileQueueLimit",[a])};SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a;this.callFlash("SetFilePostName",[a])};SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a;this.callFlash("SetUseQueryString",[a])};SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a;this.callFlash("SetRequeueOnError",[a])};SWFUpload.prototype.setHTTPSuccess=function(a){if(typeof a==="string"){a=a.replace(" ","").split(",")}this.settings.http_success=a;this.callFlash("SetHTTPSuccess",[a])};SWFUpload.prototype.setAssumeSuccessTimeout=function(a){this.settings.assume_success_timeout=a;this.callFlash("SetAssumeSuccessTimeout",[a])};SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a;this.callFlash("SetDebugEnabled",[a])};SWFUpload.prototype.setButtonImageURL=function(a){if(a==undefined){a=""}this.settings.button_image_url=a;this.callFlash("SetButtonImageURL",[a])};SWFUpload.prototype.setButtonDimensions=function(c,a){this.settings.button_width=c;this.settings.button_height=a;var b=this.getMovieElement();if(b!=undefined){b.style.width=c+"px";b.style.height=a+"px"}this.callFlash("SetButtonDimensions",[c,a])};SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a;this.callFlash("SetButtonText",[a])};SWFUpload.prototype.setButtonTextPadding=function(b,a){this.settings.button_text_top_padding=a;this.settings.button_text_left_padding=b;this.callFlash("SetButtonTextPadding",[b,a])};SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a;this.callFlash("SetButtonTextStyle",[a])};SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a;this.callFlash("SetButtonDisabled",[a])};SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a;this.callFlash("SetButtonAction",[a])};SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a;this.callFlash("SetButtonCursor",[a])};SWFUpload.prototype.queueEvent=function(b,c){if(c==undefined){c=[]}else{if(!(c instanceof Array)){c=[c]}}var a=this;if(typeof this.settings[b]==="function"){this.eventQueue.push(function(){this.settings[b].apply(this,c)});setTimeout(function(){a.executeNextEvent()},0)}else{if(this.settings[b]!==null){throw"Event handler "+b+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;if(typeof(a)==="function"){a.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(c){var e=/[$]([0-9a-f]{4})/i;var f={};var d;if(c!=undefined){for(var a in c.post){if(c.post.hasOwnProperty(a)){d=a;var b;while((b=e.exec(d))!==null){d=d.replace(b[0],String.fromCharCode(parseInt("0x"+b[1],16)))}f[d]=c.post[a]}}c.post=f}return c};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(a){return false}};SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();if(!a){this.debug("Flash called back ready but the flash movie can't be found.");return}this.cleanUp(a);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(a){try{if(this.movieElement&&typeof(a.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var c in a){try{if(typeof(a[c])==="function"){a[c]=null}}catch(b){}}}}catch(d){}window.__flash__removeCallback=function(e,f){try{if(e){e[f]=null}}catch(g){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("file_queued_handler",a)};SWFUpload.prototype.fileQueueError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("file_queue_error_handler",[a,c,b])};SWFUpload.prototype.fileDialogComplete=function(b,c,a){this.queueEvent("file_dialog_complete_handler",[b,c,a])};SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("return_upload_start_handler",a)};SWFUpload.prototype.returnUploadStart=function(a){var b;if(typeof this.settings.upload_start_handler==="function"){a=this.unescapeFilePostParams(a);b=this.settings.upload_start_handler.call(this,a)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(b===undefined){b=true}b=!!b;this.callFlash("ReturnUploadStart",[b])};SWFUpload.prototype.uploadProgress=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("upload_progress_handler",[a,c,b])};SWFUpload.prototype.uploadError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("upload_error_handler",[a,c,b])};SWFUpload.prototype.uploadSuccess=function(b,a,c){b=this.unescapeFilePostParams(b);this.queueEvent("upload_success_handler",[b,a,c])};SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("upload_complete_handler",a)};SWFUpload.prototype.debug=function(a){this.queueEvent("debug_handler",a)};SWFUpload.prototype.debugMessage=function(c){if(this.settings.debug){var a,d=[];if(typeof c==="object"&&typeof c.name==="string"&&typeof c.message==="string"){for(var b in c){if(c.hasOwnProperty(b)){d.push(b+": "+c[b])}}a=d.join("\n")||"";d=a.split("\n");a="EXCEPTION: "+d.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(a)}else{SWFUpload.Console.writeLine(c)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(d){var b,a;try{b=document.getElementById("SWFUpload_Console");if(!b){a=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(a);b=document.createElement("textarea");b.id="SWFUpload_Console";b.style.fontFamily="monospace";b.setAttribute("wrap","off");b.wrap="off";b.style.overflow="auto";b.style.width="700px";b.style.height="350px";b.style.margin="5px";a.appendChild(b)}b.value+=d+"\n";b.scrollTop=b.scrollHeight-b.clientHeight}catch(c){alert("Exception: "+c.name+" Message: "+c.message)}}; - -/* -Uploadify v3.0.0 -Copyright (c) 2010 Ronnie Garcia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -if(jQuery)(function(a){a.extend(a.fn,{uploadify:function(b,c){a(this).each(function(){function t(b,c,d){g.queue.queueBytesUploaded+=b.size;a("#"+b.id).find(".data").html(" - "+uploadifyLang["uploadComplete"]);if(g.settings.onUploadSuccess)g.settings.onUploadSuccess(b,c,d)}function s(b){var c=new Date;g.timer=c.getTime();g.bytesLoaded=0;if(g.queue.uploadQueue.length==0){g.queue.uploadSize=b.size}if(g.settings.checkExisting!==false){a.ajax({type:"POST",async:false,url:g.settings.checkExisting,data:{filename:b.name},success:function(c){if(c==1){var d=confirm(uploadifyLang["existsMsg1"]+' "'+b.name+'" '+uploadifyLang["existsMsg2"]+".\n"+uploadifyLang["existsMsg3"]);if(!d){g.cancelUpload(b.id);a("#"+b.id).remove();if(g.queue.uploadQueue.length>0&&g.queue.queueLength>0){if(g.queue.uploadQueue[0]=="*"){g.startUpload()}else{g.startUpload(g.queue.uploadQueue.shift())}}}}}})}if(g.settings.onUploadStart)g.settings.onUploadStart(b)}function r(b,c,d){var e=new Date;var f=e.getTime();var h=f-g.timer;g.timer=f;var i=c-g.bytesLoaded;g.bytesLoaded=c;var j=g.queue.queueBytesUploaded+c;var k=Math.round(c/d*100);var l=0;var m=i/1024/(h/1e3);m=Math.floor(m*10)/10;if(g.queue.averageSpeed>0){g.queue.averageSpeed=(g.queue.averageSpeed+m)/2}else{g.queue.averageSpeed=m}if(m>1e3){l=m*.001;g.queue.averageSpeed=l}var n="KB/s";if(l>0){n="MB/s"}if(a.inArray("onUploadProgress",g.settings.skipDefault)<0){if(g.settings.progressData=="percentage"){a("#"+b.id).find(".data").html(" - "+k+"%")}else if(g.settings.progressData=="speed"){a("#"+b.id).find(".data").html(" - "+g.queue.averageSpeed.toFixed(2)+" "+n)}else if(g.settings.progressData=="all"){a("#"+b.id).find(".data").html(" - "+k+"% - "+g.queue.averageSpeed.toFixed(2)+" "+n)}a("#"+b.id).find(".uploadifyProgressBar").css("width",k+"%")}if(g.settings.onUploadProgress)g.settings.onUploadProgress(b,c,d,j,g.queue.uploadSize)}function q(b,c,d){var e=uploadifyLang["errorString1"];if(c!=SWFUpload.UPLOAD_ERROR.FILE_CANCELLED&&c!=SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED){a("#"+b.id).addClass("uploadifyError")}a("#"+b.id).find(".uploadifyProgressBar").css("width","1px");switch(c){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:e=uploadifyLang["errorString2"]+" ("+d+")";break;case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:e=uploadifyLang["errorString3"];break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:e=uploadifyLang["errorString4"];break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:e=uploadifyLang["errorString5"];break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:alert(uploadifyLang["errorString6"]+" ("+d+").");e=uploadifyLang["errorString7"];break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:e=uploadifyLang["errorString8"];break;case SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND:e=uploadifyLang["errorString9"];break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:e=uploadifyLang["errorString10"];break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:e=uploadifyLang["errorString11"];g.queue.queueSize-=b.size;if(b.status==SWFUpload.FILE_STATUS.IN_PROGRESS||a.inArray(b.id,g.queue.uploadQueue)>=0){g.queue.uploadSize-=b.size}delete g.queue.files[b.id];break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:e=uploadifyLang["errorString12"];break}if(c!=SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND&&b.status!=SWFUpload.FILE_STATUS.COMPLETE){a("#"+b.id).find(".data").html(" - "+e)}if(g.settings.onUploadError)g.settings.onUploadError(b,c,d,e,g.queue)}function p(b){var c=g.getStats();g.queue.queueLength=c.files_queued;if(g.queue.uploadQueue[0]=="*"){if(g.queue.queueLength>0){g.startUpload()}else{g.queue.uploadQueue=[];if(g.settings.onQueueComplete)g.settings.onQueueComplete(c)}}else{if(g.settings.onUploadComplete)g.settings.onUploadComplete(b,g.queue);if(g.queue.queueLength>0){g.startUpload(g.queue.uploadQueue.shift())}else{g.queue.uploadQueue=[];if(g.settings.onQueueComplete)g.settings.onQueueComplete(c)}}if(a.inArray("onUploadComplete",g.settings.skipDefault)<0){if(g.settings.removeCompleted){switch(b.filestatus){case SWFUpload.FILE_STATUS.COMPLETE:setTimeout(function(){if(a("#"+b.id)){g.queue.queueSize-=b.size;delete g.queue.files[b.id];a("#"+b.id).fadeOut(500,function(){a(this).remove()})}},g.settings.removeTimeout*1e3);break;case SWFUpload.FILE_STATUS.ERROR:if(!g.settings.requeueErrors){setTimeout(function(){if(a("#"+b.id)){g.queue.queueSize-=b.size;delete g.queue.files[b.id];a("#"+b.id).fadeOut(500,function(){a(this).remove()})}},g.settings.removeTimeout*1e3)}break}}}}function o(){var a=g.getStats();if(g.settings.onQueueComplete)g.settings.onQueueComplete(a)}function n(b,c,d){if(a.inArray("onSelectError",g.settings.skipDefault)<0){switch(c){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:if(g.settings.queueSizeLimit>d){g.queue.errorMsg+="\n"+uploadifyLang["errorMsg2"]+" ("+d+")."}else{g.queue.errorMsg+="\n"+uploadifyLang["errorMsg3"]+" ("+g.settings.queueSizeLimit+")."}break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:g.queue.errorMsg+="\n"+uploadifyLang["errorMsg4"]+' "'+b.name+'" '+uploadifyLang["errorMsg5"]+" ("+g.settings.fileSizeLimit+").";break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:g.queue.errorMsg+="\n"+uploadifyLang["errorMsg4"]+' "'+b.name+'" '+uploadifyLang["errorMsg6"]+".";break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:g.queue.errorMsg+="\n"+uploadifyLang["errorMsg4"]+' "'+b.name+'" '+uploadifyLang["errorMsg7"]+" ("+g.settings.fileTypeDesc+").";break}}if(c!=SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){delete g.queue.files[b.id]}if(g.settings.onSelectError)g.settings.onSelectError(b,c,d)}function m(b){if(a.inArray("onSelect",g.settings.skipDefault)<0){var c={};for(var d in g.queue.files){c=g.queue.files[d];if(c.name==b.name){var e=confirm(uploadifyLang["replaceMsg1"]+' "'+b.name+'" '+uploadifyLang["replaceMsg2"]+".\n"+uploadifyLang["replaceMsg3"]);if(!e){g.cancelUpload(b.id);g.queue.filesCancelled++;return false}else{a("#"+c.id).remove();g.cancelUpload(c.id);g.queue.filesReplaced++}}}var f=Math.round(b.size/1024);var h="KB";if(f>1e3){f=Math.round(f/1e3);h="MB"}var i=f.toString().split(".");f=i[0];if(i.length>1){f+="."+i[1].substr(0,2)}f+=h;var j=b.name;if(j.length>18){j=j.substr(0,15)+"..."}a("#"+g.settings.queueID).append('
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t'+j+" ("+f+')\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
');g.queue.queueSize+=b.size}g.queue.files[b.id]=b;if(g.settings.onSelect)g.settings.onSelect(b)}function l(){g.queue.errorMsg=uploadifyLang["errorMsg1"];g.queue.filesReplaced=0;g.queue.filesCancelled=0;if(g.settings.onDialogOpen)g.settings.onDialogOpen()}function k(b,c,d){var e=g.getStats();g.queue.filesErrored=b-c;g.queue.filesSelected=b;g.queue.filesQueued=c-g.queue.filesCancelled;g.queue.queueLength=d;if(a.inArray("onDialogClose",g.settings.skipDefault)<0){if(g.queue.filesErrored>0){alert(g.queue.errorMsg)}}if(g.settings.onDialogClose)g.settings.onDialogClose(g.queue);if(g.settings.auto)a("#"+g.settings.id).uploadifyUpload("*")}var d=a(this).clone();var e=a.extend({id:a(this).attr("id"),langFile:"uploadifyLang_en.js",swf:"uploadify.swf",uploader:"uploadify.php",auto:false,buttonCursor:"pointer",buttonText:"",cancelImage:"uploadify-cancel.png",checkExisting:"uploadify-check-existing.php",debug:false,fileObjName:"Filedata",fileSizeLimit:0,fileTypeDesc:"",fileTypeExts:"*.*",height:30,method:"post",multi:false,queueID:false,queueSizeLimit:999,removeCompleted:true,removeTimeout:3,requeueErrors:true,postData:{},preventCaching:true,progressData:"all",successTimeout:30,transparent:true,uploadLimit:999,width:120,skipDefault:[],onDialogClose:function(){},onDialogOpen:function(){},onSelect:function(){},onSelectError:function(){},onQueueComplete:function(){},onUploadComplete:function(){},onUploadError:function(){},onUploadProgress:function(){},onUploadStart:function(){},onUploadSuccess:function(){}},b);var f={assume_success_timeout:e.successTimeout,button_placeholder_id:e.id,button_width:e.width,button_height:e.height,button_text:null,button_text_style:null,button_text_top_padding:0,button_text_left_padding:0,button_action:e.multi?SWFUpload.BUTTON_ACTION.SELECT_FILES:SWFUpload.BUTTON_ACTION.SELECT_FILE,button_disabled:false,button_cursor:e.buttonCursor=="arrow"?SWFUpload.CURSOR.ARROW:SWFUpload.CURSOR.HAND,button_window_mode:e.transparent?SWFUpload.WINDOW_MODE.TRANSPARENT:SWFUpload.WINDOW_MODE.OPAQUE,debug:e.debug,requeue_on_error:e.requeueErrors,file_post_name:e.fileObjName,file_size_limit:e.fileSizeLimit,file_types:e.fileTypeExts,file_types_description:e.fileTypeDesc,file_queue_limit:e.queueSizeLimit,file_upload_limit:e.uploadLimit,flash_url:e.swf,prevent_swf_caching:e.preventCaching,post_params:e.postData,upload_url:e.uploader,use_query_string:e.method=="get",file_dialog_complete_handler:k,file_dialog_start_handler:l,file_queued_handler:m,file_queue_error_handler:n,upload_complete_handler:p,upload_error_handler:q,upload_progress_handler:r,upload_start_handler:s,upload_success_handler:t};if(c){f=a.extend(f,c)}f=a.extend(f,e);a.ajaxSetup({async:false});a.getScript(e.langFile);a.ajaxSetup({async:true});if(e.buttonText=="")e.buttonText=uploadifyLang["buttonText"];if(e.fileTypeDesc=="")e.fileTypeDesc=uploadifyLang["fileTypeDesc"];window["uploadify_"+e.id]=new SWFUpload(f);var g=window["uploadify_"+e.id];g.original=d;var h=a("
",{id:e.id,"class":"uploadify",css:{height:e.height+"px",position:"relative",width:e.width+"px"}});a("#"+g.movieName).wrap(h);if(!e.queueID){var i=a("
",{id:e.id+"_queue","class":"uploadifyQueue"});a("#"+e.id).after(i);g.settings.queueID=e.queueID=e.id+"_queue"}g.queue={files:{},filesSelected:0,filesQueued:0,filesReplaced:0,filesCancelled:0,filesErrored:0,averageSpeed:0,queueLength:0,queueSize:0,uploadSize:0,queueBytesUploaded:0,uploadQueue:[],errorMsg:uploadifyLang["errorMsg1"]};var j=a("
",{id:e.id+"_button","class":"uploadifyButton",html:''+e.buttonText+""});a("#"+e.id).append(j);a("#"+g.movieName).css({position:"absolute","z-index":1,left:"0px"})})},uploadifyCancel:function(b){var c=a(this).selector.replace("#","");var d=window["uploadify_"+c];var e=-1;if(arguments[0]){if(arguments[0]=="*"){a("#"+d.settings.queueID).find(".uploadifyQueueItem").each(function(){e++;d.cancelUpload(a(this).attr("id"));a(this).delay(100*e).fadeOut(500,function(){a(this).remove()})});d.queue.queueSize=0}else{for(var f=0;f $image_id, - 'category_id' => $_POST['category_id'], - 'thumbnail_url' => $thumbnail_url, - ); - -$output = ob_get_contents(); -ob_end_clean(); -if (!empty($output)) -{ - add_upload_error($_POST['upload_id'], $output); - $return['error_message'] = $output; -} - -echo json_encode($return); -?> \ No newline at end of file diff --git a/admin/include/uploadify/uploadify.swf b/admin/include/uploadify/uploadify.swf deleted file mode 100644 index e3f767031..000000000 Binary files a/admin/include/uploadify/uploadify.swf and /dev/null differ diff --git a/admin/include/uploadify/uploadifyLang_en.js b/admin/include/uploadify/uploadifyLang_en.js deleted file mode 100644 index 3be8afadc..000000000 --- a/admin/include/uploadify/uploadifyLang_en.js +++ /dev/null @@ -1,32 +0,0 @@ -// this file must be in UTF-8 format - -var uploadifyLang = new Array(); - -uploadifyLang['buttonText'] = 'SELECT FILES'; -uploadifyLang['fileTypeDesc'] = 'All Files (*.*)'; -uploadifyLang['replaceMsg1'] = 'The file named'; -uploadifyLang['replaceMsg2'] = 'is already in the queue'; -uploadifyLang['replaceMsg3'] = 'Do you want to replace the existing item in the queue?'; -uploadifyLang['existsMsg1'] = 'A file with the name'; -uploadifyLang['existsMsg2'] = 'already exists on the server'; -uploadifyLang['existsMsg3'] = 'Would you like to replace the existing file?'; -uploadifyLang['errorMsg1'] = 'Some files were not added to the queue:'; -uploadifyLang['errorMsg2'] = 'The number of files selected exceeds the remaining upload limit'; -uploadifyLang['errorMsg3'] = 'The number of files selected exceeds the queue size limit'; -uploadifyLang['errorMsg4'] = 'The file'; -uploadifyLang['errorMsg5'] = 'exceeds the size limit'; -uploadifyLang['errorMsg6'] = 'is empty'; -uploadifyLang['errorMsg7'] = 'is not an accepted file type'; -uploadifyLang['errorString1'] = 'Error'; -uploadifyLang['errorString2'] = 'HTTP Error'; -uploadifyLang['errorString3'] = 'Missing Upload URL'; -uploadifyLang['errorString4'] = 'IO Error'; -uploadifyLang['errorString5'] = 'Security Error'; -uploadifyLang['errorString6'] = 'The upload limit has been reached'; -uploadifyLang['errorString7'] = 'Exceeds Upload Limit'; -uploadifyLang['errorString8'] = 'Failed'; -uploadifyLang['errorString9'] = 'File ID Not Found'; -uploadifyLang['errorString10'] = 'Validation Error'; -uploadifyLang['errorString11'] = 'Cancelled'; -uploadifyLang['errorString12'] = 'Stopped'; -uploadifyLang['uploadComplete'] = 'Complete'; \ No newline at end of file -- cgit v1.2.3