Version Description
- added Serbian translation thanks to Andrijana Nikolic from http://webhostinggeeks.com/
- bug fix with %blogid%, %pageid% and %pagetitle% that where not implemented in notification emails
- in single button operation selected files are removed in case that a subfolder has not been previously selected or a required user field has not been populated
- bug fixed in single file operation that allowed selection of multiple files through drag-and-drop
- bug fixed with files over 1MB that got corrupted when maintaining files with same filename
- dummy (test) Shortcode Composer button removed from the plugin's Settings as it is no longer useful
- added support for empty (zero size) files
- many code optimizations and security enhancements
- fixed javascript errors in IE8 that were breaking upload operation
- code improvements to avoid display of session warnings
- added %username% in redirect link
- added option in plugin's Settings in Dashboard to select alternative POST Upload method, in order to resolve errors like "http:// wrapper is disabled in the server configuration by allow_url_fopen" or "Call to undefined function curl_init()"
- added filter action wfu_after_upload, where the admin can define additional javascript code to be executed on user's browser after each file is finished
Download this release
Release Info
Developer | nickboss |
Plugin | WordPress File Upload |
Version | 2.7.4 |
Comparing to | |
See all releases |
Code changes from version 2.7.3 to 2.7.4
- js/wordpress_file_upload_functions.js +2 -2
- languages/wordpress-file-upload-fr_FR.mo +0 -0
- languages/wordpress-file-upload-fr_FR.po +79 -12
- languages/wordpress-file-upload-sr_RS.mo +0 -0
- languages/wordpress-file-upload-sr_RS.po +594 -0
- lib/wfu_admin.php +16 -2
- lib/wfu_ajaxactions.php +51 -11
- lib/wfu_attributes.php +1 -1
- lib/wfu_functions.php +80 -14
- lib/wfu_processfiles.php +57 -22
- readme.txt +59 -6
- release_notes.txt +1 -1
- wfu_file_downloader.php +1 -1
- wfu_response.php +0 -22
- wordpress_file_upload.php +16 -10
js/wordpress_file_upload_functions.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
function wfu_Initialize_Consts(e){if("undefined"==typeof GlobalData.consts){GlobalData.consts=new Object;for(var a=e.split(";"),t=0;t<a.length;t++)const_txt=a[t].split(":"),GlobalData.consts[wfu_plugin_decode_string(const_txt[0])]=wfu_plugin_decode_string(const_txt[1])}}function wfu_plugin_load_action(e){wfu_install_unload_hook();var a=document.getElementById("selectsubdiredit_"+e);a&&"none"!=a.style.display&&wfu_attach_element_handlers(a,new Function("wfu_selectsubdiredit_change("+e+");"))}function wfu_install_unload_hook(){window.onbeforeunload=wfu_unload_hook}function wfu_unload_hook(){return""!=GlobalData.UploadInProgressString.trim()?GlobalData.consts.wfu_pageexit_prompt:void 0}function wfu_Check_Browser_Capabilities(){if("undefined"==typeof wfu_BrowserCaps){wfu_BrowserCaps=new Object;var e=wfu_GetHttpRequestObject();wfu_BrowserCaps.supportsAJAX=null!=e,wfu_BrowserCaps.supportsUploadProgress=!!(e&&"upload"in e&&"onprogress"in e.upload);var a=null;try{var a=new FormData}catch(t){}wfu_BrowserCaps.supportsHTML5=null!=a;var t=document.createElement("iframe");wfu_BrowserCaps.supportsIFRAME=null!=t,wfu_BrowserCaps.supportsDRAGDROP=window.FileReader?!0:!1,wfu_BrowserCaps.supportsAnimation=wfu_check_animation(),wfu_BrowserCaps.isSafari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0}}function wfu_check_animation(){var e=!1,a="animation",t="",s="Webkit Moz O ms Khtml".split(" "),n="",l=document.createElement("DIV");if(l.style.animationName&&(e=!0),e===!1)for(var r=0;r<s.length;r++)if(void 0!==l.style[s[r]+"AnimationName"]){n=s[r],a=n+"Animation",t="-"+n.toLowerCase()+"-",e=!0;break}return e}function wfu_join_strings(e){for(var a=[].slice.call(arguments),t="",s="",n=1;n<a.length;n++)s=""==t||""==a[n]?"":e,t+=s+a[n];return t}function wfu_plugin_decode_string(e){for(var a,t,s=0,n="";s<e.length;)a=parseInt(e.substr(s,2),16),t=128>a?a:224>a?((31&a)<<6)+(63&parseInt(e.substr(s+=2,2),16)):((15&a)<<12)+((63&parseInt(e.substr(s+=2,2),16))<<6)+(63&parseInt(e.substr(s+=2,2),16)),n+=String.fromCharCode(t),s+=2;return n}function wfu_plugin_encode_string(e){var a=0,t="",s="";for(a=0;a<e.length;a++)num=e.charCodeAt(a),num>=2048?num=((16773120&num|917504)<<4)+((4032&num|8192)<<2)+(63&num|128):num>=128&&(num=((65472&num|12288)<<2)+(63&num|128)),s=num.toString(16),(1==s.length||3==s.length||5==s.length)&&(s="0"+s),t+=s;return t}function wfu_randomString(e){for(var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",t=e,s="",n=0;t>n;n++){var l=Math.floor(Math.random()*a.length);s+=a.substring(l,l+1)}return s}function wfu_addEventHandler(e,a,t){e.addEventListener?e.addEventListener(a,t,!1):e.attachEvent?e.attachEvent("on"+a,t):e["on"+a]=t}function wfu_attach_element_handlers(e,a){for(var t=["DOMAttrModified","textInput","input","change","keypress","paste","focus","propertychange"],s=0;s<t.length;s++)wfu_addEventHandler(e,t[s],a)}function wfu_GetHttpRequestObject(){var e=null;try{e=new XMLHttpRequest}catch(a){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}}if(null==e&&window.createRequest)try{xmlhttp=window.createRequest()}catch(a){}return e}function wfu_filedetails_showhide(e,a,t){var s=(document.getElementById("wfu_messageblock_arrow_"+e+"_"+a),document.getElementById("wfu_messageblock_arrow_"+e+"_up_"+a)),n=document.getElementById("wfu_messageblock_arrow_"+e+"_down_"+a),l=document.getElementById("wfu_messageblock_subheader_"+e+"_"+a),r=document.getElementById("wfu_messageblock_header_"+e+"_state_"+a);t?(s.style.display="",n.style.display="none",l.style.display="",r.value=""):(s.style.display="none",n.style.display="",l.style.display="none",r.value="none")}function wfu_get_file_ids(e){for(var a=(document.getElementById("wfu_messageblock_"+e),document.getElementById("wfu_messageblock_subheader_"+e).nextSibling),t="wfu_messageblock_"+e+"_",s=[];null!=a;)1===a.nodeType&&a.id.substr(0,t.length)==t&&s.push(a.id.substr(a.id.lastIndexOf("_")+1)),a=a.nextSibling;return s}function wfu_get_filelist(e,a){a="undefined"!=typeof a?a:!0;var t=document.getElementById("upfile_"+e),s=t.files;return s||(s=t.value?[{name:t.value}]:[]),a&&"undefined"!=typeof t.filearray&&(s=t.filearray),s}function wfu_filedetails_toggle(e,a){var t=(document.getElementById("wfu_messageblock_arrow_"+e+"_"+a),document.getElementById("wfu_messageblock_arrow_"+e+"_up_"+a));wfu_filedetails_showhide(e,a,"none"==t.style.display)}function wfu_headerdetails_showhide(e,a){var t=(document.getElementById("wfu_messageblock_arrow_"+e),document.getElementById("wfu_messageblock_arrow_"+e+"_up")),s=document.getElementById("wfu_messageblock_arrow_"+e+"_down"),n=document.getElementById("wfu_messageblock_subheader_"+e),l=document.getElementById("wfu_messageblock_subheader_"+e+"_message"),r=document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage"),o=document.getElementById("wfu_messageblock_header_"+e+"_state"),i=wfu_get_file_ids(e);if(a){t.style.display="",s.style.display="none",("none"!=l.style.display||"none"!=r.style.display)&&(n.style.display=""),o.value="";for(var _=0;_<i.length;_++)document.getElementById("wfu_messageblock_"+e+"_"+i[_]).style.display="",document.getElementById("wfu_messageblock_subheader_"+e+"_"+i[_]).style.display=document.getElementById("wfu_messageblock_header_"+e+"_state_"+i[_]).value}else{t.style.display="none",s.style.display="",n.style.display="none",o.value="none";for(var _=0;_<i.length;_++)document.getElementById("wfu_messageblock_"+e+"_"+i[_]).style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_"+i[_]).style.display="none"}}function wfu_headerdetails_toggle(e){var a=(document.getElementById("wfu_messageblock_arrow_"+e),document.getElementById("wfu_messageblock_arrow_"+e+"_up"));wfu_headerdetails_showhide(e,"none"==a.style.display)}function wfu_selectbutton_changed(e,a){wfu_BrowserCaps.supportsAJAX&&wfu_BrowserCaps.supportsHTML5||(a=0);var t=document.getElementById("upfile_"+e),s=wfu_get_filelist(e,!1);if(1==a){"undefined"==typeof t.filearray&&(t.filearray=Array());for(var n=0;n<s.length;n++)t.filearray.push(s[n])}wfu_update_filename_text(e)}function wfu_selectbutton_clicked(e){var a=document.getElementById("wordpress_file_upload_message_"+e);a&&(a.style.display="none"),wfu_reset_message(e),document.getElementById("upfile_"+e).value="";var t=document.getElementById("fileName_"+e);t&&(t.value="",t.className="file_input_textbox")}function wfu_update_uploadbutton_status(e){var a=document.getElementById("upload_"+e);if(a){var t=wfu_get_filelist(e),s=t.length>0;a.disabled=!s}}function wfu_update_filename_text(e){var a=document.getElementById("fileName_"+e);if(a){for(var t=wfu_get_filelist(e),s="",n=0;n<t.length;n++)""!=s&&(s+=", "),s+=t[n].name.replace(/c:\\fakepath\\/i,"");a.value=s}}function wfu_selectsubdir_check(e){var a=document.getElementById("selectsubdir_"+e);if(!a)return!0;var t=document.getElementById("selectsubdiredit_"+e),s="none"!=t.style.display;return s&&a.selectedIndex>0&&(t.value=a.value.replace(/^\s+/,""),t.className="file_item_clean_match",wfu_selectsubdiredit_change(e)),document.getElementById("hiddeninput_"+e).value=s?t.value:a.selectedIndex,!s&&0==a.selectedIndex||s&&(""==t.value||"file_item_clean_empty"==t.className)?(a.className="file_item_clean_prompt",s&&(t.className="file_item_clean_prompt",t.value=""),!1):(a.className="file_item_clean",s&&"file_item_clean_prompt"==t.className&&(t.className="file_item_clean"),a.options[0].style.display="none",!0)}function wfu_selectsubdiredit_enter(e){var a=document.getElementById("selectsubdir_"+e),t=document.getElementById("selectsubdiredit_"+e);"file_item_clean_empty"==t.className&&(t.value=""),a.className="file_item_clean",t.className="file_item_clean"}function wfu_selectsubdiredit_exit(e){var a=document.getElementById("selectsubdiredit_"+e);""==a.value&&(a.value=GlobalData.consts.wfu_subdir_typedir,a.className="file_item_clean_empty")}function wfu_selectsubdiredit_change(e){var a=document.getElementById("selectsubdir_"+e),t=document.getElementById("selectsubdiredit_"+e);if("none"!=t.style.display){if("file_item_clean_empty"==t.className)return a.selectedIndex=0,void(document.getElementById("hiddeninput_"+e).value="");document.getElementById("hiddeninput_"+e).value=t.value;for(var s,n=!1,l=1;l<a.options.length;l++)s=a.options[l].value.replace(/^\s+/,"").toLowerCase(),a.options[l].style.display=t.value.length>=3?s.substr(0,t.value.length)==t.value.toLowerCase()?"block":"none":"block",a.options[l].value.replace(/^\s+/,"")==t.value&&(a.selectedIndex=l,t.className="file_item_clean_match",n=!0);n||(a.selectedIndex=0,t.className="file_item_clean")}}function wfu_selectsubdir_disable_onoff(e,a){var t=document.getElementById("selectsubdir_"+e);if(!t)return!0;var s=document.getElementById("selectsubdiredit_"+e),n="none"!=s.style.display;t.disabled=a,n&&(s.disabled=a)}function wfu_Redirect(e){window.location=e}function wfu_loadStart(){}function wfu_uploadProgress(e,a,t,s){s&&"undefined"==typeof this.xhr&&(console.log("total="+e.total+", loaded="+e.loaded),console.log(e));var n=GlobalData[a].xhrs[t],l=0,r=0,o=document.getElementById("progressbar_"+a+"_animation");if(e.lengthComputable){if(n.sizeloaded=e.loaded,n.size<e.total&&e.total>0){r=e.total-n.size,n.deltasize+=r,n.size+=r;for(var i=0;i<GlobalData[a].xhrs.length;i++)GlobalData[a].xhrs[i].file_id==n.file_id&&(GlobalData[a].xhrs[i].totalsize+=r)}if(o){for(var _=0,d=0,u=[],i=0;i<GlobalData[a].xhrs.length;i++)u[GlobalData[a].xhrs[i].file_id]=0;for(var i=0;i<GlobalData[a].xhrs.length;i++)u[GlobalData[a].xhrs[i].file_id]=Math.max(GlobalData[a].xhrs[i].totalsize,u[GlobalData[a].xhrs[i].file_id]);for(var i=0;i<u.length;i++)"undefined"!=typeof u[i]&&(_+=u[i]);for(var i=0;i<GlobalData[a].xhrs.length;i++)d+=GlobalData[a].xhrs[i].sizeloaded;l=Math.round(100*d/_),o.style.width=l.toString()+"%"}}else o&&(o.style.width="0%")}function wfu_notify_WPFilebase(e,a){var t=wfu_GetHttpRequestObject();if(null==t){var s=document.createElement("iframe");return s.style.display="none",s.src=GlobalData.consts.ajax_url+"?action=wfu_ajax_action_notify_wpfilebase¶ms_index="+e+"&session_token="+a,void document.body.appendChild(s)}var n=GlobalData.consts.ajax_url;params=new Array(3),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_notify_wpfilebase",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=e,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=a;for(var l="",s=0;s<params.length;s++)l+=(s>0?"&":"")+params[s][0]+"="+encodeURI(params[s][1]);t.open("POST",n,!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onreadystatechange=function(){},t.send(l)}function wfu_send_email_notification(e,a,t,s,n,l,r,o,i){var _=wfu_GetHttpRequestObject();if(null!=_){var d=GlobalData.consts.ajax_url,u=wfu_get_userdata_count(e);params=new Array(7+u),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_send_email_notification",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=t,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=s,params[3]=new Array(2),params[3][0]="only_filename_list",params[3][1]=n,params[4]=new Array(2),params[4][0]="target_path_list",params[4][1]=l,params[5]=new Array(2),params[5][0]="attachment_list",params[5][1]=r,params[6]=new Array(2),params[6][0]="unique_id",params[6][1]=a;for(var m=0;u>m;m++)params[7+m]=new Array(2),params[7+m][0]="userdata_"+m,params[7+m][1]=wfu_plugin_encode_string(document.getElementById("hiddeninput_"+e+"_userdata_"+m).value);for(var c="",m=0;m<params.length;m++)c+=(m>0?"&":"")+params[m][0]+"="+encodeURI(params[m][1]);var f=new Date;_.xhrid=-1,_.shortcode_id=e,_.requesttype="email",_.file_id=0,_.loading=!1,_.aborted=!1,_.unique_id=a,_.debugmode=o,_.is_admin=i,_.params_index=t,_.session_token=s,_.start_time=f.getTime(),_.end_time=_.start_time,_.finish_time=_.start_time+1e3*parseInt(GlobalData.consts.max_time_limit),_.fail_colors=GlobalData.consts.fail_colors,_.error_message_header="",_.error_message_failed=GlobalData.consts.message_failed,_.error_message_cancelled=GlobalData.consts.message_cancelled,_.error_adminmessage_unknown="",_.open("POST",d,!0),_.setRequestHeader("Content-type","application/x-www-form-urlencoded"),_.addEventListener("load",wfu_uploadComplete,!1),_.addEventListener("error",wfu_uploadFailed,!1),_.addEventListener("abort",wfu_uploadCanceled,!1),_.send(c)}}function wfu_format_debug_data(e,a){return output='<label class="file_messageblock_subheader_debugmessage_label">',output+="Debug Data"+a,output+="</label>",output+='<div class="file_messageblock_subheader_debugmessage_container">',output+=e,output+="</div>"}function wfu_uploadComplete(e){var a=new Date,t=this.shortcode_id,s=(this.file_id,!1),n="",l="",r="unknown",o="",i="wfu_fileupload_success:";this.loading=!1,this.end_time=a.getTime();var _=e.target.responseText,d=_,u="error";if(-1!=_&&_.indexOf("force_errorabort_code")>-1&&(u="errorabort",_=_.replace("force_errorabort_code","")),-1!=_){var m=_.indexOf(i);if(m>-1&&("true"==this.debugmode&&(o=_.substr(0,m)),d=_.substr(m+i.length),m=d.indexOf(":"),l=d.substr(0,m),n=d.substr(m+1)),""!=o){var c="";"fileupload"==this.requesttype?c=" - File: "+this.file_id:"email"==this.requesttype&&(c=" - Email Notification"),o=wfu_format_debug_data(o,c)}if(""!=l){var f=l.split(";");if(1==parseInt(f[2])){var g=f[3].split(",");r=wfu_plugin_decode_string(g[0])}}}if(""==n||""==l){var p=this.fail_colors.split(","),y=wfu_Initialize_Params();y.general.shortcode_id=t,y.general.unique_id=this.unique_id,y.general.state=7,y.general.files_count="fileupload"==this.requesttype?1:0,y.general.upload_finish_time=this.finish_time,y.general.fail_message=GlobalData.consts.message_unknown,y.general.fail_admin_message=wfu_join_strings("<br />",this.error_adminmessage_unknown,this.requesttype+":"+d),y.general.files_count>0?(y[0]={},y[0].color=p[0],y[0].bgcolor=p[1],y[0].borcolor=p[2],y[0].message_type=u,r=u,y[0].header=this.error_message_header,y[0].message=GlobalData.consts.message_timelimit,y[0].admin_messages="true"==this.is_admin?GlobalData.consts.message_admin_timelimit:""):y.general.admin_messages.other="true"==this.is_admin?GlobalData.consts.message_admin_timelimit:"",y.general.upload_finish_time>0&&a.getTime()<y.general.upload_finish_time&&(y.general.files_count>0?(y[0].message=y.general.fail_message,y[0].admin_messages="true"==this.is_admin?y.general.fail_admin_message:""):y.general.admin_messages.other="true"==this.is_admin?y.general.fail_admin_message:"")}return s=""==n||""==l?wfu_ProcessUploadComplete(t,this.file_id,y,this.unique_id,this.params_index,this.session_token,"",[this.debugmode,o,this.is_admin],this.requesttype):wfu_ProcessUploadComplete(t,this.file_id,n,this.unique_id,this.params_index,this.session_token,l,[this.debugmode,o,this.is_admin],this.requesttype),s&&(wfu_unlock_upload(e.target.shortcode_id),wfu_hide_simple_progressbar(t),wfu_clear(e.target.shortcode_id)),e.target.return_status?r:void 0}function wfu_ProcessUploadComplete(e,a,t,s,n,l,r,o,i){if(e&&!(0>e)&&null!=t&&""!=t&&""!=s&&("no-ajax"==s||GlobalData[e])){var _=!1;if("string"==typeof t){t=wfu_plugin_decode_string(t.replace(/^\s+|\s+$/g,""));var d=null;try{d=JSON.parse(t)}catch(u){}if(null==d){var m=r.split(";");d=wfu_Initialize_Params(),d.general.shortcode_id=e,d.general.unique_id=s,d.general.state=m[0],4==d.general.state&&d.general.state++;var c=m[1].split(","),f="",g=GlobalData.consts.jsonparse_filemessage,p=GlobalData.consts.jsonparse_message,y=GlobalData.consts.jsonparse_adminmessage;d.general.files_count=parseInt(m[2]);for(var w=0;w<d.general.files_count;w++)d[w]={},d[w].color=c[0],d[w].bgcolor=c[1],d[w].borcolor=c[2],f=m[w+3].split(","),d[w].message_type=wfu_plugin_decode_string(f[0]),d[w].header=wfu_plugin_decode_string(f[1]),"success"==d[w].message_type&&(d[w].header+=g,d[w].message_type="warning"),d[w].message=wfu_join_strings("<br />",p,wfu_plugin_decode_string(f[2])),d[w].admin_messages=wfu_join_strings("<br />",y,wfu_plugin_decode_string(f[3]))}}else{if("object"!=typeof t)return;var d=t}for(w=0;d[w];)d[w].message_type&&"error"==d[w].message_type.substr(0,5)&&(d[w].message_type=d[w].message_type.substr(0,5)),w++;var b=document.getElementById("wfu_messageblock_"+e),h=!0;if(!UploadStates[e]&&b){var v=document.getElementById("wfu_messageblock_header_"+e+"_states").value;v=wfu_plugin_decode_string(v.replace(/^\s+|\s+$/g,"")),UploadStates[e]=null;try{UploadStates[e]=JSON.parse(v)}catch(u){}null==UploadStates[e]&&(h=!1)}GlobalData[e]||(GlobalData[e]=Object());var I=GlobalData[e];if("no-ajax"==s)I.last=!1,I.unique_id="",I.files_count=d.general.files_count,0==d.general.state&&(d.general.files_count=0),I.files_processed=d.general.files_count,I.upload_state=h?d.general.state:10,I.message=d.general.message,I.update_wpfilebase=d.general.update_wpfilebase,I.redirect_link=d.general.redirect_link,I.notify_only_filename_list="",I.notify_target_path_list="",I.notify_attachment_list="",I.admin_messages={},I.admin_messages.wpfilebase=d.general.admin_messages.wpfilebase,I.admin_messages.notify=d.general.admin_messages.notify,I.admin_messages.redirect=d.general.admin_messages.redirect,I.admin_messages.debug=o[1],I.admin_messages.other=d.general.admin_messages.other,I.errors={},I.errors.wpfilebase=d.general.errors.wpfilebase,I.errors.notify=d.general.errors.notify,I.errors.redirect=d.general.errors.redirect,I.current_size=0,I.total_size=0;else{if(""==I.unique_id||I.unique_id!=s||I.unique_id!=d.general.unique_id)return;if(I.last)return;0==d.general.files_count&&d[0]&&"error"==d[0].message_type&&(d.general.files_count=1);for(var E="",w=0;w<d.general.files_count;w++)E="error"==d[w].message_type&&0==I.files_processed?"error1":"error"==d[w].message_type&&I.files_processed>0?"error2":d[w].message_type,I.upload_state=GlobalData.filestatematch[E][I.upload_state];h||(I.upload_state=10),I.files_processed+=d.general.files_count,I.message=wfu_join_strings("<br />",I.message,d.general.message),""==I.update_wpfilebase&&(I.update_wpfilebase=d.general.update_wpfilebase),(!i||i&&"email"!=i)&&(I.redirect_link=d.general.redirect_link),I.notify_only_filename_list=wfu_join_strings(", ",I.notify_only_filename_list,d.general.notify_only_filename_list),I.notify_target_path_list=wfu_join_strings(", ",I.notify_target_path_list,d.general.notify_target_path_list),I.notify_attachment_list=wfu_join_strings(",",I.notify_attachment_list,d.general.notify_attachment_list),I.admin_messages.debug=wfu_join_strings("<br />",I.admin_messages.debug,o[1]),I.admin_messages.other=wfu_join_strings("<br />",I.admin_messages.other,d.general.admin_messages.other),""==I.admin_messages.wpfilebase&&(I.admin_messages.wpfilebase=d.general.admin_messages.wpfilebase),""==I.admin_messages.notify&&(I.admin_messages.notify=d.general.admin_messages.notify),""==I.admin_messages.redirect&&(I.admin_messages.redirect=d.general.admin_messages.redirect),""==I.errors.wpfilebase&&(I.errors.wpfilebase=d.general.errors.wpfilebase),""==I.errors.notify&&(I.errors.notify=d.general.errors.notify),""==I.errors.redirect&&(I.errors.redirect=d.general.errors.redirect)}I.files_processed==I.files_count&&(I.last=!0,""!=I.update_wpfilebase&&(I.admin_messages.wpfilebase="",wfu_notify_WPFilebase(n,l)),""!=I.notify_only_filename_list&&(I.admin_messages.notify="",wfu_send_email_notification(e,s,n,l,I.notify_only_filename_list,I.notify_target_path_list,I.notify_attachment_list,o[0],o[2]),I.last=!1,I.notify_only_filename_list=""),I.last&&(wfu_notify_server_upload_ended(s,n,l),GlobalData.UploadInProgressString=GlobalData.UploadInProgressString.replace(new RegExp("\\["+s+"\\]","g"),"")),""!=I.errors.redirect&&(I.redirect_link=""),""!=I.redirect_link&&I.last&&""==GlobalData.UploadInProgressString.trim()&&(I.upload_state=11,_=!0));var B=I.message,k=wfu_join_strings("<br />",I.admin_messages.other,I.admin_messages.wpfilebase,I.admin_messages.notify,I.admin_messages.redirect,I.admin_messages.debug);if(!h){var x=GlobalData.consts.jsonparse_headermessage,D=GlobalData.consts.jsonparse_headeradminmessage;B=wfu_join_strings("<br />",x,B),k=wfu_join_strings("<br />",D,k)}if(I.last){0==I.files_count?I.upload_state=8:I.upload_state<4&&(I.upload_state+=4);{""!=I.admin_messages.wpfilebase||""!=I.admin_messages.notify||""!=I.admin_messages.redirect||""!=I.admin_messages.other}4==I.upload_state&&""!=k?I.upload_state++:5==I.upload_state&&""==!k&&""==B&&I.upload_state--}if(b){var G=document.getElementById("wfu_messageblock_header_"+e+"_state"),T=1==I.files_count&&""==B&&""==k&&I.last&&!_;if(T)document.getElementById("wfu_messageblock_header_"+e).style.display="none";else{document.getElementById("wfu_messageblock_header_"+e).style.display="";var j=document.getElementById("wfu_messageblock_header_"+e+"_container");if(h){var q="";1!=I.files_count||5!=I.upload_state&&7!=I.upload_state||(q="_singlefile"),j.innerHTML=UploadStates[e]["State"+I.upload_state+q]}else{j.innerHTML="";var C=document.getElementById("wfu_messageblock_header_"+e+"_safecontainer");j.innerHTML=C.innerHTML.replace(/_safe/g,"")}var S=!1;""!=B?(document.getElementById("wfu_messageblock_subheader_"+e+"_message").style.display="",document.getElementById("wfu_messageblock_subheader_"+e+"_messagelabel").innerHTML=B,S=!0):document.getElementById("wfu_messageblock_subheader_"+e+"_message").style.display="none",""!=k?(document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage").style.display="",document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessagelabel").innerHTML=k,S=!0):document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage").style.display="none",document.getElementById("wfu_messageblock_subheader_"+e).style.display=S?G.value:"none",S||I.files_processed>0?(j.colSpan=2,document.getElementById("wfu_messageblock_arrow_"+e).style.display=""):(document.getElementById("wfu_messageblock_arrow_"+e).style.display="none",j.colSpan=3)}for(var A=document.getElementById("wfu_messageblock_subheader_"+e),N=0,O=null,H=document.getElementById("wfu_messageblock_"+e+"_filetemplate"),L="",M=document.getElementById("wfu_messageblock_"+e+"_door"),P=0,R=1,U=2,z=wfu_plugin_decode_string(H.value.replace(/^\s+|\s+$/g,"")),w=0;w<d.general.files_count;w++){for(P=w+a,L=z.replace(/\[file_id\]/g,P),L=L.replace(/\[filenumber_display\]/g,""),L=L.replace(/\[fileheader_color\]/g,d[w].color),L=L.replace(/\[fileheader_bgcolor\]/g,d[w].bgcolor),L=L.replace(/\[fileheader_borcolor\]/g,d[w].borcolor),L=L.replace(/\[fileheader_message\]/g,d[w].header),L=L.replace(/\[filesubheadermessage_display\]/g,'style="display:none;"'),L=L.replace(/\[filesubheader_message\]/g,d[w].message),L=L.replace(/\[filesubheaderadminmessage_display\]/g,'style="display:none;"'),L=L.replace(/\[filesubheader_adminmessage\]/g,d[w].admin_messages),L="<table><tbody>"+L+"</tbody></table>",M.innerHTML=L,R=1,U=2,S=!1,O=document.getElementById("wfu_messageblock_"+e+"_"+P),1==I.files_count?(document.getElementById("wfu_messageblock_"+e+"_filenumber_"+P).style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_fileempty_"+P).style.display="none",O.style.display=T?"":G.value,R++,U++):O.style.display=G.value,""!=d[w].message&&(document.getElementById("wfu_messageblock_subheader_"+e+"_message_"+P).style.display="",S=!0),""!=d[w].admin_messages&&(document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage_"+P).style.display="",S=!0),S||(document.getElementById("wfu_messageblock_arrow_"+e+"_"+P).style.display="none",R++),document.getElementById("wfu_messageblock_header_"+e+"_container_"+P).colSpan=R,document.getElementById("wfu_messageblock_subheader_"+e+"_container_"+P).colSpan=U;P>N&&(A=A.nextSibling,null!=A);)1===A.nodeType&&(N=A.id.substr(A.id.lastIndexOf("_")+1));b.tBodies[0].insertBefore(O,A),A=O.nextSibling,O=document.getElementById("wfu_messageblock_subheader_"+e+"_"+P),b.tBodies[0].insertBefore(O,A),A=O,N=P}T&&(document.getElementById("wfu_messageblock_"+e+"_1").style.display=""),b.style.display="",document.getElementById("wordpress_file_upload_message_"+e).style.display=""}return _&&wfu_Redirect(I.redirect_link),I.last}}function wfu_uploadFailed(e,a){a&&(console.log("failure report following"),console.log(e));var t=e.target,s={target:{responseText:"",shortcode_id:t.shortcode_id}};wfu_uploadComplete.call(t,s)}function wfu_uploadCanceled(){}function wfu_notify_server_upload_ended(e,a,t){var s=wfu_GetHttpRequestObject();if(null!=s){var n=GlobalData.consts.ajax_url;params=new Array(5),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action",params[1]=new Array(2),params[1][0]="unique_id",params[1][1]=e,params[2]=new Array(2),params[2][0]="params_index",params[2][1]=a,params[3]=new Array(2),params[3][0]="session_token",params[3][1]=t,params[4]=new Array(2),params[4][0]="upload_finished",params[4][1]=1;for(var l="",r=0;r<params.length;r++)l+=(r>0?"&":"")+params[r][0]+"="+encodeURI(params[r][1]);s.open("POST",n,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onreadystatechange=function(){4==s.readyState&&200==s.status},s.send(l)}}function wfu_Initialize_Params(){var e={};return e.version="full",e.general={},e.general.shortcode_id=0,e.general.unique_id="",e.general.state=0,e.general.files_count=0,e.general.update_wpfilebase="",e.general.redirect_link="",e.general.upload_finish_time=0,e.general.message="",e.general.message_type="",e.general.admin_messages={},e.general.admin_messages.wpfilebase="",e.general.admin_messages.notify="",e.general.admin_messages.redirect="",e.general.admin_messages.other="",e.general.errors={},e.general.errors.wpfilebase="",e.general.errors.notify="",e.general.errors.redirect="",e.general.color="",e.general.bgcolor="",e.general.borcolor="",e.general.notify_only_filename_list="",e.general.notify_target_path_list="",e.general.notify_attachment_list="",e.general.fail_message="",e.general.fail_admin_message="",e}function wfu_redirect_to_classic(e,a,t,s){0!=wfu_filesselected(e)&&wfu_selectsubdir_check(e)&&wfu_check_required_userdata(e)&&wfu_redirect_to_classic_cont(e,a,t,s,[""])}function wfu_redirect_to_classic_cont(e,a,t,s){var n=function(n){if(n.indexOf("wfu_response_success:")>-1){var l=wfu_Initialize_Params();if(l.general.shortcode_id=e,l.general.unique_id="",l.general.files_count=wfu_filesselected(e),wfu_ProcessUploadComplete(e,0,l,"no-ajax","",a,"",["false","","false"]),1==t){var r="";document.getElementById("upfile_"+e).name="uploadedfile_"+e+"_redirected"+r}document.getElementById("adminerrorcodes_"+e).value=s>0?s:"",document.getElementById("upfile_"+e).disabled=!1,document.getElementById("uniqueuploadid_"+e).value=wfu_randomString(20),document.getElementById("uploadform_"+e).submit()}},l="",r=new Date,o=GlobalData.consts.response_url+"?shortcode_id="+e+"&start_time="+r.getTime()+"&session_token="+a+l;wfu_lock_upload(e);var i=wfu_GetHttpRequestObject();if(null==i){var _=document.createElement("iframe");return _?(_.style.display="none",_.src=o,document.body.appendChild(_),void(_.onload=function(){n(_.contentDocument.body.innerHTML)})):void 0}i.open("GET",o,!0),i.onreadystatechange=function(){4==i.readyState&&200==i.status&&n(i.responseText)},i.send(null)}function wfu_filesselected(e){var a=document.getElementById("fileName_"+e),t=wfu_get_filelist(e);return 0==t.length&&a&&(a.value=GlobalData.consts.nofilemessage,a.className="file_input_textbox_nofile"),t.length}function wfu_check_required_userdata(e){for(var a=wfu_get_userdata_count(e),t=!1,s=0;a>s;s++){var n=document.getElementById("hiddeninput_"+e+"_userdata_"+s),l=document.getElementById("userdata_"+e+"_message_"+s),r="file_userdata_message_required";l.className.substr(0,r.length)==r&&""==n.value&&(l.className=r+"_empty",l.value=GlobalData.consts.userdata_empty,t=!0)}return!t}function wfu_HTML5UploadFile(e,a,t){if(!wfu_BrowserCaps.supportsAJAX)return void wfu_redirect_to_classic(e,t,1,1);if(!wfu_BrowserCaps.supportsHTML5)return void wfu_redirect_to_classic(e,t,1,2);a=wfu_plugin_decode_string(a.replace(/^\s+|\s+$/g,""));var s=null;try{s=JSON.parse(a)}catch(n){}if(null==s)return void wfu_redirect_to_classic(e,t,1,3);var l=wfu_GetHttpRequestObject();if(null!=l){var r=wfu_filesselected(e);if(0!=r&&wfu_selectsubdir_check(e)){var o=r;o+=o,wfu_check_required_userdata(e)&&wfu_HTML5UploadFile_cont(e,s,t,[""])}}}function wfu_HTML5UploadFile_cont(e,a,t){function s(l,r,o,m){f=!0;var g=wfu_GetHttpRequestObject(),p=wfu_GetHttpRequestObject();if(null!=g&&null!=p){var y=null,w=null;try{var y=new FormData,w=new FormData}catch(b){}if(null!=y&&null!=w){o||y.append("uploadedfile_"+e+_,r),y.append("uploadedfile_"+e+"_index",l),y.append("uploadedfile_"+e+"_name",wfu_plugin_encode_string(i[l].name)),y.append("uploadedfile_"+e+"_size",i[l].size),y.append("action","wfu_ajax_action"),y.append("uniqueuploadid_"+e,u),y.append("params_index",a.params_index),y.append("subdir_sel_index",n),o?y.append("only_check","1"):y.append("only_check","0"),y.append("session_token",t),y.append("unique_id",d);for(var h=wfu_get_userdata_count(e),v=0;h>v;v++)y.append("hiddeninput_"+e+"_userdata_"+v,document.getElementById("hiddeninput_"+e+"_userdata_"+v).value);var I=GlobalData[e].xhrs.push(g)-1,E=new Date;if(g.xhrid=I,g.shortcode_id=e,g.requesttype="fileupload",g.file_id=l+1,o?(g.size=0,g.totalsize=0,g.loading=!1):(g.size=r.size,g.totalsize=i[l].size,g.loading=!0),g.deltasize=0,g.sizeloaded=0,g.aborted=!1,g.unique_id=d,g.params_index=a.params_index,g.session_token=t,g.debugmode=a.debugmode,g.is_admin=a.is_admin,g.start_time=E.getTime(),g.end_time=g.start_time,g.finish_time=g.start_time+1e3*parseInt(GlobalData.consts.max_time_limit),g.fail_colors=a.fail_colors,g.error_message_header=a.error_header.replace(/%username%/g,"no data"),g.error_message_header=g.error_message_header.replace(/%useremail%/g,"no data"),g.error_message_header=g.error_message_header.replace(/%filename%/g,i[l].name),g.error_message_header=g.error_message_header.replace(/%filepath%/g,i[l].name),g.error_message_failed=GlobalData.consts.message_failed,g.error_message_cancelled=GlobalData.consts.message_cancelled,g.error_adminmessage_unknown=GlobalData.consts.adminmessage_unknown.replace(/%username%/g,"no data"),g.error_adminmessage_unknown=g.error_adminmessage_unknown.replace(/%useremail%/g,"no data"),g.error_adminmessage_unknown=g.error_adminmessage_unknown.replace(/%filename%/g,i[l].name),g.error_adminmessage_unknown=g.error_adminmessage_unknown.replace(/%filepath%/g,i[l].name),m){w.append("action","wfu_ajax_action"),w.append("params_index",a.params_index),w.append("session_token",t),w.append("force_connection_close","1"),p.open("POST",GlobalData.consts.ajax_url,!1);try{p.send(w)}catch(B){}f="success"==p.responseText}if(f)o?(g.addEventListener("load",function(a){a={target:{responseText:a.target.responseText,shortcode_id:e,return_status:!0}};var t=wfu_uploadComplete.call(g,a);f="success"==t||"warning"==t,f&&s(l,r,!1,!1)},!1),g.addEventListener("error",function(){},!1),g.open("POST",GlobalData.consts.ajax_url,!0),g.send(y)):(g.upload.xhr=g,g.upload.dummy=1,g.upload.addEventListener("loadstart",wfu_loadStart,!1),g.upload.addEventListener("progress",new Function("evt","wfu_uploadProgress(evt, "+e+", "+I+", "+a.debugmode+");"),!1),g.addEventListener("load",wfu_uploadComplete,!1),g.addEventListener("error",new Function("evt","wfu_uploadFailed(evt, "+a.debugmode+");"),!1),g.addEventListener("abort",wfu_uploadCanceled,!1),g.open("POST",GlobalData.consts.ajax_url,!0),g.send(y));else{var k={target:{responseText:"",shortcode_id:e}};wfu_uploadComplete.call(g,k)}return c++,f}}}var n=-1,l=document.getElementById("selectsubdir_"+e);if(l){var r=document.getElementById("selectsubdiredit_"+e),o="none"!=r.style.display;n=o?r.value:l.selectedIndex}var i=wfu_get_filelist(e),_="",d=wfu_randomString(10),u=d;GlobalData.UploadInProgressString+="["+d+"]",GlobalData[e]={},GlobalData[e].unique_id=d,GlobalData[e].last=!1,GlobalData[e].files_count=1,GlobalData[e].files_processed=0,GlobalData[e].upload_state=0,GlobalData[e].message="",GlobalData[e].update_wpfilebase="",GlobalData[e].redirect_link="",GlobalData[e].notify_only_filename_list="",GlobalData[e].notify_target_path_list="",GlobalData[e].notify_attachment_list="",GlobalData[e].admin_messages={},GlobalData[e].admin_messages.wpfilebase="",GlobalData[e].admin_messages.notify="",GlobalData[e].admin_messages.redirect="",GlobalData[e].admin_messages.debug="",GlobalData[e].admin_messages.other="",GlobalData[e].errors={},GlobalData[e].errors.wpfilebase="",GlobalData[e].errors.notify="",GlobalData[e].errors.redirect="",GlobalData[e].xhrs=Array(),wfu_show_simple_progressbar(a.shortcode_id,"progressive");
|
2 |
-
var m=wfu_Initialize_Params();m.general.shortcode_id=e,m.general.unique_id=
|
1 |
+
function wfu_Initialize_Consts(e){if("undefined"==typeof GlobalData.consts){GlobalData.consts=new Object;for(var a=e.split(";"),s=0;s<a.length;s++)const_txt=a[s].split(":"),GlobalData.consts[wfu_plugin_decode_string(const_txt[0])]=wfu_plugin_decode_string(const_txt[1])}}function wfu_plugin_load_action(e){wfu_install_unload_hook();var a=document.getElementById("selectsubdiredit_"+e);a&&"none"!=a.style.display&&wfu_attach_element_handlers(a,new Function("wfu_selectsubdiredit_change("+e+");"))}function wfu_install_unload_hook(){window.onbeforeunload=wfu_unload_hook}function wfu_unload_hook(){return""!=GlobalData.UploadInProgressString&&""!=GlobalData.UploadInProgressString.trim()?GlobalData.consts.wfu_pageexit_prompt:void 0}function wfu_Check_Browser_Capabilities(){if("undefined"==typeof wfu_BrowserCaps){wfu_BrowserCaps=new Object;var e=wfu_GetHttpRequestObject();wfu_BrowserCaps.supportsAJAX=null!=e,wfu_BrowserCaps.supportsUploadProgress=!!(e&&"upload"in e&&"onprogress"in e.upload);var a=null;try{var a=new FormData}catch(s){}wfu_BrowserCaps.supportsHTML5=null!=a;var s=document.createElement("iframe");wfu_BrowserCaps.supportsIFRAME=null!=s,wfu_BrowserCaps.supportsDRAGDROP=window.FileReader?!0:!1,wfu_BrowserCaps.supportsAnimation=wfu_check_animation(),wfu_BrowserCaps.isSafari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0}}function wfu_check_animation(){var e=!1,a="animation",s="",t="Webkit Moz O ms Khtml".split(" "),n="",r=document.createElement("DIV");if(r.style.animationName&&(e=!0),e===!1)for(var l=0;l<t.length;l++)if(void 0!==r.style[t[l]+"AnimationName"]){n=t[l],a=n+"Animation",s="-"+n.toLowerCase()+"-",e=!0;break}return e}function wfu_join_strings(e){for(var a=[].slice.call(arguments),s="",t="",n=1;n<a.length;n++)t=""==s||""==a[n]?"":e,s+=t+a[n];return s}function wfu_plugin_decode_string(e){for(var a,s,t=0,n="";t<e.length;)a=parseInt(e.substr(t,2),16),s=128>a?a:224>a?((31&a)<<6)+(63&parseInt(e.substr(t+=2,2),16)):((15&a)<<12)+((63&parseInt(e.substr(t+=2,2),16))<<6)+(63&parseInt(e.substr(t+=2,2),16)),n+=String.fromCharCode(s),t+=2;return n}function wfu_plugin_encode_string(e){var a=0,s="",t="";for(a=0;a<e.length;a++)num=e.charCodeAt(a),num>=2048?num=((16773120&num|917504)<<4)+((4032&num|8192)<<2)+(63&num|128):num>=128&&(num=((65472&num|12288)<<2)+(63&num|128)),t=num.toString(16),(1==t.length||3==t.length||5==t.length)&&(t="0"+t),s+=t;return s}function wfu_randomString(e){for(var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",s=e,t="",n=0;s>n;n++){var r=Math.floor(Math.random()*a.length);t+=a.substring(r,r+1)}return t}function wfu_addEventHandler(e,a,s){e.addEventListener?e.addEventListener(a,s,!1):e.attachEvent?e.attachEvent("on"+a,s):e["on"+a]=s}function wfu_attach_element_handlers(e,a){for(var s=["DOMAttrModified","textInput","input","change","keypress","paste","focus","propertychange"],t=0;t<s.length;t++)wfu_addEventHandler(e,s[t],a)}function wfu_GetHttpRequestObject(){var e=null;try{e=new XMLHttpRequest}catch(a){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(s){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}}if(null==e&&window.createRequest)try{xmlhttp=window.createRequest()}catch(a){}return e}function wfu_filedetails_showhide(e,a,s){var t=(document.getElementById("wfu_messageblock_arrow_"+e+"_"+a),document.getElementById("wfu_messageblock_arrow_"+e+"_up_"+a)),n=document.getElementById("wfu_messageblock_arrow_"+e+"_down_"+a),r=document.getElementById("wfu_messageblock_subheader_"+e+"_"+a),l=document.getElementById("wfu_messageblock_header_"+e+"_state_"+a);s?(t.style.display="",n.style.display="none",r.style.display="",l.value=""):(t.style.display="none",n.style.display="",r.style.display="none",l.value="none")}function wfu_get_file_ids(e){for(var a=(document.getElementById("wfu_messageblock_"+e),document.getElementById("wfu_messageblock_subheader_"+e).nextSibling),s="wfu_messageblock_"+e+"_",t=[];null!=a;)1===a.nodeType&&a.id.substr(0,s.length)==s&&t.push(a.id.substr(a.id.lastIndexOf("_")+1)),a=a.nextSibling;return t}function wfu_get_filelist(e,a){a="undefined"!=typeof a?a:!0;var s=document.getElementById("upfile_"+e),t=s.files;return t||(t=s.value?[{name:s.value}]:[]),a&&"undefined"!=typeof s.filearray&&(t=s.filearray),t}function wfu_filedetails_toggle(e,a){var s=(document.getElementById("wfu_messageblock_arrow_"+e+"_"+a),document.getElementById("wfu_messageblock_arrow_"+e+"_up_"+a));wfu_filedetails_showhide(e,a,"none"==s.style.display)}function wfu_headerdetails_showhide(e,a){var s=(document.getElementById("wfu_messageblock_arrow_"+e),document.getElementById("wfu_messageblock_arrow_"+e+"_up")),t=document.getElementById("wfu_messageblock_arrow_"+e+"_down"),n=document.getElementById("wfu_messageblock_subheader_"+e),r=document.getElementById("wfu_messageblock_subheader_"+e+"_message"),l=document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage"),i=document.getElementById("wfu_messageblock_header_"+e+"_state"),o=wfu_get_file_ids(e);if(a){s.style.display="",t.style.display="none",("none"!=r.style.display||"none"!=l.style.display)&&(n.style.display=""),i.value="";for(var _=0;_<o.length;_++)document.getElementById("wfu_messageblock_"+e+"_"+o[_]).style.display="",document.getElementById("wfu_messageblock_subheader_"+e+"_"+o[_]).style.display=document.getElementById("wfu_messageblock_header_"+e+"_state_"+o[_]).value}else{s.style.display="none",t.style.display="",n.style.display="none",i.value="none";for(var _=0;_<o.length;_++)document.getElementById("wfu_messageblock_"+e+"_"+o[_]).style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_"+o[_]).style.display="none"}}function wfu_headerdetails_toggle(e){var a=(document.getElementById("wfu_messageblock_arrow_"+e),document.getElementById("wfu_messageblock_arrow_"+e+"_up"));wfu_headerdetails_showhide(e,"none"==a.style.display)}function wfu_selectbutton_changed(e,a){wfu_BrowserCaps.supportsAJAX&&wfu_BrowserCaps.supportsHTML5||(a=0);var s=document.getElementById("upfile_"+e),t=wfu_get_filelist(e,!1);if(1==a){"undefined"==typeof s.filearray&&(s.filearray=Array());for(var n=0;n<t.length;n++)s.filearray.push(t[n])}else"undefined"!=typeof s.filearray&&delete s.filearray;wfu_update_filename_text(e)}function wfu_selectbutton_clicked(e){var a=document.getElementById("wordpress_file_upload_message_"+e);a&&(a.style.display="none"),wfu_reset_message(e),document.getElementById("upfile_"+e).value="";var s=document.getElementById("fileName_"+e);s&&(s.value="",s.className="file_input_textbox")}function wfu_update_uploadbutton_status(e){var a=document.getElementById("upload_"+e);if(a){var s=wfu_get_filelist(e),t=s.length>0;a.disabled=!t}}function wfu_update_filename_text(e){var a=document.getElementById("fileName_"+e);if(a){for(var s=wfu_get_filelist(e),t="",n=0;n<s.length;n++)""!=t&&(t+=", "),t+=s[n].name.replace(/c:\\fakepath\\/i,"");a.value=t}}function wfu_selectsubdir_check(e){var a=document.getElementById("selectsubdir_"+e);if(!a)return!0;var s=document.getElementById("selectsubdiredit_"+e),t="none"!=s.style.display;return t&&a.selectedIndex>0&&(s.value=a.value.replace(/^\s+/,""),s.className="file_item_clean_match",wfu_selectsubdiredit_change(e)),document.getElementById("hiddeninput_"+e).value=t?s.value:a.selectedIndex,!t&&0==a.selectedIndex||t&&(""==s.value||"file_item_clean_empty"==s.className)?(a.className="file_item_clean_prompt",t&&(s.className="file_item_clean_prompt",s.value=""),!1):(a.className="file_item_clean",t&&"file_item_clean_prompt"==s.className&&(s.className="file_item_clean"),a.options[0].style.display="none",!0)}function wfu_selectsubdiredit_enter(e){var a=document.getElementById("selectsubdir_"+e),s=document.getElementById("selectsubdiredit_"+e);"file_item_clean_empty"==s.className&&(s.value=""),a.className="file_item_clean",s.className="file_item_clean"}function wfu_selectsubdiredit_exit(e){var a=document.getElementById("selectsubdiredit_"+e);""==a.value&&(a.value=GlobalData.consts.wfu_subdir_typedir,a.className="file_item_clean_empty")}function wfu_selectsubdiredit_change(e){var a=document.getElementById("selectsubdir_"+e),s=document.getElementById("selectsubdiredit_"+e);if("none"!=s.style.display){if("file_item_clean_empty"==s.className)return a.selectedIndex=0,void(document.getElementById("hiddeninput_"+e).value="");document.getElementById("hiddeninput_"+e).value=s.value;for(var t,n=!1,r=1;r<a.options.length;r++)t=a.options[r].value.replace(/^\s+/,"").toLowerCase(),a.options[r].style.display=s.value.length>=3?t.substr(0,s.value.length)==s.value.toLowerCase()?"block":"none":"block",a.options[r].value.replace(/^\s+/,"")==s.value&&(a.selectedIndex=r,s.className="file_item_clean_match",n=!0);n||(a.selectedIndex=0,s.className="file_item_clean")}}function wfu_selectsubdir_disable_onoff(e,a){var s=document.getElementById("selectsubdir_"+e);if(!s)return!0;var t=document.getElementById("selectsubdiredit_"+e),n="none"!=t.style.display;s.disabled=a,n&&(t.disabled=a)}function wfu_Redirect(e){window.location=e}function wfu_loadStart(){}function wfu_uploadProgress(e,a,s,t){t&&"undefined"==typeof this.xhr&&(console.log("total="+e.total+", loaded="+e.loaded),console.log(e));var n=GlobalData[a].xhrs[s],r=0,l=0,i=document.getElementById("progressbar_"+a+"_animation");if(e.lengthComputable){if(n.sizeloaded=e.loaded,n.size<e.total&&e.total>0){l=e.total-n.size,n.deltasize+=l,n.size+=l;for(var o=0;o<GlobalData[a].xhrs.length;o++)GlobalData[a].xhrs[o].file_id==n.file_id&&(GlobalData[a].xhrs[o].totalsize+=l)}if(i){for(var _=0,d=0,u=[],o=0;o<GlobalData[a].xhrs.length;o++)u[GlobalData[a].xhrs[o].file_id]=0;for(var o=0;o<GlobalData[a].xhrs.length;o++)u[GlobalData[a].xhrs[o].file_id]=Math.max(GlobalData[a].xhrs[o].totalsize,u[GlobalData[a].xhrs[o].file_id]);for(var o=0;o<u.length;o++)"undefined"!=typeof u[o]&&(_+=u[o]);for(var o=0;o<GlobalData[a].xhrs.length;o++)d+=GlobalData[a].xhrs[o].sizeloaded;r=Math.round(100*d/_),i.style.width=r.toString()+"%"}}else i&&(i.style.width="0%")}function wfu_notify_WPFilebase(e,a){var s=wfu_GetHttpRequestObject();if(null==s){var t=document.createElement("iframe");return t.style.display="none",t.src=GlobalData.consts.ajax_url+"?action=wfu_ajax_action_notify_wpfilebase¶ms_index="+e+"&session_token="+a,void document.body.appendChild(t)}var n=GlobalData.consts.ajax_url;params=new Array(3),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_notify_wpfilebase",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=e,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=a;for(var r="",t=0;t<params.length;t++)r+=(t>0?"&":"")+params[t][0]+"="+encodeURI(params[t][1]);s.open("POST",n,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onreadystatechange=function(){},s.send(r)}function wfu_send_email_notification(e,a,s,t,n,r,l,i,o){var _=wfu_GetHttpRequestObject();if(null!=_){var d=GlobalData.consts.ajax_url,u=wfu_get_userdata_count(e);params=new Array(7+u),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_send_email_notification",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=s,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=t,params[3]=new Array(2),params[3][0]="only_filename_list",params[3][1]=n,params[4]=new Array(2),params[4][0]="target_path_list",params[4][1]=r,params[5]=new Array(2),params[5][0]="attachment_list",params[5][1]=l,params[6]=new Array(2),params[6][0]="uniqueuploadid_"+e,params[6][1]=a;for(var m=0;u>m;m++)params[7+m]=new Array(2),params[7+m][0]="userdata_"+m,params[7+m][1]=wfu_plugin_encode_string(document.getElementById("hiddeninput_"+e+"_userdata_"+m).value);for(var c="",m=0;m<params.length;m++)c+=(m>0?"&":"")+params[m][0]+"="+encodeURI(params[m][1]);var f=new Date;_.xhrid=-1,_.shortcode_id=e,_.requesttype="email",_.file_id=0,_.loading=!1,_.aborted=!1,_.unique_id=a,_.debugmode=i,_.is_admin=o,_.params_index=s,_.session_token=t,_.start_time=f.getTime(),_.end_time=_.start_time,_.finish_time=_.start_time+1e3*parseInt(GlobalData.consts.max_time_limit),_.fail_colors=GlobalData.consts.fail_colors,_.error_message_header="",_.error_message_failed=GlobalData.consts.message_failed,_.error_message_cancelled=GlobalData.consts.message_cancelled,_.error_adminmessage_unknown="",_.open("POST",d,!0),_.setRequestHeader("Content-type","application/x-www-form-urlencoded"),_.addEventListener("load",wfu_uploadComplete,!1),_.addEventListener("error",wfu_uploadFailed,!1),_.addEventListener("abort",wfu_uploadCanceled,!1),_.send(c)}}function wfu_format_debug_data(e,a){return output='<label class="file_messageblock_subheader_debugmessage_label">',output+="Debug Data"+a,output+="</label>",output+='<div class="file_messageblock_subheader_debugmessage_container">',output+=e,output+="</div>"}function wfu_uploadComplete(e){var a=new Date,s=this.shortcode_id,t=(this.file_id,!1),n="",r="",l="",i="unknown",o="",_="wfu_fileupload_success:";this.loading=!1,this.end_time=a.getTime();var d=e.target.responseText,u=d,m="error";if(-1!=d&&d.indexOf("force_errorabort_code")>-1&&(m="errorabort",d=d.replace("force_errorabort_code","")),-1!=d){var c=d.indexOf(_);if(c>-1&&("true"==this.debugmode&&(o=d.substr(0,c)),u=d.substr(c+_.length),c=u.indexOf(":"),n=u.substr(0,c),u=u.substr(c+1),c=u.indexOf(":"),l=u.substr(0,c),r=u.substr(c+1)),""!=o){var f="";"fileupload"==this.requesttype?f=" - File: "+this.file_id:"email"==this.requesttype&&(f=" - Email Notification"),o=wfu_format_debug_data(o,f)}if(""!=l){var p=l.split(";");if(1==parseInt(p[2])){var g=p[3].split(",");i=wfu_plugin_decode_string(g[0])}}}if(""==r||""==l){var b=this.fail_colors.split(","),y=wfu_Initialize_Params();y.general.shortcode_id=s,y.general.unique_id=this.unique_id,y.general.state=7,y.general.files_count="fileupload"==this.requesttype?1:0,y.general.upload_finish_time=this.finish_time,y.general.fail_message=GlobalData.consts.message_unknown,y.general.fail_admin_message=wfu_join_strings("<br />",this.error_adminmessage_unknown,this.requesttype+":"+u),y.general.files_count>0?(y[0]={},y[0].color=b[0],y[0].bgcolor=b[1],y[0].borcolor=b[2],y[0].message_type=m,i=m,y[0].header=this.error_message_header,y[0].message=GlobalData.consts.message_timelimit,y[0].admin_messages="true"==this.is_admin?GlobalData.consts.message_admin_timelimit:""):y.general.admin_messages.other="true"==this.is_admin?GlobalData.consts.message_admin_timelimit:"",y.general.upload_finish_time>0&&a.getTime()<y.general.upload_finish_time&&(y.general.files_count>0?(y[0].message=y.general.fail_message,y[0].admin_messages="true"==this.is_admin?y.general.fail_admin_message:""):y.general.admin_messages.other="true"==this.is_admin?y.general.fail_admin_message:"")}return t=""==r||""==l?wfu_ProcessUploadComplete(s,this.file_id,y,this.unique_id,this.params_index,this.session_token,"",[this.debugmode,o,this.is_admin],this.requesttype,""):wfu_ProcessUploadComplete(s,this.file_id,r,this.unique_id,this.params_index,this.session_token,l,[this.debugmode,o,this.is_admin],this.requesttype,n),t&&(wfu_unlock_upload(e.target.shortcode_id),wfu_hide_simple_progressbar(s),wfu_clear(e.target.shortcode_id)),e.target.return_status?i:void 0}function wfu_ProcessUploadComplete(sid,file_id,upload_params,unique_id,params_index,session_token,safe_output,debug_data,request_type,js_script_enc){if(sid&&!(0>sid)&&null!=upload_params&&""!=upload_params&&""!=unique_id&&("no-ajax"==unique_id||GlobalData[sid])){var do_redirect=!1;if("string"==typeof upload_params){upload_params=wfu_plugin_decode_string(upload_params.replace(/^\s+|\s+$/g,""));var Params=null;try{Params=JSON.parse(upload_params)}catch(e){}if(null==Params){var safe_parts=safe_output.split(";");Params=wfu_Initialize_Params(),Params.general.shortcode_id=sid,Params.general.unique_id=unique_id,Params.general.state=safe_parts[0],4==Params.general.state&&Params.general.state++;var default_colors=safe_parts[1].split(","),filedata="",error_jsonparse_filemessage=GlobalData.consts.jsonparse_filemessage,error_jsonparse_message=GlobalData.consts.jsonparse_message,error_jsonparse_adminmessage=GlobalData.consts.jsonparse_adminmessage;Params.general.files_count=parseInt(safe_parts[2]);for(var i=0;i<Params.general.files_count;i++)Params[i]={},Params[i].color=default_colors[0],Params[i].bgcolor=default_colors[1],Params[i].borcolor=default_colors[2],filedata=safe_parts[i+3].split(","),Params[i].message_type=wfu_plugin_decode_string(filedata[0]),Params[i].header=wfu_plugin_decode_string(filedata[1]),"success"==Params[i].message_type&&(Params[i].header+=error_jsonparse_filemessage,Params[i].message_type="warning"),Params[i].message=wfu_join_strings("<br />",error_jsonparse_message,wfu_plugin_decode_string(filedata[2])),Params[i].admin_messages=wfu_join_strings("<br />",error_jsonparse_adminmessage,wfu_plugin_decode_string(filedata[3]))}}else{if("object"!=typeof upload_params)return;var Params=upload_params}for(i=0;Params[i];)Params[i].message_type&&"error"==Params[i].message_type.substr(0,5)&&(Params[i].message_type=Params[i].message_type.substr(0,5)),i++;var message_table=document.getElementById("wfu_messageblock_"+sid),UploadStates_Ok=!0;if(!UploadStates[sid]&&message_table){var upload_states=document.getElementById("wfu_messageblock_header_"+sid+"_states").value;upload_states=wfu_plugin_decode_string(upload_states.replace(/^\s+|\s+$/g,"")),UploadStates[sid]=null;try{UploadStates[sid]=JSON.parse(upload_states)}catch(e){}null==UploadStates[sid]&&(UploadStates_Ok=!1)}GlobalData[sid]||(GlobalData[sid]=Object());var G=GlobalData[sid];if("no-ajax"==unique_id)G.last=!1,G.unique_id="",G.files_count=Params.general.files_count,0==Params.general.state&&(Params.general.files_count=0),G.files_processed=Params.general.files_count,G.upload_state=UploadStates_Ok?Params.general.state:10,G.message=Params.general.message,G.update_wpfilebase=Params.general.update_wpfilebase,G.redirect_link=Params.general.redirect_link,G.notify_only_filename_list="",G.notify_target_path_list="",G.notify_attachment_list="",G.admin_messages={},G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase,G.admin_messages.notify=Params.general.admin_messages.notify,G.admin_messages.redirect=Params.general.admin_messages.redirect,G.admin_messages.debug=debug_data[1],G.admin_messages.other=Params.general.admin_messages.other,G.errors={},G.errors.wpfilebase=Params.general.errors.wpfilebase,G.errors.notify=Params.general.errors.notify,G.errors.redirect=Params.general.errors.redirect,G.current_size=0,G.total_size=0;else{if(""==G.unique_id||G.unique_id!=unique_id||G.unique_id!=Params.general.unique_id)return;if(G.last)return;0==Params.general.files_count&&Params[0]&&"error"==Params[0].message_type&&(Params.general.files_count=1);for(var file_status="",i=0;i<Params.general.files_count;i++)file_status="error"==Params[i].message_type&&0==G.files_processed?"error1":"error"==Params[i].message_type&&G.files_processed>0?"error2":Params[i].message_type,G.upload_state=GlobalData.filestatematch[file_status][G.upload_state];UploadStates_Ok||(G.upload_state=10),G.files_processed+=Params.general.files_count,G.message=wfu_join_strings("<br />",G.message,Params.general.message),""==G.update_wpfilebase&&(G.update_wpfilebase=Params.general.update_wpfilebase),(!request_type||request_type&&"email"!=request_type)&&(G.redirect_link=Params.general.redirect_link),G.notify_only_filename_list=wfu_join_strings(", ",G.notify_only_filename_list,Params.general.notify_only_filename_list),G.notify_target_path_list=wfu_join_strings(", ",G.notify_target_path_list,Params.general.notify_target_path_list),G.notify_attachment_list=wfu_join_strings(",",G.notify_attachment_list,Params.general.notify_attachment_list),G.admin_messages.debug=wfu_join_strings("<br />",G.admin_messages.debug,debug_data[1]),G.admin_messages.other=wfu_join_strings("<br />",G.admin_messages.other,Params.general.admin_messages.other),""==G.admin_messages.wpfilebase&&(G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase),""==G.admin_messages.notify&&(G.admin_messages.notify=Params.general.admin_messages.notify),""==G.admin_messages.redirect&&(G.admin_messages.redirect=Params.general.admin_messages.redirect),""==G.errors.wpfilebase&&(G.errors.wpfilebase=Params.general.errors.wpfilebase),""==G.errors.notify&&(G.errors.notify=Params.general.errors.notify),""==G.errors.redirect&&(G.errors.redirect=Params.general.errors.redirect)}G.files_processed==G.files_count&&(G.last=!0,""!=G.update_wpfilebase&&(G.admin_messages.wpfilebase="",wfu_notify_WPFilebase(params_index,session_token)),""!=G.notify_only_filename_list&&(G.admin_messages.notify="",wfu_send_email_notification(sid,unique_id,params_index,session_token,G.notify_only_filename_list,G.notify_target_path_list,G.notify_attachment_list,debug_data[0],debug_data[2]),G.last=!1,G.notify_only_filename_list=""),G.last&&("no-ajax"!=unique_id&&wfu_notify_server_upload_ended(sid,unique_id,params_index,session_token),GlobalData.UploadInProgressString=GlobalData.UploadInProgressString.replace(new RegExp("\\["+unique_id+"\\]","g"),"")),""!=G.errors.redirect&&(G.redirect_link=""),""!=G.redirect_link&&G.last&&""==GlobalData.UploadInProgressString.trim()&&(G.upload_state=11,do_redirect=!0));var nonadmin_message=G.message,admin_message=wfu_join_strings("<br />",G.admin_messages.other,G.admin_messages.wpfilebase,G.admin_messages.notify,G.admin_messages.redirect,G.admin_messages.debug);if(!UploadStates_Ok){var error_jsonparse_headermessage=GlobalData.consts.jsonparse_headermessage,error_jsonparse_headeradminmessage=GlobalData.consts.jsonparse_headeradminmessage;nonadmin_message=wfu_join_strings("<br />",error_jsonparse_headermessage,nonadmin_message),admin_message=wfu_join_strings("<br />",error_jsonparse_headeradminmessage,admin_message)}if(G.last){0==G.files_count?G.upload_state=8:G.upload_state<4&&(G.upload_state+=4);var admin_messages_exist=""!=G.admin_messages.wpfilebase||""!=G.admin_messages.notify||""!=G.admin_messages.redirect||""!=G.admin_messages.other;4==G.upload_state&&""!=admin_message?G.upload_state++:5==G.upload_state&&""==!admin_message&&""==nonadmin_message&&G.upload_state--}if(message_table){var subheader_state=document.getElementById("wfu_messageblock_header_"+sid+"_state"),single_file_shown=1==G.files_count&&""==nonadmin_message&&""==admin_message&&G.last&&!do_redirect;if(single_file_shown)document.getElementById("wfu_messageblock_header_"+sid).style.display="none";else{document.getElementById("wfu_messageblock_header_"+sid).style.display="";var header_container=document.getElementById("wfu_messageblock_header_"+sid+"_container");if(UploadStates_Ok){var suffix="";1!=G.files_count||5!=G.upload_state&&7!=G.upload_state||(suffix="_singlefile"),header_container.innerHTML=UploadStates[sid]["State"+G.upload_state+suffix]}else{header_container.innerHTML="";var safe_container=document.getElementById("wfu_messageblock_header_"+sid+"_safecontainer");header_container.innerHTML=safe_container.innerHTML.replace(/_safe/g,"")}var subheader_show=!1;""!=nonadmin_message?(document.getElementById("wfu_messageblock_subheader_"+sid+"_message").style.display="",document.getElementById("wfu_messageblock_subheader_"+sid+"_messagelabel").innerHTML=nonadmin_message,subheader_show=!0):document.getElementById("wfu_messageblock_subheader_"+sid+"_message").style.display="none",""!=admin_message?(document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessage").style.display="",document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessagelabel").innerHTML=admin_message,subheader_show=!0):document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessage").style.display="none",document.getElementById("wfu_messageblock_subheader_"+sid).style.display=subheader_show?subheader_state.value:"none",subheader_show||G.files_processed>0?(header_container.colSpan=2,document.getElementById("wfu_messageblock_arrow_"+sid).style.display=""):(document.getElementById("wfu_messageblock_arrow_"+sid).style.display="none",header_container.colSpan=3)}for(var next_block=document.getElementById("wfu_messageblock_subheader_"+sid),next_block_id=0,file_block=null,file_template_container=document.getElementById("wfu_messageblock_"+sid+"_filetemplate"),file_contents="",door=document.getElementById("wfu_messageblock_"+sid+"_door"),ii=0,headerspan=1,subheaderspan=2,file_template=wfu_plugin_decode_string(file_template_container.value.replace(/^\s+|\s+$/g,"")),i=0;i<Params.general.files_count;i++){for(ii=i+file_id,file_contents=file_template.replace(/\[file_id\]/g,ii),file_contents=file_contents.replace(/\[filenumber_display\]/g,""),file_contents=file_contents.replace(/\[fileheader_color\]/g,Params[i].color),file_contents=file_contents.replace(/\[fileheader_bgcolor\]/g,Params[i].bgcolor),file_contents=file_contents.replace(/\[fileheader_borcolor\]/g,Params[i].borcolor),file_contents=file_contents.replace(/\[fileheader_message\]/g,Params[i].header),file_contents=file_contents.replace(/\[filesubheadermessage_display\]/g,'style="display:none;"'),file_contents=file_contents.replace(/\[filesubheader_message\]/g,Params[i].message),file_contents=file_contents.replace(/\[filesubheaderadminmessage_display\]/g,'style="display:none;"'),file_contents=file_contents.replace(/\[filesubheader_adminmessage\]/g,Params[i].admin_messages),file_contents="<table><tbody>"+file_contents+"</tbody></table>",door.innerHTML=file_contents,headerspan=1,subheaderspan=2,subheader_show=!1,file_block=document.getElementById("wfu_messageblock_"+sid+"_"+ii),1==G.files_count?(document.getElementById("wfu_messageblock_"+sid+"_filenumber_"+ii).style.display="none",document.getElementById("wfu_messageblock_subheader_"+sid+"_fileempty_"+ii).style.display="none",file_block.style.display=single_file_shown?"":subheader_state.value,headerspan++,subheaderspan++):file_block.style.display=subheader_state.value,""!=Params[i].message&&(document.getElementById("wfu_messageblock_subheader_"+sid+"_message_"+ii).style.display="",subheader_show=!0),""!=Params[i].admin_messages&&(document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessage_"+ii).style.display="",subheader_show=!0),subheader_show||(document.getElementById("wfu_messageblock_arrow_"+sid+"_"+ii).style.display="none",headerspan++),document.getElementById("wfu_messageblock_header_"+sid+"_container_"+ii).colSpan=headerspan,document.getElementById("wfu_messageblock_subheader_"+sid+"_container_"+ii).colSpan=subheaderspan;ii>next_block_id&&(next_block=next_block.nextSibling,null!=next_block);)1===next_block.nodeType&&(next_block_id=next_block.id.substr(next_block.id.lastIndexOf("_")+1));message_table.tBodies[0].insertBefore(file_block,next_block),next_block=file_block.nextSibling,file_block=document.getElementById("wfu_messageblock_subheader_"+sid+"_"+ii),message_table.tBodies[0].insertBefore(file_block,next_block),next_block=file_block,next_block_id=ii}single_file_shown&&(document.getElementById("wfu_messageblock_"+sid+"_1").style.display=""),message_table.style.display="",document.getElementById("wordpress_file_upload_message_"+sid).style.display=""}return js_script_enc&&eval(wfu_plugin_decode_string(js_script_enc)),do_redirect&&wfu_Redirect(G.redirect_link),G.last}}function wfu_uploadFailed(e,a){a&&(console.log("failure report following"),console.log(e));var s=e.target,t={target:{responseText:"",shortcode_id:s.shortcode_id}};wfu_uploadComplete.call(s,t)}function wfu_uploadCanceled(){}function wfu_notify_server_upload_ended(e,a,s,t){var n=wfu_GetHttpRequestObject();if(null!=n){var r=GlobalData.consts.ajax_url;params=new Array(5),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action",params[1]=new Array(2),params[1][0]="uniqueuploadid_"+e,params[1][1]=a,params[2]=new Array(2),params[2][0]="params_index",params[2][1]=s,params[3]=new Array(2),params[3][0]="session_token",params[3][1]=t,params[4]=new Array(2),params[4][0]="upload_finished",params[4][1]=1;for(var l="",i=0;i<params.length;i++)l+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);n.open("POST",r,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onreadystatechange=function(){4==n.readyState&&200==n.status},n.send(l)}}function wfu_Initialize_Params(){var e={};return e.version="full",e.general={},e.general.shortcode_id=0,e.general.unique_id="",e.general.state=0,e.general.files_count=0,e.general.update_wpfilebase="",e.general.redirect_link="",e.general.upload_finish_time=0,e.general.message="",e.general.message_type="",e.general.admin_messages={},e.general.admin_messages.wpfilebase="",e.general.admin_messages.notify="",e.general.admin_messages.redirect="",e.general.admin_messages.other="",e.general.errors={},e.general.errors.wpfilebase="",e.general.errors.notify="",e.general.errors.redirect="",e.general.color="",e.general.bgcolor="",e.general.borcolor="",e.general.notify_only_filename_list="",e.general.notify_target_path_list="",e.general.notify_attachment_list="",e.general.fail_message="",e.general.fail_admin_message="",e}function wfu_redirect_to_classic(e,a,s,t){0!=wfu_filesselected(e)&&wfu_selectsubdir_check(e)&&wfu_check_required_userdata(e)&&wfu_redirect_to_classic_cont(e,a,s,t,[""])}function wfu_redirect_to_classic_cont(e,a,s,t){var n=function(n){if(n.indexOf("wfu_response_success:")>-1){var r=wfu_Initialize_Params();if(r.general.shortcode_id=e,r.general.unique_id="",r.general.files_count=wfu_filesselected(e),wfu_ProcessUploadComplete(e,0,r,"no-ajax","",a,"",["false","","false"]),1==s){var l="";document.getElementById("upfile_"+e).name="uploadedfile_"+e+"_redirected"+l}document.getElementById("adminerrorcodes_"+e).value=t>0?t:"",document.getElementById("upfile_"+e).disabled=!1,document.getElementById("uniqueuploadid_"+e).value=wfu_randomString(10),document.getElementById("uploadform_"+e).submit()}},r="",l=new Date,i=GlobalData.consts.ajax_url+"?action=wfu_ajax_action&sid="+e+"&start_time="+l.getTime()+"&session_token="+a+r;wfu_lock_upload(e);var o=wfu_GetHttpRequestObject();if(null==o){var _=document.createElement("iframe");return _?(_.style.display="none",_.src=i,document.body.appendChild(_),void(_.onload=function(){n(_.contentDocument.body.innerHTML)})):void 0}o.open("GET",i,!0),o.onreadystatechange=function(){4==o.readyState&&200==o.status&&n(o.responseText)},o.send(null)}function wfu_filesselected(e){var a=document.getElementById("fileName_"+e),s=wfu_get_filelist(e);return 0==s.length&&a&&(a.value=GlobalData.consts.nofilemessage,a.className="file_input_textbox_nofile"),s.length}function wfu_check_required_userdata(e){for(var a=wfu_get_userdata_count(e),s=!1,t=0;a>t;t++){var n=document.getElementById("hiddeninput_"+e+"_userdata_"+t),r=document.getElementById("userdata_"+e+"_message_"+t),l="file_userdata_message_required";r.className.substr(0,l.length)==l&&""==n.value&&(r.className=l+"_empty",r.value=GlobalData.consts.userdata_empty,s=!0)}return!s}function wfu_HTML5UploadFile(e,a,s){if(!wfu_BrowserCaps.supportsAJAX)return void wfu_redirect_to_classic(e,s,1,1);if(!wfu_BrowserCaps.supportsHTML5)return void wfu_redirect_to_classic(e,s,1,2);a=wfu_plugin_decode_string(a.replace(/^\s+|\s+$/g,""));var t=null;try{t=JSON.parse(a)}catch(n){}if(null==t)return void wfu_redirect_to_classic(e,s,1,3);var r=wfu_GetHttpRequestObject();if(null!=r){var l=wfu_filesselected(e);if(0!=l){var i=document.getElementById("upload_"+e),o=!i;if(!wfu_selectsubdir_check(e))return void(o&&wfu_clear_files(e));var _=l;return _+=_,wfu_check_required_userdata(e)?void wfu_HTML5UploadFile_cont(e,t,s,[""]):void(o&&wfu_clear_files(e))}}}function wfu_HTML5UploadFile_cont(e,a,s){function t(r,l,i,m){f=!0;var p=wfu_GetHttpRequestObject(),g=wfu_GetHttpRequestObject();if(null!=p&&null!=g){var b=null,y=null;try{var b=new FormData,y=new FormData}catch(w){}if(null!=b&&null!=y){i||b.append("uploadedfile_"+e+_,l),b.append("uploadedfile_"+e+"_index",r),b.append("uploadedfile_"+e+"_name",wfu_plugin_encode_string(o[r].name)),b.append("uploadedfile_"+e+"_size",o[r].size),b.append("action","wfu_ajax_action"),b.append("uniqueuploadid_"+e,u),b.append("params_index",a.params_index),b.append("subdir_sel_index",n),i?b.append("only_check","1"):b.append("only_check","0"),b.append("session_token",s),b.append("unique_id",d);
|
2 |
+
for(var h=wfu_get_userdata_count(e),v=0;h>v;v++)b.append("hiddeninput_"+e+"_userdata_"+v,document.getElementById("hiddeninput_"+e+"_userdata_"+v).value);var G=GlobalData[e].xhrs.push(p)-1,k=new Date;if(p.xhrid=G,p.shortcode_id=e,p.requesttype="fileupload",p.file_id=r+1,i?(p.size=0,p.totalsize=0,p.loading=!1):(p.size=l.size,p.totalsize=o[r].size,p.loading=!0),p.deltasize=0,p.sizeloaded=0,p.aborted=!1,p.unique_id=u,p.params_index=a.params_index,p.session_token=s,p.debugmode=a.debugmode,p.is_admin=a.is_admin,p.start_time=k.getTime(),p.end_time=p.start_time,p.finish_time=p.start_time+1e3*parseInt(GlobalData.consts.max_time_limit),p.fail_colors=a.fail_colors,p.error_message_header=a.error_header.replace(/%username%/g,"no data"),p.error_message_header=p.error_message_header.replace(/%useremail%/g,"no data"),p.error_message_header=p.error_message_header.replace(/%filename%/g,o[r].name),p.error_message_header=p.error_message_header.replace(/%filepath%/g,o[r].name),p.error_message_failed=GlobalData.consts.message_failed,p.error_message_cancelled=GlobalData.consts.message_cancelled,p.error_adminmessage_unknown=GlobalData.consts.adminmessage_unknown.replace(/%username%/g,"no data"),p.error_adminmessage_unknown=p.error_adminmessage_unknown.replace(/%useremail%/g,"no data"),p.error_adminmessage_unknown=p.error_adminmessage_unknown.replace(/%filename%/g,o[r].name),p.error_adminmessage_unknown=p.error_adminmessage_unknown.replace(/%filepath%/g,o[r].name),m){y.append("action","wfu_ajax_action"),y.append("params_index",a.params_index),y.append("session_token",s),y.append("force_connection_close","1"),g.open("POST",GlobalData.consts.ajax_url,!1);try{g.send(y)}catch(I){}f="success"==g.responseText}if(f)i?(p.addEventListener("load",function(a){a={target:{responseText:a.target.responseText,shortcode_id:e,return_status:!0}};var s=wfu_uploadComplete.call(p,a);f="success"==s||"warning"==s,f&&t(r,l,!1,!1)},!1),p.addEventListener("error",function(){},!1),p.open("POST",GlobalData.consts.ajax_url,!0),p.send(b)):(p.upload.xhr=p,p.upload.dummy=1,p.upload.addEventListener("loadstart",wfu_loadStart,!1),p.upload.addEventListener("progress",new Function("evt","wfu_uploadProgress(evt, "+e+", "+G+", "+a.debugmode+");"),!1),p.addEventListener("load",wfu_uploadComplete,!1),p.addEventListener("error",new Function("evt","wfu_uploadFailed(evt, "+a.debugmode+");"),!1),p.addEventListener("abort",wfu_uploadCanceled,!1),p.open("POST",GlobalData.consts.ajax_url,!0),p.send(b));else{var E={target:{responseText:"",shortcode_id:e}};wfu_uploadComplete.call(p,E)}return c++,f}}}var n=-1,r=document.getElementById("selectsubdir_"+e);if(r){var l=document.getElementById("selectsubdiredit_"+e),i="none"!=l.style.display;n=i?l.value:r.selectedIndex}var o=wfu_get_filelist(e),_="",d=wfu_randomString(10),u=d;GlobalData.UploadInProgressString+="["+u+"]",GlobalData[e]={},GlobalData[e].unique_id=u,GlobalData[e].last=!1,GlobalData[e].files_count=1,GlobalData[e].files_processed=0,GlobalData[e].upload_state=0,GlobalData[e].message="",GlobalData[e].update_wpfilebase="",GlobalData[e].redirect_link="",GlobalData[e].notify_only_filename_list="",GlobalData[e].notify_target_path_list="",GlobalData[e].notify_attachment_list="",GlobalData[e].admin_messages={},GlobalData[e].admin_messages.wpfilebase="",GlobalData[e].admin_messages.notify="",GlobalData[e].admin_messages.redirect="",GlobalData[e].admin_messages.debug="",GlobalData[e].admin_messages.other="",GlobalData[e].errors={},GlobalData[e].errors.wpfilebase="",GlobalData[e].errors.notify="",GlobalData[e].errors.redirect="",GlobalData[e].xhrs=Array(),wfu_show_simple_progressbar(a.shortcode_id,"progressive");var m=wfu_Initialize_Params();m.general.shortcode_id=e,m.general.unique_id=u,wfu_ProcessUploadComplete(e,0,m,u,a.params_index,s,"",["false","","false"]);var c=0,f=!0,p=0;t(p,o[p],!0,!1)}function wfu_get_userdata_count(e){for(var a=0;document.getElementById("userdata_"+e+"_"+a);)a++;return a}function wfu_lock_upload(e){var a=document.getElementById("fileName_"+e);a&&(a.disabled=!0),document.getElementById("input_"+e).disabled=!0,document.getElementById("upfile_"+e).disabled=!0,wfu_selectsubdir_disable_onoff(e,!0);var s=document.getElementById("upload_"+e);s&&(s.disabled=!0);for(var t=wfu_get_userdata_count(e),n=0;t>n;n++)document.getElementById("userdata_"+e+"_message_"+n).disabled=!0}function wfu_unlock_upload(e){var a=document.getElementById("fileName_"+e);a&&(a.disabled=!1),document.getElementById("input_"+e).disabled=!1,document.getElementById("upfile_"+e).disabled=!1,wfu_selectsubdir_disable_onoff(e,!1);var s=document.getElementById("upload_"+e);s&&(s.disabled=!1);for(var t=wfu_get_userdata_count(e),n=0;t>n;n++)document.getElementById("userdata_"+e+"_message_"+n).disabled=!1}function wfu_clear_files(e){document.getElementById("uploadform_"+e).reset();var a=document.getElementById("fileName_"+e);a&&(a.value="",a.className="file_input_textbox")}function wfu_clear(e){wfu_clear_files(e);var a=document.getElementById("selectsubdir_"+e);if(a){var s=document.getElementById("selectsubdiredit_"+e),t="none"!=s.style.display;t?(a.selectedIndex=-1,s.value=""):a.selectedIndex=parseInt(document.getElementById("selectsubdirdefault_"+e).value)}for(var n=wfu_get_userdata_count(e),r=0;n>r;r++)document.getElementById("userdata_"+e+"_message_"+r).value="",document.getElementById("hiddeninput_"+e+"_userdata_"+r).value=""}function wfu_reset_message(e){var a=document.getElementById("wfu_messageblock_"+e);if(a){document.getElementById("wfu_messageblock_header_"+e).style.display="";var s=document.getElementById("wfu_messageblock_header_"+e+"_container");UploadStates[e]&&(s.innerHTML=UploadStates[e].State0),document.getElementById("wfu_messageblock_header_"+e+"_state").value="none",document.getElementById("wfu_messageblock_arrow_"+e).style.display="none",s.colSpan=3,document.getElementById("wfu_messageblock_subheader_"+e+"_messagelabel").innerHTML="",document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessagelabel").innerHTML="",document.getElementById("wfu_messageblock_subheader_"+e).style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_message").style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage").style.display="none";for(var t=wfu_get_file_ids(e),n=1;n<=t.length;n++)a.tBodies[0].removeChild(document.getElementById("wfu_messageblock_"+e+"_"+n)),a.tBodies[0].removeChild(document.getElementById("wfu_messageblock_subheader_"+e+"_"+n))}}function wfu_show_simple_progressbar(e,a){var s=document.getElementById("progressbar_"+e+"_animation"),t=document.getElementById("progressbar_"+e+"_imagesafe");s&&("progressive"==a?(s.style.width="0%",s.className="file_progress_progressive",t.style.display="none",s.style.display="block"):wfu_BrowserCaps.supportsAnimation?(s.style.width="25%",s.className="file_progress_shuffle",t.style.display="none",s.style.display="block"):(s.style.width="0%",s.className="file_progress_noanimation",s.style.display="none",t.style.display="block"),document.getElementById("wordpress_file_upload_progressbar_"+e).style.display="block")}function wfu_hide_simple_progressbar(e){var a=document.getElementById("progressbar_"+e+"_animation"),s=document.getElementById("progressbar_"+e+"_imagesafe");a&&(document.getElementById("wordpress_file_upload_progressbar_"+e).style.display="none",a.style.width="0%",a.className="file_progress_noanimation",s.style.display="none",a.style.display="block")}function wfu_invoke_shortcode_editor(e,a,s){for(var t=document.getElementsByTagName("BUTTON"),n=0,r=null,l=0;l<t.length;l++)t[l].parentNode&&t[l].parentNode.id=="wordpress_file_upload_editor_"+e&&(r=t[l],n++);if(0!=n){if(n>1)return void alert(GlobalData.consts.same_pluginid);var i=wfu_GetHttpRequestObject();if(null!=i){r.parentNode.style.display="none",document.getElementById("wordpress_file_upload_overlay_"+e).style.display="block";var o=GlobalData.consts.ajax_url;params=new Array(4),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_edit_shortcode",params[1]=new Array(2),params[1][0]="upload_id",params[1][1]=e,params[2]=new Array(2),params[2][0]="post_id",params[2][1]=a,params[3]=new Array(2),params[3][0]="post_hash",params[3][1]=s;for(var _="",l=0;l<params.length;l++)_+=(l>0?"&":"")+params[l][0]+"="+encodeURI(params[l][1]);i.open("POST",o,!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onreadystatechange=function(){if(4==i.readyState&&200==i.status){document.getElementById("wordpress_file_upload_overlay_"+e).style.display="none",r.parentNode.removeAttribute("style");var a="wfu_edit_shortcode:",s=i.responseText.indexOf(a);-1==s&&(s=i.responseText.length);var t=(i.responseText.substr(0,s),i.responseText.substr(s+a.length,i.responseText.length-s-a.length));s=t.indexOf(":");var n=t.substr(0,s);if(txt_value=t.substr(s+1,t.length-s-1),"success"==n){var l=window.open(wfu_plugin_decode_string(txt_value),"_blank");l.plugin_window=window}else"check_page_obsolete"==n&&alert(txt_value)}},i.send(_)}}}GlobalData={},UploadStates={},GlobalData.filestatematch={},GlobalData.filestatematch.success=[0,1,2,2],GlobalData.filestatematch.warning=[1,1,2,2],GlobalData.filestatematch.error1=[3,3,2,3],GlobalData.filestatematch.error2=[2,2,2,3],GlobalData.UploadInProgressString="",wfu_Check_Browser_Capabilities();
|
languages/wordpress-file-upload-fr_FR.mo
CHANGED
Binary file
|
languages/wordpress-file-upload-fr_FR.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-05
|
6 |
-
"PO-Revision-Date: 2015-05
|
7 |
"Last-Translator: nickboss <nickboss@iptanus.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: fr_FR\n"
|
@@ -14,6 +14,7 @@ msgstr ""
|
|
14 |
"X-Poedit-Basepath: ../\n"
|
15 |
"X-Generator: Poedit 1.7.5\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
|
|
17 |
|
18 |
#: lib/wfu_constants.php:7
|
19 |
msgid "Upload files"
|
@@ -21,7 +22,7 @@ msgstr "Envoyer des fichiers"
|
|
21 |
|
22 |
#: lib/wfu_constants.php:8
|
23 |
msgid "Select File"
|
24 |
-
msgstr "
|
25 |
|
26 |
#: lib/wfu_constants.php:9
|
27 |
msgid "Upload File"
|
@@ -40,15 +41,15 @@ msgstr ""
|
|
40 |
"vous prevenir qu'un nouveau fichier a été uploadé. %n%%n%Cordialement"
|
41 |
|
42 |
#: lib/wfu_constants.php:34
|
43 |
-
#,
|
44 |
msgid "File %filename% uploaded successfully"
|
45 |
-
msgstr "Le fichier %filename% a été
|
46 |
|
47 |
#: lib/wfu_constants.php:35
|
48 |
-
#,
|
49 |
msgid "File %filename% uploaded successfully but with warnings"
|
50 |
msgstr ""
|
51 |
-
"Le fichier %filename% a été envoyé avec succès mais avec des avertissements"
|
52 |
|
53 |
#: lib/wfu_constants.php:36
|
54 |
msgid "File %filename% not uploaded"
|
@@ -145,6 +146,8 @@ msgstr "La taille du fichier est supérieure à la taille limite."
|
|
145 |
#: lib/wfu_constants.php:72
|
146 |
msgid "The uploaded file exceeds 2GB and is not supported by this server."
|
147 |
msgstr ""
|
|
|
|
|
148 |
|
149 |
#: lib/wfu_constants.php:73
|
150 |
msgid ""
|
@@ -294,12 +297,16 @@ msgid ""
|
|
294 |
"There are more than one instances of the plugin in this page with the same "
|
295 |
"id. Please change it."
|
296 |
msgstr ""
|
|
|
|
|
297 |
|
298 |
#: lib/wfu_constants.php:99
|
299 |
msgid ""
|
300 |
"Cannot edit the shortcode because the page has been modified. Please reload "
|
301 |
"the page."
|
302 |
msgstr ""
|
|
|
|
|
303 |
|
304 |
#: lib/wfu_constants.php:102
|
305 |
msgid "Upload skipped! File already exists."
|
@@ -357,11 +364,11 @@ msgstr "Mode de test"
|
|
357 |
|
358 |
#: lib/wfu_constants.php:113
|
359 |
msgid "select dir..."
|
360 |
-
msgstr ""
|
361 |
|
362 |
#: lib/wfu_constants.php:114
|
363 |
msgid "type dir"
|
364 |
-
msgstr ""
|
365 |
|
366 |
#: lib/wfu_constants.php:115
|
367 |
msgid "Upload path: %filepath%"
|
@@ -377,7 +384,7 @@ msgstr " (requis)"
|
|
377 |
|
378 |
#: lib/wfu_constants.php:118
|
379 |
msgid "Files are being uploaded. Are you sure you want to exit the page?"
|
380 |
-
msgstr ""
|
381 |
|
382 |
#: lib/wfu_constants.php:121
|
383 |
msgid "This is a test message"
|
@@ -416,36 +423,48 @@ msgid ""
|
|
416 |
"Failed to edit the shortcode because the contents of the page changed. Try "
|
417 |
"again to edit the shortcode."
|
418 |
msgstr ""
|
|
|
|
|
419 |
|
420 |
#: lib/wfu_constants.php:132
|
421 |
msgid ""
|
422 |
"Failed to delete the shortcode because the contents of the page changed. Try "
|
423 |
"again to delete it."
|
424 |
msgstr ""
|
|
|
|
|
425 |
|
426 |
#: lib/wfu_constants.php:133
|
427 |
msgid ""
|
428 |
"The page containing the shortcode has been modified and it is no longer "
|
429 |
"valid. Please go back to reload the shortcode."
|
430 |
msgstr ""
|
|
|
|
|
431 |
|
432 |
#: lib/wfu_constants.php:134
|
433 |
msgid ""
|
434 |
"Failed to update the shortcode because the contents of the page changed. Go "
|
435 |
"back to reload the shortcode."
|
436 |
msgstr ""
|
|
|
|
|
437 |
|
438 |
#: lib/wfu_constants.php:135
|
439 |
msgid ""
|
440 |
"Failed to update the shortcode. Please try again. If the problem persists, "
|
441 |
"go back and reload the shortcode."
|
442 |
msgstr ""
|
|
|
|
|
443 |
|
444 |
#: lib/wfu_constants.php:138
|
445 |
msgid ""
|
446 |
"Insert variable %userid% inside text. It will be replaced by the id of the "
|
447 |
"current user."
|
448 |
msgstr ""
|
|
|
|
|
449 |
|
450 |
#: lib/wfu_constants.php:139
|
451 |
msgid ""
|
@@ -492,12 +511,16 @@ msgid ""
|
|
492 |
"Insert variable %pageid% inside text. It will be replaced by the id of the "
|
493 |
"current page."
|
494 |
msgstr ""
|
|
|
|
|
495 |
|
496 |
#: lib/wfu_constants.php:145
|
497 |
msgid ""
|
498 |
"Insert variable %pagetitle% inside text. It will be replaced by the title of "
|
499 |
"the current page."
|
500 |
msgstr ""
|
|
|
|
|
501 |
|
502 |
#: lib/wfu_constants.php:146
|
503 |
msgid ""
|
@@ -574,11 +597,14 @@ msgstr "merci de patienter pendans la redirection..."
|
|
574 |
|
575 |
#: lib/wfu_constants.php:164
|
576 |
msgid "Open visual shortcode editor in new window"
|
577 |
-
msgstr ""
|
578 |
|
579 |
#: lib/wfu_constants.php:165
|
580 |
msgid "loading visual editor"
|
581 |
-
msgstr ""
|
|
|
|
|
|
|
582 |
|
583 |
#~ msgid "Upload File/Upload Files"
|
584 |
#~ msgstr "Envoyer le fichier/Envoyer les fichiers"
|
@@ -586,12 +612,34 @@ msgstr ""
|
|
586 |
#~ msgid "Please fill in the above words: "
|
587 |
#~ msgstr "Merci de remplir dans les mots ci-dessus:"
|
588 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
#~ msgid "Bad captcha image!"
|
590 |
#~ msgstr "Mauvaise image de captcha!"
|
591 |
|
592 |
#~ msgid "No input!"
|
593 |
#~ msgstr "Aucune entrée!"
|
594 |
|
|
|
|
|
|
|
595 |
#~ msgid "Wrong captcha!"
|
596 |
#~ msgstr "Mauvaise captcha!"
|
597 |
|
@@ -604,6 +652,18 @@ msgstr ""
|
|
604 |
#~ msgid "Captcha not supported by your browser!"
|
605 |
#~ msgstr "Captcha n'a pas supporté par votre navigateur!"
|
606 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
607 |
#~ msgid "Please do not use drag drop due to an internal problem."
|
608 |
#~ msgstr "Ne pas utiliser un glisser-déposer à cause d'un problème interne."
|
609 |
|
@@ -619,6 +679,10 @@ msgstr ""
|
|
619 |
#~ "Envoi de ficher en blocs interrompu suite à une erreur dans bloc "
|
620 |
#~ "précédent!"
|
621 |
|
|
|
|
|
|
|
|
|
622 |
#~ msgid "Could not write file chuck to destination on chunk %d"
|
623 |
#~ msgstr "Impossible d'écrire le bloc de fichier a destination sur bloc %d"
|
624 |
|
@@ -637,6 +701,9 @@ msgstr ""
|
|
637 |
#~ msgid "correct captcha"
|
638 |
#~ msgstr "exact captcha"
|
639 |
|
|
|
|
|
|
|
640 |
#~ msgid "Clear file list?"
|
641 |
#~ msgstr "Effacer la liste des fichiers?"
|
642 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-06-05 18:03+0200\n"
|
6 |
+
"PO-Revision-Date: 2015-06-05 18:03+0200\n"
|
7 |
"Last-Translator: nickboss <nickboss@iptanus.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: fr_FR\n"
|
14 |
"X-Poedit-Basepath: ../\n"
|
15 |
"X-Generator: Poedit 1.7.5\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
"X-Poedit-SearchPathExcluded-0: vendor\n"
|
18 |
|
19 |
#: lib/wfu_constants.php:7
|
20 |
msgid "Upload files"
|
22 |
|
23 |
#: lib/wfu_constants.php:8
|
24 |
msgid "Select File"
|
25 |
+
msgstr "Sélectionnez un fichier"
|
26 |
|
27 |
#: lib/wfu_constants.php:9
|
28 |
msgid "Upload File"
|
41 |
"vous prevenir qu'un nouveau fichier a été uploadé. %n%%n%Cordialement"
|
42 |
|
43 |
#: lib/wfu_constants.php:34
|
44 |
+
#, php-format
|
45 |
msgid "File %filename% uploaded successfully"
|
46 |
+
msgstr "Le fichier %filename% a été envoyé avec succès"
|
47 |
|
48 |
#: lib/wfu_constants.php:35
|
49 |
+
#, php-format
|
50 |
msgid "File %filename% uploaded successfully but with warnings"
|
51 |
msgstr ""
|
52 |
+
"Le fichier %filename% a été envoyé avec succès, mais avec des avertissements"
|
53 |
|
54 |
#: lib/wfu_constants.php:36
|
55 |
msgid "File %filename% not uploaded"
|
146 |
#: lib/wfu_constants.php:72
|
147 |
msgid "The uploaded file exceeds 2GB and is not supported by this server."
|
148 |
msgstr ""
|
149 |
+
"Le fichier téléchargé excède 2 Go et ne sont pas pris en charge par ce "
|
150 |
+
"serveur."
|
151 |
|
152 |
#: lib/wfu_constants.php:73
|
153 |
msgid ""
|
297 |
"There are more than one instances of the plugin in this page with the same "
|
298 |
"id. Please change it."
|
299 |
msgstr ""
|
300 |
+
"Il ya plus d'un cas de le plugin dans cette page avec le même id. S'il vous "
|
301 |
+
"plaît changer."
|
302 |
|
303 |
#: lib/wfu_constants.php:99
|
304 |
msgid ""
|
305 |
"Cannot edit the shortcode because the page has been modified. Please reload "
|
306 |
"the page."
|
307 |
msgstr ""
|
308 |
+
"Impossible de modifier le shortcode car la page a été modifiée. Veuillez "
|
309 |
+
"recharger la page."
|
310 |
|
311 |
#: lib/wfu_constants.php:102
|
312 |
msgid "Upload skipped! File already exists."
|
364 |
|
365 |
#: lib/wfu_constants.php:113
|
366 |
msgid "select dir..."
|
367 |
+
msgstr "sélectionnez dir"
|
368 |
|
369 |
#: lib/wfu_constants.php:114
|
370 |
msgid "type dir"
|
371 |
+
msgstr "tapez dir"
|
372 |
|
373 |
#: lib/wfu_constants.php:115
|
374 |
msgid "Upload path: %filepath%"
|
384 |
|
385 |
#: lib/wfu_constants.php:118
|
386 |
msgid "Files are being uploaded. Are you sure you want to exit the page?"
|
387 |
+
msgstr "Les fichiers sont envoyés. Êtes-vous sûr de vouloir quitter la page?"
|
388 |
|
389 |
#: lib/wfu_constants.php:121
|
390 |
msgid "This is a test message"
|
423 |
"Failed to edit the shortcode because the contents of the page changed. Try "
|
424 |
"again to edit the shortcode."
|
425 |
msgstr ""
|
426 |
+
"Impossible de modifier le shortcode parce que le contenu de la page changé. "
|
427 |
+
"Essayez à nouveau de modifier le shortcode."
|
428 |
|
429 |
#: lib/wfu_constants.php:132
|
430 |
msgid ""
|
431 |
"Failed to delete the shortcode because the contents of the page changed. Try "
|
432 |
"again to delete it."
|
433 |
msgstr ""
|
434 |
+
"Impossible de supprimer le shortcode parce que le contenu de la page changé. "
|
435 |
+
"Essayez à nouveau de le supprimer."
|
436 |
|
437 |
#: lib/wfu_constants.php:133
|
438 |
msgid ""
|
439 |
"The page containing the shortcode has been modified and it is no longer "
|
440 |
"valid. Please go back to reload the shortcode."
|
441 |
msgstr ""
|
442 |
+
"La page contenant le shortcode a été modifié et il est plus valide. S'il "
|
443 |
+
"vous plaît revenir à recharger le shortcode."
|
444 |
|
445 |
#: lib/wfu_constants.php:134
|
446 |
msgid ""
|
447 |
"Failed to update the shortcode because the contents of the page changed. Go "
|
448 |
"back to reload the shortcode."
|
449 |
msgstr ""
|
450 |
+
"Impossible de mettre à jour le shortcode parce que le contenu de la page "
|
451 |
+
"changé. Retour à recharger le shortcode."
|
452 |
|
453 |
#: lib/wfu_constants.php:135
|
454 |
msgid ""
|
455 |
"Failed to update the shortcode. Please try again. If the problem persists, "
|
456 |
"go back and reload the shortcode."
|
457 |
msgstr ""
|
458 |
+
"Impossible de mettre à jour le shortcode. S'il vous plaît essayer à nouveau. "
|
459 |
+
"Si le problème persiste, revenir en arrière et recharger le shortcode."
|
460 |
|
461 |
#: lib/wfu_constants.php:138
|
462 |
msgid ""
|
463 |
"Insert variable %userid% inside text. It will be replaced by the id of the "
|
464 |
"current user."
|
465 |
msgstr ""
|
466 |
+
"Insérez %userid% variable dans le texte. Il sera remplacé par l'id de "
|
467 |
+
"l'utilisateur courant."
|
468 |
|
469 |
#: lib/wfu_constants.php:139
|
470 |
msgid ""
|
511 |
"Insert variable %pageid% inside text. It will be replaced by the id of the "
|
512 |
"current page."
|
513 |
msgstr ""
|
514 |
+
"Insérez %pageid% variable dans le texte. Il sera remplacé par l'id de la "
|
515 |
+
"page en cours."
|
516 |
|
517 |
#: lib/wfu_constants.php:145
|
518 |
msgid ""
|
519 |
"Insert variable %pagetitle% inside text. It will be replaced by the title of "
|
520 |
"the current page."
|
521 |
msgstr ""
|
522 |
+
"Insérez %pagetitle% variable dans le texte. Il sera remplacé par le titre de "
|
523 |
+
"la page courante."
|
524 |
|
525 |
#: lib/wfu_constants.php:146
|
526 |
msgid ""
|
597 |
|
598 |
#: lib/wfu_constants.php:164
|
599 |
msgid "Open visual shortcode editor in new window"
|
600 |
+
msgstr "Ouvrez l'éditeur de shortcode visuelle dans une nouvelle fenêtre"
|
601 |
|
602 |
#: lib/wfu_constants.php:165
|
603 |
msgid "loading visual editor"
|
604 |
+
msgstr "chargement éditeur visuel"
|
605 |
+
|
606 |
+
#~ msgid "Select File/Select Files"
|
607 |
+
#~ msgstr "Sélectionner un fichier/Sélectionner des fichiers"
|
608 |
|
609 |
#~ msgid "Upload File/Upload Files"
|
610 |
#~ msgstr "Envoyer le fichier/Envoyer les fichiers"
|
612 |
#~ msgid "Please fill in the above words: "
|
613 |
#~ msgstr "Merci de remplir dans les mots ci-dessus:"
|
614 |
|
615 |
+
#~ msgid ""
|
616 |
+
#~ "ERROR: Captcha not supported! You have an old PHP version. Upgrade your "
|
617 |
+
#~ "PHP or use RecaptchaV2 (no account)."
|
618 |
+
#~ msgstr ""
|
619 |
+
#~ "Erreur: Captcha pas pris en charge! Vous avez une ancienne version de "
|
620 |
+
#~ "PHP. Améliorez votre PHP ou utiliser RecaptchaV2 (no account)."
|
621 |
+
|
622 |
+
#~ msgid "ERROR: No site key. Please contact administrator!"
|
623 |
+
#~ msgstr ""
|
624 |
+
#~ "Erreur: Aucune clé du site. S'il vous plaît contacter l'administrateur!"
|
625 |
+
|
626 |
+
#~ msgid ""
|
627 |
+
#~ "ERROR: No site key defined! Please go to the plugin settings in Dashboard "
|
628 |
+
#~ "to define Google Recaptcha keys."
|
629 |
+
#~ msgstr ""
|
630 |
+
#~ "ERREUR : Aucun site clé définie ! S'il vous plaît aller à la "
|
631 |
+
#~ "configuration du plugin dans le Tableau de bord pour définir des clés de "
|
632 |
+
#~ "Google Recaptcha."
|
633 |
+
|
634 |
#~ msgid "Bad captcha image!"
|
635 |
#~ msgstr "Mauvaise image de captcha!"
|
636 |
|
637 |
#~ msgid "No input!"
|
638 |
#~ msgstr "Aucune entrée!"
|
639 |
|
640 |
+
#~ msgid "Captcha not completed!"
|
641 |
+
#~ msgstr "Captcha pas terminée!"
|
642 |
+
|
643 |
#~ msgid "Wrong captcha!"
|
644 |
#~ msgstr "Mauvaise captcha!"
|
645 |
|
652 |
#~ msgid "Captcha not supported by your browser!"
|
653 |
#~ msgstr "Captcha n'a pas supporté par votre navigateur!"
|
654 |
|
655 |
+
#~ msgid "the secret parameter is missing"
|
656 |
+
#~ msgstr "le paramètre secret est manquant"
|
657 |
+
|
658 |
+
#~ msgid "the secret parameter is invalid or malformed"
|
659 |
+
#~ msgstr "le paramètre secret est invalide ou malformé"
|
660 |
+
|
661 |
+
#~ msgid "the response parameter is missing"
|
662 |
+
#~ msgstr "le paramètre de réponse est manquant"
|
663 |
+
|
664 |
+
#~ msgid "the response parameter is invalid or malformed"
|
665 |
+
#~ msgstr "le paramètre de réponse est invalide ou malformé"
|
666 |
+
|
667 |
#~ msgid "Please do not use drag drop due to an internal problem."
|
668 |
#~ msgstr "Ne pas utiliser un glisser-déposer à cause d'un problème interne."
|
669 |
|
679 |
#~ "Envoi de ficher en blocs interrompu suite à une erreur dans bloc "
|
680 |
#~ "précédent!"
|
681 |
|
682 |
+
#~ msgid "Chunked upload failed, final file could not be created!"
|
683 |
+
#~ msgstr ""
|
684 |
+
#~ "Envoi de ficher en blocs échoué, fichier final ne pouvait être créé!"
|
685 |
+
|
686 |
#~ msgid "Could not write file chuck to destination on chunk %d"
|
687 |
#~ msgstr "Impossible d'écrire le bloc de fichier a destination sur bloc %d"
|
688 |
|
701 |
#~ msgid "correct captcha"
|
702 |
#~ msgstr "exact captcha"
|
703 |
|
704 |
+
#~ msgid "click to continue the upload"
|
705 |
+
#~ msgstr "cliquer pour continuer l'envoi"
|
706 |
+
|
707 |
#~ msgid "Clear file list?"
|
708 |
#~ msgstr "Effacer la liste des fichiers?"
|
709 |
|
languages/wordpress-file-upload-sr_RS.mo
ADDED
Binary file
|
languages/wordpress-file-upload-sr_RS.po
ADDED
@@ -0,0 +1,594 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-06-05 18:46+0200\n"
|
6 |
+
"PO-Revision-Date: 2015-06-05 18:46+0200\n"
|
7 |
+
"Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
|
8 |
+
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
+
"Language: sr\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;gettext;gettext_noop\n"
|
14 |
+
"X-Poedit-Basepath: ../\n"
|
15 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
16 |
+
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
17 |
+
"X-Generator: Poedit 1.7.5\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SearchPathExcluded-0: vendor\n"
|
20 |
+
|
21 |
+
#: lib/wfu_constants.php:7
|
22 |
+
msgid "Upload files"
|
23 |
+
msgstr "Otpremi datoteke"
|
24 |
+
|
25 |
+
#: lib/wfu_constants.php:8
|
26 |
+
msgid "Select File"
|
27 |
+
msgstr "Odaberi datoteku"
|
28 |
+
|
29 |
+
#: lib/wfu_constants.php:9
|
30 |
+
msgid "Upload File"
|
31 |
+
msgstr "Otpremi datoteku"
|
32 |
+
|
33 |
+
#: lib/wfu_constants.php:27
|
34 |
+
msgid "File Upload Notification"
|
35 |
+
msgstr "Obaveštenje o otpremanju datoteke"
|
36 |
+
|
37 |
+
#: lib/wfu_constants.php:28
|
38 |
+
msgid ""
|
39 |
+
"Dear Recipient,%n%%n% This is an automatic delivery message to notify you "
|
40 |
+
"that a new file has been uploaded.%n%%n%Best Regards"
|
41 |
+
msgstr ""
|
42 |
+
"Dragi primaoče, %n%%n%, ovo je automatski generisana poruka koja vas "
|
43 |
+
"obaveštava da je datoteka otpremljena.%n%%n%Srdačan pozdrav"
|
44 |
+
|
45 |
+
#: lib/wfu_constants.php:34
|
46 |
+
#, php-format
|
47 |
+
msgid "File %filename% uploaded successfully"
|
48 |
+
msgstr "Datoteka %filename% uspešno otpremljena"
|
49 |
+
|
50 |
+
#: lib/wfu_constants.php:35
|
51 |
+
#, php-format
|
52 |
+
msgid "File %filename% uploaded successfully but with warnings"
|
53 |
+
msgstr "Datoteka %filename% uspešno otpremljena, ali sa upozorenjima"
|
54 |
+
|
55 |
+
#: lib/wfu_constants.php:36
|
56 |
+
msgid "File %filename% not uploaded"
|
57 |
+
msgstr "Datoteka %nazivdatoteke% nije otpremljena"
|
58 |
+
|
59 |
+
#: lib/wfu_constants.php:37
|
60 |
+
msgid "File %filename% is being uploaded"
|
61 |
+
msgstr "Datoteka %nazivdatoteke% upravo se otprema"
|
62 |
+
|
63 |
+
#: lib/wfu_constants.php:55
|
64 |
+
msgid "Your message"
|
65 |
+
msgstr "Vaša poruka"
|
66 |
+
|
67 |
+
#: lib/wfu_constants.php:60
|
68 |
+
msgid ""
|
69 |
+
"Error. Could not resolve ftp target filedir. Check the domain in 'ftpinfo' "
|
70 |
+
"attribute."
|
71 |
+
msgstr ""
|
72 |
+
"Greška. Ciljni direktorijum datoteke nije mogao biti razrešen. Proverite "
|
73 |
+
"domen u 'ftpinfo' atributu."
|
74 |
+
|
75 |
+
#: lib/wfu_constants.php:61
|
76 |
+
msgid "Error. Invalid ftp information. Check 'ftpinfo' attribute."
|
77 |
+
msgstr "Greška. Nevažeći ftp podaci. Proverite 'ftpinfo' atribut."
|
78 |
+
|
79 |
+
#: lib/wfu_constants.php:62
|
80 |
+
msgid ""
|
81 |
+
"Error. Could not extract ftp information from 'ftpinfo' attribute. Check its "
|
82 |
+
"syntax."
|
83 |
+
msgstr ""
|
84 |
+
"Greška. Neuspelo izvlačenje ftp podataka iz 'ftpinfo' atributa. Proverite "
|
85 |
+
"njegovu sintaksu. "
|
86 |
+
|
87 |
+
#: lib/wfu_constants.php:63
|
88 |
+
msgid ""
|
89 |
+
"Error. Could not resolve ftp target filename. Check the domain in 'ftpinfo' "
|
90 |
+
"attribute."
|
91 |
+
msgstr ""
|
92 |
+
"Greška. Ftp naziv ciljne datoteke nije mogao biti razrešen. Proverite domen "
|
93 |
+
"u 'ftpinfo' atributu."
|
94 |
+
|
95 |
+
#: lib/wfu_constants.php:64
|
96 |
+
msgid ""
|
97 |
+
"Error. The upload size limit of PHP directive upload_max_filesize is "
|
98 |
+
"preventing the upload of big files.\n"
|
99 |
+
"PHP directive upload_max_filesize limit is: "
|
100 |
+
msgstr ""
|
101 |
+
"Greška. Ograničenje veličine PHP-a za otpremanje, otpremi_max_veličinu "
|
102 |
+
"datoteke, sprečava otpremanje velikih datoteka. \n"
|
103 |
+
"PHP direktiva ograničenja otpremi_max_veličinu datoteke je:"
|
104 |
+
|
105 |
+
#: lib/wfu_constants.php:65
|
106 |
+
msgid ""
|
107 |
+
"The upload time limit of PHP directive max_input_time is preventing the "
|
108 |
+
"upload of big files.\n"
|
109 |
+
"PHP directive max_input_time limit is: "
|
110 |
+
msgstr ""
|
111 |
+
"Vremensko ograničenje za otpremanje PHP direktive, max_vreme_unosa sprečava "
|
112 |
+
"otpremanje velikih datoteka. \n"
|
113 |
+
"PHP direktiva ograničenja max_vreme_unosa je:"
|
114 |
+
|
115 |
+
#: lib/wfu_constants.php:66
|
116 |
+
msgid ""
|
117 |
+
"Error. Permission denied to write to target folder.\n"
|
118 |
+
"Check and correct read/write permissions of target folder."
|
119 |
+
msgstr ""
|
120 |
+
"Greška. Odbijena je dozvola za pisanje u ciljnoj fascikli. Proverite i "
|
121 |
+
"ispravite dozvole za čitanje/pisanje u ciljnoj fascikli. "
|
122 |
+
|
123 |
+
#: lib/wfu_constants.php:67
|
124 |
+
msgid "Targer folder doesn't exist."
|
125 |
+
msgstr "Ciljna fascikla ne postoji."
|
126 |
+
|
127 |
+
#: lib/wfu_constants.php:68
|
128 |
+
msgid "Upload failed! Missing a temporary folder."
|
129 |
+
msgstr "Otpremanje neuspešno! Nedostaje privremena fascikla. "
|
130 |
+
|
131 |
+
#: lib/wfu_constants.php:69
|
132 |
+
msgid "Upload failed! Permission denied to write to target folder."
|
133 |
+
msgstr "Otpremanje neuspešno! Odbijena dozvola za pisanje u ciljnoj fascikli."
|
134 |
+
|
135 |
+
#: lib/wfu_constants.php:70
|
136 |
+
msgid "File not allowed."
|
137 |
+
msgstr "Datoteka nije dozvoljena."
|
138 |
+
|
139 |
+
#: lib/wfu_constants.php:71
|
140 |
+
msgid "The uploaded file exceeds the file size limit."
|
141 |
+
msgstr ""
|
142 |
+
"Veličina otpremljene datoteke prevazilazi ograničenje veličine datoteke."
|
143 |
+
|
144 |
+
#: lib/wfu_constants.php:72
|
145 |
+
msgid "The uploaded file exceeds 2GB and is not supported by this server."
|
146 |
+
msgstr "Otpremljena datoteka je veća od 2GB i nije podržana ovim serverom."
|
147 |
+
|
148 |
+
#: lib/wfu_constants.php:73
|
149 |
+
msgid ""
|
150 |
+
"Upload failed! The uploaded file exceeds the file size limit of the server. "
|
151 |
+
"Please contact the administrator."
|
152 |
+
msgstr ""
|
153 |
+
"Otpremanje neuspešno! Otpremljena datoteka prevazilazi ograničenje servera "
|
154 |
+
"za veličinu datoteke. Obratite se administratoru."
|
155 |
+
|
156 |
+
#: lib/wfu_constants.php:74
|
157 |
+
msgid ""
|
158 |
+
"Upload failed! The duration of the upload exceeded the time limit of the "
|
159 |
+
"server. Please contact the administrator."
|
160 |
+
msgstr ""
|
161 |
+
"Otpremanje neuspešno! Trajanje otpremanja prevazišlo je vremensko "
|
162 |
+
"ograničenje servera. Obratite se administratoru."
|
163 |
+
|
164 |
+
#: lib/wfu_constants.php:75
|
165 |
+
msgid ""
|
166 |
+
"Upload failed! The uploaded file exceeds the MAX_FILE_SIZE directive that "
|
167 |
+
"was specified in the HTML form."
|
168 |
+
msgstr ""
|
169 |
+
"Otpremanje neuspešno! Otpremljena datoteka prevazilazi direktivu "
|
170 |
+
"MAX_VELIČINA_DATOTEKE koja je navedena u HTML obrascu."
|
171 |
+
|
172 |
+
#: lib/wfu_constants.php:76
|
173 |
+
msgid "Upload failed! The uploaded file was only partially uploaded."
|
174 |
+
msgstr "Otpremanje neuspešno! Datoteka je samo delimično otpremljena."
|
175 |
+
|
176 |
+
#: lib/wfu_constants.php:77
|
177 |
+
msgid "Upload failed! No file was uploaded."
|
178 |
+
msgstr "Otpremanje neuspešno! Nijedna datoteka nije otpremljena."
|
179 |
+
|
180 |
+
#: lib/wfu_constants.php:78
|
181 |
+
msgid "Upload failed! Failed to write file to disk."
|
182 |
+
msgstr "Otpremanje neuspešno! Datoteka nije zapisana na disk."
|
183 |
+
|
184 |
+
#: lib/wfu_constants.php:79
|
185 |
+
msgid ""
|
186 |
+
"Upload failed! Error occured while moving temporary file. Please contact "
|
187 |
+
"administrator."
|
188 |
+
msgstr ""
|
189 |
+
"Otpremanje neuspešno! Došlo je do greške prilikom pomeranja privremene "
|
190 |
+
"datoteke. Obratite se administratoru."
|
191 |
+
|
192 |
+
#: lib/wfu_constants.php:80
|
193 |
+
msgid ""
|
194 |
+
"Upload failed! A PHP extension stopped the file upload. PHP does not provide "
|
195 |
+
"a way to ascertain which extension caused the file upload to stop; examining "
|
196 |
+
"the list of loaded extensions with phpinfo() may help."
|
197 |
+
msgstr ""
|
198 |
+
"Otpremanje neuspešno! PHP ekstenzija zaustavila je otpremanje datoteke. PHP "
|
199 |
+
"ne obezbeđuje način da se utvrdi koja je ekstenzija zaustavila otpremanje. "
|
200 |
+
"Možda će pomoći ako pregledate spisak otpremljenih ekstenzija uz phpinfo(). "
|
201 |
+
|
202 |
+
#: lib/wfu_constants.php:81
|
203 |
+
msgid "Upload failed! Error occured while attemting to upload the file."
|
204 |
+
msgstr ""
|
205 |
+
"Otpremanje neuspešno! Došlo je do greške prilikom pokušaja da se otpremi "
|
206 |
+
"datoteka."
|
207 |
+
|
208 |
+
#: lib/wfu_constants.php:82
|
209 |
+
msgid "Upload failed!"
|
210 |
+
msgstr "Otpremanje neuspešno! "
|
211 |
+
|
212 |
+
#: lib/wfu_constants.php:83
|
213 |
+
msgid "No file!"
|
214 |
+
msgstr "Nema datoteke!"
|
215 |
+
|
216 |
+
#: lib/wfu_constants.php:84
|
217 |
+
msgid ""
|
218 |
+
"Upload failed! The upload has been canceled by the user or the browser "
|
219 |
+
"dropped the connection."
|
220 |
+
msgstr ""
|
221 |
+
"Otpremanje neuspešno! Korisnik je otkazao otpremanje ili je pretraživač "
|
222 |
+
"izgubio internet vezu."
|
223 |
+
|
224 |
+
#: lib/wfu_constants.php:85
|
225 |
+
msgid "Upload failed! Unknown error."
|
226 |
+
msgstr "Otpremanje neuspešno! Nepoznata greška."
|
227 |
+
|
228 |
+
#: lib/wfu_constants.php:86
|
229 |
+
msgid "Please contact the administrator."
|
230 |
+
msgstr "Obratite se administratoru."
|
231 |
+
|
232 |
+
#: lib/wfu_constants.php:87
|
233 |
+
msgid "No result from remote server!"
|
234 |
+
msgstr "Nema rezultata sa udaljenog servera!"
|
235 |
+
|
236 |
+
#: lib/wfu_constants.php:88
|
237 |
+
msgid " but with warnings"
|
238 |
+
msgstr "ali sa upozorenjima"
|
239 |
+
|
240 |
+
#: lib/wfu_constants.php:89 lib/wfu_constants.php:91
|
241 |
+
msgid "Warning: JSON parse error."
|
242 |
+
msgstr "Upozorenje: Greška prilikom JSON parsiranja."
|
243 |
+
|
244 |
+
#: lib/wfu_constants.php:90
|
245 |
+
msgid ""
|
246 |
+
"Upload parameters of this file, passed as JSON string to the handler, could "
|
247 |
+
"not be parsed."
|
248 |
+
msgstr ""
|
249 |
+
"Otpremljeni parametri ove datoteke, poslate na obradu kao JSON niz, nisu "
|
250 |
+
"mogle biti parsirane. "
|
251 |
+
|
252 |
+
#: lib/wfu_constants.php:92
|
253 |
+
msgid ""
|
254 |
+
"UploadStates, passed as JSON string to the handler, could not be parsed."
|
255 |
+
msgstr ""
|
256 |
+
"UploadStates, poslate na obradu kao JSON niz, nisu mogle biti parsirane. "
|
257 |
+
|
258 |
+
#: lib/wfu_constants.php:93
|
259 |
+
msgid ""
|
260 |
+
"Redirection to classic form functionality occurred due to unknown error."
|
261 |
+
msgstr ""
|
262 |
+
"Zbog nepoznate greške došlo je do preusmeravanja na funkcionalnost klasičnog "
|
263 |
+
"obrasca."
|
264 |
+
|
265 |
+
#: lib/wfu_constants.php:94
|
266 |
+
msgid ""
|
267 |
+
"Redirection to classic form functionality occurred because AJAX is not "
|
268 |
+
"supported."
|
269 |
+
msgstr ""
|
270 |
+
"Do preusmeravanja na funkcionalnost klasičnog obrasca došlo je zato što nije "
|
271 |
+
"podržan AJAX."
|
272 |
+
|
273 |
+
#: lib/wfu_constants.php:95
|
274 |
+
msgid ""
|
275 |
+
"Redirection to classic form functionality occurred because HTML5 is not "
|
276 |
+
"supported."
|
277 |
+
msgstr ""
|
278 |
+
"Do preusmeravanja na funkcionalnost klasičnog obrasca došlo je zato što nije "
|
279 |
+
"podržan HTML5."
|
280 |
+
|
281 |
+
#: lib/wfu_constants.php:96
|
282 |
+
msgid ""
|
283 |
+
"Redirection to classic form functionality occurred due to JSON parse error."
|
284 |
+
msgstr ""
|
285 |
+
"Do preusmeravanja na funkcionalnost klasičnog obrasca došlo je zbog JSON "
|
286 |
+
"greške prilikom parsiranja."
|
287 |
+
|
288 |
+
#: lib/wfu_constants.php:97
|
289 |
+
msgid "cannot be empty!"
|
290 |
+
msgstr "ne može biti prazno!"
|
291 |
+
|
292 |
+
#: lib/wfu_constants.php:98
|
293 |
+
msgid ""
|
294 |
+
"There are more than one instances of the plugin in this page with the same "
|
295 |
+
"id. Please change it."
|
296 |
+
msgstr ""
|
297 |
+
"Na ovoj stranici ima više od jednog primera plugin-a sa istom "
|
298 |
+
"identifikacijom."
|
299 |
+
|
300 |
+
#: lib/wfu_constants.php:99
|
301 |
+
msgid ""
|
302 |
+
"Cannot edit the shortcode because the page has been modified. Please reload "
|
303 |
+
"the page."
|
304 |
+
msgstr ""
|
305 |
+
"Shortcode ne može da se uredi zato što stranica nije modifikovana. Ponovo "
|
306 |
+
"učitajte stranicu."
|
307 |
+
|
308 |
+
#: lib/wfu_constants.php:102
|
309 |
+
msgid "Upload skipped! File already exists."
|
310 |
+
msgstr "Otpremanje preskočeno! Datoteka već postoji."
|
311 |
+
|
312 |
+
#: lib/wfu_constants.php:103
|
313 |
+
msgid "No files have been selected!"
|
314 |
+
msgstr "Datoteke nisu odabrane!"
|
315 |
+
|
316 |
+
#: lib/wfu_constants.php:104
|
317 |
+
msgid "WPFilebase Plugin not updated because there were no files uploaded."
|
318 |
+
msgstr ""
|
319 |
+
"WPFilebase Plugin nije ažuriran zato što nije bilo otpremljenih datoteka."
|
320 |
+
|
321 |
+
#: lib/wfu_constants.php:105
|
322 |
+
msgid "Notification email was not sent because there were no files uploaded."
|
323 |
+
msgstr "Mail obaveštenja nije poslat jer nije bilo otpremljenih datoteka."
|
324 |
+
|
325 |
+
#: lib/wfu_constants.php:106
|
326 |
+
msgid ""
|
327 |
+
"Notification email was not sent because no recipients were defined. Please "
|
328 |
+
"check notifyrecipients attribute in the shortcode."
|
329 |
+
msgstr ""
|
330 |
+
"Mail obaveštenja nije poslat jer nije bilo navedenih primalaca. Proverite "
|
331 |
+
"notifyrecipients atribut u shortcode-u."
|
332 |
+
|
333 |
+
#: lib/wfu_constants.php:107
|
334 |
+
msgid ""
|
335 |
+
"Notification email was not sent due to an error. Please check "
|
336 |
+
"notifyrecipients, notifysubject and notifymessage attributes for errors."
|
337 |
+
msgstr ""
|
338 |
+
"Mail obaveštenja nije poslat zbog greške. Proverite notifyrecipients, "
|
339 |
+
"notifysubject i notifymessage atribute da biste našli greške."
|
340 |
+
|
341 |
+
#: lib/wfu_constants.php:108
|
342 |
+
msgid ""
|
343 |
+
"Redirection not executed because redirection link is empty. Please check "
|
344 |
+
"redirectlink attribute."
|
345 |
+
msgstr ""
|
346 |
+
"Preusmeravanje nije izvršeno zato što je link za preusmeravanje prazan. "
|
347 |
+
"Proverite redirectlink atribut."
|
348 |
+
|
349 |
+
#: lib/wfu_constants.php:109
|
350 |
+
msgid ""
|
351 |
+
"Redirection not executed because not all files were successfully uploaded."
|
352 |
+
msgstr ""
|
353 |
+
"Preusmeravanje nije izvršeno zato što nisu sve datoteke uspešno otpremljene."
|
354 |
+
|
355 |
+
#: lib/wfu_constants.php:112
|
356 |
+
msgid "Test Mode"
|
357 |
+
msgstr "Režim testiranja"
|
358 |
+
|
359 |
+
#: lib/wfu_constants.php:113
|
360 |
+
msgid "select dir..."
|
361 |
+
msgstr "odaberite dir..."
|
362 |
+
|
363 |
+
#: lib/wfu_constants.php:114
|
364 |
+
msgid "type dir"
|
365 |
+
msgstr "vrsta direktorijuma "
|
366 |
+
|
367 |
+
#: lib/wfu_constants.php:115
|
368 |
+
msgid "Upload path: %filepath%"
|
369 |
+
msgstr "Putanja otpremanja: %filepath%"
|
370 |
+
|
371 |
+
#: lib/wfu_constants.php:116
|
372 |
+
msgid "Failed upload path: %filepath%"
|
373 |
+
msgstr "Putanja otpremanja neuspešna: %filepath%"
|
374 |
+
|
375 |
+
#: lib/wfu_constants.php:117
|
376 |
+
msgid " (required)"
|
377 |
+
msgstr "(obavezna)"
|
378 |
+
|
379 |
+
#: lib/wfu_constants.php:118
|
380 |
+
msgid "Files are being uploaded. Are you sure you want to exit the page?"
|
381 |
+
msgstr "Datoteke su otpremljene. Da li sigurno želite da napustite stranicu?"
|
382 |
+
|
383 |
+
#: lib/wfu_constants.php:121
|
384 |
+
msgid "This is a test message"
|
385 |
+
msgstr "Ovo je poruka testa"
|
386 |
+
|
387 |
+
#: lib/wfu_constants.php:122
|
388 |
+
msgid "This is a test administrator message"
|
389 |
+
msgstr "Ovo je poruka testa administratora "
|
390 |
+
|
391 |
+
#: lib/wfu_constants.php:123
|
392 |
+
msgid "File testfile 1 under test"
|
393 |
+
msgstr "Datoteka testfile 1 na testiranju"
|
394 |
+
|
395 |
+
#: lib/wfu_constants.php:124
|
396 |
+
msgid "File testfile 1 message"
|
397 |
+
msgstr "Datoteka testfile 1 poruka"
|
398 |
+
|
399 |
+
#: lib/wfu_constants.php:125
|
400 |
+
msgid "File testfile 1 administrator message"
|
401 |
+
msgstr "Datoteka testfile 1 poruka administratora"
|
402 |
+
|
403 |
+
#: lib/wfu_constants.php:126
|
404 |
+
msgid "File testfile 2 under test"
|
405 |
+
msgstr "Datoteka testfile 2 na testiranju"
|
406 |
+
|
407 |
+
#: lib/wfu_constants.php:127
|
408 |
+
msgid "File testfile 2 message"
|
409 |
+
msgstr "Datoteka testfile 2 poruka"
|
410 |
+
|
411 |
+
#: lib/wfu_constants.php:128
|
412 |
+
msgid "File testfile 2 administrator message"
|
413 |
+
msgstr "Datoteka testfile 2 poruka administratora"
|
414 |
+
|
415 |
+
#: lib/wfu_constants.php:131
|
416 |
+
msgid ""
|
417 |
+
"Failed to edit the shortcode because the contents of the page changed. Try "
|
418 |
+
"again to edit the shortcode."
|
419 |
+
msgstr ""
|
420 |
+
"Neuspešno uređivanje shortcode-a zbog izmene sadržaja stranice. Pokušajte "
|
421 |
+
"ponovo da uredite shortcode."
|
422 |
+
|
423 |
+
#: lib/wfu_constants.php:132
|
424 |
+
msgid ""
|
425 |
+
"Failed to delete the shortcode because the contents of the page changed. Try "
|
426 |
+
"again to delete it."
|
427 |
+
msgstr ""
|
428 |
+
"Neuspešno brisanje shortcode-a zbog izmene sadržaja stranice. Pokušajte "
|
429 |
+
"ponovo da ga obrišete."
|
430 |
+
|
431 |
+
#: lib/wfu_constants.php:133
|
432 |
+
msgid ""
|
433 |
+
"The page containing the shortcode has been modified and it is no longer "
|
434 |
+
"valid. Please go back to reload the shortcode."
|
435 |
+
msgstr ""
|
436 |
+
"Stranica koja sadrži shortcode je izmenjena i više nije validna. Vratite se "
|
437 |
+
"da ponovo učitate shortcode."
|
438 |
+
|
439 |
+
#: lib/wfu_constants.php:134
|
440 |
+
msgid ""
|
441 |
+
"Failed to update the shortcode because the contents of the page changed. Go "
|
442 |
+
"back to reload the shortcode."
|
443 |
+
msgstr ""
|
444 |
+
"Neuspešno ažuriranje shortcode-a zbog izmene sadržaja stranice. Vratite se "
|
445 |
+
"da ponovo učitate shortcode."
|
446 |
+
|
447 |
+
#: lib/wfu_constants.php:135
|
448 |
+
msgid ""
|
449 |
+
"Failed to update the shortcode. Please try again. If the problem persists, "
|
450 |
+
"go back and reload the shortcode."
|
451 |
+
msgstr ""
|
452 |
+
"Neuspešno ažuriranje shortcode-a. Pokušajte ponovo. Ako se problem ne reši, "
|
453 |
+
"vratite se i opet učitajte shortcode."
|
454 |
+
|
455 |
+
#: lib/wfu_constants.php:138
|
456 |
+
msgid ""
|
457 |
+
"Insert variable %userid% inside text. It will be replaced by the id of the "
|
458 |
+
"current user."
|
459 |
+
msgstr ""
|
460 |
+
"Unesite promenljivu %idkorisnika% u tekst. Biće zamenjena id-jem tekućeg "
|
461 |
+
"korisnika."
|
462 |
+
|
463 |
+
#: lib/wfu_constants.php:139
|
464 |
+
msgid ""
|
465 |
+
"Insert variable %username% inside text. It will be replaced by the username "
|
466 |
+
"of the current user."
|
467 |
+
msgstr ""
|
468 |
+
"Unesite promenljivu %korisničko ime% u tekst. Biće zamenjena korisničkim "
|
469 |
+
"imenom tekućeg korisnika."
|
470 |
+
|
471 |
+
#: lib/wfu_constants.php:140
|
472 |
+
msgid ""
|
473 |
+
"Insert variable %useremail% inside text. It will be replaced by the email of "
|
474 |
+
"the current user."
|
475 |
+
msgstr ""
|
476 |
+
"Unesite promenljivu %mailkorisnika% u tekst. Biće zamenjena mail-om tekućeg "
|
477 |
+
"korisnika."
|
478 |
+
|
479 |
+
#: lib/wfu_constants.php:141
|
480 |
+
msgid ""
|
481 |
+
"Insert variable %filename% inside text. It will be replaced by the filename "
|
482 |
+
"of the uploaded file."
|
483 |
+
msgstr ""
|
484 |
+
"Unesite promenljivu %nazivdatoteke% u tekst. Biće zamenjena nazivom "
|
485 |
+
"otpremljene datoteke."
|
486 |
+
|
487 |
+
#: lib/wfu_constants.php:142
|
488 |
+
msgid ""
|
489 |
+
"Insert variable %filepath% inside text. It will be replaced by the full "
|
490 |
+
"filepath of the uploaded file."
|
491 |
+
msgstr ""
|
492 |
+
"Unesite promenljivu %putanjadatoteke% u tekst. Biće zamenjena celom putanjom "
|
493 |
+
"otpremljene datoteke."
|
494 |
+
|
495 |
+
#: lib/wfu_constants.php:143
|
496 |
+
msgid ""
|
497 |
+
"Insert variable %blogid% inside text. It will be replaced by the blog id of "
|
498 |
+
"the website."
|
499 |
+
msgstr ""
|
500 |
+
"Unesite promenljivu %idbloga% u tekst. Biće zamenjena id-jem bloga web site-"
|
501 |
+
"a."
|
502 |
+
|
503 |
+
#: lib/wfu_constants.php:144
|
504 |
+
msgid ""
|
505 |
+
"Insert variable %pageid% inside text. It will be replaced by the id of the "
|
506 |
+
"current page."
|
507 |
+
msgstr ""
|
508 |
+
"Unesite promenljivu %idstranice% u tekst. Biće zamenjena id-jem tekuće "
|
509 |
+
"stranice."
|
510 |
+
|
511 |
+
#: lib/wfu_constants.php:145
|
512 |
+
msgid ""
|
513 |
+
"Insert variable %pagetitle% inside text. It will be replaced by the title of "
|
514 |
+
"the current page."
|
515 |
+
msgstr ""
|
516 |
+
"Unesite promenljivu %naslovstranice% u tekst. Biće zamenjena naslovom tekuće "
|
517 |
+
"stranice."
|
518 |
+
|
519 |
+
#: lib/wfu_constants.php:146
|
520 |
+
msgid ""
|
521 |
+
"Insert variable %userdataXXX% inside text. Select the user field from the "
|
522 |
+
"drop-down list. It will be replaced by the value that the user entered in "
|
523 |
+
"this field."
|
524 |
+
msgstr ""
|
525 |
+
"Unesite promenljivu %korisnički podaciXXX%. Odaberite korisničko polje iz "
|
526 |
+
"opadajuće liste. Biće zamenjena vrednošću koju je korisnik uneo u ovo polje."
|
527 |
+
|
528 |
+
#: lib/wfu_constants.php:147
|
529 |
+
msgid "Insert variable %n% inside text to denote a line change."
|
530 |
+
msgstr "Unesite promenljivu %n% u tekst kako biste označili promenu reda."
|
531 |
+
|
532 |
+
#: lib/wfu_constants.php:150
|
533 |
+
msgid "Upload in progress"
|
534 |
+
msgstr "Otpremanje u toku"
|
535 |
+
|
536 |
+
#: lib/wfu_constants.php:151
|
537 |
+
msgid "Upload in progress with warnings!"
|
538 |
+
msgstr "Otpremanje sa upozorenjima u toku!"
|
539 |
+
|
540 |
+
#: lib/wfu_constants.php:152
|
541 |
+
msgid "Upload in progress but some files already failed!"
|
542 |
+
msgstr "Otpremanje u toku, ali neke datoteke već nisu uspešno otpremljene!"
|
543 |
+
|
544 |
+
#: lib/wfu_constants.php:153
|
545 |
+
msgid "Upload in progress but no files uploaded so far!"
|
546 |
+
msgstr "Otpremanje u toku, ali do sada nisu otpremljene nikakve datoteke!"
|
547 |
+
|
548 |
+
#: lib/wfu_constants.php:154
|
549 |
+
msgid "All files uploaded successfully"
|
550 |
+
msgstr "Sve datoteke uspešno su otpremljene"
|
551 |
+
|
552 |
+
#: lib/wfu_constants.php:155
|
553 |
+
msgid "All files uploaded successfully but there are warnings!"
|
554 |
+
msgstr "Sve datoteke uspešno su otpremljene, ali postoje upozorenja!"
|
555 |
+
|
556 |
+
#: lib/wfu_constants.php:156
|
557 |
+
msgid "File uploaded successfully but there are warnings!"
|
558 |
+
msgstr "Datoteka je uspešno otpremljena, ali postoje upozorenja!"
|
559 |
+
|
560 |
+
#: lib/wfu_constants.php:157
|
561 |
+
msgid "Some files failed to upload!"
|
562 |
+
msgstr "Neke datoteke nisu otpremljene!"
|
563 |
+
|
564 |
+
#: lib/wfu_constants.php:158
|
565 |
+
msgid "All files failed to upload"
|
566 |
+
msgstr "Nijedna datoteka nije otpremljena"
|
567 |
+
|
568 |
+
#: lib/wfu_constants.php:159
|
569 |
+
msgid "File failed to upload"
|
570 |
+
msgstr "Datoteka nije uspešno otpremljena"
|
571 |
+
|
572 |
+
#: lib/wfu_constants.php:160
|
573 |
+
msgid "There are no files to upload!"
|
574 |
+
msgstr "Nema datoteka za otpremanje"
|
575 |
+
|
576 |
+
#: lib/wfu_constants.php:161
|
577 |
+
msgid "Test upload message"
|
578 |
+
msgstr "Testiraj poruku za otpremanje"
|
579 |
+
|
580 |
+
#: lib/wfu_constants.php:162
|
581 |
+
msgid "JSON parse warning!"
|
582 |
+
msgstr "Upozorenje za JSON parsiranje!"
|
583 |
+
|
584 |
+
#: lib/wfu_constants.php:163
|
585 |
+
msgid "please wait while redirecting..."
|
586 |
+
msgstr "Molimo sačekajte preusmeravanje..."
|
587 |
+
|
588 |
+
#: lib/wfu_constants.php:164
|
589 |
+
msgid "Open visual shortcode editor in new window"
|
590 |
+
msgstr "Otvori vizuelni shortcode uređivač u novom prozoru"
|
591 |
+
|
592 |
+
#: lib/wfu_constants.php:165
|
593 |
+
msgid "loading visual editor"
|
594 |
+
msgstr "učitavanje vizuelnog uređivača"
|
lib/wfu_admin.php
CHANGED
@@ -202,7 +202,7 @@ function wfu_manage_mainmenu($message = '') {
|
|
202 |
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
203 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=plugin_settings" class="button" title="Settings">Settings</a>';
|
204 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser" class="button" title="File browser">File Browser</a>';
|
205 |
-
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=shortcode_composer" class="button" title="Shortcode composer">Shortcode Composer</a>';
|
206 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=view_log" class="button" title="View log">View Log</a>';
|
207 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=sync_db" class="button" title="Update database to reflect current status of files">Sync Database</a>';
|
208 |
$echo_str .= "\n\t\t".'<h3 style="margin-bottom: 10px; margin-top: 40px;">Status</h3>';
|
@@ -478,6 +478,19 @@ function wfu_manage_settings($message = '') {
|
|
478 |
$echo_str .= "\n\t\t\t\t\t\t\t".'<p style="cursor: text; font-size:9px; padding: 0px; margin: 0px; width: 95%; color: #AAAAAA;">Current value: <strong>'.$plugin_options['basedir'].'</strong></p>';
|
479 |
$echo_str .= "\n\t\t\t\t\t\t".'</td>';
|
480 |
$echo_str .= "\n\t\t\t\t\t".'</tr>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
481 |
$echo_str .= "\n\t\t\t\t".'</tbody>';
|
482 |
$echo_str .= "\n\t\t\t".'</table>';
|
483 |
$echo_str .= "\n\t\t\t".'<p class="submit">';
|
@@ -498,12 +511,13 @@ function wfu_update_settings() {
|
|
498 |
|
499 |
// $enabled = ( isset($_POST['wfu_enabled']) ? ( $_POST['wfu_enabled'] == "on" ? 1 : 0 ) : 0 );
|
500 |
$hashfiles = ( isset($_POST['wfu_hashfiles']) ? ( $_POST['wfu_hashfiles'] == "on" ? 1 : 0 ) : 0 );
|
501 |
-
if ( isset($_POST['wfu_basedir']) && isset($_POST['
|
502 |
if ( $_POST['submit'] == "Update" ) {
|
503 |
$new_plugin_options['version'] = '1.0';
|
504 |
$new_plugin_options['shortcode'] = $plugin_options['shortcode'];
|
505 |
$new_plugin_options['hashfiles'] = $hashfiles;
|
506 |
$new_plugin_options['basedir'] = $_POST['wfu_basedir'];
|
|
|
507 |
$encoded_options = wfu_encode_plugin_options($new_plugin_options);
|
508 |
update_option( "wordpress_file_upload_options", $encoded_options );
|
509 |
if ( $new_plugin_options['hashfiles'] == '1' && $plugin_options['hashfiles'] != '1' )
|
202 |
$echo_str .= "\n\t".'<div style="margin-top:20px;">';
|
203 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=plugin_settings" class="button" title="Settings">Settings</a>';
|
204 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser" class="button" title="File browser">File Browser</a>';
|
205 |
+
// if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=shortcode_composer" class="button" title="Shortcode composer">Shortcode Composer</a>';
|
206 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=view_log" class="button" title="View log">View Log</a>';
|
207 |
if ( current_user_can( 'manage_options' ) ) $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=sync_db" class="button" title="Update database to reflect current status of files">Sync Database</a>';
|
208 |
$echo_str .= "\n\t\t".'<h3 style="margin-bottom: 10px; margin-top: 40px;">Status</h3>';
|
478 |
$echo_str .= "\n\t\t\t\t\t\t\t".'<p style="cursor: text; font-size:9px; padding: 0px; margin: 0px; width: 95%; color: #AAAAAA;">Current value: <strong>'.$plugin_options['basedir'].'</strong></p>';
|
479 |
$echo_str .= "\n\t\t\t\t\t\t".'</td>';
|
480 |
$echo_str .= "\n\t\t\t\t\t".'</tr>';
|
481 |
+
$echo_str .= "\n\t\t\t\t\t".'<tr class="form-field">';
|
482 |
+
$echo_str .= "\n\t\t\t\t\t\t".'<th scope="row">';
|
483 |
+
$echo_str .= "\n\t\t\t\t\t\t\t".'<label for="wfu_postmethod">Post Method</label>';
|
484 |
+
$echo_str .= "\n\t\t\t\t\t\t".'</th>';
|
485 |
+
$echo_str .= "\n\t\t\t\t\t\t".'<td>';
|
486 |
+
$echo_str .= "\n\t\t\t\t\t\t\t".'<select name="wfu_postmethod" id="wfu_postmethod" value="'.$plugin_options['postmethod'].'">';
|
487 |
+
$echo_str .= "\n\t\t\t\t\t\t\t\t".'<option value="fopen"'.( $plugin_options['postmethod'] == 'fopen' || $plugin_options['postmethod'] == '' ? ' selected="selected"' : '' ).'>Using fopen (default)</option>';
|
488 |
+
$echo_str .= "\n\t\t\t\t\t\t\t\t".'<option value="curl"'.( $plugin_options['postmethod'] == 'curl' ? ' selected="selected"' : '' ).'>Using cURL</option>';
|
489 |
+
$echo_str .= "\n\t\t\t\t\t\t\t\t".'<option value="socket"'.( $plugin_options['postmethod'] == 'socket' ? ' selected="selected"' : '' ).'>Using Sockets</option>';
|
490 |
+
$echo_str .= "\n\t\t\t\t\t\t\t".'</select>';
|
491 |
+
$echo_str .= "\n\t\t\t\t\t\t\t".'<p style="cursor: text; font-size:9px; padding: 0px; margin: 0px; width: 95%; color: #AAAAAA;">Current value: <strong>'.( $plugin_options['postmethod'] == 'fopen' || $plugin_options['postmethod'] == '' ? 'Using fopen' : ( $plugin_options['postmethod'] == 'curl' ? 'Using cURL' : 'Using Sockets' ) ).'</strong></p>';
|
492 |
+
$echo_str .= "\n\t\t\t\t\t\t".'</td>';
|
493 |
+
$echo_str .= "\n\t\t\t\t\t".'</tr>';
|
494 |
$echo_str .= "\n\t\t\t\t".'</tbody>';
|
495 |
$echo_str .= "\n\t\t\t".'</table>';
|
496 |
$echo_str .= "\n\t\t\t".'<p class="submit">';
|
511 |
|
512 |
// $enabled = ( isset($_POST['wfu_enabled']) ? ( $_POST['wfu_enabled'] == "on" ? 1 : 0 ) : 0 );
|
513 |
$hashfiles = ( isset($_POST['wfu_hashfiles']) ? ( $_POST['wfu_hashfiles'] == "on" ? 1 : 0 ) : 0 );
|
514 |
+
if ( isset($_POST['wfu_basedir']) && isset($_POST['wfu_postmethod']) && isset($_POST['submit']) ) {
|
515 |
if ( $_POST['submit'] == "Update" ) {
|
516 |
$new_plugin_options['version'] = '1.0';
|
517 |
$new_plugin_options['shortcode'] = $plugin_options['shortcode'];
|
518 |
$new_plugin_options['hashfiles'] = $hashfiles;
|
519 |
$new_plugin_options['basedir'] = $_POST['wfu_basedir'];
|
520 |
+
$new_plugin_options['postmethod'] = $_POST['wfu_postmethod'];
|
521 |
$encoded_options = wfu_encode_plugin_options($new_plugin_options);
|
522 |
update_option( "wordpress_file_upload_options", $encoded_options );
|
523 |
if ( $new_plugin_options['hashfiles'] == '1' && $plugin_options['hashfiles'] != '1' )
|
lib/wfu_ajaxactions.php
CHANGED
@@ -8,7 +8,8 @@ function wfu_ajax_action_send_email_notification() {
|
|
8 |
|
9 |
$arr = wfu_get_params_fields_from_index($_POST['params_index']);
|
10 |
//check referer using server sessions to avoid CSRF attacks
|
11 |
-
|
|
|
12 |
if ( $user->user_login != $arr['user_login'] ) die();
|
13 |
|
14 |
$params_str = get_option('wfu_params_'.$arr['unique_id']);
|
@@ -17,7 +18,7 @@ function wfu_ajax_action_send_email_notification() {
|
|
17 |
/* initialize return array */
|
18 |
$params_output_array["version"] = "full";
|
19 |
$params_output_array["general"]['shortcode_id'] = $params["uploadid"];
|
20 |
-
$params_output_array["general"]['unique_id'] = ( isset($_POST['
|
21 |
$params_output_array["general"]['state'] = 0;
|
22 |
$params_output_array["general"]['files_count'] = 0;
|
23 |
$params_output_array["general"]['update_wpfilebase'] = "";
|
@@ -58,14 +59,39 @@ function wfu_ajax_action_send_email_notification() {
|
|
58 |
/* construct safe output */
|
59 |
$sout = "0;".WFU_DEFAULTMESSAGECOLORS.";0";
|
60 |
|
61 |
-
die("wfu_fileupload_success
|
62 |
}
|
63 |
|
64 |
function wfu_ajax_action_callback() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
$user = wp_get_current_user();
|
66 |
-
$arr = wfu_get_params_fields_from_index($
|
|
|
67 |
//check referrer using server sessions to avoid CSRF attacks
|
68 |
-
if ( $_SESSION["wfu_token_".$
|
69 |
echo "Session failed!<br/><br/>Session Data:<br/>";
|
70 |
print_r(wfu_sanitize($_SESSION));
|
71 |
echo "<br/><br/>Post Data:<br/>";
|
@@ -83,15 +109,16 @@ function wfu_ajax_action_callback() {
|
|
83 |
die('force_errorabort_code');
|
84 |
}
|
85 |
|
86 |
-
//
|
87 |
-
$unique_id = ( isset($_POST['unique_id']) ? $_POST['unique_id'] : "" );
|
88 |
-
|
89 |
-
//the first pass to this callback script is for closing the previous connection_aborted
|
90 |
if ( isset($_POST["force_connection_close"]) && $_POST["force_connection_close"] === "1" ) {
|
91 |
header("Connection: Close");
|
92 |
die("success");
|
93 |
}
|
94 |
|
|
|
|
|
|
|
|
|
95 |
//if upload has finished then perform post upload actions
|
96 |
if ( isset($_POST["upload_finished"]) && $_POST["upload_finished"] === "1" ) {
|
97 |
die("success");
|
@@ -100,14 +127,26 @@ function wfu_ajax_action_callback() {
|
|
100 |
$params_str = get_option('wfu_params_'.$arr['unique_id']);
|
101 |
$params = wfu_decode_array_from_string($params_str);
|
102 |
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
$_SESSION['wfu_check_refresh_'.$params["uploadid"]] = 'do not process';
|
105 |
|
106 |
$wfu_process_file_array = wfu_process_files($params, 'ajax');
|
107 |
// extract safe_output from wfu_process_file_array and pass it as separate part of the response text
|
108 |
$safe_output = $wfu_process_file_array["general"]['safe_output'];
|
109 |
unset($wfu_process_file_array["general"]['safe_output']);
|
110 |
-
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
|
113 |
function wfu_ajax_action_save_shortcode() {
|
@@ -120,6 +159,7 @@ function wfu_ajax_action_save_shortcode() {
|
|
120 |
$new_plugin_options['shortcode'] = $plugin_options['shortcode'];
|
121 |
$new_plugin_options['hashfiles'] = $plugin_options['hashfiles'];
|
122 |
$new_plugin_options['basedir'] = $plugin_options['basedir'];
|
|
|
123 |
$encoded_options = wfu_encode_plugin_options($new_plugin_options);
|
124 |
update_option( "wordpress_file_upload_options", $encoded_options );
|
125 |
|
8 |
|
9 |
$arr = wfu_get_params_fields_from_index($_POST['params_index']);
|
10 |
//check referer using server sessions to avoid CSRF attacks
|
11 |
+
$sid = $arr['shortcode_id'];
|
12 |
+
if ( $_SESSION["wfu_token_".$sid] != $_POST['session_token'] ) die();
|
13 |
if ( $user->user_login != $arr['user_login'] ) die();
|
14 |
|
15 |
$params_str = get_option('wfu_params_'.$arr['unique_id']);
|
18 |
/* initialize return array */
|
19 |
$params_output_array["version"] = "full";
|
20 |
$params_output_array["general"]['shortcode_id'] = $params["uploadid"];
|
21 |
+
$params_output_array["general"]['unique_id'] = ( isset($_POST['uniqueuploadid_'.$sid]) ? sanitize_text_field($_POST['uniqueuploadid_'.$sid]) : "" );
|
22 |
$params_output_array["general"]['state'] = 0;
|
23 |
$params_output_array["general"]['files_count'] = 0;
|
24 |
$params_output_array["general"]['update_wpfilebase'] = "";
|
59 |
/* construct safe output */
|
60 |
$sout = "0;".WFU_DEFAULTMESSAGECOLORS.";0";
|
61 |
|
62 |
+
die("wfu_fileupload_success::".$sout.":".wfu_encode_array_to_string($params_output_array));
|
63 |
}
|
64 |
|
65 |
function wfu_ajax_action_callback() {
|
66 |
+
if ( !isset($_REQUEST['session_token']) ) die();
|
67 |
+
$session_token = sanitize_text_field( $_REQUEST["session_token"] );
|
68 |
+
if ( $session_token == "" ) die();
|
69 |
+
|
70 |
+
/* This section is executed when forceclassic is enabled or when redirection to the classic uploader was performed */
|
71 |
+
if ( isset($_REQUEST['sid']) && isset($_REQUEST['start_time']) ) {
|
72 |
+
//this request came from classic non-HTML5 uploader
|
73 |
+
$sid = sanitize_text_field( $_REQUEST["sid"] );
|
74 |
+
if ( $sid == "" ) die();
|
75 |
+
$start_time = sanitize_text_field( $_REQUEST["start_time"] );
|
76 |
+
|
77 |
+
$_SESSION['wfu_check_refresh_'.$sid] = 'form button pressed';
|
78 |
+
$_SESSION['wfu_start_time_'.$sid] = $start_time;
|
79 |
+
|
80 |
+
die("wfu_response_success:");
|
81 |
+
}
|
82 |
+
|
83 |
+
/* This section is executed when normal HTML5 upload is performed */
|
84 |
+
if ( !isset($_REQUEST['params_index']) ) die();
|
85 |
+
|
86 |
+
$params_index = sanitize_text_field( $_REQUEST["params_index"] );
|
87 |
+
|
88 |
+
if ( $params_index == "" ) die();
|
89 |
+
|
90 |
$user = wp_get_current_user();
|
91 |
+
$arr = wfu_get_params_fields_from_index($params_index);
|
92 |
+
$sid = $arr['shortcode_id'];
|
93 |
//check referrer using server sessions to avoid CSRF attacks
|
94 |
+
if ( $_SESSION["wfu_token_".$sid] != $session_token ) {
|
95 |
echo "Session failed!<br/><br/>Session Data:<br/>";
|
96 |
print_r(wfu_sanitize($_SESSION));
|
97 |
echo "<br/><br/>Post Data:<br/>";
|
109 |
die('force_errorabort_code');
|
110 |
}
|
111 |
|
112 |
+
//if force_connection_close is set, then the first pass to this callback script is for closing the previous connection
|
|
|
|
|
|
|
113 |
if ( isset($_POST["force_connection_close"]) && $_POST["force_connection_close"] === "1" ) {
|
114 |
header("Connection: Close");
|
115 |
die("success");
|
116 |
}
|
117 |
|
118 |
+
//get the unique id of the upload
|
119 |
+
$unique_id = ( isset($_POST['uniqueuploadid_'.$sid]) ? sanitize_text_field($_POST['uniqueuploadid_'.$sid]) : "" );
|
120 |
+
if ( strlen($unique_id) != 10 ) die('force_errorabort_code');
|
121 |
+
|
122 |
//if upload has finished then perform post upload actions
|
123 |
if ( isset($_POST["upload_finished"]) && $_POST["upload_finished"] === "1" ) {
|
124 |
die("success");
|
127 |
$params_str = get_option('wfu_params_'.$arr['unique_id']);
|
128 |
$params = wfu_decode_array_from_string($params_str);
|
129 |
|
130 |
+
|
131 |
+
//if this is the first pass of an upload attempt then perform pre-upload actions
|
132 |
+
if ( !isset($_SESSION['wfu_upload_first_pass_'.$unique_id]) || $_SESSION['wfu_upload_first_pass_'.$unique_id] != 'true' ) {
|
133 |
+
$_SESSION['wfu_upload_first_pass_'.$unique_id] = 'true';
|
134 |
+
}
|
135 |
+
|
136 |
+
if ( !isset($_POST["subdir_sel_index"]) ) die();
|
137 |
+
$subdir_sel_index = sanitize_text_field( $_POST["subdir_sel_index"] );
|
138 |
+
$params['subdir_selection_index'] = $subdir_sel_index;
|
139 |
$_SESSION['wfu_check_refresh_'.$params["uploadid"]] = 'do not process';
|
140 |
|
141 |
$wfu_process_file_array = wfu_process_files($params, 'ajax');
|
142 |
// extract safe_output from wfu_process_file_array and pass it as separate part of the response text
|
143 |
$safe_output = $wfu_process_file_array["general"]['safe_output'];
|
144 |
unset($wfu_process_file_array["general"]['safe_output']);
|
145 |
+
// get javascript code that has been defined in wfu_after_file_upload action
|
146 |
+
$js_script = wfu_plugin_encode_string($wfu_process_file_array["general"]['js_script']);
|
147 |
+
unset($wfu_process_file_array["general"]['js_script']);
|
148 |
+
|
149 |
+
die("wfu_fileupload_success:".$js_script.":".$safe_output.":".wfu_encode_array_to_string($wfu_process_file_array));
|
150 |
}
|
151 |
|
152 |
function wfu_ajax_action_save_shortcode() {
|
159 |
$new_plugin_options['shortcode'] = $plugin_options['shortcode'];
|
160 |
$new_plugin_options['hashfiles'] = $plugin_options['hashfiles'];
|
161 |
$new_plugin_options['basedir'] = $plugin_options['basedir'];
|
162 |
+
$new_plugin_options['postmethod'] = $plugin_options['postmethod'];
|
163 |
$encoded_options = wfu_encode_plugin_options($new_plugin_options);
|
164 |
update_option( "wordpress_file_upload_options", $encoded_options );
|
165 |
|
lib/wfu_attributes.php
CHANGED
@@ -361,7 +361,7 @@ function wfu_attribute_definitions() {
|
|
361 |
"subcategory" => "Redirection",
|
362 |
"parent" => "redirect",
|
363 |
"dependencies" => null,
|
364 |
-
"variables" => array("%filename%"),
|
365 |
"help" => "This is the redirect URL. The URL can be dynamic by using variables. Please see Documentation on how to use variables inside attributes."
|
366 |
),
|
367 |
array(
|
361 |
"subcategory" => "Redirection",
|
362 |
"parent" => "redirect",
|
363 |
"dependencies" => null,
|
364 |
+
"variables" => array("%filename%", "%username%"),
|
365 |
"help" => "This is the redirect URL. The URL can be dynamic by using variables. Please see Documentation on how to use variables inside attributes."
|
366 |
),
|
367 |
array(
|
lib/wfu_functions.php
CHANGED
@@ -240,6 +240,7 @@ function wfu_encode_plugin_options($plugin_options) {
|
|
240 |
$encoded_options .= 'shortcode='.wfu_plugin_encode_string($plugin_options['shortcode']).';';
|
241 |
$encoded_options .= 'hashfiles='.$plugin_options['hashfiles'].';';
|
242 |
$encoded_options .= 'basedir='.wfu_plugin_encode_string($plugin_options['basedir']).';';
|
|
|
243 |
$encoded_options .= 'captcha_sitekey='.wfu_plugin_encode_string($plugin_options['captcha_sitekey']).';';
|
244 |
$encoded_options .= 'captcha_secretkey='.wfu_plugin_encode_string($plugin_options['captcha_secretkey']);
|
245 |
return $encoded_options;
|
@@ -1088,6 +1089,8 @@ function wfu_add_div() {
|
|
1088 |
//********************* Email Functions ****************************************************************************************************
|
1089 |
|
1090 |
function wfu_send_notification_email($user, $only_filename_list, $target_path_list, $attachment_list, $userdata_fields, $params) {
|
|
|
|
|
1091 |
//apply wfu_before_email_notification filter
|
1092 |
$changable_data['recipients'] = $params["notifyrecipients"];
|
1093 |
$changable_data['subject'] = $params["notifysubject"];
|
@@ -1129,8 +1132,8 @@ function wfu_send_notification_email($user, $only_filename_list, $target_path_li
|
|
1129 |
$search = array ('/%n%/', '/%dq%/', '/%brl%/', '/%brr%/');
|
1130 |
$replace = array ("\n", "\"", "[", "]");
|
1131 |
$notifyheaders = preg_replace($search, $replace, $notifyheaders);
|
1132 |
-
$search = array ('/%username%/', '/%useremail%/', '/%filename%/', '/%filepath%/', '/%n%/', '/%dq%/', '/%brl%/', '/%brr%/');
|
1133 |
-
$replace = array ($user_login, ( $user_email == "" ? "no email" : $user_email ), $only_filename_list, $target_path_list, "\n", "\"", "[", "]");
|
1134 |
foreach ( $userdata_fields as $userdata_key => $userdata_field ) {
|
1135 |
$ind = 1 + $userdata_key;
|
1136 |
array_push($search, '/%userdata'.$ind.'%/');
|
@@ -1179,19 +1182,82 @@ function wfu_process_media_insert($file_path, $page_id){
|
|
1179 |
//********************* POST/GET Requests Functions ****************************************************************************************************
|
1180 |
|
1181 |
function wfu_post_request($url, $params, $verifypeer = false) {
|
1182 |
-
$
|
1183 |
-
$
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1191 |
}
|
1192 |
-
$context_params = array( 'http' => $http_array );
|
1193 |
-
$context = stream_context_create($context_params);
|
1194 |
-
return file_get_contents($url, false, $context);
|
1195 |
}
|
1196 |
|
1197 |
?>
|
240 |
$encoded_options .= 'shortcode='.wfu_plugin_encode_string($plugin_options['shortcode']).';';
|
241 |
$encoded_options .= 'hashfiles='.$plugin_options['hashfiles'].';';
|
242 |
$encoded_options .= 'basedir='.wfu_plugin_encode_string($plugin_options['basedir']).';';
|
243 |
+
$encoded_options .= 'postmethod='.$plugin_options['postmethod'].';';
|
244 |
$encoded_options .= 'captcha_sitekey='.wfu_plugin_encode_string($plugin_options['captcha_sitekey']).';';
|
245 |
$encoded_options .= 'captcha_secretkey='.wfu_plugin_encode_string($plugin_options['captcha_secretkey']);
|
246 |
return $encoded_options;
|
1089 |
//********************* Email Functions ****************************************************************************************************
|
1090 |
|
1091 |
function wfu_send_notification_email($user, $only_filename_list, $target_path_list, $attachment_list, $userdata_fields, $params) {
|
1092 |
+
global $blog_id;
|
1093 |
+
|
1094 |
//apply wfu_before_email_notification filter
|
1095 |
$changable_data['recipients'] = $params["notifyrecipients"];
|
1096 |
$changable_data['subject'] = $params["notifysubject"];
|
1132 |
$search = array ('/%n%/', '/%dq%/', '/%brl%/', '/%brr%/');
|
1133 |
$replace = array ("\n", "\"", "[", "]");
|
1134 |
$notifyheaders = preg_replace($search, $replace, $notifyheaders);
|
1135 |
+
$search = array ('/%username%/', '/%useremail%/', '/%filename%/', '/%filepath%/', '/%blogid%/', '/%pageid%/', '/%pagetitle%/', '/%n%/', '/%dq%/', '/%brl%/', '/%brr%/');
|
1136 |
+
$replace = array ($user_login, ( $user_email == "" ? "no email" : $user_email ), $only_filename_list, $target_path_list, $blog_id, $params["pageid"], get_the_title($params["pageid"]), "\n", "\"", "[", "]");
|
1137 |
foreach ( $userdata_fields as $userdata_key => $userdata_field ) {
|
1138 |
$ind = 1 + $userdata_key;
|
1139 |
array_push($search, '/%userdata'.$ind.'%/');
|
1182 |
//********************* POST/GET Requests Functions ****************************************************************************************************
|
1183 |
|
1184 |
function wfu_post_request($url, $params, $verifypeer = false) {
|
1185 |
+
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
1186 |
+
if ( $plugin_options['postmethod'] == 'curl' ) {
|
1187 |
+
// POST request using CURL
|
1188 |
+
$ch = curl_init($url);
|
1189 |
+
$options = array(
|
1190 |
+
CURLOPT_POST => true,
|
1191 |
+
CURLOPT_POSTFIELDS => http_build_query($params),
|
1192 |
+
CURLOPT_HTTPHEADER => array(
|
1193 |
+
'Content-Type: application/x-www-form-urlencoded'
|
1194 |
+
),
|
1195 |
+
CURLINFO_HEADER_OUT => false,
|
1196 |
+
CURLOPT_HEADER => false,
|
1197 |
+
CURLOPT_RETURNTRANSFER => true,
|
1198 |
+
CURLOPT_SSL_VERIFYPEER => $verifypeer
|
1199 |
+
);
|
1200 |
+
curl_setopt_array($ch, $options);
|
1201 |
+
$result = curl_exec($ch);
|
1202 |
+
curl_close ($ch);
|
1203 |
+
return $result;
|
1204 |
+
}
|
1205 |
+
elseif ( $plugin_options['postmethod'] == 'socket' ) {
|
1206 |
+
// POST request using sockets
|
1207 |
+
$scheme = "";
|
1208 |
+
$port = 80;
|
1209 |
+
$timeout = null;
|
1210 |
+
$errno = 0;
|
1211 |
+
$errstr = '';
|
1212 |
+
$url = parse_url($url);
|
1213 |
+
$host = $url['host'];
|
1214 |
+
$path = $url['path'];
|
1215 |
+
if ( $url['scheme'] == 'https' ) {
|
1216 |
+
$scheme = "ssl://";
|
1217 |
+
$port = 443;
|
1218 |
+
$timeout = 30;
|
1219 |
+
}
|
1220 |
+
elseif ( $url['scheme'] != 'http' ) return '';
|
1221 |
+
$handle = fsockopen($scheme.$host, $port, $errno, $errstr, (is_null($timeout) ? ini_get("default_socket_timeout") : $timeout));
|
1222 |
+
if ( $errno !== 0 || $errstr !== '' ) $handle = false;
|
1223 |
+
if ( $handle !== false ) {
|
1224 |
+
$content = http_build_query($params);
|
1225 |
+
$request = "POST " . $path . " HTTP/1.1\r\n";
|
1226 |
+
$request .= "Host: " . $host . "\r\n";
|
1227 |
+
$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
|
1228 |
+
$request .= "Content-length: " . strlen($content) . "\r\n";
|
1229 |
+
$request .= "Connection: close\r\n\r\n";
|
1230 |
+
$request .= $content . "\r\n\r\n";
|
1231 |
+
fwrite($handle, $request, strlen($request));
|
1232 |
+
$response = '';
|
1233 |
+
while ( !feof($handle) ) {
|
1234 |
+
$response .= fgets($handle, 4096);
|
1235 |
+
}
|
1236 |
+
fclose($handle);
|
1237 |
+
if (0 === strpos($response, 'HTTP/1.1 200 OK')) {
|
1238 |
+
$parts = preg_split("#\n\s*\n#Uis", $response);
|
1239 |
+
return $parts[1];
|
1240 |
+
}
|
1241 |
+
return '';
|
1242 |
+
}
|
1243 |
+
return '';
|
1244 |
+
}
|
1245 |
+
else {
|
1246 |
+
// POST request using file_get_contents
|
1247 |
+
$peer_key = version_compare(PHP_VERSION, '5.6.0', '<') ? 'CN_name' : 'peer_name';
|
1248 |
+
$http_array = array(
|
1249 |
+
'method' => 'POST',
|
1250 |
+
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
1251 |
+
'content' => http_build_query($params)
|
1252 |
+
);
|
1253 |
+
if ( $verifypeer ) {
|
1254 |
+
$http_array['verify_peer'] = true;
|
1255 |
+
$http_array[$peer_key] = 'www.google.com';
|
1256 |
+
}
|
1257 |
+
$context_params = array( 'http' => $http_array );
|
1258 |
+
$context = stream_context_create($context_params);
|
1259 |
+
return file_get_contents($url, false, $context);
|
1260 |
}
|
|
|
|
|
|
|
1261 |
}
|
1262 |
|
1263 |
?>
|
lib/wfu_processfiles.php
CHANGED
@@ -16,7 +16,7 @@ function wfu_process_files($params, $method) {
|
|
16 |
$user_email = $user->user_email;
|
17 |
$is_admin = current_user_can('manage_options');
|
18 |
}
|
19 |
-
$
|
20 |
// determine if this routine is only for checking the file
|
21 |
$only_check = ( isset($_POST['only_check']) ? ( $_POST['only_check'] == "1" ) : false );
|
22 |
|
@@ -30,14 +30,13 @@ function wfu_process_files($params, $method) {
|
|
30 |
$notify_attachment_list = "";
|
31 |
$uploadedfile = 'uploadedfile_'.$sid;
|
32 |
$hiddeninput = 'hiddeninput_'.$sid;
|
33 |
-
$unique_id = ( isset($_POST['unique_id']) ? $_POST['unique_id'] : "" );
|
34 |
$allowed_patterns = explode(",",$params["uploadpatterns"]);
|
35 |
foreach ($allowed_patterns as $key => $allowed_pattern) {
|
36 |
$allowed_patterns[$key] = trim($allowed_pattern);
|
37 |
}
|
38 |
$userdata_fields = $params["userdata_fields"];
|
39 |
foreach ( $userdata_fields as $userdata_key => $userdata_field )
|
40 |
-
$userdata_fields[$userdata_key]["value"] = ( isset($_POST[$hiddeninput.'_userdata_'.$userdata_key]) ? $_POST[$hiddeninput.'_userdata_'.$userdata_key] : "" );
|
41 |
$params_output_array["version"] = "full";
|
42 |
$params_output_array["general"]['shortcode_id'] = $sid;
|
43 |
$params_output_array["general"]['unique_id'] = $unique_id;
|
@@ -70,6 +69,8 @@ function wfu_process_files($params, $method) {
|
|
70 |
file_count: the number of files processed
|
71 |
filedata: message type, header, message and admin message of each file, encoded and separated by comma (,) */
|
72 |
$params_output_array["general"]['safe_output'] = "";
|
|
|
|
|
73 |
|
74 |
/* adjust $uploadedfile variable (holding file data) if this is a redirection caused because the browser of the user could not handle AJAX upload */
|
75 |
if ( isset($_FILES[$uploadedfile.'_redirected']) ) $uploadedfile .= '_redirected';
|
@@ -146,8 +147,14 @@ function wfu_process_files($params, $method) {
|
|
146 |
|
147 |
/* Get uploaded file size in Mbytes */
|
148 |
// correct file size in case of checking of file otherwise $upload_file_size will be zero and the routine will fail
|
149 |
-
if ( $only_check )
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
$upload_file_size_MB = $upload_file_size / 1024 / 1024;
|
152 |
|
153 |
$only_filename = $fileprops['name'];
|
@@ -171,7 +178,7 @@ function wfu_process_files($params, $method) {
|
|
171 |
$additional_data['page_id'] = $params["pageid"];
|
172 |
$ret_data = apply_filters('wfu_before_file_check', $changable_data, $additional_data);
|
173 |
$target_path = $ret_data['file_path'];
|
174 |
-
$
|
175 |
$userdata_fields = $ret_data['user_data'];
|
176 |
$filter_error_message = $ret_data['error_message'];
|
177 |
// if this is a file check, which means that a second pass of the file will follow, then we do not want to
|
@@ -186,7 +193,7 @@ function wfu_process_files($params, $method) {
|
|
186 |
// file data that may have previously changed because of application of filters
|
187 |
if ( $filedata_previously_defined ) {
|
188 |
$target_path = $_SESSION[$file_map]['filepath'];
|
189 |
-
$
|
190 |
$userdata_fields = $_SESSION[$file_map]['userdata'];
|
191 |
}
|
192 |
if ( $filter_error_message != '' ) {
|
@@ -196,10 +203,17 @@ function wfu_process_files($params, $method) {
|
|
196 |
}
|
197 |
else {
|
198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
/* if medialink or postlink is activated then the target path becomes the current wordpress upload folder */
|
200 |
if ( $params["medialink"] == "true" || $params["postlink"] == "true" ) {
|
201 |
$mediapath = wp_upload_dir();
|
202 |
-
$target_path = $mediapath['path'].'/'.$
|
203 |
}
|
204 |
/* Check if upload path exist */
|
205 |
if ( is_dir( wfu_basedir($target_path) ) ) {
|
@@ -217,9 +231,9 @@ function wfu_process_files($params, $method) {
|
|
217 |
}
|
218 |
|
219 |
/* File name control, reject files with .php and .js extension for security reasons */
|
220 |
-
if ( strtolower(substr($
|
221 |
foreach ($allowed_patterns as $allowed_pattern) {
|
222 |
-
if ( wfu_upload_plugin_wildcard_match( $allowed_pattern, $
|
223 |
$allowed_file_ok = true;
|
224 |
break ;
|
225 |
}
|
@@ -268,9 +282,6 @@ function wfu_process_files($params, $method) {
|
|
268 |
$file_output['message_type'] = "error";
|
269 |
$file_output['message'] = wfu_join_strings("<br />", $file_output['message'], $message_text);
|
270 |
}
|
271 |
-
//generate safe filename by removing invalid characters if forcefilename is deactivated
|
272 |
-
if ( $params['forcefilename'] != "true" ) $only_filename = wfu_upload_plugin_clean( $fileprops['name'] );
|
273 |
-
else $only_filename = $fileprops['name'];
|
274 |
|
275 |
$message_processed = false;
|
276 |
// if ( $upload_path_ok and $allowed_file_ok and $size_file_ok ) {
|
@@ -401,8 +412,8 @@ function wfu_process_files($params, $method) {
|
|
401 |
/* prepare redirect link if redirection is enabled */
|
402 |
if ( $params["redirect"] == "true" ) {
|
403 |
/* Define dynamic redirect link from variables */
|
404 |
-
$search = array ('/%filename%/');
|
405 |
-
$replace = array ($only_filename);
|
406 |
$params_output_array["general"]['redirect_link'] = trim(preg_replace($search, $replace, $params["redirectlink"]));
|
407 |
}
|
408 |
|
@@ -494,19 +505,43 @@ function wfu_process_files($params, $method) {
|
|
494 |
|
495 |
$params_output_array[0] = $file_output;
|
496 |
|
497 |
-
/* Apply wfu_after_file_upload action after failed upload, in order to allow the user to perform any post-upload actions.
|
498 |
-
If additional data are required, such as user_id or userdata values or filepath, they can be retrieved by implementing
|
499 |
-
the previous filters wfu_before_file_check and wfu_before_file_upload, corresponding them to the unique file id */
|
500 |
if ( $file_unique_id != '' && $file_finished_unsuccessfully && !$ignore_server_actions ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
do_action('wfu_after_file_upload', $file_unique_id, $file_output['message_type'], $file_output['message'], $file_output['admin_messages']);
|
502 |
}
|
503 |
|
504 |
-
/* log file upload action if file has finished uploading successfully */
|
505 |
if ( $file_finished_successfully && !$ignore_server_actions ) {
|
506 |
-
|
507 |
-
|
|
|
508 |
If additional data are required, such as user_id or userdata values or filepath, they can be retrieved by implementing
|
509 |
-
the previous filters wfu_before_file_check and wfu_before_file_upload, corresponding them to the unique file id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
do_action('wfu_after_file_upload', $file_unique_id, $file_output['message_type'], $file_output['message'], $file_output['admin_messages']);
|
511 |
}
|
512 |
|
16 |
$user_email = $user->user_email;
|
17 |
$is_admin = current_user_can('manage_options');
|
18 |
}
|
19 |
+
$unique_id = sanitize_text_field($_POST['uniqueuploadid_'.$sid]);
|
20 |
// determine if this routine is only for checking the file
|
21 |
$only_check = ( isset($_POST['only_check']) ? ( $_POST['only_check'] == "1" ) : false );
|
22 |
|
30 |
$notify_attachment_list = "";
|
31 |
$uploadedfile = 'uploadedfile_'.$sid;
|
32 |
$hiddeninput = 'hiddeninput_'.$sid;
|
|
|
33 |
$allowed_patterns = explode(",",$params["uploadpatterns"]);
|
34 |
foreach ($allowed_patterns as $key => $allowed_pattern) {
|
35 |
$allowed_patterns[$key] = trim($allowed_pattern);
|
36 |
}
|
37 |
$userdata_fields = $params["userdata_fields"];
|
38 |
foreach ( $userdata_fields as $userdata_key => $userdata_field )
|
39 |
+
$userdata_fields[$userdata_key]["value"] = ( isset($_POST[$hiddeninput.'_userdata_'.$userdata_key]) ? sanitize_text_field($_POST[$hiddeninput.'_userdata_'.$userdata_key]) : "" );
|
40 |
$params_output_array["version"] = "full";
|
41 |
$params_output_array["general"]['shortcode_id'] = $sid;
|
42 |
$params_output_array["general"]['unique_id'] = $unique_id;
|
69 |
file_count: the number of files processed
|
70 |
filedata: message type, header, message and admin message of each file, encoded and separated by comma (,) */
|
71 |
$params_output_array["general"]['safe_output'] = "";
|
72 |
+
/* js_script is javascript code that is executed after each file upload and is defined in wfu_after_file_upload action */
|
73 |
+
$params_output_array["general"]['js_script'] = "";
|
74 |
|
75 |
/* adjust $uploadedfile variable (holding file data) if this is a redirection caused because the browser of the user could not handle AJAX upload */
|
76 |
if ( isset($_FILES[$uploadedfile.'_redirected']) ) $uploadedfile .= '_redirected';
|
147 |
|
148 |
/* Get uploaded file size in Mbytes */
|
149 |
// correct file size in case of checking of file otherwise $upload_file_size will be zero and the routine will fail
|
150 |
+
if ( $only_check ) {
|
151 |
+
$upload_file_size = $fileprops['size'];
|
152 |
+
if ( $upload_file_size == 0 ) $upload_file_size ++;
|
153 |
+
}
|
154 |
+
else {
|
155 |
+
$upload_file_size = filesize($fileprops['tmp_name']);
|
156 |
+
if ( $upload_file_size == 0 && file_exists($fileprops['tmp_name']) && $fileprops['error'] == 0 ) $upload_file_size ++;
|
157 |
+
}
|
158 |
$upload_file_size_MB = $upload_file_size / 1024 / 1024;
|
159 |
|
160 |
$only_filename = $fileprops['name'];
|
178 |
$additional_data['page_id'] = $params["pageid"];
|
179 |
$ret_data = apply_filters('wfu_before_file_check', $changable_data, $additional_data);
|
180 |
$target_path = $ret_data['file_path'];
|
181 |
+
$only_filename = wfu_basename($target_path);
|
182 |
$userdata_fields = $ret_data['user_data'];
|
183 |
$filter_error_message = $ret_data['error_message'];
|
184 |
// if this is a file check, which means that a second pass of the file will follow, then we do not want to
|
193 |
// file data that may have previously changed because of application of filters
|
194 |
if ( $filedata_previously_defined ) {
|
195 |
$target_path = $_SESSION[$file_map]['filepath'];
|
196 |
+
$only_filename = wfu_basename($target_path);
|
197 |
$userdata_fields = $_SESSION[$file_map]['userdata'];
|
198 |
}
|
199 |
if ( $filter_error_message != '' ) {
|
203 |
}
|
204 |
else {
|
205 |
|
206 |
+
/* generate safe filename by removing invalid characters if forcefilename is deactivated */
|
207 |
+
if ( $params['forcefilename'] != "true" ) {
|
208 |
+
$only_filename = wfu_upload_plugin_clean( $only_filename );
|
209 |
+
//reconstruct target_path
|
210 |
+
$target_path = wfu_basedir($target_path).$only_filename;
|
211 |
+
}
|
212 |
+
|
213 |
/* if medialink or postlink is activated then the target path becomes the current wordpress upload folder */
|
214 |
if ( $params["medialink"] == "true" || $params["postlink"] == "true" ) {
|
215 |
$mediapath = wp_upload_dir();
|
216 |
+
$target_path = $mediapath['path'].'/'.$only_filename;
|
217 |
}
|
218 |
/* Check if upload path exist */
|
219 |
if ( is_dir( wfu_basedir($target_path) ) ) {
|
231 |
}
|
232 |
|
233 |
/* File name control, reject files with .php and .js extension for security reasons */
|
234 |
+
if ( strtolower(substr($only_filename, -4)) != ".php" && strtolower(substr($only_filename, -3)) != ".js" )
|
235 |
foreach ($allowed_patterns as $allowed_pattern) {
|
236 |
+
if ( wfu_upload_plugin_wildcard_match( $allowed_pattern, $only_filename) ) {
|
237 |
$allowed_file_ok = true;
|
238 |
break ;
|
239 |
}
|
282 |
$file_output['message_type'] = "error";
|
283 |
$file_output['message'] = wfu_join_strings("<br />", $file_output['message'], $message_text);
|
284 |
}
|
|
|
|
|
|
|
285 |
|
286 |
$message_processed = false;
|
287 |
// if ( $upload_path_ok and $allowed_file_ok and $size_file_ok ) {
|
412 |
/* prepare redirect link if redirection is enabled */
|
413 |
if ( $params["redirect"] == "true" ) {
|
414 |
/* Define dynamic redirect link from variables */
|
415 |
+
$search = array ('/%filename%/', '/%username%/');
|
416 |
+
$replace = array ($only_filename, $user_login);
|
417 |
$params_output_array["general"]['redirect_link'] = trim(preg_replace($search, $replace, $params["redirectlink"]));
|
418 |
}
|
419 |
|
505 |
|
506 |
$params_output_array[0] = $file_output;
|
507 |
|
|
|
|
|
|
|
508 |
if ( $file_unique_id != '' && $file_finished_unsuccessfully && !$ignore_server_actions ) {
|
509 |
+
/* Apply wfu_after_file_upload filter after failed upload, in order to allow the user to perform any post-upload actions.
|
510 |
+
If additional data are required, such as user_id or userdata values or filepath, they can be retrieved by implementing
|
511 |
+
the previous filters wfu_before_file_check and wfu_before_file_upload, corresponding them to the unique file id.
|
512 |
+
This actions allows to define custom javascript code to run after each file finishes (either suceeded or failed).
|
513 |
+
For backward compatibility, the wfu_after_file_upload action that was implemented in previous version of the plugin
|
514 |
+
still remains. */
|
515 |
+
$changable_data['ret_value'] = null;
|
516 |
+
$changable_data['js_script'] = '';
|
517 |
+
$additional_data['shortcode_id'] = $sid;
|
518 |
+
$additional_data['file_unique_id'] = $file_unique_id;
|
519 |
+
$additional_data['upload_result'] = $file_output['message_type'];
|
520 |
+
$additional_data['error_message'] = $file_output['message'];
|
521 |
+
$additional_data['admin_messages'] = $file_output['admin_messages'];
|
522 |
+
$ret_data = apply_filters('wfu_after_file_upload', $changable_data, $additional_data);
|
523 |
+
$params_output_array["general"]['js_script'] = $ret_data['js_script'];
|
524 |
do_action('wfu_after_file_upload', $file_unique_id, $file_output['message_type'], $file_output['message'], $file_output['admin_messages']);
|
525 |
}
|
526 |
|
|
|
527 |
if ( $file_finished_successfully && !$ignore_server_actions ) {
|
528 |
+
/* log file upload action if file has finished uploading successfully */
|
529 |
+
wfu_log_action('upload', $target_path, $user->ID, $unique_id, $params['pageid'], $sid, $userdata_fields);
|
530 |
+
/* Apply wfu_after_file_upload filter after failed upload, in order to allow the user to perform any post-upload actions.
|
531 |
If additional data are required, such as user_id or userdata values or filepath, they can be retrieved by implementing
|
532 |
+
the previous filters wfu_before_file_check and wfu_before_file_upload, corresponding them to the unique file id.
|
533 |
+
This actions allows to define custom javascript code to run after each file finishes (either suceeded or failed).
|
534 |
+
For backward compatibility, the wfu_after_file_upload action that was implemented in previous version of the plugin
|
535 |
+
still remains. */
|
536 |
+
$changable_data['ret_value'] = null;
|
537 |
+
$changable_data['js_script'] = '';
|
538 |
+
$additional_data['shortcode_id'] = $sid;
|
539 |
+
$additional_data['file_unique_id'] = $file_unique_id;
|
540 |
+
$additional_data['upload_result'] = $file_output['message_type'];
|
541 |
+
$additional_data['error_message'] = $file_output['message'];
|
542 |
+
$additional_data['admin_messages'] = $file_output['admin_messages'];
|
543 |
+
$ret_data = apply_filters('wfu_after_file_upload', $changable_data, $additional_data);
|
544 |
+
$params_output_array["general"]['js_script'] = $ret_data['js_script'];
|
545 |
do_action('wfu_after_file_upload', $file_unique_id, $file_output['message_type'], $file_output['message'], $file_output['admin_messages']);
|
546 |
}
|
547 |
|
readme.txt
CHANGED
@@ -28,7 +28,6 @@ The characteristics of the plugin are:
|
|
28 |
* You can have more than one instances of the shortcode in the same page.
|
29 |
* It includes an overall upload progress bar.
|
30 |
* It supports multilingual characters and localization.
|
31 |
-
* It integrates with WP-Filebase plugin.
|
32 |
* Uploaded files can be added to Media or be attached to the current page.
|
33 |
* It is highly customizable with many (more than 50) options.
|
34 |
* It produces notification messages and e-mails.
|
@@ -40,6 +39,11 @@ The characteristics of the plugin are:
|
|
40 |
* It supports logging of upload events or management of files, which can be viewed by admins through the Dashboard.
|
41 |
* It includes a file browser in the Dashboard, from where admins can view the uploaded file and manage them.
|
42 |
|
|
|
|
|
|
|
|
|
|
|
43 |
Please note that old desktop browsers or mobile browsers may not support all of the above functionalities. In order to get full functionality use the latest versions browsers, supporting HTML5, AJAX and CSS3.
|
44 |
|
45 |
For additional features, such as multiple file upload, very large file upload, drag and drop of files, captcha, detailed upload progress bars, image gallery and custom css please consider [Wordpress File Upload Professional](http://www.iptanus.com/support/wordpress-file-upload/ "Wordpress File Upload support page").
|
@@ -81,6 +85,10 @@ Yes, but not in the free version. If you want to allow multiple file uploads, pl
|
|
81 |
|
82 |
Files by default are uploaded inside wp-content directory of your Wordpress website. To change it use attribute uploadpath.
|
83 |
|
|
|
|
|
|
|
|
|
84 |
= Are there filters to restrict uploaded content? =
|
85 |
|
86 |
Yes, you can control allowed file size and file extensions by using the appropriate attribute (see Other Notes section).
|
@@ -117,6 +125,21 @@ In the free version the upload will fail. However in the Pro version the upload
|
|
117 |
|
118 |
== Changelog ==
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
= 2.7.3 =
|
121 |
* important bug fix in Pro version
|
122 |
* added wfu_before_email_notification filter
|
@@ -405,6 +428,9 @@ Initial version.
|
|
405 |
|
406 |
== Upgrade Notice ==
|
407 |
|
|
|
|
|
|
|
408 |
= 2.7.3 =
|
409 |
Upgrade to add some new features and address some bugs.
|
410 |
|
@@ -720,7 +746,7 @@ For the time being, the following variables are supported:
|
|
720 |
|
721 |
* **%userid%:** Is replaced by the id of the current user. Can be used inside attribute *uploadpath*.
|
722 |
* **%username%:** Is replaced by the username of the current user. Can be used inside attributes *uploadpath*, *notifysubject* and *notifymessage*.
|
723 |
-
* **%useremail%:** Is replaced by the email of the current user. Can be used inside attributes *notifyrecipients*, *notifysubject* and *
|
724 |
* **%filename%:** Is replaced by the filename (not including path information) of the uploaded file. Can be used inside attributes *notifysubject*, *notifymessage*, *successmessage* and *redirectlink*.
|
725 |
* **%filepath%:** Is replaced by the filepath (full path and filename) of the uploaded file. Can be used inside attributes *notifysubject*, *notifymessage* and *successmessage*.
|
726 |
* **%blogid%:** Is replaced by the blog_id of the current site. Can be used inside attribute *uploadpath*, *notifysubject* and *notifymessage*.
|
@@ -759,7 +785,6 @@ add_filter('wfu_before_file_check', 'wfu_before_file_check_handler', 10, 2);
|
|
759 |
// file_size: the size of the uploaded file
|
760 |
// user_id: the id of the user that submitted the file for upload
|
761 |
// page_id: the id of the page from where the upload was performed (because there may be upload plugins in more than one page)
|
762 |
-
// shortcode_id: the id of the upload plugin (because more than one upload plugins can exist in the same page)
|
763 |
//The function must return the final $changable_data.
|
764 |
function wfu_before_file_check_handler($changable_data, $additional_data) {
|
765 |
// Add code here...
|
@@ -813,6 +838,33 @@ function wfu_before_email_notification_handler($changable_data, $additional_data
|
|
813 |
}
|
814 |
`
|
815 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
816 |
The following actions are supported:
|
817 |
|
818 |
**wfu_after_file_upload**
|
@@ -821,15 +873,16 @@ It is executed after the upload process for each individual file has finished, i
|
|
821 |
|
822 |
`
|
823 |
add_action('wfu_after_file_upload', 'wfu_after_file_upload_handler', 10, 4);
|
|
|
824 |
|
825 |
//The following function takes four parameters, $file_unique_id, $upload_result, $error_message and $error_admin_messages.
|
826 |
// $file_unique_id is is unique for each individual file upload and can be used to identify each separate upload.
|
827 |
-
// $upload_result is
|
828 |
// success: the upload was successful
|
829 |
// warning: the upload was successful but with warning messages
|
830 |
// error: the upload failed
|
831 |
-
// $error_message: contains
|
832 |
-
// $admin_messages: contains
|
833 |
//If additional data are required (such as user id, userdata or filename) you can get them by implementing the previous filters
|
834 |
//wfu_before_file_check or wfu_before_file_upload and link both filters by $file_unique_id parameter.
|
835 |
function wfu_after_file_upload_handler($file_unique_id, $upload_result, $error_message, $error_admin_messages) {
|
28 |
* You can have more than one instances of the shortcode in the same page.
|
29 |
* It includes an overall upload progress bar.
|
30 |
* It supports multilingual characters and localization.
|
|
|
31 |
* Uploaded files can be added to Media or be attached to the current page.
|
32 |
* It is highly customizable with many (more than 50) options.
|
33 |
* It produces notification messages and e-mails.
|
39 |
* It supports logging of upload events or management of files, which can be viewed by admins through the Dashboard.
|
40 |
* It includes a file browser in the Dashboard, from where admins can view the uploaded file and manage them.
|
41 |
|
42 |
+
The plugin is translated in the following languages:
|
43 |
+
|
44 |
+
* French, kindly provided by Thomas Bastide of http://www.omicronn.fr/
|
45 |
+
* Serbian, kindly provided by Andrijana Nikolic of http://webhostinggeeks.com/
|
46 |
+
|
47 |
Please note that old desktop browsers or mobile browsers may not support all of the above functionalities. In order to get full functionality use the latest versions browsers, supporting HTML5, AJAX and CSS3.
|
48 |
|
49 |
For additional features, such as multiple file upload, very large file upload, drag and drop of files, captcha, detailed upload progress bars, image gallery and custom css please consider [Wordpress File Upload Professional](http://www.iptanus.com/support/wordpress-file-upload/ "Wordpress File Upload support page").
|
85 |
|
86 |
Files by default are uploaded inside wp-content directory of your Wordpress website. To change it use attribute uploadpath.
|
87 |
|
88 |
+
= Can I see and download the uploaded files? =
|
89 |
+
|
90 |
+
Administrators can view all uploaded files together with associated field data from the plugin's Settings in Dashboard. There is also an article in www.iptanus.com for enabling a front-end file browser for logged users or guests. Better browsing capabilities under currently under development.
|
91 |
+
|
92 |
= Are there filters to restrict uploaded content? =
|
93 |
|
94 |
Yes, you can control allowed file size and file extensions by using the appropriate attribute (see Other Notes section).
|
125 |
|
126 |
== Changelog ==
|
127 |
|
128 |
+
= 2.7.4 =
|
129 |
+
* added Serbian translation thanks to Andrijana Nikolic from http://webhostinggeeks.com/
|
130 |
+
* bug fix with %blogid%, %pageid% and %pagetitle% that where not implemented in notification emails
|
131 |
+
* in single button operation selected files are removed in case that a subfolder has not been previously selected or a required user field has not been populated
|
132 |
+
* bug fixed in single file operation that allowed selection of multiple files through drag-and-drop
|
133 |
+
* bug fixed with files over 1MB that got corrupted when maintaining files with same filename
|
134 |
+
* dummy (test) Shortcode Composer button removed from the plugin's Settings as it is no longer useful
|
135 |
+
* added support for empty (zero size) files
|
136 |
+
* many code optimizations and security enhancements
|
137 |
+
* fixed javascript errors in IE8 that were breaking upload operation
|
138 |
+
* code improvements to avoid display of session warnings
|
139 |
+
* added %username% in redirect link
|
140 |
+
* added option in plugin's Settings in Dashboard to select alternative POST Upload method, in order to resolve errors like "http:// wrapper is disabled in the server configuration by allow_url_fopen" or "Call to undefined function curl_init()"
|
141 |
+
* added filter action wfu_after_upload, where the admin can define additional javascript code to be executed on user's browser after each file is finished
|
142 |
+
|
143 |
= 2.7.3 =
|
144 |
* important bug fix in Pro version
|
145 |
* added wfu_before_email_notification filter
|
428 |
|
429 |
== Upgrade Notice ==
|
430 |
|
431 |
+
= 2.7.4 =
|
432 |
+
Upgrade to add some new features and address some bugs.
|
433 |
+
|
434 |
= 2.7.3 =
|
435 |
Upgrade to add some new features and address some bugs.
|
436 |
|
746 |
|
747 |
* **%userid%:** Is replaced by the id of the current user. Can be used inside attribute *uploadpath*.
|
748 |
* **%username%:** Is replaced by the username of the current user. Can be used inside attributes *uploadpath*, *notifysubject* and *notifymessage*.
|
749 |
+
* **%useremail%:** Is replaced by the email of the current user. Can be used inside attributes *notifyrecipients*, *notifysubject*, *notifymessage* and *redirectlink*.
|
750 |
* **%filename%:** Is replaced by the filename (not including path information) of the uploaded file. Can be used inside attributes *notifysubject*, *notifymessage*, *successmessage* and *redirectlink*.
|
751 |
* **%filepath%:** Is replaced by the filepath (full path and filename) of the uploaded file. Can be used inside attributes *notifysubject*, *notifymessage* and *successmessage*.
|
752 |
* **%blogid%:** Is replaced by the blog_id of the current site. Can be used inside attribute *uploadpath*, *notifysubject* and *notifymessage*.
|
785 |
// file_size: the size of the uploaded file
|
786 |
// user_id: the id of the user that submitted the file for upload
|
787 |
// page_id: the id of the page from where the upload was performed (because there may be upload plugins in more than one page)
|
|
|
788 |
//The function must return the final $changable_data.
|
789 |
function wfu_before_file_check_handler($changable_data, $additional_data) {
|
790 |
// Add code here...
|
838 |
}
|
839 |
`
|
840 |
|
841 |
+
**wfu_before_file_check**
|
842 |
+
|
843 |
+
It is executed before file is uploaded and before any internal file checks, in order to allow the filter to perform its own checks or change some basic upload parameters, such as filename or userdata. You can use it as follows:
|
844 |
+
|
845 |
+
`
|
846 |
+
add_filter('wfu_after_file_upload', 'wfu_after_file_upload_handler', 10, 2);
|
847 |
+
|
848 |
+
//The following function takes two parameters, $changable_data and $additional_data.
|
849 |
+
// $changable_data is an array that can be modified by the filter and contains the items:
|
850 |
+
// ret_value: not used for the moment, it exists for future additions
|
851 |
+
// js_script: javascript code to be executed on the client's browser after each file is uploaded
|
852 |
+
// $additional_data is an array with additional data to be used by the filter (but cannot be modified) as follows:
|
853 |
+
// shortcode_id: this is the id of the plugin, as set using uploadid attribute; it can be used to apply this filter only to a specific instance of the plugin (if it is used in more than one pages or posts)
|
854 |
+
// file_unique_id: this id is unique for each individual file upload and can be used to identify each separate upload
|
855 |
+
// upload_result is the result of the upload process:
|
856 |
+
// success: the upload was successful
|
857 |
+
// warning: the upload was successful but with warning messages
|
858 |
+
// error: the upload failed
|
859 |
+
// error_message: contains warning or error messages generated during the upload process
|
860 |
+
// admin_messages: contains detailed error messages for administrators generated during the upload process
|
861 |
+
//The function must return the final $changable_data.
|
862 |
+
function wfu_after_file_upload_handler($changable_data, $additional_data) {
|
863 |
+
// Add code here...
|
864 |
+
return $changable_data;
|
865 |
+
}
|
866 |
+
`
|
867 |
+
|
868 |
The following actions are supported:
|
869 |
|
870 |
**wfu_after_file_upload**
|
873 |
|
874 |
`
|
875 |
add_action('wfu_after_file_upload', 'wfu_after_file_upload_handler', 10, 4);
|
876 |
+
(It is noted that this action will be removed in future version of the plugin, it is here only for compatibility with previous versions of the plugin, please use wfu_after_file_upload filter instead)
|
877 |
|
878 |
//The following function takes four parameters, $file_unique_id, $upload_result, $error_message and $error_admin_messages.
|
879 |
// $file_unique_id is is unique for each individual file upload and can be used to identify each separate upload.
|
880 |
+
// $upload_result is the result of the upload process:
|
881 |
// success: the upload was successful
|
882 |
// warning: the upload was successful but with warning messages
|
883 |
// error: the upload failed
|
884 |
+
// $error_message: contains warning or error messages generated during the upload process
|
885 |
+
// $admin_messages: contains detailed error messages for administrators generated during the upload process
|
886 |
//If additional data are required (such as user id, userdata or filename) you can get them by implementing the previous filters
|
887 |
//wfu_before_file_check or wfu_before_file_upload and link both filters by $file_unique_id parameter.
|
888 |
function wfu_after_file_upload_handler($file_unique_id, $upload_result, $error_message, $error_admin_messages) {
|
release_notes.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<span><strong>Latest release notes: </strong>
|
2 |
<!--
|
3 |
-->
|
1 |
+
<span><strong>Latest release notes: </strong>This version introduces a new filter, <strong>wfu_after_file_upload</strong>, that is executed right after a file is uploaded for executing custom tasks and extending the plugin's capabilities. It replaces the action wfu_after_file_upload that existed for the same reason, however through the filter javascript code can be defined that will be executed at the client's browser after each file is uploaded.<br />This version introduces also a new option in Settings to select the POST method. This options resolves errors like <em>"http:// wrapper is disabled in the server configuration by allow_url_fopen"</em> or <em>"Call to undefined function curl_init()"</em> that may appear in some server environments.<br />In addition, Serbian translation was added thanks to Andrijana Nikolic from </span><a href="http://webhostinggeeks.com">webhostinggeeks</a><span>. </span><span style="text-decoration:underline;"><strong>Translations in other languages are more than welcome!</strong></span>
|
2 |
<!--
|
3 |
-->
|
wfu_file_downloader.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
session_start();
|
3 |
include_once( dirname(__FILE__).'/lib/wfu_functions.php' );
|
4 |
wfu_download_file();
|
5 |
|
1 |
<?php
|
2 |
+
if( !session_id() ) { session_start(); }
|
3 |
include_once( dirname(__FILE__).'/lib/wfu_functions.php' );
|
4 |
wfu_download_file();
|
5 |
|
wfu_response.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
This script runs every time the user presses the upload button in order to inform the page that
|
4 |
-
it should process the file upload data (stored in $_FILES variable) when the page reloads
|
5 |
-
*/
|
6 |
-
session_start();
|
7 |
-
|
8 |
-
if ( isset($_GET['shortcode_id']) && isset($_GET['session_token']) ) {
|
9 |
-
//sanitize variables
|
10 |
-
$sid = filter_var($_GET['shortcode_id'], FILTER_SANITIZE_STRING);
|
11 |
-
$session_token = filter_var($_GET['session_token'], FILTER_SANITIZE_STRING);
|
12 |
-
//check referer using server sessions to avoid CSRF attacks
|
13 |
-
if ( $_SESSION["wfu_token_".$sid] != $session_token ) die();
|
14 |
-
if ( isset($_GET['start_time']) ) {
|
15 |
-
$_SESSION['wfu_check_refresh_'.$_GET['shortcode_id']] = 'form button pressed';
|
16 |
-
$_SESSION['wfu_start_time_'.$_GET['shortcode_id']] = $_GET['start_time'];
|
17 |
-
|
18 |
-
die("wfu_response_success:");
|
19 |
-
}
|
20 |
-
}
|
21 |
-
die();
|
22 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wordpress_file_upload.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
-
session_start();
|
3 |
/*Plugin Name: Wordpress File Upload
|
4 |
/*
|
5 |
Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
|
6 |
Description: Simple interface to upload files from a page.
|
7 |
-
Version: 2.7.
|
8 |
Author: Nickolas Bossinas
|
9 |
Author URI: http://www.iptanus.com
|
10 |
*/
|
@@ -308,18 +308,24 @@ function wordpress_file_upload_function($incomingfromhandler) {
|
|
308 |
elseif ( $code == "1" || $code == "2" || $code == "3" ) $params['adminerrors'] = constant('WFU_ERROR_REDIRECTION_ERRORCODE'.$code);
|
309 |
else $params['adminerrors'] = WFU_ERROR_REDIRECTION_ERRORCODE0;
|
310 |
}
|
|
|
|
|
|
|
311 |
|
312 |
-
|
313 |
-
|
314 |
|
315 |
-
|
316 |
-
|
317 |
-
|
|
|
318 |
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
|
|
|
|
|
323 |
$wordpress_file_upload_output .= wfu_post_plugin_actions($params);
|
324 |
return $wordpress_file_upload_output."\n";
|
325 |
}
|
1 |
<?php
|
2 |
+
if( !session_id() ) { session_start(); }
|
3 |
/*Plugin Name: Wordpress File Upload
|
4 |
/*
|
5 |
Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
|
6 |
Description: Simple interface to upload files from a page.
|
7 |
+
Version: 2.7.4
|
8 |
Author: Nickolas Bossinas
|
9 |
Author URI: http://www.iptanus.com
|
10 |
*/
|
308 |
elseif ( $code == "1" || $code == "2" || $code == "3" ) $params['adminerrors'] = constant('WFU_ERROR_REDIRECTION_ERRORCODE'.$code);
|
309 |
else $params['adminerrors'] = WFU_ERROR_REDIRECTION_ERRORCODE0;
|
310 |
}
|
311 |
+
|
312 |
+
$unique_id = ( isset($_POST['uniqueuploadid_'.$sid]) ? sanitize_text_field($_POST['uniqueuploadid_'.$sid]) : "" );
|
313 |
+
if ( strlen($unique_id) == 10 ) {
|
314 |
|
315 |
+
$params['subdir_selection_index'] = -1;
|
316 |
+
if ( isset( $_POST[$hiddeninput] ) ) $params['subdir_selection_index'] = sanitize_text_field($_POST[$hiddeninput]);
|
317 |
|
318 |
+
$wfu_process_file_array = wfu_process_files($params, 'no_ajax');
|
319 |
+
$safe_output = $wfu_process_file_array["general"]['safe_output'];
|
320 |
+
unset($wfu_process_file_array["general"]['safe_output']);
|
321 |
+
unset($wfu_process_file_array["general"]['js_script']);
|
322 |
|
323 |
+
$wfu_process_file_array_str = wfu_encode_array_to_string($wfu_process_file_array);
|
324 |
+
$ProcessUploadComplete_functiondef = 'function(){wfu_ProcessUploadComplete('.$sid.', 1, "'.$wfu_process_file_array_str.'", "no-ajax", "", "", "'.$safe_output.'", ["false", "", "false"]);}';
|
325 |
+
$wordpress_file_upload_output .= '<script type="text/javascript">window.onload='.$ProcessUploadComplete_functiondef.'</script>';
|
326 |
|
327 |
+
}
|
328 |
+
|
329 |
$wordpress_file_upload_output .= wfu_post_plugin_actions($params);
|
330 |
return $wordpress_file_upload_output."\n";
|
331 |
}
|