WordPress File Upload - Version 4.7.0

Version Description

  • added Uploaded Files top-level Dashboard menu item, showing all the uploaded files and highlighting the new ones
  • added Portuguese translation from Rui Alao
  • checked and verified compatibility with Gutenberg
  • plugin initialization actions moved to plugins_loaded filter
  • fixed bug clearing userdata fields when Select File is pressed
  • File Browser and View Log tables modified to become more responsive especially for small screens
Download this release

Release Info

Developer nickboss
Plugin Icon 128x128 WordPress File Upload
Version 4.7.0
Comparing to
See all releases

Code changes from version 4.6.2 to 4.7.0

css/wordpress_file_upload_adminstyle.css CHANGED
@@ -1 +1 @@
1
- div.wfu_help_container,div.wfu_restore_container,div.wfu_shortcode_container,div.wfu_td_div{background:0 0;border:none;padding:0;position:relative}select.wfu_variable,span.wfu_variable{font-size:smaller;color:#333;-webkit-touch-callout:none;-khtml-user-select:none;cursor:default}.wfu_conquestions_optable,.wfu_logactions_table,.wfu_permissions_table{border-collapse:collapse}.wfu_cleanlog_proceed.disabled,.wfu_frozen{pointer-events:none}div.wfu_shortcode_container{display:inline-block;width:50%;margin:0}div.wfu_container input.wfu_long_text,textarea.wfu_shortcode{width:100%}div.wfu_container{margin-top:10px}div.wfu_help_container{display:inline-block;top:4px;margin:0}div.wfu_help_container img{visibility:hidden}table.wfu_inner_table th:hover div.wfu_help_container img,table.wfu_main_table th:hover div.wfu_help_container img{visibility:visible}div.wfu_restore_container{display:inline-block;top:4px;margin:0}div.wfu_restore_container img{visibility:hidden}div.wfu_mchecklist_item:hover img,table.wfu_inner_table th:hover div.wfu_restore_container img,table.wfu_main_table th:hover div.wfu_restore_container img{visibility:visible}div.wfu_td_div{display:block;width:100%;height:100%;margin:0}div.wfu_container input.wfu_short_text{width:60px}div.wfu_container input{width:200px}div.wfu_container input[type=checkbox]{width:auto}div.wfu_container textarea{width:100%}table.wfu_main_table{table-layout:fixed}table.wfu_main_table tr:nth-child(odd){background-color:#f4f4f4}table.wfu_main_table table.wfu_inner_table tr,table.wfu_main_table tr:nth-child(even){background-color:transparent}select.wfu_variable,span.wfu_variable,table.wfu_main_table tr.wfu_subcategory{background-color:#ddd}table.wfu_main_table th{width:17%}table.wfu_main_table td:nth-child(2){width:33%}table.wfu_main_table td:nth-child(3){width:50%}table.wfu_main_table table.wfu_inner_table th{width:34%}table.wfu_main_table table.wfu_inner_table td:nth-child(2){width:66%}table.wfu_main_table tr.wfu_subcategory>th{padding-top:0;padding-bottom:0}select.wfu_variable{padding:0;margin:0;height:auto;border:1px solid #ccc;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}span.wfu_variable{padding:1px;margin:0;border:1px solid #ccc;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.wfu_date_container{display:inline-block;position:relative;width:auto;height:100%;padding:0;margin:0;background:0 0;border:none}.wfu_datereset_button{position:absolute;right:4px;top:0;bottom:0;margin:auto 0;opacity:.5}.wfu_datereset_button:hover{opacity:1}span.wfu_ptext_span{display:inline-block;width:60px}select.wfu_select_folders{height:auto;min-width:75%}select.wfu_select_folders_empty{font-style:italic;color:silver}div.wfu_subfolders_inner_shadow{position:absolute;width:100%;height:100%;padding:0;margin:0;border:none;background-color:rgba(255,255,255,.8)}div.wfu_subfolder_nav_container,table.wfu_subfolder_nav,table.wfu_subfolder_nav td,table.wfu_subfolder_nav tr{background:0 0;margin:0;padding:0;border:none}option.wfu_select_folders_option_default{color:#00f}div.wfu_subfolder_nav_container{width:40px;display:inline-block;vertical-align:top}table.wfu_subfolder_nav{table-layout:fixed;width:100%;border-spacing:1px}table.wfu_subfolder_nav td{font-size:small;line-height:1;text-align:center}table.wfu_subfolder_nav button.button{margin:0;padding:0;width:17px;font-size:smaller;height:18px;line-height:1;color:#000;font-weight:700}.wfu_subfolder_tools_disabled,table.wfu_subfolder_nav button.button:disabled,table.wfu_subfolder_tools button.button:disabled{color:silver}.button.wfu_subfolder_nav_pressed,.button.wfu_subfolder_nav_pressed:focus,.button.wfu_subfolder_nav_pressed:hover{background:#4169e1}div.wfu_subfolder_tools_container{width:75%;margin:0;padding:0;border:none;background:0 0}table.wfu_subfolder_tools,table.wfu_subfolder_tools input{width:100%;padding:0;margin:0}table.wfu_subfolder_tools{table-layout:fixed;border:none;background:0 0}table.wfu_subfolder_tools tr{margin:0;padding:0;border:none;background:0 0}table.wfu_subfolder_tools td{margin:0;padding:0;border:none;background:0 0;font-size:smaller}table.wfu_subfolder_tools td div{margin:0;padding:0;border:none;background:0 0;position:relative}table.wfu_subfolder_tools label{display:block;padding:0;margin:0;line-height:1}table.wfu_subfolder_tools input:disabled{width:100%;padding:0;margin:0;color:silver}table.wfu_subfolder_tools button.button{margin:0;padding:1px 0 0;width:17px;font-size:smaller;height:17px;line-height:1;position:absolute;bottom:2px}table.wfu_subfolder_tools button.button:disabled img{opacity:.4}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container{position:absolute;width:150px;height:150px;margin:0;padding:0;z-index:100;border:1px solid silver;box-shadow:1px 1px 2px;background-color:#fff;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container table{table-layout:fixed;width:100%;height:100%;border:none;background:#eee;margin:0;padding:0;border-spacing:0;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container tr{border:none;background:0 0;margin:0;padding:0;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td{border:none;background:0 0;margin:0;padding:2px;line-height:0;overflow:hidden;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div{position:relative;border:none;background:0 0;margin:0;padding:0;width:100%;height:100%;display:inline-block;line-height:1}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div button.button{font-size:inherit;line-height:1;height:17px;padding:4px;position:relative;width:auto;margin:0;bottom:auto}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container select{width:100%;height:100%;top:0;bottom:0;position:absolute;margin:0}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container label{color:#222;font-weight:700;position:absolute;top:0;bottom:0;height:10px;margin:auto}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div button.button.wfu_folder_browser_cancel{width:17px;height:17px;position:absolute;right:0;top:0;margin:0;padding:0}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container{position:absolute;width:100%;height:100%;top:0;bottom:0;margin:0;padding:0;background-color:rgba(255,255,255,.9);text-align:center}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container label{position:relative;display:block}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container img{position:relative}.button.wfu_folder_browser_cancel img{vertical-align:top;margin-top:2px}div.wfu_mchecklist_container{display:inline-block;border:1px solid #ddd;border-radius:4px;padding:4px}div.wfu_mchecklist_item{display:inline-block}div.wfu_mchecklist_item label{vertical-align:baseline;margin-left:4px;cursor:default}div.wfu_mchecklist_item input:disabled+label{color:gray}div.wfu_mchecklist_item div{margin-left:4px}div.wfu_bloglist_checkbtn,div.wfu_mchecklist_checkall,div.wfu_postlist_checkbtn,div.wfu_rolelist_checkbtn,div.wfu_userlist_checkbtn{display:inline-block;vertical-align:top;margin:0 0 0 10px}table.wfu_bloglist_container,table.wfu_postlist_container,table.wfu_rolelist_container,table.wfu_stringmatch_container,table.wfu_userlist_container{border:none;background:0 0;margin:0;padding:0;border-spacing:0}table.wfu_bloglist_container tr:nth-child(odd),table.wfu_postlist_container tr:nth-child(odd),table.wfu_rolelist_container tr:nth-child(odd),table.wfu_userlist_container tr:nth-child(odd){border:none;background:0 0;margin:0;padding:0}table.wfu_bloglist_container td,table.wfu_postlist_container td,table.wfu_rolelist_container td,table.wfu_stringmatch_container td,table.wfu_userlist_container td{width:1%;border:none;background:0 0;margin:0;padding:0;vertical-align:top}table.wfu_postlist_container td{padding-right:20px}table.wfu_postlist_container td:last-child{padding-right:0}div.wfu_postlist_header{padding:0 10px}div.wfu_postlist_selectall{float:right}div.wfu_shadow{position:absolute;width:100%;height:100%;left:0;top:0;margin:0;padding:0;background-color:#fff;z-index:10;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";filter:alpha(opacity=60);-moz-opacity:.6;-khtml-opacity:.6;opacity:.6}table.wfu_main_table tr:nth-child(odd) div.wfu_shadow{background-color:#f4f4f4}div.wfu_onoff_container_off,div.wfu_onoff_container_on{display:inline-block;position:relative;padding:2px;border:1px solid #aaa;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;background:#066dab;background:-moz-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(6,109,171,1)),color-stop(100%,rgba(197,222,234,1)));background:-webkit-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-o-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-ms-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:linear-gradient(to bottom,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#066dab', endColorstr='#c5deea', GradientType=0 )}span.wfu_onoff_text{width:30px;display:inline-block;text-align:center;color:#FFF}div.wfu_onoff_slider{position:absolute;margin:0;width:31px;top:0;bottom:0;border:1px solid #fff;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 2px;-webkit-box-shadow:0 0 2px;box-shadow:0 0 2px;background:#ccc;background:-moz-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(204,204,204,1)),color-stop(100%,rgba(255,255,255,1)));background:-webkit-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-o-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-ms-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:linear-gradient(to bottom,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#ffffff', GradientType=0 )}div.wfu_onoff_container_on div.wfu_onoff_slider{left:50%}div.wfu_onoff_container_off div.wfu_onoff_slider{left:0}@-webkit-keyframes set_on{from{left:0}to{left:50%}}@-moz-keyframes set_on{from{left:0}to{left:50%}}@-o-keyframes set_on{from{left:0}to{left:50%}}@keyframes set_on{from{left:0}to{left:50%}}div.wfu_placements_wrapper{display:block;position:relative;margin:0;padding:0;background:0 0;border:none}div.wfu_placements_container{display:inline-block;position:relative;width:100%;height:300px;background-color:#fff;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;padding:0;overflow:scroll;font-size:0;line-height:0;white-space:nowrap}div.wfu_componentlist_container{display:inline-block;position:absolute;width:auto;height:auto;top:0;left:100%;background:0 0;border:none;margin:0 0 0 20px;padding:0;z-index:1;white-space:nowrap}div.wfu_component_box_container{display:inline-block;position:relative;width:80px;height:30px;background-color:transparent;border:1px solid transparent;padding:4px;margin:0;cursor:default}div.wfu_component_box,div.wfu_component_box_base{width:80px;height:30px;background-color:#ddd;padding:4px;cursor:default;font-size:12px;line-height:1;white-space:normal}div.wfu_component_box_base{display:block;position:absolute;left:-1px;top:-1px;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_component_box{display:inline-block;position:relative;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;z-index:1}div.wfu_component_box_inner{display:table;width:100%;height:100%}div.wfu_component_box_label{display:table-cell;text-align:center;vertical-align:middle}div.wfu_component_box_index{background-color:coral;padding:1px;float:right;border-radius:10px}div.wfu_inbase{display:block;position:absolute;left:-1px;top:-1px}div.wfu_component_box:hover{background-color:#eee;border:1px solid #bbb}div.wfu_component_box_selected{background-color:#aaa;border:1px solid #bbb}div.wfu_component_separator_hor,div.wfu_component_separator_ver{position:relative;background-color:transparent;border:1px solid transparent;z-index:1;cursor:default}div.wfu_component_box_dragged{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_component_separator_ver{display:inline-block;width:8px;height:26px;margin:6px -8px;padding:0 8px}div.wfu_component_separator_hor{display:block;width:100%;height:8px;margin:-8px 0;padding:8px 0}div.wfu_component_bar_hor,div.wfu_component_bar_ver{background-color:silver;border:none;display:none;position:absolute}div.wfu_component_bar_hor{width:auto;height:4px;left:10px;right:0;margin:11px 0 0;padding:0}div.wfu_component_bar_ver{width:4px;height:40px;margin:-6px 0 0 11px;padding:0}div.wfu_componentlist_dragdrop{position:absolute;width:100%;height:100%;left:0;top:0;background-color:#f8f8f8;border:4px dashed #aaa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;z-index:2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;opacity:.7}div.wfu_componentlist_dragdrop_dragover{border:4px dashed #555}div.wfu_formdata_container,div.wfu_userdata_container{display:block;position:relative;width:100%;height:100%;padding:0;margin:0;background:0 0;border:none}label.wfu_formdata_label{margin-right:6px}.wfu_formdata_props{padding-left:20px}div.wfu_formdata_action,div.wfu_userdata_action{display:inline-block;position:relative;top:2px;width:16px;height:16px;padding:0;margin:0;background:0 0;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_formdata_action:hover,div.wfu_userdata_action:hover{border:1px solid #aaa}div.wfu_formdata_action.wfu_formdata_action_disabled:hover,div.wfu_userdata_action.wfu_userdata_action_disabled:hover{border:1px solid transparent}div.wfu_formdata_action>img,div.wfu_userdata_action>img{width:12px;height:12px}div.wfu_formdata_action_disabled>img,div.wfu_userdata_action_disabled>img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_formdata_line_container,div.wfu_userdata_line{display:block;position:relative;padding:0;margin:0;background:0 0;border:none;white-space:nowrap}table.wfu_formdata_props_table{background:0 0;border:none;padding:0}table.wfu_formdata_props_table td,table.wfu_main_table table.wfu_inner_table table.wfu_formdata_props_table td{background:0 0;border:none;padding:0;width:auto}table.wfu_formdata_props_table td.wfu_formdata_props,table.wfu_main_table table.wfu_inner_table table.wfu_formdata_props_table td.wfu_formdata_props{padding-left:20px}div.wfu_color_container{display:block;position:relative;padding:0;margin:0;background:0 0;border:none;white-space:nowrap;z-index:1}.wfu_cleanlog_error.hidden,.wfu_cleanlog_tr,.wfu_consent_logactions,.wfu_consent_operations,.wfu_consent_permissions,.wfu_consent_questions,.wfu_consent_users,.wfu_plugin_operations,.wfu_selectdate_container,.wfu_selectdates_container,.wfu_selectperiod_container{display:none}span.wfu_save_label,span.wfu_save_label_fail{border-radius:6px;padding:1px 2px;box-shadow:1px 1px 1px;opacity:0;font-size:smaller}input[type=text].wp-color-picker{width:75px}input[type=button].wp-picker-clear{width:62px}span.wfu_save_label{background-color:#f0f8ff;color:#32cd32}span.wfu_save_label_fail{background-color:beige;color:#f08080}.wfu_conquestion_itemcontainer,.wfu_conquestions_opsel.wfu_forced_selection{opacity:.5}div.wfu_global_dialog_container{position:fixed;width:100%;height:100%;top:0;left:0;margin:0;padding:0;border:none;background:0 0;z-index:1;display:none}table.wfu_main_table table.wfu_columns_container{border:none;background:0 0;margin:0;padding:0;border-spacing:0}table.wfu_main_table table.wfu_columns_container tr{background:0 0}table.wfu_main_table table.wfu_columns_container td{border:none;background:0 0;margin:0;padding:0;vertical-align:top;width:auto}.wfu_buttons_container .button,.wfu_buttons_container .wfu_cleanlog_error,.wfu_pdheader_button,.wfu_selectdate_container input[type=text],.wfu_selectdate_container label,.wfu_selectdates_container input[type=text],.wfu_selectdates_container label,.wfu_selectperiod_container input[type=number],.wfu_selectperiod_container label,.wfu_selectperiod_container select{vertical-align:middle}table.wfu_main_table table.wfu_columnprops_container{border:none;background:0 0;margin:0;padding:6px;border-spacing:0;width:100%;box-shadow:0 0 1px #aaa}table.wfu_main_table table.wfu_columnprops_container tr{background:0 0}table.wfu_main_table table.wfu_columnprops_container td{border:none;background:0 0;margin:0;padding:0;vertical-align:middle;width:auto}table.wfu_main_table table.wfu_columnprops_container label.wfu_columnprops_label_disabled,table.wfu_main_table table.wfu_columnprops_container_disabled label{color:#ccc}button.wfu_columns_addbutton{font-size:smaller}option.wfu_columns_item_required{color:gray}.wfu_cleanlog_tr td{margin-top:0;padding-top:0}.wfu_buttons_container,.wfu_selectdate_container,.wfu_selectdates_container,.wfu_selectperiod_container{margin-top:10px}.wfu_selectdate_container input[type=text],.wfu_selectdates_container input[type=text]{width:8em;text-align:center}.wfu_selectperiod_container input[type=number]{width:4em}.wfu_cleanlog_error{color:red;font-size:small}.wfu_cleanlog_error:before{content:'!';font-weight:700;margin-right:2px}.wfu_conop_header,.wfu_pdop_header{transition:.4s;padding:6px}.wfu_conop_header label,.wfu_pdop_header label{font-weight:700;cursor:default}.wfu_conop_button,.wfu_pdheader_button,.wfu_pdop_button{color:#777;width:1em;height:1em;cursor:pointer;text-align:center}.wfu_conop_header.atomic label,.wfu_pdop_header.atomic label{font-weight:400}.wfu_pdheader_button{padding:2px;border:1px solid gray;border-radius:1em;position:relative;display:inline-block;font-size:smaller}.wfu_pdheader_button:after{content:'\02795';position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.wfu_conop_panel,.wfu_conop_topmost_panel,.wfu_pdop_panel,.wfu_pdop_topmost_panel{margin-left:40px;overflow:hidden}.wfu_pdheader_button.expanded:after{content:'\02796'}.wfu_conop_panel,.wfu_pdop_panel{display:none}.wfu_conop_level_1,.wfu_pdop_level_1{padding:10px;font-size:larger}.wfu_conop_level_2,.wfu_pdop_level_2{padding:6px;font-size:smaller}.wfu_conop_level_3,.wfu_conop_level_4,.wfu_conop_level_5,.wfu_pdop_level_3,.wfu_pdop_level_4,.wfu_pdop_level_5{padding:2px}.wfu_conop_header:hover,.wfu_pdop_header:hover{background-color:rgba(0,0,0,.2)}.wfu_conop_button,.wfu_pdop_button{float:right;padding:2px;border:1px solid gray;border-radius:4px;position:relative;display:none}.wfu_conop_button:after,.wfu_pdop_button:after{content:'\02795';position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;font-size:smaller}.wfu_conop_button.expanded:after,.wfu_pdop_button.expanded:after{content:'\02796'}.wfu_conop_header:hover .wfu_conop_button,.wfu_pdop_header:hover .wfu_pdop_button{display:block}input[type=checkbox].wfu_conop_selector,input[type=checkbox].wfu_pdop_selector{-webkit-appearance:checkbox;margin:0 0 0 4px}.wfu_conquestions_operations{margin-top:20px;margin-left:40px}.wfu_conquestions_operations label{display:block;font-size:larger;font-weight:700}.wfu_conquestions_oppanel{background-color:#fff;padding:10px;display:inline-block;margin-top:10px}.wfu_conquestions_optable tbody tr:hover{background-color:rgba(0,0,0,.1)}.wfu_conquestions_optable td{cursor:default}.wfu_conquestions_optable td:not(:first-child){text-align:center}.wfu_op_unassigned{background-color:#ffdb99}.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover{background-color:#e6c58a}.wfu_op_unassigned .wfu_conquestions_opinv,.wfu_op_unassigned .wfu_conquestions_opsel{background-color:#ffdb99}.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover .wfu_conquestions_opinv,.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover .wfu_conquestions_opsel{background-color:#e6c58a}.wfu_conquestions_container{margin-top:20px;margin-left:40px}.wfu_conquestion_header{font-size:larger}.wfu_conquestion_subcontainer{padding:10px}.wfu_conquestion_headerlabel{font-weight:700}.wfu_conquestion_tools{float:right}.wfu_conquestion_itemprops,.wfu_conquestion_itemspreview,.wfu_conquestion_mainprops{display:table-cell;position:relative;border:1px solid silver;padding:4ex 10px 10px;vertical-align:top;min-width:10em;min-height:4ex;resize:both;overflow:auto}.wfu_conquestion_itempropstitle,.wfu_conquestion_itemspreviewtitle,.wfu_conquestion_mainpropstitle{position:absolute;top:0;left:0;height:3ex;font-size:inherit;text-align:center;width:100%;background-color:rgba(0,0,0,.1)}.wfu_conquestion_displayedtitle,.wfu_conquestion_groupedlabel,.wfu_conquestion_labellabel,.wfu_conquestion_labellocationlabel,.wfu_conquestion_matrixlabel,.wfu_conquestion_preselectedlabel,.wfu_conquestion_titlelabel,.wfu_conquestion_titlelocationlabel,.wfu_conquestion_typelabel,.wfu_conquestion_visiblelabel{display:block}.wfu_conquestion_labeltext,.wfu_conquestion_titletext{width:100%}.wfu_conquestion_matrix_x,.wfu_conquestion_matrix_y{width:4em;text-align:center}.wfu_conquestion_matrixsep{width:1em;display:inline-block;text-align:center}.wfu_empty_label{font-style:italic}.wfu_conquestion_itemtable td:hover{background-color:rgba(0,0,0,.1)}.wfu_item_selected{background-color:rgba(0,0,0,.2)}.wfu_item_assigned{color:#00f}.wfu_item_visible{opacity:1}.wfu_conquestion_btn{display:inline-block;position:relative;width:16px;height:16px;padding:0;margin:0;background:0 0;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_conquestion_btn:hover{border:1px solid #aaa}.wfu_conquestion_btn>img{width:12px;height:12px;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto}.wfu_log_button,.wfu_perm_button{width:1.5ex;height:1.5ex;cursor:pointer;display:inline-block;vertical-align:middle;text-align:center}div.wfu_conquestion_btn.wfu_tool_disabled:hover{border:1px solid transparent}.wfu_conquestion_btn.wfu_tool_disabled>img{opacity:.4}.wfu_permissions_topmost_panel{margin-left:40px}.wfu_permissions_panel{background-color:#fff;padding:10px;display:inline-block;margin-top:20px}.wfu_perm_container{padding-right:20px}.wfu_location_cell{text-align:center}.wfu_perm_level_1{padding-left:0}.wfu_perm_level_2{padding-left:20px}.wfu_perm_level_3{padding-left:40px}.wfu_permissions_table td:nth-child(n+2),.wfu_permissions_table tr:nth-child(2) th{border-left:1px solid rgba(0,0,0,.1)}.wfu_perm_row:hover{background-color:rgba(0,0,0,.1)}.wfu_perm_button{color:#777;border:1px solid gray;position:relative}.wfu_perm_button:after{content:'+';position:absolute;left:0;right:0;top:-.75ex;bottom:0;margin:auto}.wfu_perm_button:hover{color:#000}.wfu_perm_button.expanded:after{content:'-'}input[type=checkbox].wfu_location_selector{-webkit-appearance:checkbox;margin:0}.wfu_logactions_topmost_panel{margin-left:40px}.wfu_logactions_panel{background-color:#fff;padding:10px;display:inline-block;margin-top:20px}.wfu_log_container{padding-right:20px}.wfu_entity_cell{text-align:center}.wfu_log_level_1{padding-left:0}.wfu_log_level_2{padding-left:20px}.wfu_log_level_3{padding-left:40px}.wfu_logactions_table td:nth-child(n+2),.wfu_logactions_table tr:nth-child(2) th{border-left:1px solid rgba(0,0,0,.1)}.wfu_log_row:hover{background-color:rgba(0,0,0,.1)}.wfu_log_button{color:#777;border:1px solid gray;position:relative}.wfu_log_button:after{content:'+';position:absolute;left:0;right:0;top:-.75ex;bottom:0;margin:auto}.wfu_log_button:hover{color:#000}.wfu_log_button.expanded:after{content:'-'}input[type=checkbox].wfu_entity_selector{-webkit-appearance:checkbox;margin:0}.wfu_pdusers_topmost_panel{margin-top:20px;margin-left:40px}.wfu_pdusers_topmost_panel>label{display:block;font-size:larger;font-weight:700}.wfu_pdusers_rolepanel,.wfu_pdusers_userpanel{margin-top:20px;margin-bottom:20px}.wfu_pdusers_roles_container,.wfu_pdusers_users_container{display:inline-block}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_roles_midpanel,.wfu_pdusers_roles_rightpanel,.wfu_pdusers_users_leftpanel,.wfu_pdusers_users_midpanel,.wfu_pdusers_users_rightpanel{display:table-cell;position:relative}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_roles_rightpanel{height:200px;min-width:100px}.wfu_pdusers_users_leftpanel,.wfu_pdusers_users_rightpanel{height:100px;min-width:100px}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_users_leftpanel{padding:10px 10px 10px 0}.wfu_pdusers_roles_midpanel,.wfu_pdusers_users_midpanel{padding:10px 0;vertical-align:top}.wfu_pdusers_roles_rightpanel,.wfu_pdusers_users_rightpanel{padding:20px;vertical-align:top}.wfu_pdusers_roles_container>label,.wfu_pdusers_users_container>label{font-weight:700}.wfu_pdusers_users_leftpanel label{display:block}.wfu_pdusers_users_midpanel label,.wfu_pdusers_users_rightpanel label{display:block;visibility:hidden}.wfu_pdusers_users_leftpanel input[type=text]{width:100%;display:block}.wfu_pdusers_roles_leftpanel select{height:100%!important;line-height:100%!important}.wfu_pdusers_roles_leftpanel select,.wfu_pdusers_users_leftpanel select{min-width:100px;min-height:100px}.wfu_pdusers_roles_show,.wfu_pdusers_users_show{overflow-x:visible;overflow-y:scroll;height:100%}.wfu_pdusers_roles_back,.wfu_pdusers_users_back{border:1px solid gray;position:absolute;left:10px;top:10px;bottom:10px;right:10px;pointer-events:none},.wfu_pdusers_roles_back.active{background-color:rgba(255,255,255,.7)}.wfu_pdusers_roles_role,.wfu_pdusers_users_user{border:1px solid gray;text-align:center;padding:2px 24px 2px 4px;border-radius:1em;cursor:default;background-color:rgba(0,0,0,.05);position:relative;display:inline-block;white-space:nowrap}.wfu_pdusers_roles_all{text-align:center;padding:2px 20px;font-weight:700}.wfu_pdusers_roles_role span,.wfu_pdusers_users_user span{width:14px;height:14px;position:absolute;display:inline-block;right:3px;top:0;bottom:0;margin:auto;border:1px solid #888;border-radius:1em}.wfu_pdusers_roles_role span:after,.wfu_pdusers_roles_role span:before,.wfu_pdusers_users_user span:after,.wfu_pdusers_users_user span:before{content:'';height:1px;margin-top:0;position:absolute;width:10px;top:50%;right:2px;background:#888}.wfu_pdusers_roles_role span:before,.wfu_pdusers_users_user span:before{transform:rotate(45deg)}.wfu_pdusers_roles_role span:after,.wfu_pdusers_users_user span:after{transform:rotate(-45deg)}.wfu_pdusers_roles_role span:hover,.wfu_pdusers_users_user span:hover{background-color:rgba(0,0,0,.1);border:1px solid #1ebcc5}.wfu_pdusers_roles_role span:hover:after,.wfu_pdusers_roles_role span:hover:before,.wfu_pdusers_users_user span:hover:after,.wfu_pdusers_users_user span:hover:before{background:#1ebcc5}.wfu_pdusers_roles_add,.wfu_pdusers_users_add{width:20px;height:18px;display:inline-block;border:1px solid #888;border-radius:4px}.wfu_pdusers_roles_add:after,.wfu_pdusers_users_add:after{border:solid #555;border-width:0 3px 3px 0;display:inline-block;padding:3px;vertical-align:middle;transform:rotate(-45deg);content:'';margin-left:4px;margin-top:-2px}.wfu_pdusers_roles_add:hover,.wfu_pdusers_users_add:hover{border:1px solid #444;background-color:rgba(0,0,0,.1)}.wfu_pd_user_box0{width:100%}.wfu_pd_user_select0,.wfu_pdusers_users_leftpanel select{width:100%;height:100px!important;line-height:100px!important;min-width:100px;min-height:100px}
1
+ div.wfu_help_container,div.wfu_restore_container,div.wfu_shortcode_container,div.wfu_td_div{background:0 0;border:none;padding:0;position:relative}select.wfu_variable,span.wfu_variable{font-size:smaller;color:#333;-webkit-touch-callout:none;-khtml-user-select:none;cursor:default}.wfu_conquestions_optable,.wfu_logactions_table,.wfu_permissions_table{border-collapse:collapse}.wfu_cleanlog_proceed.disabled,.wfu_frozen{pointer-events:none}div.wfu_shortcode_container{display:inline-block;width:50%;margin:0}div.wfu_container input.wfu_long_text,textarea.wfu_shortcode{width:100%}div.wfu_container{margin-top:10px}div.wfu_help_container{display:inline-block;top:4px;margin:0}div.wfu_help_container img{visibility:hidden}table.wfu_inner_table th:hover div.wfu_help_container img,table.wfu_main_table th:hover div.wfu_help_container img{visibility:visible}div.wfu_restore_container{display:inline-block;top:4px;margin:0}div.wfu_restore_container img{visibility:hidden}div.wfu_mchecklist_item:hover img,table.wfu_inner_table th:hover div.wfu_restore_container img,table.wfu_main_table th:hover div.wfu_restore_container img{visibility:visible}div.wfu_td_div{display:block;width:100%;height:100%;margin:0}div.wfu_container input.wfu_short_text{width:60px}div.wfu_container input{width:200px}div.wfu_container input[type=checkbox]{width:auto}div.wfu_container textarea{width:100%}table.wfu_main_table{table-layout:fixed}table.wfu_main_table tr:nth-child(odd){background-color:#f4f4f4}table.wfu_main_table table.wfu_inner_table tr,table.wfu_main_table tr:nth-child(even){background-color:transparent}select.wfu_variable,span.wfu_variable,table.wfu_main_table tr.wfu_subcategory{background-color:#ddd}table.wfu_main_table th{width:17%}table.wfu_main_table td:nth-child(2){width:33%}table.wfu_main_table td:nth-child(3){width:50%}table.wfu_main_table table.wfu_inner_table th{width:34%}table.wfu_main_table table.wfu_inner_table td:nth-child(2){width:66%}table.wfu_main_table tr.wfu_subcategory>th{padding-top:0;padding-bottom:0}select.wfu_variable{padding:0;margin:0;height:auto;border:1px solid #ccc;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}span.wfu_variable{padding:1px;margin:0;border:1px solid #ccc;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.wfu_date_container{display:inline-block;position:relative;width:auto;height:100%;padding:0;margin:0;background:0 0;border:none}.wfu_datereset_button{position:absolute;right:4px;top:0;bottom:0;margin:auto 0;opacity:.5}.wfu_datereset_button:hover{opacity:1}span.wfu_ptext_span{display:inline-block;width:60px}select.wfu_select_folders{height:auto;min-width:75%}select.wfu_select_folders_empty{font-style:italic;color:silver}div.wfu_subfolders_inner_shadow{position:absolute;width:100%;height:100%;padding:0;margin:0;border:none;background-color:rgba(255,255,255,.8)}div.wfu_subfolder_nav_container,table.wfu_subfolder_nav,table.wfu_subfolder_nav td,table.wfu_subfolder_nav tr{background:0 0;margin:0;padding:0;border:none}option.wfu_select_folders_option_default{color:#00f}div.wfu_subfolder_nav_container{width:40px;display:inline-block;vertical-align:top}table.wfu_subfolder_nav{table-layout:fixed;width:100%;border-spacing:1px}table.wfu_subfolder_nav td{font-size:small;line-height:1;text-align:center}table.wfu_subfolder_nav button.button{margin:0;padding:0;width:17px;font-size:smaller;height:18px;line-height:1;color:#000;font-weight:700}.wfu_subfolder_tools_disabled,table.wfu_subfolder_nav button.button:disabled,table.wfu_subfolder_tools button.button:disabled{color:silver}.button.wfu_subfolder_nav_pressed,.button.wfu_subfolder_nav_pressed:focus,.button.wfu_subfolder_nav_pressed:hover{background:#4169e1}div.wfu_subfolder_tools_container{width:75%;margin:0;padding:0;border:none;background:0 0}table.wfu_subfolder_tools,table.wfu_subfolder_tools input{width:100%;padding:0;margin:0}table.wfu_subfolder_tools{table-layout:fixed;border:none;background:0 0}table.wfu_subfolder_tools tr{margin:0;padding:0;border:none;background:0 0}table.wfu_subfolder_tools td{margin:0;padding:0;border:none;background:0 0;font-size:smaller}table.wfu_subfolder_tools td div{margin:0;padding:0;border:none;background:0 0;position:relative}table.wfu_subfolder_tools label{display:block;padding:0;margin:0;line-height:1}table.wfu_subfolder_tools input:disabled{width:100%;padding:0;margin:0;color:silver}table.wfu_subfolder_tools button.button{margin:0;padding:1px 0 0;width:17px;font-size:smaller;height:17px;line-height:1;position:absolute;bottom:2px}table.wfu_subfolder_tools button.button:disabled img{opacity:.4}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container{position:absolute;width:150px;height:150px;margin:0;padding:0;z-index:100;border:1px solid silver;box-shadow:1px 1px 2px;background-color:#fff;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container table{table-layout:fixed;width:100%;height:100%;border:none;background:#eee;margin:0;padding:0;border-spacing:0;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container tr{border:none;background:0 0;margin:0;padding:0;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td{border:none;background:0 0;margin:0;padding:2px;line-height:0;overflow:hidden;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div{position:relative;border:none;background:0 0;margin:0;padding:0;width:100%;height:100%;display:inline-block;line-height:1}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div button.button{font-size:inherit;line-height:1;height:17px;padding:4px;position:relative;width:auto;margin:0;bottom:auto}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container select{width:100%;height:100%;top:0;bottom:0;position:absolute;margin:0}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container label{color:#222;font-weight:700;position:absolute;top:0;bottom:0;height:10px;margin:auto}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div button.button.wfu_folder_browser_cancel{width:17px;height:17px;position:absolute;right:0;top:0;margin:0;padding:0}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container{position:absolute;width:100%;height:100%;top:0;bottom:0;margin:0;padding:0;background-color:rgba(255,255,255,.9);text-align:center}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container label{position:relative;display:block}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container img{position:relative}.button.wfu_folder_browser_cancel img{vertical-align:top;margin-top:2px}div.wfu_mchecklist_container{display:inline-block;border:1px solid #ddd;border-radius:4px;padding:4px}div.wfu_mchecklist_item{display:inline-block}div.wfu_mchecklist_item label{vertical-align:baseline;margin-left:4px;cursor:default}div.wfu_mchecklist_item input:disabled+label{color:gray}div.wfu_mchecklist_item div{margin-left:4px}div.wfu_bloglist_checkbtn,div.wfu_mchecklist_checkall,div.wfu_postlist_checkbtn,div.wfu_rolelist_checkbtn,div.wfu_userlist_checkbtn{display:inline-block;vertical-align:top;margin:0 0 0 10px}table.wfu_bloglist_container,table.wfu_postlist_container,table.wfu_rolelist_container,table.wfu_stringmatch_container,table.wfu_userlist_container{border:none;background:0 0;margin:0;padding:0;border-spacing:0}table.wfu_bloglist_container tr:nth-child(odd),table.wfu_postlist_container tr:nth-child(odd),table.wfu_rolelist_container tr:nth-child(odd),table.wfu_userlist_container tr:nth-child(odd){border:none;background:0 0;margin:0;padding:0}table.wfu_bloglist_container td,table.wfu_postlist_container td,table.wfu_rolelist_container td,table.wfu_stringmatch_container td,table.wfu_userlist_container td{width:1%;border:none;background:0 0;margin:0;padding:0;vertical-align:top}table.wfu_postlist_container td{padding-right:20px}table.wfu_postlist_container td:last-child{padding-right:0}div.wfu_postlist_header{padding:0 10px}div.wfu_postlist_selectall{float:right}div.wfu_shadow{position:absolute;width:100%;height:100%;left:0;top:0;margin:0;padding:0;background-color:#fff;z-index:10;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";filter:alpha(opacity=60);-moz-opacity:.6;-khtml-opacity:.6;opacity:.6}table.wfu_main_table tr:nth-child(odd) div.wfu_shadow{background-color:#f4f4f4}div.wfu_onoff_container_off,div.wfu_onoff_container_on{display:inline-block;position:relative;padding:2px;border:1px solid #aaa;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;background:#066dab;background:-moz-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(6,109,171,1)),color-stop(100%,rgba(197,222,234,1)));background:-webkit-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-o-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-ms-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:linear-gradient(to bottom,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#066dab', endColorstr='#c5deea', GradientType=0 )}span.wfu_onoff_text{width:30px;display:inline-block;text-align:center;color:#FFF}div.wfu_onoff_slider{position:absolute;margin:0;width:31px;top:0;bottom:0;border:1px solid #fff;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 2px;-webkit-box-shadow:0 0 2px;box-shadow:0 0 2px;background:#ccc;background:-moz-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(204,204,204,1)),color-stop(100%,rgba(255,255,255,1)));background:-webkit-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-o-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-ms-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:linear-gradient(to bottom,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#ffffff', GradientType=0 )}div.wfu_onoff_container_on div.wfu_onoff_slider{left:50%}div.wfu_onoff_container_off div.wfu_onoff_slider{left:0}@-webkit-keyframes set_on{from{left:0}to{left:50%}}@-moz-keyframes set_on{from{left:0}to{left:50%}}@-o-keyframes set_on{from{left:0}to{left:50%}}@keyframes set_on{from{left:0}to{left:50%}}div.wfu_placements_wrapper{display:block;position:relative;margin:0;padding:0;background:0 0;border:none}div.wfu_placements_container{display:inline-block;position:relative;width:100%;height:300px;background-color:#fff;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;padding:0;overflow:scroll;font-size:0;line-height:0;white-space:nowrap}div.wfu_componentlist_container{display:inline-block;position:absolute;width:auto;height:auto;top:0;left:100%;background:0 0;border:none;margin:0 0 0 20px;padding:0;z-index:1;white-space:nowrap}div.wfu_component_box_container{display:inline-block;position:relative;width:80px;height:30px;background-color:transparent;border:1px solid transparent;padding:4px;margin:0;cursor:default}div.wfu_component_box,div.wfu_component_box_base{width:80px;height:30px;background-color:#ddd;padding:4px;cursor:default;font-size:12px;line-height:1;white-space:normal}div.wfu_component_box_base{display:block;position:absolute;left:-1px;top:-1px;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_component_box{display:inline-block;position:relative;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;z-index:1}div.wfu_component_box_inner{display:table;width:100%;height:100%}div.wfu_component_box_label{display:table-cell;text-align:center;vertical-align:middle}div.wfu_component_box_index{background-color:coral;padding:1px;float:right;border-radius:10px}div.wfu_inbase{display:block;position:absolute;left:-1px;top:-1px}div.wfu_component_box:hover{background-color:#eee;border:1px solid #bbb}div.wfu_component_box_selected{background-color:#aaa;border:1px solid #bbb}div.wfu_component_separator_hor,div.wfu_component_separator_ver{position:relative;background-color:transparent;border:1px solid transparent;z-index:1;cursor:default}div.wfu_component_box_dragged{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_component_separator_ver{display:inline-block;width:8px;height:26px;margin:6px -8px;padding:0 8px}div.wfu_component_separator_hor{display:block;width:100%;height:8px;margin:-8px 0;padding:8px 0}div.wfu_component_bar_hor,div.wfu_component_bar_ver{background-color:silver;border:none;display:none;position:absolute}div.wfu_component_bar_hor{width:auto;height:4px;left:10px;right:0;margin:11px 0 0;padding:0}div.wfu_component_bar_ver{width:4px;height:40px;margin:-6px 0 0 11px;padding:0}div.wfu_componentlist_dragdrop{position:absolute;width:100%;height:100%;left:0;top:0;background-color:#f8f8f8;border:4px dashed #aaa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;z-index:2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;opacity:.7}div.wfu_componentlist_dragdrop_dragover{border:4px dashed #555}div.wfu_formdata_container,div.wfu_userdata_container{display:block;position:relative;width:100%;height:100%;padding:0;margin:0;background:0 0;border:none}label.wfu_formdata_label{margin-right:6px}.wfu_formdata_props{padding-left:20px}div.wfu_formdata_action,div.wfu_userdata_action{display:inline-block;position:relative;top:2px;width:16px;height:16px;padding:0;margin:0;background:0 0;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_formdata_action:hover,div.wfu_userdata_action:hover{border:1px solid #aaa}div.wfu_formdata_action.wfu_formdata_action_disabled:hover,div.wfu_userdata_action.wfu_userdata_action_disabled:hover{border:1px solid transparent}div.wfu_formdata_action>img,div.wfu_userdata_action>img{width:12px;height:12px}div.wfu_formdata_action_disabled>img,div.wfu_userdata_action_disabled>img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_formdata_line_container,div.wfu_userdata_line{display:block;position:relative;padding:0;margin:0;background:0 0;border:none;white-space:nowrap}table.wfu_formdata_props_table{background:0 0;border:none;padding:0}table.wfu_formdata_props_table td,table.wfu_main_table table.wfu_inner_table table.wfu_formdata_props_table td{background:0 0;border:none;padding:0;width:auto}table.wfu_formdata_props_table td.wfu_formdata_props,table.wfu_main_table table.wfu_inner_table table.wfu_formdata_props_table td.wfu_formdata_props{padding-left:20px}div.wfu_color_container{display:block;position:relative;padding:0;margin:0;background:0 0;border:none;white-space:nowrap;z-index:1}span.wfu_save_label,span.wfu_save_label_fail{border-radius:6px;padding:1px 2px;box-shadow:1px 1px 1px;opacity:0;font-size:smaller}input[type=text].wp-color-picker{width:75px}input[type=button].wp-picker-clear{width:62px}span.wfu_save_label{background-color:#f0f8ff;color:#32cd32}span.wfu_save_label_fail{background-color:beige;color:#f08080}.wfu_conquestion_itemcontainer,.wfu_conquestions_opsel.wfu_forced_selection{opacity:.5}div.wfu_global_dialog_container{position:fixed;width:100%;height:100%;top:0;left:0;margin:0;padding:0;border:none;background:0 0;z-index:1;display:none}table.wfu_main_table table.wfu_columns_container{border:none;background:0 0;margin:0;padding:0;border-spacing:0}table.wfu_main_table table.wfu_columns_container tr{background:0 0}table.wfu_main_table table.wfu_columns_container td{border:none;background:0 0;margin:0;padding:0;vertical-align:top;width:auto}.wfu_buttons_container .button,.wfu_buttons_container .wfu_cleanlog_error,.wfu_pdheader_button,.wfu_selectdate_container input[type=text],.wfu_selectdate_container label,.wfu_selectdates_container input[type=text],.wfu_selectdates_container label,.wfu_selectperiod_container input[type=number],.wfu_selectperiod_container label,.wfu_selectperiod_container select{vertical-align:middle}table.wfu_main_table table.wfu_columnprops_container{border:none;background:0 0;margin:0;padding:6px;border-spacing:0;width:100%;box-shadow:0 0 1px #aaa}table.wfu_main_table table.wfu_columnprops_container tr{background:0 0}table.wfu_main_table table.wfu_columnprops_container td{border:none;background:0 0;margin:0;padding:0;vertical-align:middle;width:auto}table.wfu_main_table table.wfu_columnprops_container label.wfu_columnprops_label_disabled,table.wfu_main_table table.wfu_columnprops_container_disabled label{color:#ccc}button.wfu_columns_addbutton{font-size:smaller}option.wfu_columns_item_required{color:gray}@font-face{font-family:wfu-icons;src:url(../images/fonts/wfu-icons.eot?xnqdfz);src:url(../images/fonts/wfu-icons.eot?xnqdfz#iefix) format('embedded-opentype'),url(../images/fonts/wfu-icons.ttf?xnqdfz) format('truetype'),url(../images/fonts/wfu-icons.woff?xnqdfz) format('woff'),url(../images/fonts/wfu-icons.svg?xnqdfz#wfu-icons) format('svg');font-weight:400;font-style:normal}.wfu-dashicons-media-external:before{font-family:wfu-icons;content:"\e900"}.wfu-dashicons-ftp:before{font-family:wfu-icons;content:"\e901"}.wfu-uploadedfiles .wfu-dashicons-after{margin-left:4px}.wfu-uploadedfiles .wfu-dashicons-hidden{display:none}.wfu-uploadedfiles .wfu-properties.wfu-clicked,.wfu-uploadedfiles .wfu-properties:hover{color:#00f}.wfu-uploadedfiles .wfu_unread{box-shadow:4px 0 0 inset #0f0;font-weight:700}.wfu-uploadedfiles .wfu-remarks-container:before{content:'-';width:0;display:inline-block;overflow:hidden}.wfu_cleanlog_error.hidden,.wfu_cleanlog_tr,.wfu_consent_logactions,.wfu_consent_operations,.wfu_consent_permissions,.wfu_consent_questions,.wfu_consent_users,.wfu_plugin_operations,.wfu_selectdate_container,.wfu_selectdates_container,.wfu_selectperiod_container{display:none}.wfu-adminbrowser .wfu-highlighted,.wfu-historylog .wfu-highlighted{box-shadow:0 -1000px 0 inset rgba(0,255,0,.2)}.wfu_cleanlog_tr td{margin-top:0;padding-top:0}.wfu_buttons_container,.wfu_selectdate_container,.wfu_selectdates_container,.wfu_selectperiod_container{margin-top:10px}.wfu_selectdate_container input[type=text],.wfu_selectdates_container input[type=text]{width:8em;text-align:center}.wfu_selectperiod_container input[type=number]{width:4em}.wfu_cleanlog_error{color:red;font-size:small}.wfu_cleanlog_error:before{content:'!';font-weight:700;margin-right:2px}.wfu_conop_header,.wfu_pdop_header{transition:.4s;padding:6px}.wfu_conop_header label,.wfu_pdop_header label{font-weight:700;cursor:default}.wfu_conop_button,.wfu_pdheader_button,.wfu_pdop_button{color:#777;width:1em;height:1em;cursor:pointer;text-align:center}.wfu_conop_header.atomic label,.wfu_pdop_header.atomic label{font-weight:400}.wfu_pdheader_button{padding:2px;border:1px solid gray;border-radius:1em;position:relative;display:inline-block;font-size:smaller}.wfu_pdheader_button:after{content:'\02795';position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.wfu_conop_panel,.wfu_conop_topmost_panel,.wfu_pdop_panel,.wfu_pdop_topmost_panel{margin-left:40px;overflow:hidden}.wfu_pdheader_button.expanded:after{content:'\02796'}.wfu_conop_panel,.wfu_pdop_panel{display:none}.wfu_conop_level_1,.wfu_pdop_level_1{padding:10px;font-size:larger}.wfu_conop_level_2,.wfu_pdop_level_2{padding:6px;font-size:smaller}.wfu_conop_level_3,.wfu_conop_level_4,.wfu_conop_level_5,.wfu_pdop_level_3,.wfu_pdop_level_4,.wfu_pdop_level_5{padding:2px}.wfu_conop_header:hover,.wfu_pdop_header:hover{background-color:rgba(0,0,0,.2)}.wfu_conop_button,.wfu_pdop_button{float:right;padding:2px;border:1px solid gray;border-radius:4px;position:relative;display:none}.wfu_conop_button:after,.wfu_pdop_button:after{content:'\02795';position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;font-size:smaller}.wfu_conop_button.expanded:after,.wfu_pdop_button.expanded:after{content:'\02796'}.wfu_conop_header:hover .wfu_conop_button,.wfu_pdop_header:hover .wfu_pdop_button{display:block}input[type=checkbox].wfu_conop_selector,input[type=checkbox].wfu_pdop_selector{-webkit-appearance:checkbox;margin:0 0 0 4px}.wfu_conquestions_operations{margin-top:20px;margin-left:40px}.wfu_conquestions_operations label{display:block;font-size:larger;font-weight:700}.wfu_conquestions_oppanel{background-color:#fff;padding:10px;display:inline-block;margin-top:10px}.wfu_conquestions_optable tbody tr:hover{background-color:rgba(0,0,0,.1)}.wfu_conquestions_optable td{cursor:default}.wfu_conquestions_optable td:not(:first-child){text-align:center}.wfu_op_unassigned{background-color:#ffdb99}.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover{background-color:#e6c58a}.wfu_op_unassigned .wfu_conquestions_opinv,.wfu_op_unassigned .wfu_conquestions_opsel{background-color:#ffdb99}.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover .wfu_conquestions_opinv,.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover .wfu_conquestions_opsel{background-color:#e6c58a}.wfu_conquestions_container{margin-top:20px;margin-left:40px}.wfu_conquestion_header{font-size:larger}.wfu_conquestion_subcontainer{padding:10px}.wfu_conquestion_headerlabel{font-weight:700}.wfu_conquestion_tools{float:right}.wfu_conquestion_itemprops,.wfu_conquestion_itemspreview,.wfu_conquestion_mainprops{display:table-cell;position:relative;border:1px solid silver;padding:4ex 10px 10px;vertical-align:top;min-width:10em;min-height:4ex;resize:both;overflow:auto}.wfu_conquestion_itempropstitle,.wfu_conquestion_itemspreviewtitle,.wfu_conquestion_mainpropstitle{position:absolute;top:0;left:0;height:3ex;font-size:inherit;text-align:center;width:100%;background-color:rgba(0,0,0,.1)}.wfu_conquestion_displayedtitle,.wfu_conquestion_groupedlabel,.wfu_conquestion_labellabel,.wfu_conquestion_labellocationlabel,.wfu_conquestion_matrixlabel,.wfu_conquestion_preselectedlabel,.wfu_conquestion_titlelabel,.wfu_conquestion_titlelocationlabel,.wfu_conquestion_typelabel,.wfu_conquestion_visiblelabel{display:block}.wfu_conquestion_labeltext,.wfu_conquestion_titletext{width:100%}.wfu_conquestion_matrix_x,.wfu_conquestion_matrix_y{width:4em;text-align:center}.wfu_conquestion_matrixsep{width:1em;display:inline-block;text-align:center}.wfu_empty_label{font-style:italic}.wfu_conquestion_itemtable td:hover{background-color:rgba(0,0,0,.1)}.wfu_item_selected{background-color:rgba(0,0,0,.2)}.wfu_item_assigned{color:#00f}.wfu_item_visible{opacity:1}.wfu_conquestion_btn{display:inline-block;position:relative;width:16px;height:16px;padding:0;margin:0;background:0 0;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_conquestion_btn:hover{border:1px solid #aaa}.wfu_conquestion_btn>img{width:12px;height:12px;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto}.wfu_log_button,.wfu_perm_button{width:1.5ex;height:1.5ex;cursor:pointer;display:inline-block;vertical-align:middle;text-align:center}div.wfu_conquestion_btn.wfu_tool_disabled:hover{border:1px solid transparent}.wfu_conquestion_btn.wfu_tool_disabled>img{opacity:.4}.wfu_permissions_topmost_panel{margin-left:40px}.wfu_permissions_panel{background-color:#fff;padding:10px;display:inline-block;margin-top:20px}.wfu_perm_container{padding-right:20px}.wfu_location_cell{text-align:center}.wfu_perm_level_1{padding-left:0}.wfu_perm_level_2{padding-left:20px}.wfu_perm_level_3{padding-left:40px}.wfu_permissions_table td:nth-child(n+2),.wfu_permissions_table tr:nth-child(2) th{border-left:1px solid rgba(0,0,0,.1)}.wfu_perm_row:hover{background-color:rgba(0,0,0,.1)}.wfu_perm_button{color:#777;border:1px solid gray;position:relative}.wfu_perm_button:after{content:'+';position:absolute;left:0;right:0;top:-.75ex;bottom:0;margin:auto}.wfu_perm_button:hover{color:#000}.wfu_perm_button.expanded:after{content:'-'}input[type=checkbox].wfu_location_selector{-webkit-appearance:checkbox;margin:0}.wfu_logactions_topmost_panel{margin-left:40px}.wfu_logactions_panel{background-color:#fff;padding:10px;display:inline-block;margin-top:20px}.wfu_log_container{padding-right:20px}.wfu_entity_cell{text-align:center}.wfu_log_level_1{padding-left:0}.wfu_log_level_2{padding-left:20px}.wfu_log_level_3{padding-left:40px}.wfu_logactions_table td:nth-child(n+2),.wfu_logactions_table tr:nth-child(2) th{border-left:1px solid rgba(0,0,0,.1)}.wfu_log_row:hover{background-color:rgba(0,0,0,.1)}.wfu_log_button{color:#777;border:1px solid gray;position:relative}.wfu_log_button:after{content:'+';position:absolute;left:0;right:0;top:-.75ex;bottom:0;margin:auto}.wfu_log_button:hover{color:#000}.wfu_log_button.expanded:after{content:'-'}input[type=checkbox].wfu_entity_selector{-webkit-appearance:checkbox;margin:0}.wfu_pdusers_topmost_panel{margin-top:20px;margin-left:40px}.wfu_pdusers_topmost_panel>label{display:block;font-size:larger;font-weight:700}.wfu_pdusers_rolepanel,.wfu_pdusers_userpanel{margin-top:20px;margin-bottom:20px}.wfu_pdusers_roles_container,.wfu_pdusers_users_container{display:inline-block}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_roles_midpanel,.wfu_pdusers_roles_rightpanel,.wfu_pdusers_users_leftpanel,.wfu_pdusers_users_midpanel,.wfu_pdusers_users_rightpanel{display:table-cell;position:relative}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_roles_rightpanel{height:200px;min-width:100px}.wfu_pdusers_users_leftpanel,.wfu_pdusers_users_rightpanel{height:100px;min-width:100px}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_users_leftpanel{padding:10px 10px 10px 0}.wfu_pdusers_roles_midpanel,.wfu_pdusers_users_midpanel{padding:10px 0;vertical-align:top}.wfu_pdusers_roles_rightpanel,.wfu_pdusers_users_rightpanel{padding:20px;vertical-align:top}.wfu_pdusers_roles_container>label,.wfu_pdusers_users_container>label{font-weight:700}.wfu_pdusers_users_leftpanel label{display:block}.wfu_pdusers_users_midpanel label,.wfu_pdusers_users_rightpanel label{display:block;visibility:hidden}.wfu_pdusers_users_leftpanel input[type=text]{width:100%;display:block}.wfu_pdusers_roles_leftpanel select{height:100%!important;line-height:100%!important}.wfu_pdusers_roles_leftpanel select,.wfu_pdusers_users_leftpanel select{min-width:100px;min-height:100px}.wfu_pdusers_roles_show,.wfu_pdusers_users_show{overflow-x:visible;overflow-y:scroll;height:100%}.wfu_pdusers_roles_back,.wfu_pdusers_users_back{border:1px solid gray;position:absolute;left:10px;top:10px;bottom:10px;right:10px;pointer-events:none},.wfu_pdusers_roles_back.active{background-color:rgba(255,255,255,.7)}.wfu_pdusers_roles_role,.wfu_pdusers_users_user{border:1px solid gray;text-align:center;padding:2px 24px 2px 4px;border-radius:1em;cursor:default;background-color:rgba(0,0,0,.05);position:relative;display:inline-block;white-space:nowrap}.wfu_pdusers_roles_all{text-align:center;padding:2px 20px;font-weight:700}.wfu_pdusers_roles_role span,.wfu_pdusers_users_user span{width:14px;height:14px;position:absolute;display:inline-block;right:3px;top:0;bottom:0;margin:auto;border:1px solid #888;border-radius:1em}.wfu_pdusers_roles_role span:after,.wfu_pdusers_roles_role span:before,.wfu_pdusers_users_user span:after,.wfu_pdusers_users_user span:before{content:'';height:1px;margin-top:0;position:absolute;width:10px;top:50%;right:2px;background:#888}.wfu_pdusers_roles_role span:before,.wfu_pdusers_users_user span:before{transform:rotate(45deg)}.wfu_pdusers_roles_role span:after,.wfu_pdusers_users_user span:after{transform:rotate(-45deg)}.wfu_pdusers_roles_role span:hover,.wfu_pdusers_users_user span:hover{background-color:rgba(0,0,0,.1);border:1px solid #1ebcc5}.wfu_pdusers_roles_role span:hover:after,.wfu_pdusers_roles_role span:hover:before,.wfu_pdusers_users_user span:hover:after,.wfu_pdusers_users_user span:hover:before{background:#1ebcc5}.wfu_pdusers_roles_add,.wfu_pdusers_users_add{width:20px;height:18px;display:inline-block;border:1px solid #888;border-radius:4px}.wfu_pdusers_roles_add:after,.wfu_pdusers_users_add:after{border:solid #555;border-width:0 3px 3px 0;display:inline-block;padding:3px;vertical-align:middle;transform:rotate(-45deg);content:'';margin-left:4px;margin-top:-2px}.wfu_pdusers_roles_add:hover,.wfu_pdusers_users_add:hover{border:1px solid #444;background-color:rgba(0,0,0,.1)}.wfu_pd_user_box0{width:100%}.wfu_pd_user_select0,.wfu_pdusers_users_leftpanel select{width:100%;height:100px!important;line-height:100px!important;min-width:100px;min-height:100px}
images/fonts/wfu-icons.eot ADDED
Binary file
images/fonts/wfu-icons.svg ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="wfu-icons" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="media-external" d="M221.9 755.2l-56.8-85.3h-71.2c-23.467 0-42.7-19.233-42.7-42.7v-298.7c0-23.467 19.233-42.6 42.7-42.6h426.6c23.467 0 42.7 19.133 42.7 42.6v9.2l-150.3 151.4c-5.162-54.079-50.276-96.6-105.7-96.6-58.88 0-106.7 47.82-106.7 106.7s47.82 106.7 106.7 106.7c57.989 0 104.984-46.45 106.4-104.1l144.4 144.6c-7.108 13.74-21.039 23.5-37.5 23.5h-71.2l-56.8 85.3h-170.6zM811.3 541.9l-127.8-128h50.4v-215.5c-6.827 1.28-14.147 2.1-21.4 2.1-58.88 0-106.6-47.72-106.6-106.6s47.72-106.7 106.6-106.7c58.88 0 106.7 47.82 106.7 106.7v448h-7.9zM435.2 243.2v-44.8c-6.827 1.28-14.047 2.1-21.3 2.1-58.88 0-106.7-47.72-106.7-106.6s47.82-106.7 106.7-106.7c58.88 0 106.6 47.82 106.6 106.7v149.3h-85.3zM563.221 908.88h409.6v-409.6l-102.4 51.2v157.696l-286.72-286.208-72.192 72.192 311.808 312.32h-208.896z" />
11
+ <glyph unicode="&#xe901;" glyph-name="ftp" d="M593.3 806.4c-86.739 0-157.152-53.747-195.1-131.4-10.842 5.973-32.536 11.9-48.8 11.9-75.896 0-135.6-65.673-135.6-149.3 0-11.947 0.079-23.927 5.5-29.9-97.581-17.92-168.1-101.48-168.1-209 0-113.493 86.698-209.1 189.7-209.1h542.2c103.002 0 189.7 95.607 189.7 209.1 0 107.52-70.519 197.053-168.1 209 0 17.92 5.5 35.907 5.5 59.8 0 131.413-97.634 238.9-216.9 238.9zM452.5 671h109.8v-73.2h73.3l-128.2-146.5-128.2 146.5h73.3v73.2zM219.9 404.9h166.7v-45h-107v-43.3h99.2v-45h-99.2v-99.4h-59.7v232.7zM404.8 404.9h205.3v-45h-72.7v-187.7h-60v187.7h-72.6v45zM646.2 404.9h98.7c14.792 0 27.296-1.296 37.4-3.9 10.208-2.5 19.188-6.296 27-11.4 9.375-6.146 16.504-14.017 21.4-23.6 5-9.583 7.5-21.063 7.5-34.5 0-10.417-1.854-20.7-5.5-30.7-3.646-9.896-8.829-18.229-15.6-25-9.271-9.167-19.642-16.012-31.1-20.7-11.354-4.688-25.521-7.1-42.5-7.1h-37.3v-75.8h-60v232.7zM706.2 361.5v-69.7h17.1c10.208 0 18.638 0.65 25.2 1.9 6.667 1.25 12.221 3.75 16.7 7.5 3.854 3.333 6.633 7.217 8.3 11.8 1.771 4.688 2.7 10.433 2.7 17.1 0 6.563-1.858 12.112-5.4 16.8-3.542 4.792-7.613 8.125-12.3 10-6.25 2.5-12.362 3.891-18.3 4.1-5.937 0.314-13.804 0.5-23.7 0.5h-10.3z" />
12
+ </font></defs></svg>
images/fonts/wfu-icons.ttf ADDED
Binary file
images/fonts/wfu-icons.woff ADDED
Binary file
images/wfu-media-external.svg ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
2
+ <path d="M 4.3339844 4 L 3.2246094 5.6660156 L 1.8339844 5.6660156 C 1.3756511 5.6660156 1 6.0416666 1 6.5 L 1 12.333984 C 1 12.792318 1.3756511 13.166016 1.8339844 13.166016 L 10.166016 13.166016 C 10.62435 13.166016 11 12.792318 11 12.333984 L 11 12.154297 L 8.0644531 9.1972656 C 7.9636343 10.253489 7.0824936 11.083984 6 11.083984 C 4.8500001 11.083984 3.9160156 10.149999 3.9160156 9 C 3.9160156 7.8499995 4.8500001 6.9160156 6 6.9160156 C 7.1325933 6.9160156 8.05046 7.8232465 8.078125 8.9492188 L 10.898438 6.125 C 10.759609 5.8566437 10.487512 5.6660156 10.166016 5.6660156 L 8.7753906 5.6660156 L 7.6660156 4 L 4.3339844 4 z M 15.845703 8.1660156 L 13.349609 10.666016 L 14.333984 10.666016 L 14.333984 14.875 C 14.200651 14.85 14.057682 14.833984 13.916016 14.833984 C 12.766017 14.833984 11.833984 15.766016 11.833984 16.916016 C 11.833984 18.066016 12.766017 19 13.916016 19 C 15.066016 19 16 18.066016 16 16.916016 L 16 8.1660156 L 15.845703 8.1660156 z M 8.5 14 L 8.5 14.875 C 8.3666668 14.85 8.2256512 14.833984 8.0839844 14.833984 C 6.9339844 14.833984 6 15.766016 6 16.916016 C 6 18.066016 6.9339844 19 8.0839844 19 C 9.2339842 19 10.166016 18.066016 10.166016 16.916016 L 10.166016 14 L 8.5 14 z " />
3
+ <path d="m 11.000408,0.99844212 8.000001,0 0,8.00000038 -2,-1 0,-3.0800003 -5.600001,5.5899988 -1.4099996,-1.4099985 6.0900006,-6.1000003 -4.080001,0 z" />
4
+ </svg>
js/wordpress_file_upload_adminfunctions.js CHANGED
@@ -258,6 +258,16 @@ params[0]=new Array(2);params[0][0]="action";params[0][1]="wfu_ajax_action_get_h
258
  xhr.onreadystatechange=function(){if(xhr.readyState==4)if(xhr.status==200){document.getElementById("wfu_historylog_overlay").style.display="none";var start_text="wfu_historylog_page_success:";var pos=xhr.responseText.indexOf(start_text);if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);if(response!=""){var t=document.getElementById("wfu_historylog_table");t.tBodies[0].innerHTML=
259
  wfu_plugin_decode_string(response);sel.selectedIndex=newpage-1;document.getElementById("wfu_historylog_first_disabled").style.display=newpage==1?"inline":"none";document.getElementById("wfu_historylog_prev_disabled").style.display=newpage==1?"inline":"none";document.getElementById("wfu_historylog_first").style.display=newpage==1?"none":"inline";document.getElementById("wfu_historylog_prev").style.display=newpage==1?"none":"inline";document.getElementById("wfu_historylog_last_disabled").style.display=
260
  newpage==sel.options.length?"inline":"none";document.getElementById("wfu_historylog_next_disabled").style.display=newpage==sel.options.length?"inline":"none";document.getElementById("wfu_historylog_last").style.display=newpage==sel.options.length?"none":"inline";document.getElementById("wfu_historylog_next").style.display=newpage==sel.options.length?"none":"inline"}}};xhr.send(parameters)}
 
 
 
 
 
 
 
 
 
 
261
  function wfu_include_file(filepath_enc,ii){var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var nonce="";var nonce_elem=document.getElementById("wfu_include_file_nonce");if(nonce_elem)nonce=nonce_elem.value;if(nonce=="")return;var url=AdminParams.wfu_ajax_url;params=new Array(2);params[0]=new Array(3);params[0][0]="action";params[0][1]="wfu_ajax_action_include_file";params[1]=new Array(2);params[1][0]="file";params[1][1]=filepath_enc;params[2]=new Array(2);params[2][0]="nonce";params[2][1]=
262
  nonce;var parameters="";for(var i=0;i<params.length;i++)parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);document.getElementById("wfu_include_file_"+ii+"_a").href="javascript: void(0)";document.getElementById("wfu_include_file_"+ii+"_img").style.display="inline";xhr.open("POST",url,true);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4){document.getElementById("wfu_include_file_"+ii+"_img").style.display=
263
  "none";if(xhr.status==200){var start_text="wfu_include_file:";var pos=xhr.responseText.indexOf(start_text);if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);pos=response.indexOf(":");var txt_header=response.substr(0,pos);txt_value=response.substr(pos+1,response.length-pos-1);if(txt_header=="success"){document.getElementById("wfu_file_flat_"+ii).style.display="none";
@@ -274,6 +284,7 @@ params[0]=new Array(2);params[0][0]="action";params[0][1]="wfu_ajax_action_get_a
274
  pos-start_text.length);if(response!=""){response=wfu_plugin_decode_string(response);var t=document.getElementById("wfu_adminbrowser_table");t.tBodies[0].innerHTML=response;document.getElementById("wfu_select_all_visible").checked=false;wfu_adminbrowser_select_all_visible_changed();sel.selectedIndex=newpage-1;document.getElementById("wfu_adminbrowser_first_disabled").style.display=newpage==1?"inline":"none";document.getElementById("wfu_adminbrowser_prev_disabled").style.display=newpage==1?"inline":
275
  "none";document.getElementById("wfu_adminbrowser_first").style.display=newpage==1?"none":"inline";document.getElementById("wfu_adminbrowser_prev").style.display=newpage==1?"none":"inline";document.getElementById("wfu_adminbrowser_last_disabled").style.display=newpage==sel.options.length?"inline":"none";document.getElementById("wfu_adminbrowser_next_disabled").style.display=newpage==sel.options.length?"inline":"none";document.getElementById("wfu_adminbrowser_last").style.display=newpage==sel.options.length?
276
  "none":"inline";document.getElementById("wfu_adminbrowser_next").style.display=newpage==sel.options.length?"none":"inline"}}};xhr.send(parameters)}
 
277
  function wfu_cleanlog_initialize_elements(){jQuery("#wfu_cleanlog_dateold").datepicker({dateFormat:"yy-mm-dd",beforeShow:function(){wfu_cleanlog_element_handler()},onSelect:function(){wfu_cleanlog_element_handler()},onClose:function(){wfu_cleanlog_element_handler()}});jQuery("#wfu_cleanlog_datefrom").datepicker({dateFormat:"yy-mm-dd",beforeShow:function(){wfu_cleanlog_element_handler()},onSelect:function(){wfu_cleanlog_element_handler()},onClose:function(){wfu_cleanlog_element_handler()}});jQuery("#wfu_cleanlog_dateto").datepicker({dateFormat:"yy-mm-dd",
278
  beforeShow:function(){wfu_cleanlog_element_handler()},onSelect:function(){wfu_cleanlog_element_handler()},onClose:function(){wfu_cleanlog_element_handler()}});wfu_attach_element_handlers(document.getElementById("wfu_cleanlog_periodold"),wfu_cleanlog_element_handler);wfu_attach_element_handlers(document.getElementById("wfu_cleanlog_periodtype"),wfu_cleanlog_element_handler)}function wfu_cleanlog_element_handler(e){document.querySelector(".wfu_cleanlog_error").classList.add("hidden")}
279
  function wfu_cleanlog_period_changed(){var sel=document.getElementById("wfu_cleanlog_period");if(sel.selectedIndex==0){document.querySelector(".wfu_selectdate_container").style.display="block";document.querySelector(".wfu_selectperiod_container").style.display="none";document.querySelector(".wfu_selectdates_container").style.display="none";document.getElementById("wfu_cleanlog_dateold").value="";document.querySelector(".wfu_cleanlog_proceed").classList.remove("disabled")}else if(sel.selectedIndex==
258
  xhr.onreadystatechange=function(){if(xhr.readyState==4)if(xhr.status==200){document.getElementById("wfu_historylog_overlay").style.display="none";var start_text="wfu_historylog_page_success:";var pos=xhr.responseText.indexOf(start_text);if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);if(response!=""){var t=document.getElementById("wfu_historylog_table");t.tBodies[0].innerHTML=
259
  wfu_plugin_decode_string(response);sel.selectedIndex=newpage-1;document.getElementById("wfu_historylog_first_disabled").style.display=newpage==1?"inline":"none";document.getElementById("wfu_historylog_prev_disabled").style.display=newpage==1?"inline":"none";document.getElementById("wfu_historylog_first").style.display=newpage==1?"none":"inline";document.getElementById("wfu_historylog_prev").style.display=newpage==1?"none":"inline";document.getElementById("wfu_historylog_last_disabled").style.display=
260
  newpage==sel.options.length?"inline":"none";document.getElementById("wfu_historylog_next_disabled").style.display=newpage==sel.options.length?"inline":"none";document.getElementById("wfu_historylog_last").style.display=newpage==sel.options.length?"none":"inline";document.getElementById("wfu_historylog_next").style.display=newpage==sel.options.length?"none":"inline"}}};xhr.send(parameters)}
261
+ function wfu_attach_uploadedfiles_events(){function _wfu_hightlight_property(obj){var id=obj.id.replace(/^p_([0-9]+)_[0-9]+$/,"$1");document.querySelector("tr.wfu_row-"+id+" .wfu-remarks-container").innerHTML=wfu_plugin_decode_string(obj.firstChild.value)}function _wfu_unhightlight_property(obj){var id=obj.id.replace(/^p_([0-9]+)_[0-9]+$/,"$1");obj.classList.remove("wfu-clicked");document.querySelector("tr.wfu_row-"+id+" .wfu-remarks-container").innerHTML=""}window.wfu_last_shown_remark=null;var props=
262
+ document.querySelectorAll(".wfu-properties:not(.wfu-dashicons-hidden)");for(var i=0;i<props.length;i++)if(typeof props[i].hashover=="undefined"||props[i].hashover!=true){jQuery(props[i]).hover(function(){if(window.wfu_last_shown_remark)_wfu_unhightlight_property(window.wfu_last_shown_remark);_wfu_hightlight_property(this);window.wfu_last_shown_remark=this},function(){if(window.wfu_last_shown_remark)_wfu_unhightlight_property(window.wfu_last_shown_remark);_wfu_unhightlight_property(this);window.wfu_last_shown_remark=
263
+ null});jQuery(props[i]).click(function(){if(window.wfu_last_shown_remark)_wfu_unhightlight_property(window.wfu_last_shown_remark);_wfu_hightlight_property(this);this.classList.add("wfu-clicked");window.wfu_last_shown_remark=this});this.hashover=true}}
264
+ function wfu_update_uploadedfiles_bubble(count){var bubble_container=document.querySelector("#toplevel_page_wfu_uploaded_files .update-plugins");var bubble_text=document.querySelector("#toplevel_page_wfu_uploaded_files .plugin-count");if(bubble_container&&bubble_text){bubble_container.className="update-plugins count-"+count;var text=count;if(count>99)text="99+";bubble_text.innerHTML=text}}
265
+ function wfu_goto_uploadedfiles_page(token,go_to){var sel=document.getElementById("wfu_uploadedfiles_pages");var page=sel.selectedIndex+1;var newpage=page;if(go_to=="next")newpage=Math.min(page+1,sel.options.length);else if(go_to=="prev")newpage=Math.max(page-1,1);else if(go_to=="last")newpage=sel.options.length;else if(go_to=="first")newpage=1;else if(go_to=="sel")page=-1;if(newpage==page)return;var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var url=AdminParams.wfu_ajax_url;params=new Array(3);
266
+ params[0]=new Array(2);params[0][0]="action";params[0][1]="wfu_ajax_action_get_uploadedfiles_page";params[1]=new Array(2);params[1][0]="token";params[1][1]=token;params[2]=new Array(2);params[2][0]="page";params[2][1]=newpage;var parameters="";for(var i=0;i<params.length;i++)parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);document.getElementById("wfu_uploadedfiles_overlay").style.display="block";xhr.open("POST",url,true);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
267
+ xhr.onreadystatechange=function(){if(xhr.readyState==4)if(xhr.status==200){document.getElementById("wfu_uploadedfiles_overlay").style.display="none";var start_text="wfu_uploadedfiles_page_success:";var pos=xhr.responseText.indexOf(start_text);if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);if(response!=""){var t=document.getElementById("wfu_uploadedfiles_table");
268
+ var html=wfu_plugin_decode_string(response);var unread_files_count=0;var unread_files_count_raw=html.match(/wfu_uploadedfiles_unread\[(.*?)\]/);if(unread_files_count_raw&&unread_files_count_raw[1])unread_files_count=parseInt(unread_files_count_raw[1]);if(isNaN(unread_files_count))unread_files_count=0;t.tBodies[0].innerHTML=html;sel.selectedIndex=newpage-1;document.getElementById("wfu_uploadedfiles_first_disabled").style.display=newpage==1?"inline":"none";document.getElementById("wfu_uploadedfiles_prev_disabled").style.display=
269
+ newpage==1?"inline":"none";document.getElementById("wfu_uploadedfiles_first").style.display=newpage==1?"none":"inline";document.getElementById("wfu_uploadedfiles_prev").style.display=newpage==1?"none":"inline";document.getElementById("wfu_uploadedfiles_last_disabled").style.display=newpage==sel.options.length?"inline":"none";document.getElementById("wfu_uploadedfiles_next_disabled").style.display=newpage==sel.options.length?"inline":"none";document.getElementById("wfu_uploadedfiles_last").style.display=
270
+ newpage==sel.options.length?"none":"inline";document.getElementById("wfu_uploadedfiles_next").style.display=newpage==sel.options.length?"none":"inline";wfu_attach_uploadedfiles_events();wfu_update_uploadedfiles_bubble(unread_files_count)}}};xhr.send(parameters)}
271
  function wfu_include_file(filepath_enc,ii){var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var nonce="";var nonce_elem=document.getElementById("wfu_include_file_nonce");if(nonce_elem)nonce=nonce_elem.value;if(nonce=="")return;var url=AdminParams.wfu_ajax_url;params=new Array(2);params[0]=new Array(3);params[0][0]="action";params[0][1]="wfu_ajax_action_include_file";params[1]=new Array(2);params[1][0]="file";params[1][1]=filepath_enc;params[2]=new Array(2);params[2][0]="nonce";params[2][1]=
272
  nonce;var parameters="";for(var i=0;i<params.length;i++)parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);document.getElementById("wfu_include_file_"+ii+"_a").href="javascript: void(0)";document.getElementById("wfu_include_file_"+ii+"_img").style.display="inline";xhr.open("POST",url,true);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4){document.getElementById("wfu_include_file_"+ii+"_img").style.display=
273
  "none";if(xhr.status==200){var start_text="wfu_include_file:";var pos=xhr.responseText.indexOf(start_text);if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);pos=response.indexOf(":");var txt_header=response.substr(0,pos);txt_value=response.substr(pos+1,response.length-pos-1);if(txt_header=="success"){document.getElementById("wfu_file_flat_"+ii).style.display="none";
284
  pos-start_text.length);if(response!=""){response=wfu_plugin_decode_string(response);var t=document.getElementById("wfu_adminbrowser_table");t.tBodies[0].innerHTML=response;document.getElementById("wfu_select_all_visible").checked=false;wfu_adminbrowser_select_all_visible_changed();sel.selectedIndex=newpage-1;document.getElementById("wfu_adminbrowser_first_disabled").style.display=newpage==1?"inline":"none";document.getElementById("wfu_adminbrowser_prev_disabled").style.display=newpage==1?"inline":
285
  "none";document.getElementById("wfu_adminbrowser_first").style.display=newpage==1?"none":"inline";document.getElementById("wfu_adminbrowser_prev").style.display=newpage==1?"none":"inline";document.getElementById("wfu_adminbrowser_last_disabled").style.display=newpage==sel.options.length?"inline":"none";document.getElementById("wfu_adminbrowser_next_disabled").style.display=newpage==sel.options.length?"inline":"none";document.getElementById("wfu_adminbrowser_last").style.display=newpage==sel.options.length?
286
  "none":"inline";document.getElementById("wfu_adminbrowser_next").style.display=newpage==sel.options.length?"none":"inline"}}};xhr.send(parameters)}
287
+ function wfu_focus_table_on_highlighted_file(tableID){var tr=document.querySelector("#"+tableID+" tr.wfu-highlighted");if(tr){var adminbar=document.getElementById("wpadminbar");if(adminbar)adminbar=jQuery(adminbar).is(":visible")?adminbar:null;jQuery("html, body").animate({scrollTop:jQuery(tr).offset().top-(adminbar?jQuery(adminbar).height():0)+"px"},"fast")}}
288
  function wfu_cleanlog_initialize_elements(){jQuery("#wfu_cleanlog_dateold").datepicker({dateFormat:"yy-mm-dd",beforeShow:function(){wfu_cleanlog_element_handler()},onSelect:function(){wfu_cleanlog_element_handler()},onClose:function(){wfu_cleanlog_element_handler()}});jQuery("#wfu_cleanlog_datefrom").datepicker({dateFormat:"yy-mm-dd",beforeShow:function(){wfu_cleanlog_element_handler()},onSelect:function(){wfu_cleanlog_element_handler()},onClose:function(){wfu_cleanlog_element_handler()}});jQuery("#wfu_cleanlog_dateto").datepicker({dateFormat:"yy-mm-dd",
289
  beforeShow:function(){wfu_cleanlog_element_handler()},onSelect:function(){wfu_cleanlog_element_handler()},onClose:function(){wfu_cleanlog_element_handler()}});wfu_attach_element_handlers(document.getElementById("wfu_cleanlog_periodold"),wfu_cleanlog_element_handler);wfu_attach_element_handlers(document.getElementById("wfu_cleanlog_periodtype"),wfu_cleanlog_element_handler)}function wfu_cleanlog_element_handler(e){document.querySelector(".wfu_cleanlog_error").classList.add("hidden")}
290
  function wfu_cleanlog_period_changed(){var sel=document.getElementById("wfu_cleanlog_period");if(sel.selectedIndex==0){document.querySelector(".wfu_selectdate_container").style.display="block";document.querySelector(".wfu_selectperiod_container").style.display="none";document.querySelector(".wfu_selectdates_container").style.display="none";document.getElementById("wfu_cleanlog_dateold").value="";document.querySelector(".wfu_cleanlog_proceed").classList.remove("disabled")}else if(sel.selectedIndex==
js/wordpress_file_upload_functions.js CHANGED
@@ -124,7 +124,7 @@ function wfu_lock_upload(sid){var WFU=GlobalData.WFU[sid];if(!!WFU.textbox_exist
124
  function wfu_unlock_upload(sid){var WFU=GlobalData.WFU[sid];if(!!WFU.textbox_exist)WFU.textbox.update("unlock");if(!!WFU.uploadform_exist)WFU.uploadform.unlock();if(!!WFU.subfolders_exist)WFU.subfolders.toggle(true);if(!!WFU.submit_exist)WFU.submit.toggle(true);var userdata_count=wfu_get_userdata_count(sid);for(var i=0;i<userdata_count;i++)WFU.userdata.codes[i].unlock();wfu_Code_Objects[sid].do_action("unlock_upload")}
125
  function wfu_clear_files(sid){var WFU=GlobalData.WFU[sid];if(!!WFU.uploadform_exist)WFU.uploadform.reset();if(typeof WFU.filearray!="undefined"){WFU.filearray.length=0;WFU.filearrayprops.length=0}if(!!WFU.textbox_exist)WFU.textbox.update("clear")}
126
  function wfu_check_reset(sid){var WFU=GlobalData.WFU[sid];var G=GlobalData[sid];if(WFU.resetmode=="always")return true;else if(WFU.resetmode=="never")return false;else if(WFU.resetmode=="onsuccess")return[4,5,6,14].indexOf(G.upload_state)>-1;else if(WFU.resetmode=="onfullsuccess")return[4,5,14].indexOf(G.upload_state)>-1;else return true}
127
- function wfu_clear(sid){var WFU=GlobalData.WFU[sid];var do_reset=wfu_check_reset(sid);wfu_clear_files(sid);if(do_reset){if(!!WFU.subfolders_exist)WFU.subfolders.reset();var userdata_count=wfu_get_userdata_count(sid);for(var i=0;i<userdata_count;i++)WFU.userdata.codes[i].reset()}wfu_Code_Objects[sid].do_action("clear_upload")}
128
  function wfu_invoke_shortcode_editor(WFU){var sid=WFU.shortcode_id;var same=0;var n=GlobalData.WFU.n;if(WFU.shortcode_tag=="wordpress_file_upload_browser")n=GlobalData.WFUB.n;for(var i=0;i<n.length;i++)if(n[i]==sid)same++;if(same==0)return;if(same>1){alert(GlobalData.consts.same_pluginid);return}var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;WFU.visualeditorbutton.update("on_invoke");var url=GlobalData.consts.ajax_url;params=new Array(6);params[0]=new Array(2);params[0][0]="action";params[0][1]=
129
  "wfu_ajax_action_edit_shortcode";params[1]=new Array(2);params[1][0]="upload_id";params[1][1]=sid;params[2]=new Array(2);params[2][0]="post_id";params[2][1]=WFU.post_id;params[3]=new Array(2);params[3][0]="post_hash";params[3][1]=WFU.post_hash;params[4]=new Array(2);params[4][0]="shortcode_tag";params[4][1]=WFU.shortcode_tag;params[5]=new Array(2);params[5][0]="widget_id";params[5][1]=WFU.widgetid?WFU.widgetid:"";var parameters="";for(var i=0;i<params.length;i++)parameters+=(i>0?"&":"")+params[i][0]+
130
  "="+encodeURI(params[i][1]);xhr.open("POST",url,true);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4)if(xhr.status==200){WFU.visualeditorbutton.update("on_open");var start_text="wfu_edit_shortcode:";var pos=xhr.responseText.indexOf(start_text);if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);
124
  function wfu_unlock_upload(sid){var WFU=GlobalData.WFU[sid];if(!!WFU.textbox_exist)WFU.textbox.update("unlock");if(!!WFU.uploadform_exist)WFU.uploadform.unlock();if(!!WFU.subfolders_exist)WFU.subfolders.toggle(true);if(!!WFU.submit_exist)WFU.submit.toggle(true);var userdata_count=wfu_get_userdata_count(sid);for(var i=0;i<userdata_count;i++)WFU.userdata.codes[i].unlock();wfu_Code_Objects[sid].do_action("unlock_upload")}
125
  function wfu_clear_files(sid){var WFU=GlobalData.WFU[sid];if(!!WFU.uploadform_exist)WFU.uploadform.reset();if(typeof WFU.filearray!="undefined"){WFU.filearray.length=0;WFU.filearrayprops.length=0}if(!!WFU.textbox_exist)WFU.textbox.update("clear")}
126
  function wfu_check_reset(sid){var WFU=GlobalData.WFU[sid];var G=GlobalData[sid];if(WFU.resetmode=="always")return true;else if(WFU.resetmode=="never")return false;else if(WFU.resetmode=="onsuccess")return[4,5,6,14].indexOf(G.upload_state)>-1;else if(WFU.resetmode=="onfullsuccess")return[4,5,14].indexOf(G.upload_state)>-1;else return true}
127
+ function wfu_clear(sid){var WFU=GlobalData.WFU[sid];var do_reset=wfu_check_reset(sid);wfu_clear_files(sid);if(do_reset){if(!!WFU.subfolders_exist)WFU.subfolders.reset();var userdata_count=wfu_get_userdata_count(sid);for(var i=0;i<userdata_count;i++)WFU.userdata.codes[i].reset();if(!!WFU.uploadform_exist)WFU.uploadform.resetDummy()}wfu_Code_Objects[sid].do_action("clear_upload")}
128
  function wfu_invoke_shortcode_editor(WFU){var sid=WFU.shortcode_id;var same=0;var n=GlobalData.WFU.n;if(WFU.shortcode_tag=="wordpress_file_upload_browser")n=GlobalData.WFUB.n;for(var i=0;i<n.length;i++)if(n[i]==sid)same++;if(same==0)return;if(same>1){alert(GlobalData.consts.same_pluginid);return}var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;WFU.visualeditorbutton.update("on_invoke");var url=GlobalData.consts.ajax_url;params=new Array(6);params[0]=new Array(2);params[0][0]="action";params[0][1]=
129
  "wfu_ajax_action_edit_shortcode";params[1]=new Array(2);params[1][0]="upload_id";params[1][1]=sid;params[2]=new Array(2);params[2][0]="post_id";params[2][1]=WFU.post_id;params[3]=new Array(2);params[3][0]="post_hash";params[3][1]=WFU.post_hash;params[4]=new Array(2);params[4][0]="shortcode_tag";params[4][1]=WFU.shortcode_tag;params[5]=new Array(2);params[5][0]="widget_id";params[5][1]=WFU.widgetid?WFU.widgetid:"";var parameters="";for(var i=0;i<params.length;i++)parameters+=(i>0?"&":"")+params[i][0]+
130
  "="+encodeURI(params[i][1]);xhr.open("POST",url,true);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4)if(xhr.status==200){WFU.visualeditorbutton.update("on_open");var start_text="wfu_edit_shortcode:";var pos=xhr.responseText.indexOf(start_text);if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);
languages/wp-file-upload-pt_BR.mo ADDED
Binary file
languages/wp-file-upload-pt_BR.po ADDED
@@ -0,0 +1,1152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Wordpress File Upload\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2018-08-01 14:09+0200\n"
6
+ "PO-Revision-Date: 2018-08-07 14:10-0400\n"
7
+ "Language-Team: Iptanus Team <info@iptanus.com>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Poedit-KeywordsList: __;gettext;gettext_noop\n"
12
+ "X-Poedit-Basepath: ..\n"
13
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
14
+ "X-Generator: Poedit 2.0.4\n"
15
+ "Last-Translator: Jon Hanson <jon@quickbrasil.org>\n"
16
+ "Language: pt_BR\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+ "X-Poedit-SearchPathExcluded-0: vendor\n"
19
+ "X-Poedit-SearchPathExcluded-1: minified\n"
20
+ "X-Poedit-SearchPathExcluded-2: unminified\n"
21
+
22
+ #: lib/wfu_constants.php:7
23
+ msgid "Upload files"
24
+ msgstr "Enviar arquivos"
25
+
26
+ #: lib/wfu_constants.php:10
27
+ msgid "Select File/Select Files"
28
+ msgstr "Selecionar arquivos"
29
+
30
+ #: lib/wfu_constants.php:11
31
+ msgid "Upload File/Upload Files"
32
+ msgstr "Enviar arquivos"
33
+
34
+ #: lib/wfu_constants.php:15
35
+ msgid "Select File"
36
+ msgstr "Selecionar arquivos"
37
+
38
+ #: lib/wfu_constants.php:16
39
+ msgid "Upload File"
40
+ msgstr "Enviar arquivos"
41
+
42
+ #: lib/wfu_constants.php:19
43
+ msgid "File Upload Notification"
44
+ msgstr "Notificação de envio de arquivo"
45
+
46
+ #: lib/wfu_constants.php:20
47
+ msgid ""
48
+ "Dear Recipient,%n%%n% This is an automatic delivery message to notify you "
49
+ "that a new file has been uploaded.%n%%n%Best Regards"
50
+ msgstr ""
51
+ "Prezado Destinatário,%n%%n% Esta é uma mensagem de entrega automática para "
52
+ "notificá-lo de que um novo arquivo foi enviado.%n%%n% Atenciosamente"
53
+
54
+ #: lib/wfu_constants.php:21
55
+ #, php-format
56
+ msgid "File %filename% uploaded successfully"
57
+ msgstr "Arquivo %filename% enviado com sucesso"
58
+
59
+ #: lib/wfu_constants.php:22
60
+ #, php-format
61
+ msgid "File %filename% uploaded successfully but with warnings"
62
+ msgstr "Arquivo %filename% enviado com sucesso, mas com problemas"
63
+
64
+ #: lib/wfu_constants.php:23
65
+ msgid "File %filename% not uploaded"
66
+ msgstr "Arquivo %filename% não enviado"
67
+
68
+ #: lib/wfu_constants.php:24
69
+ msgid "File %filename% is being uploaded"
70
+ msgstr "O arquivo %filename% está sendo enviado"
71
+
72
+ #: lib/wfu_constants.php:25
73
+ msgid "Your message"
74
+ msgstr "Sua mensagem"
75
+
76
+ #: lib/wfu_constants.php:26
77
+ msgid "Please fill in the above words: "
78
+ msgstr "Por favor, preencha os campos acima: "
79
+
80
+ #: lib/wfu_constants.php:27
81
+ msgid "Upload Media"
82
+ msgstr "Envio de mídia"
83
+
84
+ #: lib/wfu_constants.php:28
85
+ msgid "videostream"
86
+ msgstr "stream de video"
87
+
88
+ #: lib/wfu_constants.php:29
89
+ msgid "screenshot"
90
+ msgstr "captura de tela"
91
+
92
+ #: lib/wfu_constants.php:30
93
+ msgid ""
94
+ "By activating this option I agree to let the website keep my personal data"
95
+ msgstr ""
96
+ "Ao ativar esta opção, concordo em deixar o site manter meus dados pessoais"
97
+
98
+ #: lib/wfu_constants.php:32
99
+ msgid "File"
100
+ msgstr "Arquivo"
101
+
102
+ #: lib/wfu_constants.php:33
103
+ msgid "Date"
104
+ msgstr "Data"
105
+
106
+ #: lib/wfu_constants.php:34
107
+ msgid "Size"
108
+ msgstr "Tamanho"
109
+
110
+ #: lib/wfu_constants.php:35
111
+ msgid "User"
112
+ msgstr "Usuário"
113
+
114
+ #: lib/wfu_constants.php:36 lib/wfu_constants.php:200
115
+ msgid "Page"
116
+ msgstr "Página"
117
+
118
+ #: lib/wfu_constants.php:37
119
+ msgid "User Fields"
120
+ msgstr "Campos do usuário"
121
+
122
+ #: lib/wfu_constants.php:38
123
+ msgid "Download"
124
+ msgstr "Baixar"
125
+
126
+ #: lib/wfu_constants.php:39
127
+ msgid "Download this file"
128
+ msgstr "Baixar este arquivo"
129
+
130
+ #: lib/wfu_constants.php:40
131
+ msgid "Delete"
132
+ msgstr "Excluir"
133
+
134
+ #: lib/wfu_constants.php:41
135
+ msgid "Delete this file"
136
+ msgstr "Excluir este arquivo"
137
+
138
+ #: lib/wfu_constants.php:42
139
+ msgid "Sort list based on this column"
140
+ msgstr "Ordenar lista com base nesta coluna"
141
+
142
+ #: lib/wfu_constants.php:43
143
+ msgid "guest"
144
+ msgstr "convidado"
145
+
146
+ #: lib/wfu_constants.php:44
147
+ msgid "unknown"
148
+ msgstr "desconhecido"
149
+
150
+ #: lib/wfu_constants.php:46
151
+ msgid ""
152
+ "Error. Could not resolve ftp target filedir. Check the domain in 'ftpinfo' "
153
+ "attribute."
154
+ msgstr ""
155
+ "Erro. Não foi possível encontrar o filedir de destino do FTP. Verifique o "
156
+ "domínio no atributo 'ftpinfo'."
157
+
158
+ #: lib/wfu_constants.php:47
159
+ msgid "Error. Invalid ftp information. Check 'ftpinfo' attribute."
160
+ msgstr "Erro. Informações inválidas de FTP. Verifique o atributo 'ftpinfo'."
161
+
162
+ #: lib/wfu_constants.php:48
163
+ msgid ""
164
+ "Error. Could not extract ftp information from 'ftpinfo' attribute. Check its "
165
+ "syntax."
166
+ msgstr ""
167
+ "Erro. Não foi possível extrair informações de FTP do atributo 'ftpinfo'. "
168
+ "Verifique sua sintaxe."
169
+
170
+ #: lib/wfu_constants.php:49
171
+ msgid ""
172
+ "Error. Could not resolve ftp target filename. Check the domain in 'ftpinfo' "
173
+ "attribute."
174
+ msgstr ""
175
+ "Erro. Não foi possível encontrar o nome do arquivo de destino do ftp. "
176
+ "Verifique o domínio no atributo 'ftpinfo'."
177
+
178
+ #: lib/wfu_constants.php:50
179
+ msgid ""
180
+ "Error. Could not open source file for ftp upload. Check if file is "
181
+ "accessible."
182
+ msgstr ""
183
+ "Erro. Não foi possível abrir o arquivo de origem para o envio do ftp. "
184
+ "Verifique se o arquivo está acessível."
185
+
186
+ #: lib/wfu_constants.php:51
187
+ msgid "Error. Could not send data to ftp target file."
188
+ msgstr "Erro. Não foi possível enviar dados para o arquivo de destino do ftp."
189
+
190
+ #: lib/wfu_constants.php:52
191
+ msgid ""
192
+ "Error. Could not connect to ftp host. Check the domain in 'ftpinfo' "
193
+ "attribute."
194
+ msgstr ""
195
+ "Erro. Não foi possível conectar-se ao host FTP. Verifique o domínio no "
196
+ "atributo 'ftpinfo'."
197
+
198
+ #: lib/wfu_constants.php:53
199
+ msgid ""
200
+ "Error. Could not authenticate to ftp host. Check username and password in "
201
+ "'ftpinfo' attribute."
202
+ msgstr ""
203
+ "Erro. Não foi possível autenticar para o host FTP. Verifique o nome e a "
204
+ "senha do usuário no atributo 'ftpinfo'."
205
+
206
+ #: lib/wfu_constants.php:54
207
+ msgid ""
208
+ "Error. Could not initialize sftp subsystem. Please check if the server "
209
+ "supports sftp."
210
+ msgstr ""
211
+ "Erro. Não foi possível inicializar o subsistema sftp. Por favor, verifique "
212
+ "se o servidor suporta sftp."
213
+
214
+ #: lib/wfu_constants.php:55
215
+ msgid "Error. The web server does not support sftp."
216
+ msgstr "Erro. O servidor web não suporta sftp."
217
+
218
+ #: lib/wfu_constants.php:56
219
+ msgid ""
220
+ "Error. The upload size limit of PHP directive upload_max_filesize is "
221
+ "preventing the upload of big files.\n"
222
+ "PHP directive upload_max_filesize limit is: "
223
+ msgstr ""
224
+ "Erro. O limite de tamanho de envio de arquivos da diretiva do PHP "
225
+ "upload_max_filesize está impedindo o envio de arquivos grandes.\n"
226
+ "O limite de upload_max_filesize da diretiva do PHP é: "
227
+
228
+ #: lib/wfu_constants.php:57
229
+ msgid ""
230
+ "The upload time limit of PHP directive max_input_time is preventing the "
231
+ "upload of big files.\n"
232
+ "PHP directive max_input_time limit is: "
233
+ msgstr ""
234
+ "O limite de tempo de envio da diretiva do PHP max_input_time está impedindo "
235
+ "o envio de arquivos grandes.\n"
236
+ "A diretiva do PHP max_input_time limit é: "
237
+
238
+ #: lib/wfu_constants.php:58
239
+ msgid ""
240
+ "Error. Permission denied to write to target folder.\n"
241
+ "Check and correct read/write permissions of target folder."
242
+ msgstr ""
243
+ "Erro. Permissão negada para gravar na pasta de destino.\n"
244
+ "Verifique e corrija as permissões de leitura / gravação da pasta de destino."
245
+
246
+ #: lib/wfu_constants.php:59
247
+ msgid ""
248
+ "Error. This file was rejected because its extension is not correct. Its "
249
+ "proper filename is: "
250
+ msgstr ""
251
+ "Erro. Este arquivo foi rejeitado porque sua extensão não está correta. Seu "
252
+ "nome de arquivo correto é: "
253
+
254
+ #: lib/wfu_constants.php:60
255
+ msgid ""
256
+ "Too many files are uploaded in a short period of time. This may be a Denial-"
257
+ "Of-Service attack, so file was rejected. Please check the upload log for "
258
+ "suspicious behaviour."
259
+ msgstr ""
260
+ "Muitos arquivos foram enviados em um curto período de tempo. Isso pode ser "
261
+ "um ataque de Denial-Of-Service, portanto, o arquivo foi rejeitado. Por "
262
+ "favor, verifique o log de envio para comportamento suspeito."
263
+
264
+ #: lib/wfu_constants.php:61
265
+ msgid ""
266
+ "File not uploaded in order to prevent overflow of the website. Please "
267
+ "contact administrator."
268
+ msgstr ""
269
+ "Arquivo não enviado para evitar o estouro de limite de tráfego do site. Por "
270
+ "favor, entre em contato com o administrador."
271
+
272
+ #: lib/wfu_constants.php:62
273
+ msgid "Target folder doesn't exist."
274
+ msgstr "Pasta de destino não existe."
275
+
276
+ #: lib/wfu_constants.php:63
277
+ msgid "Upload failed! Missing a temporary folder."
278
+ msgstr "O envio falhou! Faltando uma pasta temporária."
279
+
280
+ #: lib/wfu_constants.php:64
281
+ msgid "Upload failed! Permission denied to write to target folder."
282
+ msgstr "O envio falhou! Permissão negada para gravar na pasta de destino."
283
+
284
+ #: lib/wfu_constants.php:65
285
+ msgid "File not allowed."
286
+ msgstr "Arquivo não permitido."
287
+
288
+ #: lib/wfu_constants.php:66
289
+ msgid "File is suspicious and was rejected."
290
+ msgstr "O arquivo é suspeito e foi rejeitado."
291
+
292
+ #: lib/wfu_constants.php:67
293
+ msgid "The uploaded file exceeds the file size limit."
294
+ msgstr "O arquivo enviado excede o limite de tamanho de arquivo."
295
+
296
+ #: lib/wfu_constants.php:68
297
+ msgid "The uploaded file exceeds 2GB and is not supported by this server."
298
+ msgstr "O arquivo enviado excede 2 GB e não é suportado por este servidor."
299
+
300
+ #: lib/wfu_constants.php:69
301
+ msgid ""
302
+ "Upload failed! The uploaded file exceeds the file size limit of the server. "
303
+ "Please contact the administrator."
304
+ msgstr ""
305
+ "O envio falhou! O arquivo enviado excede o limite de tamanho de arquivo do "
306
+ "servidor. Por favor contate o administrador."
307
+
308
+ #: lib/wfu_constants.php:70
309
+ msgid ""
310
+ "Upload failed! The duration of the upload exceeded the time limit of the "
311
+ "server. Please contact the administrator."
312
+ msgstr ""
313
+ "O envio falhou! A duração do envio excedeu o limite de tempo do servidor. "
314
+ "Por favor contate o administrador."
315
+
316
+ #: lib/wfu_constants.php:71
317
+ msgid ""
318
+ "Upload failed! The uploaded file exceeds the MAX_FILE_SIZE directive that "
319
+ "was specified in the HTML form."
320
+ msgstr ""
321
+ "O envio falhou! O arquivo enviado excede a diretiva MAX_FILE_SIZE "
322
+ "especificada no formulário HTML."
323
+
324
+ #: lib/wfu_constants.php:72
325
+ msgid "Upload failed! The uploaded file was only partially uploaded."
326
+ msgstr "O envio falhou! O arquivo enviado foi apenas parcialmente carregado."
327
+
328
+ #: lib/wfu_constants.php:73
329
+ msgid "Upload failed! No file was uploaded."
330
+ msgstr "O envio falhou! Nenhum arquivo foi enviado."
331
+
332
+ #: lib/wfu_constants.php:74
333
+ msgid "Upload failed! Failed to write file to disk."
334
+ msgstr "O envio falhou! Falha ao gravar o arquivo no disco."
335
+
336
+ #: lib/wfu_constants.php:75
337
+ msgid ""
338
+ "Upload failed! Error occured while moving temporary file. Please contact "
339
+ "administrator."
340
+ msgstr ""
341
+ "O envio falhou! Ocorreu um erro ao mover o arquivo temporário. Por favor, "
342
+ "entre em contato com o administrador."
343
+
344
+ #: lib/wfu_constants.php:76 lib/wfu_constants.php:223
345
+ msgid "Upload cancelled!"
346
+ msgstr "Envio cancelado!"
347
+
348
+ #: lib/wfu_constants.php:77
349
+ msgid ""
350
+ "Upload failed! A PHP extension stopped the file upload. PHP does not provide "
351
+ "a way to ascertain which extension caused the file upload to stop; examining "
352
+ "the list of loaded extensions with phpinfo() may help."
353
+ msgstr ""
354
+ "O envio falhou! Uma extensão PHP parou o envio do arquivo. O PHP não fornece "
355
+ "uma maneira de determinar qual extensão causou a parada do envio do arquivo; "
356
+ "Examinar a lista de extensões carregadas com phpinfo() pode ajudar."
357
+
358
+ #: lib/wfu_constants.php:78
359
+ msgid "Upload failed! Error occured while attemting to upload the file."
360
+ msgstr "O envio falhou! Ocorreu um erro ao tentar carregar o arquivo."
361
+
362
+ #: lib/wfu_constants.php:79 lib/wfu_constants.php:218
363
+ msgid "Upload failed!"
364
+ msgstr "O envio falhou!"
365
+
366
+ #: lib/wfu_constants.php:80
367
+ msgid "No file!"
368
+ msgstr "Nenhum arquivo!"
369
+
370
+ #: lib/wfu_constants.php:81
371
+ msgid ""
372
+ "Upload failed! The upload has been canceled by the user or the browser "
373
+ "dropped the connection."
374
+ msgstr ""
375
+ "O envio falhou! O envio foi cancelado pelo usuário ou o navegador perdeu a "
376
+ "conexão."
377
+
378
+ #: lib/wfu_constants.php:82
379
+ msgid "Upload failed! Unknown error."
380
+ msgstr "O envio falhou! Erro desconhecido."
381
+
382
+ #: lib/wfu_constants.php:83
383
+ msgid "Please contact the administrator."
384
+ msgstr "Por favor contate o administrador."
385
+
386
+ #: lib/wfu_constants.php:84
387
+ msgid "No result from remote server!"
388
+ msgstr "Nenhum resultado do servidor remoto!"
389
+
390
+ #: lib/wfu_constants.php:85
391
+ msgid " but with warnings"
392
+ msgstr " mas com problemas"
393
+
394
+ #: lib/wfu_constants.php:86 lib/wfu_constants.php:88
395
+ msgid "Warning: JSON parse error."
396
+ msgstr "Aviso: erro de parse do JSON."
397
+
398
+ #: lib/wfu_constants.php:87
399
+ msgid ""
400
+ "Upload parameters of this file, passed as JSON string to the handler, could "
401
+ "not be parsed."
402
+ msgstr ""
403
+ "Os parâmetros de envio desse arquivo, transmitidos como string JSON para o "
404
+ "interpretador, não puderam ser traduzidos."
405
+
406
+ #: lib/wfu_constants.php:89
407
+ msgid ""
408
+ "UploadStates, passed as JSON string to the handler, could not be parsed."
409
+ msgstr ""
410
+ "UploadStates, transmitidos como string JSON para o interpretador, não "
411
+ "puderam ser traduzidos."
412
+
413
+ #: lib/wfu_constants.php:90
414
+ msgid ""
415
+ "Redirection to classic form functionality occurred due to unknown error."
416
+ msgstr ""
417
+ "O redirecionamento para a funcionalidade de formulário clássico ocorreu "
418
+ "devido a erro desconhecido."
419
+
420
+ #: lib/wfu_constants.php:91
421
+ msgid ""
422
+ "Redirection to classic form functionality occurred because AJAX is not "
423
+ "supported."
424
+ msgstr ""
425
+ "O redirecionamento para a funcionalidade de formulário clássico ocorreu "
426
+ "porque o AJAX não é suportado."
427
+
428
+ #: lib/wfu_constants.php:92
429
+ msgid ""
430
+ "Redirection to classic form functionality occurred because HTML5 is not "
431
+ "supported."
432
+ msgstr ""
433
+ "O redirecionamento para a funcionalidade de formulário clássico ocorreu "
434
+ "porque o HTML5 não é suportado."
435
+
436
+ #: lib/wfu_constants.php:93
437
+ msgid ""
438
+ "Redirection to classic form functionality occurred due to JSON parse error."
439
+ msgstr ""
440
+ "O redirecionamento para a funcionalidade de formulário clássico ocorreu "
441
+ "devido ao erro de análise JSON."
442
+
443
+ #: lib/wfu_constants.php:94
444
+ msgid "Please enable popup windows from the browser's settings!"
445
+ msgstr "Por favor, habilite as janelas pop-up nas configurações do navegador!"
446
+
447
+ #: lib/wfu_constants.php:95
448
+ msgid "cannot be empty!"
449
+ msgstr "não pode estar vazio!"
450
+
451
+ #: lib/wfu_constants.php:96
452
+ msgid "number not valid!"
453
+ msgstr "número não válido!"
454
+
455
+ #: lib/wfu_constants.php:97
456
+ msgid "email not valid!"
457
+ msgstr "email não válido!"
458
+
459
+ #: lib/wfu_constants.php:98
460
+ msgid "emails do not match!"
461
+ msgstr "emails não coincidem!"
462
+
463
+ #: lib/wfu_constants.php:99
464
+ msgid "no base email field in group!"
465
+ msgstr "nenhum campo de e-mail base no grupo!"
466
+
467
+ #: lib/wfu_constants.php:100
468
+ msgid "passwords do not match!"
469
+ msgstr "as senhas não coincidem!"
470
+
471
+ #: lib/wfu_constants.php:101
472
+ msgid "no base password field in group!"
473
+ msgstr "nenhum campo de senha base no grupo!"
474
+
475
+ #: lib/wfu_constants.php:102
476
+ msgid "checkbox unchecked!"
477
+ msgstr "caixa de seleção desmarcada!"
478
+
479
+ #: lib/wfu_constants.php:103
480
+ msgid "no option selected!"
481
+ msgstr "nenhuma opção selecionada!"
482
+
483
+ #: lib/wfu_constants.php:104
484
+ msgid "no item selected!"
485
+ msgstr "nenhum item selecionado!"
486
+
487
+ #: lib/wfu_constants.php:105
488
+ msgid ""
489
+ "There are more than one instances of the plugin in this page with the same "
490
+ "id. Please change it."
491
+ msgstr ""
492
+ "Existe mais de uma instância do plugin nesta página com o mesmo id. Por "
493
+ "favor mude isto."
494
+
495
+ #: lib/wfu_constants.php:106
496
+ msgid ""
497
+ "Cannot edit the shortcode because the page has been modified. Please reload "
498
+ "the page."
499
+ msgstr ""
500
+ "Não é possível editar o shortcode porque a página foi modificada. Por favor "
501
+ "recarregue a página."
502
+
503
+ #: lib/wfu_constants.php:107
504
+ msgid "Your browser does not support webcam capture!"
505
+ msgstr "Seu navegador não suporta captura de webcam!"
506
+
507
+ #: lib/wfu_constants.php:108
508
+ msgid "Your browser does not support video recording from the webcam!"
509
+ msgstr "Seu navegador não suporta gravação de vídeo da webcam!"
510
+
511
+ #: lib/wfu_constants.php:109
512
+ msgid "No video was recorded!"
513
+ msgstr "Nenhum vídeo foi gravado!"
514
+
515
+ #: lib/wfu_constants.php:110
516
+ msgid ""
517
+ "ERROR: Captcha not supported! You have an old PHP version. Upgrade your PHP "
518
+ "or use RecaptchaV2 (no account)."
519
+ msgstr ""
520
+ "ERRO: Captcha não suportado! Você tem uma versão antiga do PHP. Atualize seu "
521
+ "PHP ou use RecaptchaV2 (sem conta)."
522
+
523
+ #: lib/wfu_constants.php:111
524
+ msgid ""
525
+ "ERROR: Only one instance of RecaptchaV1 can exist on the same page. Please "
526
+ "notify administrator."
527
+ msgstr ""
528
+ "ERRO: Apenas uma instância do RecaptchaV1 pode existir na mesma página. Por "
529
+ "favor, notifique o administrador."
530
+
531
+ #: lib/wfu_constants.php:112
532
+ msgid ""
533
+ "ERROR: Only one instance of RecaptchaV1 can exist on the same page. Please "
534
+ "use RecaptchaV1 (no account)."
535
+ msgstr ""
536
+ "ERRO: Apenas uma instância do RecaptchaV1 pode existir na mesma página. Por "
537
+ "favor use RecaptchaV1 (sem conta)."
538
+
539
+ #: lib/wfu_constants.php:113
540
+ msgid "ERROR: No site key. Please contact administrator!"
541
+ msgstr ""
542
+ "ERRO: nenhuma chave de site. Por favor, entre em contato com o administrador!"
543
+
544
+ #: lib/wfu_constants.php:114
545
+ msgid ""
546
+ "ERROR: No site key defined! Please go to the plugin settings in Dashboard to "
547
+ "define Google Recaptcha keys."
548
+ msgstr ""
549
+ "ERRO: Nenhuma chave de site definida! Acesse as configurações do plug-in no "
550
+ "Painel para definir as chaves do Google Recaptcha."
551
+
552
+ #: lib/wfu_constants.php:115
553
+ msgid "Bad captcha image!"
554
+ msgstr "Imagem do captcha ruim!"
555
+
556
+ #: lib/wfu_constants.php:116
557
+ msgid "No input!"
558
+ msgstr "Sem entrada!"
559
+
560
+ #: lib/wfu_constants.php:117
561
+ msgid "Captcha not completed!"
562
+ msgstr "Captcha não concluído!"
563
+
564
+ #: lib/wfu_constants.php:118
565
+ msgid "Wrong captcha!"
566
+ msgstr "Captcha errado!"
567
+
568
+ #: lib/wfu_constants.php:119
569
+ msgid "Error refreshing captcha!"
570
+ msgstr "Erro ao atualizar o captcha!"
571
+
572
+ #: lib/wfu_constants.php:120
573
+ msgid "Unknown captcha error!"
574
+ msgstr "Erro de captcha desconhecido!"
575
+
576
+ #: lib/wfu_constants.php:121
577
+ msgid "Captcha not supported by your browser!"
578
+ msgstr "Captcha não suportado pelo seu navegador!"
579
+
580
+ #: lib/wfu_constants.php:122
581
+ msgid "the secret parameter is missing"
582
+ msgstr "o parâmetro secreto está faltando"
583
+
584
+ #: lib/wfu_constants.php:123
585
+ msgid "the secret parameter is invalid or malformed"
586
+ msgstr "o parâmetro secreto é inválido ou mal informado"
587
+
588
+ #: lib/wfu_constants.php:124
589
+ msgid "the response parameter is missing"
590
+ msgstr "o parâmetro de resposta está ausente"
591
+
592
+ #: lib/wfu_constants.php:125
593
+ msgid "the response parameter is invalid or malformed"
594
+ msgstr "o parâmetro de resposta é inválido ou mal informado"
595
+
596
+ #: lib/wfu_constants.php:126
597
+ msgid "Please do not use drag drop due to an internal problem."
598
+ msgstr "Por favor, não use o recurso de arrastar devido a um problema interno."
599
+
600
+ #: lib/wfu_constants.php:127
601
+ #, php-format
602
+ msgid "Error during chunked upload. Unique ID empty in chunk %d"
603
+ msgstr "Erro durante o envio em partes. ID exclusivo vazio no fragmento %d"
604
+
605
+ #: lib/wfu_constants.php:128
606
+ msgid "Chunked upload is not allowed!"
607
+ msgstr "Envio em partes não é permitido!"
608
+
609
+ #: lib/wfu_constants.php:129
610
+ msgid "Chunked upload aborted due to error in previous chunk!"
611
+ msgstr "Envio em partes abortado devido a erro no fragmento anterior!"
612
+
613
+ #: lib/wfu_constants.php:130
614
+ msgid "Chunked upload failed, final file could not be created!"
615
+ msgstr "O envio em partes falhou, o arquivo final não pôde ser criado!"
616
+
617
+ #: lib/wfu_constants.php:131
618
+ #, php-format
619
+ msgid "Could not write file chuck to destination on chunk %d"
620
+ msgstr ""
621
+ "Não foi possível gravar o mandril de arquivos no destino no fragmento %d"
622
+
623
+ #: lib/wfu_constants.php:132
624
+ #, php-format
625
+ msgid "Could not enlarge destination file on chunk %d"
626
+ msgstr "Não foi possível ampliar o arquivo de destino no fragmento %d"
627
+
628
+ #: lib/wfu_constants.php:133
629
+ #, php-format
630
+ msgid "Could not open file handles on chunk %d"
631
+ msgstr "Não foi possível abrir interpretadores de arquivo no fragmento %d"
632
+
633
+ #: lib/wfu_constants.php:134
634
+ msgid "You are not allowed to download this file!"
635
+ msgstr "Você não tem permissão para baixar este arquivo!"
636
+
637
+ #: lib/wfu_constants.php:135
638
+ msgid "File does not exist!"
639
+ msgstr "Arquivo não existe!"
640
+
641
+ #: lib/wfu_constants.php:136
642
+ msgid "Could not download file!"
643
+ msgstr "Não foi possível baixar o arquivo!"
644
+
645
+ #: lib/wfu_constants.php:137
646
+ msgid "You are not allowed to delete this file!"
647
+ msgstr "Você não tem permissão para excluir este arquivo!"
648
+
649
+ #: lib/wfu_constants.php:138
650
+ msgid "File was not deleted!"
651
+ msgstr "Arquivo não foi excluído!"
652
+
653
+ #: lib/wfu_constants.php:139
654
+ msgid "No file was deleted!"
655
+ msgstr "Nenhum arquivo foi excluído!"
656
+
657
+ #: lib/wfu_constants.php:140
658
+ msgid "Some files were not deleted!"
659
+ msgstr "Alguns arquivos não foram excluídos!"
660
+
661
+ #: lib/wfu_constants.php:142
662
+ msgid "Upload skipped! File already exists."
663
+ msgstr "Envio ignorado! O arquivo já existe."
664
+
665
+ #: lib/wfu_constants.php:143
666
+ msgid "The extension of the file does not match its contents."
667
+ msgstr "A extensão do arquivo não corresponde ao seu conteúdo."
668
+
669
+ #: lib/wfu_constants.php:144
670
+ msgid ""
671
+ "Upload succeeded but the file is suspicious because its contents do not "
672
+ "match its extension. Its proper filename is: "
673
+ msgstr ""
674
+ "O envio foi bem-sucedido, mas o arquivo é suspeito porque seu conteúdo não "
675
+ "corresponde à sua extensão. Seu nome de arquivo correto é: "
676
+
677
+ #: lib/wfu_constants.php:145
678
+ msgid "No files have been selected!"
679
+ msgstr "Nenhum arquivo foi selecionado!"
680
+
681
+ #: lib/wfu_constants.php:146
682
+ msgid "Please complete the consent question before continuing the upload!"
683
+ msgstr ""
684
+ "Por favor, preencha a questão do consentimento antes de continuar o envio!"
685
+
686
+ #: lib/wfu_constants.php:147
687
+ msgid "WPFilebase Plugin not updated because there were no files uploaded."
688
+ msgstr "Plugin WPFilebase não atualizado porque não havia arquivos enviados."
689
+
690
+ #: lib/wfu_constants.php:148
691
+ msgid "Notification email was not sent because there were no files uploaded."
692
+ msgstr ""
693
+ "O e-mail de notificação não foi enviado porque não havia arquivos enviados."
694
+
695
+ #: lib/wfu_constants.php:149
696
+ msgid ""
697
+ "Notification email was not sent because no recipients were defined. Please "
698
+ "check notifyrecipients attribute in the shortcode."
699
+ msgstr ""
700
+ "O e-mail de notificação não foi enviado porque nenhum destinatário foi "
701
+ "definido. Por favor, verifique o atributo notifyRecipients no shortcode."
702
+
703
+ #: lib/wfu_constants.php:150
704
+ msgid ""
705
+ "Notification email was not sent due to an error. Please check "
706
+ "notifyrecipients, notifysubject and notifymessage attributes for errors."
707
+ msgstr ""
708
+ "O e-mail de notificação não foi enviado devido a um erro. Por favor, "
709
+ "verifique os atributos notifyRecipients, notifysubject e notifymessage para "
710
+ "erros."
711
+
712
+ #: lib/wfu_constants.php:151
713
+ msgid ""
714
+ "Redirection not executed because redirection link is empty. Please check "
715
+ "redirectlink attribute."
716
+ msgstr ""
717
+ "Redirecionamento não executado porque o link de redirecionamento está vazio. "
718
+ "Por favor, verifique o atributo redirectlink."
719
+
720
+ #: lib/wfu_constants.php:152
721
+ msgid ""
722
+ "Redirection not executed because not all files were successfully uploaded."
723
+ msgstr ""
724
+ "Redirecionamento não executado porque nem todos os arquivos foram enviados "
725
+ "com sucesso."
726
+
727
+ #: lib/wfu_constants.php:153
728
+ msgid "Potential Denial-Of-Service Attack on {SITE}"
729
+ msgstr "Ataque potencial de Denial-Of-Service em {SITE}"
730
+
731
+ #: lib/wfu_constants.php:154
732
+ msgid ""
733
+ "Hello admin\n"
734
+ "\n"
735
+ "This is a message from Wordpress File Upload Plugin to notify you that a "
736
+ "potential Denial-Of-Service attack has been detected on {SITE}.\n"
737
+ "\n"
738
+ "The plugin detected more than {FILENUM} uploads within {INTERVAL} seconds.\n"
739
+ "\n"
740
+ "All file uploads that exceed this limit are rejected to protect the website "
741
+ "from overflowing.\n"
742
+ "\n"
743
+ "Please check the upload history log in the plugin's area in Dashboard for "
744
+ "any suspicious behaviour.\n"
745
+ "\n"
746
+ "A new message will follow if the situation remains.\n"
747
+ "\n"
748
+ "Thanks"
749
+ msgstr ""
750
+ "Olá, admin\n"
751
+ "\n"
752
+ "Esta é uma mensagem do Plugin de Upload de Arquivos do Wordpress para "
753
+ "notificá-lo de que um possível ataque de Denial-Of-Service foi detectado em "
754
+ "{SITE}. \n"
755
+ "\n"
756
+ "O plug-in detectou mais de {FILENUM} uploads em {INTERVAL} segundos. \n"
757
+ "\n"
758
+ "Todos os uploads de arquivos que excedam esse limite são rejeitados para "
759
+ "evitar que o site transborde. \n"
760
+ "\n"
761
+ "Por favor, verifique o log de histórico de upload na área do plugin no "
762
+ "Dashboard para qualquer comportamento suspeito. \n"
763
+ "\n"
764
+ "Uma nova mensagem será exibida se a situação persistir. \n"
765
+ "\n"
766
+ "Obrigado"
767
+
768
+ #: lib/wfu_constants.php:155
769
+ msgid ""
770
+ "You have activated an alternative insecure Iptanus Services Server. For "
771
+ "details please contact info@iptanus.com."
772
+ msgstr ""
773
+ "Você ativou uma alternativa insegura Iptanus Services Server. Para mais "
774
+ "detalhes, entre em contato com info@iptanus.com."
775
+
776
+ #: lib/wfu_constants.php:156
777
+ msgid ""
778
+ "Iptanus Services Server is unreachable. This may cause problems in some "
779
+ "plugin functions. Please contact info@iptanus.com for details."
780
+ msgstr ""
781
+ "O Iptanus Services Server está inacessível. Isso pode causar problemas em "
782
+ "algumas funções do plugin. Por favor, entre em contato com info@iptanus.com "
783
+ "para detalhes."
784
+
785
+ #: lib/wfu_constants.php:158
786
+ msgid ""
787
+ "Failed to add the shortcode to the page/post. Please try again. If the "
788
+ "message persists, contact administrator."
789
+ msgstr ""
790
+ "Falha ao adicionar o shortcode à página / postagem. Por favor, tente "
791
+ "novamente. Se a mensagem persistir, entre em contato com o administrador."
792
+
793
+ #: lib/wfu_constants.php:159
794
+ msgid ""
795
+ "Failed to edit the shortcode because the contents of the page changed. Try "
796
+ "again to edit the shortcode."
797
+ msgstr ""
798
+ "Falha ao editar o shortcode porque o conteúdo da página foi alterado. Tente "
799
+ "novamente editar o shortcode."
800
+
801
+ #: lib/wfu_constants.php:160
802
+ msgid ""
803
+ "Failed to delete the shortcode because the contents of the page changed. Try "
804
+ "again to delete it."
805
+ msgstr ""
806
+ "Falha ao excluir o shortcode porque o conteúdo da página foi alterado. Tente "
807
+ "novamente excluí-lo."
808
+
809
+ #: lib/wfu_constants.php:161
810
+ msgid ""
811
+ "The page containing the shortcode has been modified and it is no longer "
812
+ "valid. Please go back to reload the shortcode."
813
+ msgstr ""
814
+ "A página que contém o shortcode foi modificada e não é mais válida. Por "
815
+ "favor, volte para recarregar o shortcode."
816
+
817
+ #: lib/wfu_constants.php:162
818
+ msgid ""
819
+ "Failed to update the shortcode because the contents of the page changed. Go "
820
+ "back to reload the shortcode."
821
+ msgstr ""
822
+ "Falha ao atualizar o shortcode porque o conteúdo da página foi alterado. "
823
+ "Volte para recarregar o shortcode."
824
+
825
+ #: lib/wfu_constants.php:163
826
+ msgid ""
827
+ "Failed to update the shortcode. Please try again. If the problem persists, "
828
+ "go back and reload the shortcode."
829
+ msgstr ""
830
+ "Falha ao atualizar o shortcode. Por favor, tente novamente. Se o problema "
831
+ "persistir, volte e recarregue o código de acesso."
832
+
833
+ #: lib/wfu_constants.php:165
834
+ msgid "This is a test message"
835
+ msgstr "Esta é uma mensagem de teste"
836
+
837
+ #: lib/wfu_constants.php:166
838
+ msgid "This is a test administrator message"
839
+ msgstr "Esta é uma mensagem do administrador de teste"
840
+
841
+ #: lib/wfu_constants.php:167
842
+ msgid "File testfile 1 under test"
843
+ msgstr "Arquivo testfile 1 sob teste"
844
+
845
+ #: lib/wfu_constants.php:168
846
+ msgid "File testfile 1 message"
847
+ msgstr "Arquivo testfile 1 message"
848
+
849
+ #: lib/wfu_constants.php:169
850
+ msgid "File testfile 1 administrator message"
851
+ msgstr "Mensagem do administrador do arquivo testfile 1"
852
+
853
+ #: lib/wfu_constants.php:170
854
+ msgid "File testfile 2 under test"
855
+ msgstr "Arquivo de teste 2 sob teste"
856
+
857
+ #: lib/wfu_constants.php:171
858
+ msgid "File testfile 2 message"
859
+ msgstr "Mensagem do arquivo de teste 2"
860
+
861
+ #: lib/wfu_constants.php:172
862
+ msgid "File testfile 2 administrator message"
863
+ msgstr "Mensagem do administrador do arquivo testfile 2"
864
+
865
+ #: lib/wfu_constants.php:174
866
+ msgid ""
867
+ "Insert variable %userid% inside text. It will be replaced by the id of the "
868
+ "current user."
869
+ msgstr ""
870
+ "Insira a variável %userid% dentro do texto. Será substituído pelo id do "
871
+ "usuário atual."
872
+
873
+ #: lib/wfu_constants.php:175
874
+ msgid ""
875
+ "Insert variable %username% inside text. It will be replaced by the username "
876
+ "of the current user."
877
+ msgstr ""
878
+ "Insira a variável %username% dentro do texto. Ele será substituído pelo nome "
879
+ "de usuário atual."
880
+
881
+ #: lib/wfu_constants.php:176
882
+ msgid ""
883
+ "Insert variable %useremail% inside text. It will be replaced by the email of "
884
+ "the current user."
885
+ msgstr ""
886
+ "Insira a variável %useremail% dentro do texto. Ele será substituído pelo e-"
887
+ "mail do usuário atual."
888
+
889
+ #: lib/wfu_constants.php:177
890
+ msgid ""
891
+ "Insert variable %filename% inside text. It will be replaced by the filename "
892
+ "of the uploaded file."
893
+ msgstr ""
894
+ "Insira a variável %filename% no texto. Ele será substituído pelo nome do "
895
+ "arquivo do arquivo enviado."
896
+
897
+ #: lib/wfu_constants.php:178
898
+ msgid ""
899
+ "Insert variable %filepath% inside text. It will be replaced by the full "
900
+ "filepath of the uploaded file."
901
+ msgstr ""
902
+ "Insira a variável %filepath% dentro do texto. Ele será substituído pelo "
903
+ "caminho de arquivo completo do arquivo enviado."
904
+
905
+ #: lib/wfu_constants.php:179
906
+ msgid ""
907
+ "Insert variable %blogid% inside text. It will be replaced by the blog id of "
908
+ "the website."
909
+ msgstr ""
910
+ "Insira a variável %blogid% dentro do texto. Ele será substituído pelo ID do "
911
+ "blog do site."
912
+
913
+ #: lib/wfu_constants.php:180
914
+ msgid ""
915
+ "Insert variable %pageid% inside text. It will be replaced by the id of the "
916
+ "current page."
917
+ msgstr ""
918
+ "Insira a variável %pageid% dentro do texto. Será substituído pelo id da "
919
+ "página atual."
920
+
921
+ #: lib/wfu_constants.php:181
922
+ msgid ""
923
+ "Insert variable %pagetitle% inside text. It will be replaced by the title of "
924
+ "the current page."
925
+ msgstr ""
926
+ "Insira a variável %pagetitle% dentro do texto. Será substituído pelo título "
927
+ "da página atual."
928
+
929
+ #: lib/wfu_constants.php:182
930
+ msgid ""
931
+ "Insert variable %userdataXXX% inside text. Select the user field from the "
932
+ "drop-down list. It will be replaced by the value that the user entered in "
933
+ "this field."
934
+ msgstr ""
935
+ "Insira a variável %userdataXXX% no texto. Selecione o campo do usuário na "
936
+ "lista suspensa. Ele será substituído pelo valor que o usuário inseriu nesse "
937
+ "campo."
938
+
939
+ #: lib/wfu_constants.php:183
940
+ msgid "Insert variable %n% inside text to denote a line change."
941
+ msgstr ""
942
+ "Insira a variável %n% dentro do texto para indicar uma mudança de linha."
943
+
944
+ #: lib/wfu_constants.php:185
945
+ msgid "Test Mode"
946
+ msgstr "Modo de teste"
947
+
948
+ #: lib/wfu_constants.php:186
949
+ msgid "select dir..."
950
+ msgstr "selecione dir ..."
951
+
952
+ #: lib/wfu_constants.php:187
953
+ msgid "type dir"
954
+ msgstr "digite dir"
955
+
956
+ #: lib/wfu_constants.php:188
957
+ msgid "Upload path: %filepath%"
958
+ msgstr "Caminho de upload: %filepath%"
959
+
960
+ #: lib/wfu_constants.php:189
961
+ msgid "Failed upload path: %filepath%"
962
+ msgstr "Caminho de upload com falha: %filepath%"
963
+
964
+ #: lib/wfu_constants.php:190
965
+ msgid " (required)"
966
+ msgstr " (requerido)"
967
+
968
+ #: lib/wfu_constants.php:191
969
+ msgid "Files are being uploaded. Are you sure you want to exit the page?"
970
+ msgstr ""
971
+ "Arquivos estão sendo enviados. Tem certeza de que deseja sair da página?"
972
+
973
+ #: lib/wfu_constants.php:192
974
+ msgid "checking captcha..."
975
+ msgstr "verificando o captcha ..."
976
+
977
+ #: lib/wfu_constants.php:193
978
+ msgid "refreshing..."
979
+ msgstr "atualizando..."
980
+
981
+ #: lib/wfu_constants.php:194
982
+ msgid "correct captcha"
983
+ msgstr "captcha correto"
984
+
985
+ #: lib/wfu_constants.php:195
986
+ msgid "click to continue the upload"
987
+ msgstr "clique para continuar o envio"
988
+
989
+ #: lib/wfu_constants.php:196
990
+ msgid "Are you sure you want to delete this file?"
991
+ msgstr "Tem certeza de que deseja excluir este arquivo?"
992
+
993
+ #: lib/wfu_constants.php:197
994
+ msgid "Are you sure you want to delete these files?"
995
+ msgstr "Tem certeza de que deseja excluir estes arquivos?"
996
+
997
+ #: lib/wfu_constants.php:198
998
+ msgid "Bulk Actions"
999
+ msgstr "Ações em massa"
1000
+
1001
+ #: lib/wfu_constants.php:199
1002
+ msgid "Apply"
1003
+ msgstr "Submeter"
1004
+
1005
+ #: lib/wfu_constants.php:201
1006
+ msgid "of "
1007
+ msgstr "de "
1008
+
1009
+ #: lib/wfu_constants.php:202
1010
+ msgid "Are you sure that you want to cancel the upload?"
1011
+ msgstr "Tem certeza de que deseja cancelar o envio?"
1012
+
1013
+ #: lib/wfu_constants.php:203
1014
+ msgid "cancel upload of this file"
1015
+ msgstr "cancelar o envio deste arquivo"
1016
+
1017
+ #: lib/wfu_constants.php:204
1018
+ msgid "Upload in progress"
1019
+ msgstr "Envio em andamento"
1020
+
1021
+ #: lib/wfu_constants.php:205
1022
+ msgid "Upload in progress with warnings!"
1023
+ msgstr "Envio em andamento com problemas!"
1024
+
1025
+ #: lib/wfu_constants.php:206
1026
+ msgid "Upload in progress but some files already failed!"
1027
+ msgstr "Envio em andamento, mas alguns arquivos já falharam!"
1028
+
1029
+ #: lib/wfu_constants.php:207
1030
+ msgid "Upload in progress but no files uploaded so far!"
1031
+ msgstr "Envio em andamento, mas nenhum arquivo enviado até o momento!"
1032
+
1033
+ #: lib/wfu_constants.php:208
1034
+ msgid "All files uploaded successfully"
1035
+ msgstr "Todos os arquivos enviados com sucesso"
1036
+
1037
+ #: lib/wfu_constants.php:209
1038
+ msgid "All files uploaded successfully but there are warnings!"
1039
+ msgstr "Todos os arquivos foram enviados com sucesso, mas há problemas!"
1040
+
1041
+ #: lib/wfu_constants.php:210
1042
+ msgid "File uploaded successfully but there are warnings!"
1043
+ msgstr "Arquivo enviado com sucesso, mas há problemas!"
1044
+
1045
+ #: lib/wfu_constants.php:211
1046
+ msgid "Some files failed to upload!"
1047
+ msgstr "Alguns arquivos não foram enviados!"
1048
+
1049
+ #: lib/wfu_constants.php:212
1050
+ msgid "All files failed to upload"
1051
+ msgstr "Nenhum arquivo foi enviado"
1052
+
1053
+ #: lib/wfu_constants.php:213
1054
+ msgid "File failed to upload"
1055
+ msgstr "Falha no envio do arquivo"
1056
+
1057
+ #: lib/wfu_constants.php:214
1058
+ msgid "There are no files to upload!"
1059
+ msgstr "Não há arquivos para envio!"
1060
+
1061
+ #: lib/wfu_constants.php:215
1062
+ msgid "Test upload message"
1063
+ msgstr "Testar mensagem de envio"
1064
+
1065
+ #: lib/wfu_constants.php:216
1066
+ msgid "JSON parse warning!"
1067
+ msgstr "JSON analisar parse!"
1068
+
1069
+ #: lib/wfu_constants.php:217
1070
+ msgid "please wait while redirecting..."
1071
+ msgstr "por favor aguarde enquanto redireciona ..."
1072
+
1073
+ #: lib/wfu_constants.php:219
1074
+ msgid "Submitting data"
1075
+ msgstr "Enviando dados"
1076
+
1077
+ #: lib/wfu_constants.php:220
1078
+ msgid "Data submitted successfully!"
1079
+ msgstr "Dados enviados com sucesso!"
1080
+
1081
+ #: lib/wfu_constants.php:221
1082
+ msgid "Data were not submitted!"
1083
+ msgstr "Os dados não foram enviados!"
1084
+
1085
+ #: lib/wfu_constants.php:222
1086
+ msgid "Cancelling upload"
1087
+ msgstr "Cancelando o envio"
1088
+
1089
+ #: lib/wfu_constants.php:224
1090
+ msgid "Open visual shortcode editor in new window"
1091
+ msgstr "Abra o editor de shortcode visual em uma nova janela"
1092
+
1093
+ #: lib/wfu_constants.php:225
1094
+ msgid "loading visual editor"
1095
+ msgstr "carregando editor visual"
1096
+
1097
+ #: lib/wfu_constants.php:226
1098
+ msgid "Clear file list?"
1099
+ msgstr "Apagar lista de arquivos?"
1100
+
1101
+ #: lib/wfu_constants.php:227
1102
+ msgid "DROP HERE"
1103
+ msgstr "SOLTAR AQUI"
1104
+
1105
+ #: lib/wfu_constants.php:229
1106
+ msgid "record video"
1107
+ msgstr "gravar vídeo"
1108
+
1109
+ #: lib/wfu_constants.php:230
1110
+ msgid "take a picture"
1111
+ msgstr "tirar uma foto"
1112
+
1113
+ #: lib/wfu_constants.php:231
1114
+ msgid "turn webcam on/off"
1115
+ msgstr "ligar / desligar a webcam"
1116
+
1117
+ #: lib/wfu_constants.php:232
1118
+ msgid "go live again"
1119
+ msgstr "ao vivo novamente"
1120
+
1121
+ #: lib/wfu_constants.php:233
1122
+ msgid "end recording"
1123
+ msgstr "finalizar gravação"
1124
+
1125
+ #: lib/wfu_constants.php:234
1126
+ msgid "play"
1127
+ msgstr "exibir"
1128
+
1129
+ #: lib/wfu_constants.php:235
1130
+ msgid "pause"
1131
+ msgstr "pausar"
1132
+
1133
+ #: lib/wfu_constants.php:236
1134
+ msgid "go to the beginning"
1135
+ msgstr "ir para o início"
1136
+
1137
+ #: lib/wfu_constants.php:237
1138
+ msgid "go to the end"
1139
+ msgstr "ir para o fim"
1140
+
1141
+ #: lib/wfu_constants.php:239
1142
+ msgid "Wordpress File Upload Form"
1143
+ msgstr "Formulário de Envio de Arquivos do Wordpress"
1144
+
1145
+ #: lib/wfu_constants.php:240
1146
+ msgid "Wordpress File Upload plugin uploader for sidebars"
1147
+ msgstr ""
1148
+ "Carregador de plugins de Envio de Arquivos do Wordpress para barras laterais"
1149
+
1150
+ #: lib/wfu_constants.php:241
1151
+ msgid "Upload Files"
1152
+ msgstr "Enviar arquivos"
lib/wfu_admin.php CHANGED
@@ -22,12 +22,60 @@ function wordpress_file_upload_admin_init() {
22
  wp_register_script('jquery-ui-datepicker', false, array('jquery'));
23
  wp_register_script('wordpress_file_upload_admin_script', WPFILEUPLOAD_DIR.'js/wordpress_file_upload_adminfunctions.js', array( 'wp-color-picker' ), false, true);
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
  function wordpress_file_upload_add_admin_pages() {
 
 
 
28
  $page_hook_suffix = false;
29
  if ( current_user_can( 'manage_options' ) ) $page_hook_suffix = add_options_page('Wordpress File Upload', 'Wordpress File Upload', 'manage_options', 'wordpress_file_upload', 'wordpress_file_upload_manage_dashboard');
30
  if ( $page_hook_suffix !== false ) add_action('admin_print_scripts-'.$page_hook_suffix, 'wfu_enqueue_admin_scripts');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
 
33
  function wfu_enqueue_admin_scripts() {
@@ -57,6 +105,29 @@ function wfu_enqueue_admin_scripts() {
57
  }
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  function wordpress_file_upload_install() {
61
  global $wpdb;
62
  global $wfu_tb_log_version;
@@ -175,7 +246,10 @@ function wordpress_file_upload_manage_dashboard() {
175
  $page = $tag;
176
  if ( $page == '' ) $page = 1;
177
  $page = (int)wfu_sanitize_int($page);
178
- $echo_str = wfu_view_log($page);
 
 
 
179
  }
180
  elseif ( $action == 'rename_file' && $file != "" ) {
181
  $echo_str = wfu_rename_file_prompt($file, 'file', false);
@@ -243,7 +317,7 @@ function wordpress_file_upload_manage_dashboard() {
243
  }
244
  elseif ( $action == 'edit_filedetails' && $file != "" ) {
245
  wfu_edit_filedetails($file);
246
- $echo_str = wfu_file_details($file, false);
247
  }
248
  elseif ( $action == 'personal_data' && $plugin_options["personaldata"] == "1" ) {
249
  $echo_str = wfu_manage_personaldata_policies();
22
  wp_register_script('jquery-ui-datepicker', false, array('jquery'));
23
  wp_register_script('wordpress_file_upload_admin_script', WPFILEUPLOAD_DIR.'js/wordpress_file_upload_adminfunctions.js', array( 'wp-color-picker' ), false, true);
24
  }
25
+ //register scripts for Uploaded Files
26
+ elseif ( is_admin() && ( ( $is_admin && strpos($uri, "admin.php") !== false ) ) ) {
27
+ //apply wfu_before_admin_scripts to get additional settings
28
+ $changable_data = array();
29
+ $ret_data = apply_filters('wfu_before_uploadedfiles_admin_scripts', $changable_data);
30
+ //if $ret_data contains 'return_value' key then no scripts will be
31
+ //registered
32
+ if ( isset($ret_data['return_value']) ) return $ret_data['return_value'];
33
+ //continue with script and style registering
34
+ wp_register_style('wordpress-file-upload-admin-style', WPFILEUPLOAD_DIR.'css/wordpress_file_upload_adminstyle.css',false,'1.0','all');
35
+ //do not register JQuery UI css if $ret_data denotes incompatibility
36
+ //issues
37
+ if ( ( !isset($ret_data["correct_NextGenGallery_incompatibility"]) || $ret_data["correct_NextGenGallery_incompatibility"] != "true" ) &&
38
+ ( !isset($ret_data["correct_JQueryUI_incompatibility"]) || $ret_data["correct_JQueryUI_incompatibility"] != "true" ) )
39
+ wp_register_style('jquery-ui-css', WPFILEUPLOAD_DIR.'vendor/jquery/jquery-ui.min.css');
40
+ wp_register_script('wordpress_file_upload_admin_script', WPFILEUPLOAD_DIR.'js/wordpress_file_upload_adminfunctions.js', array( 'wp-color-picker' ), false, true);
41
+ }
42
  }
43
 
44
  function wordpress_file_upload_add_admin_pages() {
45
+ global $wpdb;
46
+ $table_name1 = $wpdb->prefix . "wfu_log";
47
+
48
  $page_hook_suffix = false;
49
  if ( current_user_can( 'manage_options' ) ) $page_hook_suffix = add_options_page('Wordpress File Upload', 'Wordpress File Upload', 'manage_options', 'wordpress_file_upload', 'wordpress_file_upload_manage_dashboard');
50
  if ( $page_hook_suffix !== false ) add_action('admin_print_scripts-'.$page_hook_suffix, 'wfu_enqueue_admin_scripts');
51
+ //add Uploaded Files menu if it is allowed
52
+ $page_hook_suffix = false;
53
+ if ( current_user_can( 'manage_options' ) && WFU_VAR("WFU_UPLOADEDFILES_MENU") == "true" ) {
54
+ //get the last idlog read from options; create the option if it does not
55
+ //exist pointing to the currently last idlog
56
+ $last_idlog = get_option( "wordpress_file_upload_last_idlog" );
57
+ if ( $last_idlog === false ) {
58
+ $latest_idlog = $wpdb->get_var('SELECT MAX(idlog) FROM '.$table_name1);
59
+ $last_idlog = array( 'pre' => $latest_idlog, 'post' => $latest_idlog, 'time' => time() );
60
+ update_option( "wordpress_file_upload_last_idlog", $last_idlog );
61
+ }
62
+ $limit = (int)WFU_VAR("WFU_UPLOADEDFILES_RESET_TIME");
63
+ if ( $limit == -1 || time() > $last_idlog["time"] + $limit ) $unread_files_count = wfu_get_unread_files_count($last_idlog["post"]);
64
+ else $unread_files_count = wfu_get_unread_files_count($last_idlog["pre"]);
65
+ $text = $unread_files_count;
66
+ if ( $unread_files_count > 99 ) $text = "99+";
67
+ $title = 'Uploaded Files <span class="update-plugins count-'.$unread_files_count.'"><span class="plugin-count">'.$text.'</span></span>';
68
+ $page_hook_suffix = add_menu_page(
69
+ 'Uploaded Files',
70
+ $title,
71
+ 'manage_options',
72
+ 'wfu_uploaded_files',
73
+ 'wfu_uploadedfiles_menu',
74
+ 'dashicons-upload',
75
+ 6
76
+ );
77
+ }
78
+ if ( $page_hook_suffix !== false ) add_action('admin_print_scripts-'.$page_hook_suffix, 'wfu_enqueue_uploadedfiles_admin_scripts');
79
  }
80
 
81
  function wfu_enqueue_admin_scripts() {
105
  }
106
  }
107
 
108
+ function wfu_enqueue_uploadedfiles_admin_scripts() {
109
+ $uri = $_SERVER['REQUEST_URI'];
110
+ $is_admin = current_user_can( 'manage_options' );
111
+ if ( is_admin() && ( ( $is_admin && strpos($uri, "admin.php") !== false ) ) ) {
112
+ //apply wfu_before_admin_scripts to get additional settings
113
+ $changable_data = array();
114
+ $ret_data = apply_filters('wfu_before_uploadedfiles_admin_scripts', $changable_data);
115
+ //if $ret_data contains 'return_value' key then no scripts will be
116
+ //enqueued
117
+ if ( isset($ret_data['return_value']) ) return $ret_data['return_value'];
118
+ //continue with script and style enqueuing
119
+ wp_enqueue_style('wordpress-file-upload-admin-style');
120
+ //do not enqueue JQuery UI css if $ret_data denotes incompatibility
121
+ //issues
122
+ if ( ( !isset($ret_data["correct_NextGenGallery_incompatibility"]) || $ret_data["correct_NextGenGallery_incompatibility"] != "true" ) &&
123
+ ( !isset($ret_data["correct_JQueryUI_incompatibility"]) || $ret_data["correct_JQueryUI_incompatibility"] != "true" ) )
124
+ wp_enqueue_style('jquery-ui-css');
125
+ wp_enqueue_script('wordpress_file_upload_admin_script');
126
+ $AdminParams = array("wfu_ajax_url" => site_url()."/wp-admin/admin-ajax.php");
127
+ wp_localize_script( 'wordpress_file_upload_admin_script', 'AdminParams', $AdminParams );
128
+ }
129
+ }
130
+
131
  function wordpress_file_upload_install() {
132
  global $wpdb;
133
  global $wfu_tb_log_version;
246
  $page = $tag;
247
  if ( $page == '' ) $page = 1;
248
  $page = (int)wfu_sanitize_int($page);
249
+ $located_rec = $invoker;
250
+ if ( $located_rec == '' ) $located_rec = -1;
251
+ $located_rec = (int)wfu_sanitize_int($located_rec);
252
+ $echo_str = wfu_view_log($page, false, $located_rec);
253
  }
254
  elseif ( $action == 'rename_file' && $file != "" ) {
255
  $echo_str = wfu_rename_file_prompt($file, 'file', false);
317
  }
318
  elseif ( $action == 'edit_filedetails' && $file != "" ) {
319
  wfu_edit_filedetails($file);
320
+ $echo_str = wfu_file_details($file, false, $invoker);
321
  }
322
  elseif ( $action == 'personal_data' && $plugin_options["personaldata"] == "1" ) {
323
  $echo_str = wfu_manage_personaldata_policies();
lib/wfu_admin_browser.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
4
  $siteurl = site_url();
5
  $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
6
  $user = wp_get_current_user();
@@ -13,16 +13,29 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
13
  //clean session array holding dir and file paths if it is too big
14
  if ( WFU_USVAR_exists('wfu_filepath_safe_storage') && count(WFU_USVAR('wfu_filepath_safe_storage')) > WFU_VAR("WFU_PHP_ARRAY_MAXLEN") ) WFU_USVAR_store('wfu_filepath_safe_storage', array());
15
 
16
- //extract sort info from basedir
 
 
 
 
17
  $sort = "";
 
 
 
18
  if ( $basedir !== false ) {
19
  $ret = wfu_extract_sortdata_from_path($basedir);
20
  $basedir = $ret['path'];
21
  $sort = $ret['sort'];
 
 
22
  }
23
  if ( $sort == "" ) $sort = 'name';
24
  if ( substr($sort, 0, 1) == '-' ) $order = SORT_DESC;
25
  else $order = SORT_ASC;
 
 
 
 
26
 
27
  //adjust basedir to have a standard format
28
  if ( $basedir !== false ) {
@@ -68,8 +81,8 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
68
  //find contents of current folder taking into account pagination, if it is
69
  //activated; contents are found following an optimized procedure as follows:
70
  // 1. all dirs and files are found and stored in separate arrays
71
- // 2. if pagination is activated then it is checked if there are any dirs in
72
- // the current page
73
  // 3. if dir sorting is name then dirs are sorted
74
  // 4. if dir sorting is date then stat is called for all dirs and then they
75
  // are sorted
@@ -83,12 +96,13 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
83
  // then they are sorted
84
  // 9. if file sorting is user then db record is retrieved for all files and
85
  // then they are sorted
86
- // 10. if pagination is activated then files array is sliced to keep only the
87
- // ones fitting in the page; then stat is called and/or db record is
88
  // retrieved
89
  //first calculate dirs and files arrays
90
  $dirlist = array();
91
  $dirlist_include = true;
 
92
  $dirstat_ok = false;
93
  $filelist = array();
94
  $filestat_ok = false;
@@ -109,10 +123,13 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
109
  $maxrows = (int)WFU_VAR("WFU_ADMINBROWSER_TABLE_MAXROWS");
110
  $files_total = $dirlist_count + $filelist_count;
111
  if ( $maxrows > 0 ) {
112
- $pages = ceil($files_total / $maxrows);
113
  if ( $page > $pages ) $page = $pages;
114
  //if first item index passes number of dirs then do not include dirs
115
  if ( ($page - 1) * $maxrows >= $dirlist_count ) $dirlist_include = false;
 
 
 
116
  }
117
  //process dirs if they are included in page
118
  if ( $dirlist_include ) {
@@ -125,8 +142,9 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
125
  case "name": $dirsort .= ":s"; break;
126
  case "mdate": $dirsort .= ":n"; break;
127
  }
128
- //if dir sort is mdate then first calculate stat
129
- if ( substr($dirsort, 0, 5) == 'mdate' ) {
 
130
  foreach ( $dirlist as &$dir ) {
131
  $stat = stat($dir['fullpath']);
132
  $dir['mdate'] = $stat['mtime'];
@@ -136,12 +154,26 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
136
  }
137
  //sort dirs
138
  $dirlist = wfu_array_sort($dirlist, $dirsort, $dirorder);
139
- //if pagination is activated then slice dirs array to keep only the items
140
- //belonging in the current page
141
- if ( $maxrows > 0 )
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  $dirlist = array_slice($dirlist, ($page - 1) * $maxrows, $maxrows);
143
- //calculate stat for the remaining dirs array, if it has not already been
144
- //done
 
145
  if ( !$dirstat_ok ) {
146
  foreach ( $dirlist as &$dir ) {
147
  $stat = stat($dir['fullpath']);
@@ -154,6 +186,9 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
154
  //determine if any files will be included in page; in case pagination is
155
  //activated then the remaining places need to be more than zero
156
  $files_included = ( $maxrows > 0 ? ( $maxrows - count($dirlist) > 0 ) : true );
 
 
 
157
  if ( $files_included ) {
158
  //adjust sort details
159
  $filesort = ( substr($sort, -4) == 'date' ? 'mdate' : substr($sort, -4) );
@@ -192,6 +227,24 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
192
  }
193
  //sort files
194
  $filelist = wfu_array_sort($filelist, $filesort, $order);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  //if pagination is activated then slice files array to keep only the items
196
  //belonging in the current page
197
  if ( $maxrows > 0 )
@@ -253,29 +306,29 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
253
  $echo_str .= "\n\t\t\t".'<input id="wfu_download_file_nonce" type="hidden" value="'.wp_create_nonce('wfu_download_file_invoker').'" />';
254
  $echo_str .= "\n\t\t\t".'<input id="wfu_include_file_nonce" type="hidden" value="'.wp_create_nonce('wfu_include_file').'" />';
255
  $echo_str .= "\n\t\t".'</div>';
256
- $echo_str .= "\n\t\t".'<table id="wfu_adminbrowser_table" class="wp-list-table widefat fixed striped">';
257
  $echo_str .= "\n\t\t\t".'<thead>';
258
  $echo_str .= "\n\t\t\t\t".'<tr>';
259
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="5%" style="text-align:center;">';
260
  $echo_str .= "\n\t\t\t\t\t\t".'<input id="wfu_select_all_visible" type="checkbox" onchange="wfu_adminbrowser_select_all_visible_changed();" style="-webkit-appearance:checkbox;" />';
261
- $echo_str .= "\n\t\t\t\t\t".'</th>';
262
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="25%" style="text-align:left;">';
263
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($basedir).'[['.( substr($sort, -4) == 'name' ? ( $order == SORT_ASC ? '-name' : 'name' ) : 'name' ).']]');
264
  $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'">Name'.( substr($sort, -4) == 'name' ? ( $order == SORT_ASC ? ' &uarr;' : ' &darr;' ) : '' ).'</a>';
265
  $echo_str .= "\n\t\t\t\t\t".'</th>';
266
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" style="text-align:right;">';
267
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($basedir).'[['.( substr($sort, -4) == 'size' ? ( $order == SORT_ASC ? '-size' : 'size' ) : 'size' ).']]');
268
  $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'">Size'.( substr($sort, -4) == 'size' ? ( $order == SORT_ASC ? ' &uarr;' : ' &darr;' ) : '' ).'</a>';
269
  $echo_str .= "\n\t\t\t\t\t".'</th>';
270
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="20%" style="text-align:left;">';
271
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($basedir).'[['.( substr($sort, -4) == 'date' ? ( $order == SORT_ASC ? '-date' : 'date' ) : 'date' ).']]');
272
  $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'">Date'.( substr($sort, -4) == 'date' ? ( $order == SORT_ASC ? ' &uarr;' : ' &darr;' ) : '' ).'</a>';
273
  $echo_str .= "\n\t\t\t\t\t".'</th>';
274
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" style="text-align:center;">';
275
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($basedir).'[['.( substr($sort, -4) == 'user' ? ( $order == SORT_ASC ? '-user' : 'user' ) : 'user' ).']]');
276
  $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'">Uploaded By'.( substr($sort, -4) == 'user' ? ( $order == SORT_ASC ? ' &uarr;' : ' &darr;' ) : '' ).'</a>';
277
  $echo_str .= "\n\t\t\t\t\t".'</th>';
278
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="30%" style="text-align:left;">';
279
  $echo_str .= "\n\t\t\t\t\t\t".'<label>User Data</label>';
280
  $echo_str .= "\n\t\t\t\t\t".'</th>';
281
  $echo_str .= "\n\t\t\t\t".'</tr>';
@@ -287,22 +340,22 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
287
  if ( $reldir != "root/" ) {
288
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($updir));
289
  $echo_str .= "\n\t\t\t\t".'<tr>';
290
- $echo_str .= "\n\t\t\t\t\t".'<td width="5%" style="padding: 5px 5px 5px 10px; text-align:center;"><input type="checkbox" disabled="disabled" /></td>';
291
- $echo_str .= "\n\t\t\t\t\t".'<td width="25%" style="padding: 5px 5px 5px 10px; text-align:left;">';
292
  $echo_str .= "\n\t\t\t\t\t\t".'<a class="row-title" href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'" title="go up">..</a>';
293
  $echo_str .= "\n\t\t\t\t\t".'</td>';
294
- $echo_str .= "\n\t\t\t\t\t".'<td width="10%" style="padding: 5px 5px 5px 10px; text-align:right;"> </td>';
295
- $echo_str .= "\n\t\t\t\t\t".'<td width="20%" style="padding: 5px 5px 5px 10px; text-align:left;"> </td>';
296
- $echo_str .= "\n\t\t\t\t\t".'<td width="10%" style="padding: 5px 5px 5px 10px; text-align:center;"> </td>';
297
- $echo_str .= "\n\t\t\t\t\t".'<td width="30%" style="padding: 5px 5px 5px 10px; text-align:left;"> </td>';
298
  $echo_str .= "\n\t\t\t\t".'</tr>';
299
  }
300
  $ii = 1;
301
  foreach ( $dirlist as $dir ) {
302
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($dir['fullpath']).'[['.$sort.']]');
303
  $echo_str .= "\n\t\t\t\t".'<tr onmouseover="var actions=document.getElementsByName(\'wfu_dir_actions\'); for (var i=0; i<actions.length; i++) {actions[i].style.visibility=\'hidden\';} document.getElementById(\'wfu_dir_actions_'.$ii.'\').style.visibility=\'visible\'" onmouseout="var actions=document.getElementsByName(\'wfu_dir_actions\'); for (var i=0; i<actions.length; i++) {actions[i].style.visibility=\'hidden\';}">';
304
- $echo_str .= "\n\t\t\t\t\t".'<td width="5%" style="padding: 5px 5px 5px 10px; text-align:center;"><input type="checkbox" disabled="disabled" /></td>';
305
- $echo_str .= "\n\t\t\t\t\t".'<td width="25%" style="padding: 5px 5px 5px 10px; text-align:left;">';
306
  $echo_str .= "\n\t\t\t\t\t\t".'<a class="row-title" href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'" title="'.$dir['name'].'">'.$dir['name'].'</a>';
307
  $echo_str .= "\n\t\t\t\t\t\t".'<div id="wfu_dir_actions_'.$ii.'" name="wfu_dir_actions" style="visibility:hidden;">';
308
  $echo_str .= "\n\t\t\t\t\t\t\t".'<span style="visibility:hidden;">';
@@ -317,11 +370,12 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
317
  // $echo_str .= "\n\t\t\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=delete_dir&file='.$dir_code.'" title="Delete this folder">Delete</a>';
318
  // $echo_str .= "\n\t\t\t\t\t\t\t".'</span>';
319
  $echo_str .= "\n\t\t\t\t\t\t".'</div>';
 
320
  $echo_str .= "\n\t\t\t\t\t".'</td>';
321
- $echo_str .= "\n\t\t\t\t\t".'<td width="10%" style="padding: 5px 5px 5px 10px; text-align:right;"> </td>';
322
- $echo_str .= "\n\t\t\t\t\t".'<td width="20%" style="padding: 5px 5px 5px 10px; text-align:left;">'.get_date_from_gmt(date("Y-m-d H:i:s", $dir['mdate']), "d/m/Y H:i:s").'</td>';
323
- $echo_str .= "\n\t\t\t\t\t".'<td width="10%" style="padding: 5px 5px 5px 10px; text-align:center;"> </td>';
324
- $echo_str .= "\n\t\t\t\t\t".'<td width="30%" style="padding: 5px 5px 5px 10px; text-align:left;"> </td>';
325
  $echo_str .= "\n\t\t\t\t".'</tr>';
326
  $ii ++;
327
  }
@@ -329,14 +383,15 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
329
  foreach ( $filelist as $file ) {
330
  $is_included = ( $file['filedata'] != null );
331
  $can_be_included = ( $plugin_options['includeotherfiles'] == "1" ) && !wfu_file_extension_blacklisted($file['name']);
 
332
  $file_code = '';
333
  if ( $is_included || $can_be_included ) $file_code = wfu_safe_store_filepath(wfu_path_abs2rel($file['fullpath']).'[['.$sort.']]');
334
- $echo_str .= "\n\t\t\t\t".'<tr onmouseover="var actions=document.getElementsByName(\'wfu_file_actions\'); for (var i=0; i<actions.length; i++) {actions[i].style.visibility=\'hidden\';} document.getElementById(\'wfu_file_actions_'.$ii.'\').style.visibility=\'visible\'" onmouseout="var actions=document.getElementsByName(\'wfu_file_actions\'); for (var i=0; i<actions.length; i++) {actions[i].style.visibility=\'hidden\';}">';
335
- $echo_str .= "\n\t\t\t\t\t".'<td width="5%" style="padding: 5px 5px 5px 10px; text-align:center;">';
336
  if ( $is_included || $can_be_included ) $echo_str .= "\n\t\t\t\t\t\t".'<input class="wfu_selectors'.( $is_included ? ' wfu_included' : '' ).' wfu_selcode_'.$file_code.'" type="checkbox" onchange="wfu_adminbrowser_selector_changed(this);" />';
337
  else $echo_str .= "\n\t\t\t\t\t\t".'<input type="checkbox" disabled="disabled" />';
338
- $echo_str .= "\n\t\t\t\t\t".'</td>';
339
- $echo_str .= "\n\t\t\t\t\t".'<td width="25%" style="padding: 5px 5px 5px 10px; text-align:left;">';
340
  if ( $is_included || $can_be_included )
341
  $echo_str .= "\n\t\t\t\t\t\t".'<a id="wfu_file_link_'.$ii.'" class="row-title" href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_details&file='.$file_code.'" title="View and edit file details" style="font-weight:normal;'.( $is_included ? '' : ' display:none;' ).'">'.$file['name'].'</a>';
342
  if ( !$is_included )
@@ -381,11 +436,12 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
381
  }
382
  $echo_str .= "\n\t\t\t\t\t\t".'</div>';
383
  $echo_str .= "\n\t\t\t\t\t\t".'<div id="wfu_file_download_container_'.$ii.'" style="display: none;"></div>';
 
384
  $echo_str .= "\n\t\t\t\t\t".'</td>';
385
- $echo_str .= "\n\t\t\t\t\t".'<td width="10%" style="padding: 5px 5px 5px 10px; text-align:right;">'.$file['size'].'</td>';
386
- $echo_str .= "\n\t\t\t\t\t".'<td width="20%" style="padding: 5px 5px 5px 10px; text-align:left;">'.get_date_from_gmt(date("Y-m-d H:i:s", $file['mdate']), "d/m/Y H:i:s").'</td>';
387
- $echo_str .= "\n\t\t\t\t\t".'<td width="10%" style="padding: 5px 5px 5px 10px; text-align:center;">'.$file['user'].'</td>';
388
- $echo_str .= "\n\t\t\t\t\t".'<td width="30%" style="padding: 5px 5px 5px 10px; text-align:left;">';
389
  if ( $is_included ) {
390
  if ( count($file['filedata']->userdata) > 0 ) {
391
  $echo_str .= "\n\t\t\t\t\t\t".'<select multiple="multiple" style="width:100%; height:40px; background:none; font-size:small;">';
@@ -407,6 +463,10 @@ function wfu_browse_files($basedir_code, $page = 1, $only_table_rows = false) {
407
  $echo_str .= "\n\t".'</div>';
408
  $echo_str .= "\n".'</div>';
409
  }
 
 
 
 
410
 
411
  return $echo_str;
412
  }
@@ -841,36 +901,73 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
841
  global $wpdb;
842
  $table_name1 = $wpdb->prefix . "wfu_log";
843
  $siteurl = site_url();
 
 
 
 
 
 
 
 
 
 
 
 
 
844
 
845
  $user = wp_get_current_user();
846
  $is_admin = current_user_can( 'manage_options' );
847
  //check if user is allowed to view file details
848
  if ( !$is_admin ) {
 
849
  return;
850
  }
851
- $file_code = wfu_sanitize_code($file_code);
852
- $dec_file = wfu_get_filepath_from_safe($file_code);
853
- if ( $dec_file === false ) return;
 
 
 
 
 
 
 
854
 
855
- //extract file browser data from $file variable
856
- $ret = wfu_extract_sortdata_from_path($dec_file);
857
- $filepath = wfu_path_rel2abs($ret['path']);
858
-
859
- //check if user is allowed to perform this action
860
- if ( !wfu_current_user_owes_file($filepath) ) return;
 
861
 
862
- //get file data from database with user data
863
- $filedata = wfu_get_file_rec($filepath, true);
864
- if ( $filedata == null ) return;
 
 
 
 
 
 
865
 
866
- //get all users
867
- $users = get_users();
 
 
 
 
868
 
869
- //extract sort info and construct contained dir
870
- $parts = pathinfo($filepath);
871
- $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($parts['dirname']).'[['.$ret['sort'].']]');
872
 
873
- $stat = stat($filepath);
 
 
 
 
 
874
 
875
  $echo_str = '<div class="regev_wrap">';
876
  if ( $errorstatus == 'error' ) {
@@ -880,17 +977,31 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
880
  }
881
  //show file detais
882
  $echo_str .= "\n\t".'<h2>Detais of File: '.$parts['basename'].'</h2>';
 
 
 
 
 
 
 
 
 
 
883
  $echo_str .= "\n\t".'<div style="margin-top:10px;">';
884
  if ( $is_admin ) {
885
  $invoker_action = ( $invoker == '' ? false : wfu_get_browser_params_from_safe($invoker) );
886
  $goback_action = ( $invoker_action === false ? 'file_browser&dir='.$dir_code : $invoker_action );
887
- $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action='.$goback_action.'" class="button" title="go back">Go back</a>';
 
 
 
888
  $echo_str .= "\n\t\t".'<form enctype="multipart/form-data" name="editfiledetails" id="editfiledetails" method="post" action="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=edit_filedetails" class="validate">';
889
  }
890
  $echo_str .= "\n\t\t\t".'<h3 style="margin-bottom: 10px; margin-top: 40px;">Upload Details</h3>';
891
  $echo_str .= "\n\t\t\t".'<input type="hidden" name="action" value="edit_filedetails" />';
892
- $echo_str .= "\n\t\t\t".'<input type="hidden" name="dir" value="'.$dir_code.'">';
893
- $echo_str .= "\n\t\t\t".'<input type="hidden" name="file" value="'.$file_code.'">';
 
894
  $echo_str .= "\n\t\t\t".'<table class="form-table">';
895
  $echo_str .= "\n\t\t\t\t".'<tbody>';
896
  if ( $is_admin ) {
@@ -908,14 +1019,18 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
908
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
909
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
910
  $echo_str .= "\n\t\t\t\t\t\t\t".'<select id="wfu_filedetails_users" disabled="disabled">';
 
 
911
  foreach ( $users as $userid => $user )
912
- $echo_str .= "\n\t\t\t\t\t\t\t\t".'<option value="'.$user->ID.'"'.( $filedata->uploaduserid == $user->ID ? ' selected="selected"' : '' ).'>'.$user->display_name.' ('.$user->user_login.')</option>';
913
  $echo_str .= "\n\t\t\t\t\t\t\t".'</select>';
914
- $echo_str .= "\n\t\t\t\t\t\t\t".'<a class="button" id="btn_change" href="" onclick="document.getElementById(\'wfu_filedetails_users\').disabled = false; this.style.display = \'none\'; document.getElementById(\'btn_ok\').style.display = \'inline-block\'; document.getElementById(\'btn_cancel\').style.display = \'inline-block\'; return false;"'.( $is_admin ? '' : ' style="display:none;"' ).'>Change User</a>';
915
- $echo_str .= "\n\t\t\t\t\t\t\t".'<a class="button" id="btn_ok" href="" onclick="document.getElementById(\'wfu_filedetails_users\').disabled = true; document.getElementById(\'btn_change\').style.display = \'inline-block\'; this.style.display=\'none\'; document.getElementById(\'btn_cancel\').style.display = \'none\'; document.getElementById(\'wfu_filedetails_userid\').value = document.getElementById(\'wfu_filedetails_users\').value; wfu_filedetails_changed(); return false;" style="display:none;">Ok</a>';
916
- $echo_str .= "\n\t\t\t\t\t\t\t".'<a class="button" id="btn_cancel" href="" onclick="document.getElementById(\'wfu_filedetails_users\').disabled = true; document.getElementById(\'btn_change\').style.display = \'inline-block\'; this.style.display=\'none\'; document.getElementById(\'btn_ok\').style.display = \'none\'; document.getElementById(\'wfu_filedetails_users\').value = document.getElementById(\'wfu_filedetails_userid\').value; return false;" style="display:none;">Cancel</a>';
917
- $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="hidden" id="wfu_filedetails_userid" name="wfu_filedetails_userid" value="'.$filedata->uploaduserid.'" />';
918
- $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="hidden" id="wfu_filedetails_userid_default" value="'.$filedata->uploaduserid.'" />';
 
 
919
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
920
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
921
  }
@@ -924,7 +1039,7 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
924
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>File Size</label>';
925
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
926
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
927
- $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="text" value="'.$filedata->filesize.'" readonly="readonly" style="width:auto;" />';
928
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
929
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
930
  $echo_str .= "\n\t\t\t\t\t".'<tr>';
@@ -932,7 +1047,7 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
932
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>File Date</label>';
933
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
934
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
935
- $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="text" value="'.get_date_from_gmt(date("Y-m-d H:i:s", $stat['mtime']), "d/m/Y H:i:s").'" readonly="readonly" style="width:auto;" />';
936
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
937
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
938
  $echo_str .= "\n\t\t\t\t\t".'<tr>';
@@ -940,7 +1055,7 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
940
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>Uploaded From Page</label>';
941
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
942
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
943
- $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="text" value="'.get_the_title($filedata->pageid).' ('.$filedata->pageid.')'.'" readonly="readonly" style="width:50%;" />';
944
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
945
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
946
  if ( $is_admin ) {
@@ -949,7 +1064,7 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
949
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>Upload Plugin ID</label>';
950
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
951
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
952
- $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="text" value="'.$filedata->sid.'" readonly="readonly" style="width:auto;" />';
953
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
954
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
955
  }
@@ -965,35 +1080,28 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
965
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label></label>';
966
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
967
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
968
- //read all linked records
969
- $filerecs = array();
970
- array_push($filerecs, $filedata);
971
- $currec = $filedata;
972
- while ( $currec->linkedto > 0 ) {
973
- $currec = $wpdb->get_row('SELECT * FROM '.$table_name1.' WHERE idlog = '.$currec->linkedto);
974
- if ( $currec != null ) array_push($filerecs, $currec);
975
- else break;
976
- }
977
  //construct report from db records
978
  $rep = '';
979
- foreach ( $filerecs as $filerec ) {
980
- $username = wfu_get_username_by_id($filerec->userid);
981
- $fileparts = pathinfo($filerec->filepath);
982
  if ( $rep != '' ) $rep .= "<br />";
983
- $rep .= '<strong>['.get_date_from_gmt($filerec->date_from).']</strong> ';
984
- if ( $filerec->action == 'upload' )
985
  $rep .= 'File uploaded with name <strong>'.$fileparts['basename'].'</strong> by user <strong>'.$username.'</strong>';
986
- elseif ( $filerec->action == 'include' )
987
  $rep .= 'File included in database with name <strong>'.$fileparts['basename'].'</strong> by user <strong>'.$username.'</strong>';
988
- elseif ( $filerec->action == 'download' )
989
  $rep .= 'File downloaded by user <strong>'.$username.'</strong>';
990
- elseif ( $filerec->action == 'rename' )
991
  $rep .= 'File renamed to <strong>'.$fileparts['basename'].'</strong> by user <strong>'.$username.'</strong>';
992
- elseif ( $filerec->action == 'delete' )
993
  $rep .= 'File deleted by user <strong>'.$username.'</strong>';
994
- elseif ( $filerec->action == 'modify' )
995
  $rep .= 'File userdata modified by user <strong>'.$username.'</strong>';
996
- elseif ( $filerec->action == 'changeuser' )
997
  $rep .= 'File upload user modified by user <strong>'.$username.'</strong>';
998
  }
999
  $echo_str .= "\n\t\t\t\t\t\t\t".'<div style="border:1px solid #dfdfdf; border-radius:3px; width:50%; overflow:scroll; padding:6px; height:100px; background-color:#eee;">';
@@ -1008,15 +1116,15 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
1008
  $echo_str .= "\n\t\t\t".'<h3 style="margin-bottom: 10px; margin-top: 40px;">User Data Details</h3>';
1009
  $echo_str .= "\n\t\t\t".'<table class="form-table">';
1010
  $echo_str .= "\n\t\t\t\t".'<tbody>';
1011
- if ( count($filedata->userdata) > 0 ) {
1012
- foreach ( $filedata->userdata as $userdata ) {
1013
  $echo_str .= "\n\t\t\t\t\t".'<tr>';
1014
  $echo_str .= "\n\t\t\t\t\t\t".'<th scope="row">';
1015
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>'.$userdata->property.'</label>';
1016
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
1017
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
1018
  // $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_value_'.$userdata->propkey.'" name="wfu_filedetails_userdata" type="text"'.( $is_admin ? '' : ' readonly="readonly"' ).' value="'.$userdata->propvalue.'" />';
1019
- $echo_str .= "\n\t\t\t\t\t\t\t".'<textarea id="wfu_filedetails_userdata_value_'.$userdata->propkey.'" name="wfu_filedetails_userdata" '.( $is_admin ? '' : ' readonly="readonly"' ).' value="'.$userdata->propvalue.'">'.$userdata->propvalue.'</textarea>';
1020
  $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_default_'.$userdata->propkey.'" type="hidden" value="'.$userdata->propvalue.'" />';
1021
  $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_'.$userdata->propkey.'" name="wfu_filedetails_userdata_'.$userdata->propkey.'" type="hidden" value="'.$userdata->propvalue.'" />';
1022
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
@@ -1033,7 +1141,7 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
1033
  }
1034
  $echo_str .= "\n\t\t\t\t".'</tbody>';
1035
  $echo_str .= "\n\t\t\t".'</table>';
1036
- if ( $is_admin ) {
1037
  $echo_str .= "\n\t\t\t".'<p class="submit">';
1038
  $echo_str .= "\n\t\t\t\t".'<input id="dp_filedetails_submit_fields" type="submit" class="button-primary" name="submit" value="Update" disabled="disabled" />';
1039
  $echo_str .= "\n\t\t\t".'</p>';
@@ -1050,32 +1158,59 @@ function wfu_file_details($file_code, $errorstatus, $invoker = '') {
1050
  function wfu_edit_filedetails($file_code) {
1051
  global $wpdb;
1052
  $table_name2 = $wpdb->prefix . "wfu_userdata";
 
 
 
 
 
 
1053
 
1054
  $user = wp_get_current_user();
1055
  $is_admin = current_user_can( 'manage_options' );
1056
  //check if user is allowed to view file details
1057
  if ( !$is_admin ) {
 
1058
  return;
1059
  }
1060
- $file_code = wfu_sanitize_code($file_code);
1061
- $dec_file = wfu_get_filepath_from_safe($file_code);
1062
- if ( $dec_file === false ) return;
 
 
 
 
 
 
 
1063
 
1064
- $dec_file = wfu_path_rel2abs(wfu_flatten_path($dec_file));
 
 
 
 
 
 
 
 
 
 
1065
 
1066
- //check if user is allowed to perform this action
1067
- if ( !wfu_current_user_owes_file($dec_file) ) return;
 
 
1068
 
1069
- //get file data from database with user data
1070
- $filedata = wfu_get_file_rec($dec_file, true);
1071
- if ( $filedata == null ) return;
 
1072
 
1073
  if ( isset($_POST['submit']) ) {
1074
  if ( $_POST['submit'] == "Update" ) {
1075
- if ( !is_array($filedata->userdata) ) $filedata->userdata = array();
1076
  //check for errors
1077
  $is_error = false;
1078
- foreach ( $filedata->userdata as $userdata ) {
1079
  if ( !isset($_POST['wfu_filedetails_userdata_'.$userdata->propkey]) ) {
1080
  $is_error = true;
1081
  break;
@@ -1084,7 +1219,7 @@ function wfu_edit_filedetails($file_code) {
1084
  if ( !$is_error ) {
1085
  $now_date = date('Y-m-d H:i:s');
1086
  $userdata_count = 0;
1087
- foreach ( $filedata->userdata as $userdata ) {
1088
  $userdata_count ++;
1089
  //make existing userdata record obsolete
1090
  $wpdb->update($table_name2,
@@ -1113,10 +1248,10 @@ function wfu_edit_filedetails($file_code) {
1113
  )
1114
  );
1115
  }
1116
- if ( $userdata_count > 0 ) wfu_log_action('modify:'.$now_date, $dec_file, $user->ID, '', 0, 0, '', null);
1117
  }
1118
- if ( isset($_POST['wfu_filedetails_userid']) && $_POST['wfu_filedetails_userid'] != $filedata->uploaduserid ) {
1119
- wfu_log_action('changeuser:'.$_POST['wfu_filedetails_userid'], $dec_file, $user->ID, '', 0, 0, '', null);
1120
  }
1121
  }
1122
  }
1
  <?php
2
 
3
+ function wfu_browse_files($basedir_code, $page = -1, $only_table_rows = false) {
4
  $siteurl = site_url();
5
  $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
6
  $user = wp_get_current_user();
13
  //clean session array holding dir and file paths if it is too big
14
  if ( WFU_USVAR_exists('wfu_filepath_safe_storage') && count(WFU_USVAR('wfu_filepath_safe_storage')) > WFU_VAR("WFU_PHP_ARRAY_MAXLEN") ) WFU_USVAR_store('wfu_filepath_safe_storage', array());
15
 
16
+ //basedir may also contain information about the sorting of the displayed
17
+ //elements, as well as a filename that needs to be located and get focus on
18
+ //the browser;
19
+ //sorting information is enclosed in double brackets: [[sort_info]]
20
+ //filename information is enclosed in double braces: {{filename}}
21
  $sort = "";
22
+ $located_file = "";
23
+ $located_file_found = false;
24
+ $filter = "";
25
  if ( $basedir !== false ) {
26
  $ret = wfu_extract_sortdata_from_path($basedir);
27
  $basedir = $ret['path'];
28
  $sort = $ret['sort'];
29
+ $located_file = $ret['file'];
30
+ $filter = $ret['filter'];
31
  }
32
  if ( $sort == "" ) $sort = 'name';
33
  if ( substr($sort, 0, 1) == '-' ) $order = SORT_DESC;
34
  else $order = SORT_ASC;
35
+ //if page is not -1, then do not locate a file
36
+ if ( $located_file != "" && $page > -1 ) $located_file = "";
37
+ //adjust page to be larger than zero
38
+ if ( $page < 1 ) $page = 1;
39
 
40
  //adjust basedir to have a standard format
41
  if ( $basedir !== false ) {
81
  //find contents of current folder taking into account pagination, if it is
82
  //activated; contents are found following an optimized procedure as follows:
83
  // 1. all dirs and files are found and stored in separate arrays
84
+ // 2. if pagination is activated then it is checked if there are any dirs
85
+ // in the current page
86
  // 3. if dir sorting is name then dirs are sorted
87
  // 4. if dir sorting is date then stat is called for all dirs and then they
88
  // are sorted
96
  // then they are sorted
97
  // 9. if file sorting is user then db record is retrieved for all files and
98
  // then they are sorted
99
+ // 10. if pagination is activated then files array is sliced to keep only
100
+ // the ones fitting in the page; then stat is called and/or db record is
101
  // retrieved
102
  //first calculate dirs and files arrays
103
  $dirlist = array();
104
  $dirlist_include = true;
105
+ $dirlist_perpage = array();
106
  $dirstat_ok = false;
107
  $filelist = array();
108
  $filestat_ok = false;
123
  $maxrows = (int)WFU_VAR("WFU_ADMINBROWSER_TABLE_MAXROWS");
124
  $files_total = $dirlist_count + $filelist_count;
125
  if ( $maxrows > 0 ) {
126
+ $pages = max(ceil($files_total / $maxrows), 1);
127
  if ( $page > $pages ) $page = $pages;
128
  //if first item index passes number of dirs then do not include dirs
129
  if ( ($page - 1) * $maxrows >= $dirlist_count ) $dirlist_include = false;
130
+ //if a filename has been defined to get focus, then $dirlist_include
131
+ //needs to be true in order to calculate the dirs of every page
132
+ if ( $located_file != "" ) $dirlist_include = true;
133
  }
134
  //process dirs if they are included in page
135
  if ( $dirlist_include ) {
142
  case "name": $dirsort .= ":s"; break;
143
  case "mdate": $dirsort .= ":n"; break;
144
  }
145
+ //if dir sort is mdate or if a file needs to be located then first
146
+ //calculate stat
147
+ if ( substr($dirsort, 0, 5) == 'mdate' || $located_file != "" ) {
148
  foreach ( $dirlist as &$dir ) {
149
  $stat = stat($dir['fullpath']);
150
  $dir['mdate'] = $stat['mtime'];
154
  }
155
  //sort dirs
156
  $dirlist = wfu_array_sort($dirlist, $dirsort, $dirorder);
157
+ //if pagination is activated then slice dirs array to keep only the
158
+ //items belonging in the current page
159
+ if ( $maxrows > 0 ) {
160
+ //before slicing we store the items in $dirlist_perpage array
161
+ $i = $maxrows;
162
+ $ipage = 0;
163
+ foreach ( $dirlist as $dir ) {
164
+ if ( $i >= $maxrows ) {
165
+ $i = 0;
166
+ $ipage ++;
167
+ $dirlist_perpage[$ipage] = array();
168
+ }
169
+ array_push($dirlist_perpage[$ipage], $dir);
170
+ $i ++;
171
+ }
172
+ //now we slice $dirlist
173
  $dirlist = array_slice($dirlist, ($page - 1) * $maxrows, $maxrows);
174
+ }
175
+ //calculate stat for the remaining dirs array, if it has not already
176
+ //been done
177
  if ( !$dirstat_ok ) {
178
  foreach ( $dirlist as &$dir ) {
179
  $stat = stat($dir['fullpath']);
186
  //determine if any files will be included in page; in case pagination is
187
  //activated then the remaining places need to be more than zero
188
  $files_included = ( $maxrows > 0 ? ( $maxrows - count($dirlist) > 0 ) : true );
189
+ //if a filename has been defined to get focus, then $files_included
190
+ //needs to be true in order to re-calculate the page
191
+ if ( $located_file != "" ) $files_included = true;
192
  if ( $files_included ) {
193
  //adjust sort details
194
  $filesort = ( substr($sort, -4) == 'date' ? 'mdate' : substr($sort, -4) );
227
  }
228
  //sort files
229
  $filelist = wfu_array_sort($filelist, $filesort, $order);
230
+ //if pagination is activated and a file needs to receive focus, then we
231
+ //need to calculate the page where the file is shown
232
+ if ( $maxrows > 0 && $located_file != "" ) {
233
+ $i = $dirlist_count;
234
+ foreach ( $filelist as $key => $file ) {
235
+ if ( $file['name'] == $located_file ) {
236
+ $located_file_found = true;
237
+ $filelist[$key]['highlighted'] = 1;
238
+ break;
239
+ }
240
+ $i ++;
241
+ }
242
+ if ( $located_file_found ) {
243
+ $page = floor( $i / $maxrows ) + 1;
244
+ if ( isset($dirlist_perpage[$page]) ) $dirlist = $dirlist_perpage[$page];
245
+ else $dirlist = array();
246
+ }
247
+ }
248
  //if pagination is activated then slice files array to keep only the items
249
  //belonging in the current page
250
  if ( $maxrows > 0 )
306
  $echo_str .= "\n\t\t\t".'<input id="wfu_download_file_nonce" type="hidden" value="'.wp_create_nonce('wfu_download_file_invoker').'" />';
307
  $echo_str .= "\n\t\t\t".'<input id="wfu_include_file_nonce" type="hidden" value="'.wp_create_nonce('wfu_include_file').'" />';
308
  $echo_str .= "\n\t\t".'</div>';
309
+ $echo_str .= "\n\t\t".'<table id="wfu_adminbrowser_table" class="wfu-adminbrowser wp-list-table widefat fixed striped">';
310
  $echo_str .= "\n\t\t\t".'<thead>';
311
  $echo_str .= "\n\t\t\t\t".'<tr>';
312
+ $echo_str .= "\n\t\t\t\t\t".'<td scope="col" width="5%" class="manage-column check-column">';
313
  $echo_str .= "\n\t\t\t\t\t\t".'<input id="wfu_select_all_visible" type="checkbox" onchange="wfu_adminbrowser_select_all_visible_changed();" style="-webkit-appearance:checkbox;" />';
314
+ $echo_str .= "\n\t\t\t\t\t".'</td>';
315
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="25%" class="manage-column column-primary">';
316
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($basedir).'[['.( substr($sort, -4) == 'name' ? ( $order == SORT_ASC ? '-name' : 'name' ) : 'name' ).']]');
317
  $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'">Name'.( substr($sort, -4) == 'name' ? ( $order == SORT_ASC ? ' &uarr;' : ' &darr;' ) : '' ).'</a>';
318
  $echo_str .= "\n\t\t\t\t\t".'</th>';
319
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" class="manage-column">';
320
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($basedir).'[['.( substr($sort, -4) == 'size' ? ( $order == SORT_ASC ? '-size' : 'size' ) : 'size' ).']]');
321
  $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'">Size'.( substr($sort, -4) == 'size' ? ( $order == SORT_ASC ? ' &uarr;' : ' &darr;' ) : '' ).'</a>';
322
  $echo_str .= "\n\t\t\t\t\t".'</th>';
323
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="20%" class="manage-column">';
324
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($basedir).'[['.( substr($sort, -4) == 'date' ? ( $order == SORT_ASC ? '-date' : 'date' ) : 'date' ).']]');
325
  $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'">Date'.( substr($sort, -4) == 'date' ? ( $order == SORT_ASC ? ' &uarr;' : ' &darr;' ) : '' ).'</a>';
326
  $echo_str .= "\n\t\t\t\t\t".'</th>';
327
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" class="manage-column">';
328
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($basedir).'[['.( substr($sort, -4) == 'user' ? ( $order == SORT_ASC ? '-user' : 'user' ) : 'user' ).']]');
329
  $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'">Uploaded By'.( substr($sort, -4) == 'user' ? ( $order == SORT_ASC ? ' &uarr;' : ' &darr;' ) : '' ).'</a>';
330
  $echo_str .= "\n\t\t\t\t\t".'</th>';
331
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="30%" class="manage-column">';
332
  $echo_str .= "\n\t\t\t\t\t\t".'<label>User Data</label>';
333
  $echo_str .= "\n\t\t\t\t\t".'</th>';
334
  $echo_str .= "\n\t\t\t\t".'</tr>';
340
  if ( $reldir != "root/" ) {
341
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($updir));
342
  $echo_str .= "\n\t\t\t\t".'<tr>';
343
+ $echo_str .= "\n\t\t\t\t\t".'<th class="check-column"><input type="checkbox" disabled="disabled" /></th>';
344
+ $echo_str .= "\n\t\t\t\t\t".'<td class="column-primary" data-colname="Name">';
345
  $echo_str .= "\n\t\t\t\t\t\t".'<a class="row-title" href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'" title="go up">..</a>';
346
  $echo_str .= "\n\t\t\t\t\t".'</td>';
347
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Size"> </td>';
348
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Date"> </td>';
349
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Uploaded By"> </td>';
350
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="User Data"> </td>';
351
  $echo_str .= "\n\t\t\t\t".'</tr>';
352
  }
353
  $ii = 1;
354
  foreach ( $dirlist as $dir ) {
355
  $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($dir['fullpath']).'[['.$sort.']]');
356
  $echo_str .= "\n\t\t\t\t".'<tr onmouseover="var actions=document.getElementsByName(\'wfu_dir_actions\'); for (var i=0; i<actions.length; i++) {actions[i].style.visibility=\'hidden\';} document.getElementById(\'wfu_dir_actions_'.$ii.'\').style.visibility=\'visible\'" onmouseout="var actions=document.getElementsByName(\'wfu_dir_actions\'); for (var i=0; i<actions.length; i++) {actions[i].style.visibility=\'hidden\';}">';
357
+ $echo_str .= "\n\t\t\t\t\t".'<th class="check-column"><input type="checkbox" disabled="disabled" /></th>';
358
+ $echo_str .= "\n\t\t\t\t\t".'<td class="column-primary" data-colname="Name">';
359
  $echo_str .= "\n\t\t\t\t\t\t".'<a class="row-title" href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code.'" title="'.$dir['name'].'">'.$dir['name'].'</a>';
360
  $echo_str .= "\n\t\t\t\t\t\t".'<div id="wfu_dir_actions_'.$ii.'" name="wfu_dir_actions" style="visibility:hidden;">';
361
  $echo_str .= "\n\t\t\t\t\t\t\t".'<span style="visibility:hidden;">';
370
  // $echo_str .= "\n\t\t\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=delete_dir&file='.$dir_code.'" title="Delete this folder">Delete</a>';
371
  // $echo_str .= "\n\t\t\t\t\t\t\t".'</span>';
372
  $echo_str .= "\n\t\t\t\t\t\t".'</div>';
373
+ $echo_str .= "\n\t\t\t\t\t\t".'<button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>';
374
  $echo_str .= "\n\t\t\t\t\t".'</td>';
375
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Size"> </td>';
376
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Date">'.get_date_from_gmt(date("Y-m-d H:i:s", $dir['mdate']), "d/m/Y H:i:s").'</td>';
377
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Uploaded By"> </td>';
378
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="User Data"> </td>';
379
  $echo_str .= "\n\t\t\t\t".'</tr>';
380
  $ii ++;
381
  }
383
  foreach ( $filelist as $file ) {
384
  $is_included = ( $file['filedata'] != null );
385
  $can_be_included = ( $plugin_options['includeotherfiles'] == "1" ) && !wfu_file_extension_blacklisted($file['name']);
386
+ $highlighted = ( isset($file['highlighted']) && $file['highlighted'] == 1 );
387
  $file_code = '';
388
  if ( $is_included || $can_be_included ) $file_code = wfu_safe_store_filepath(wfu_path_abs2rel($file['fullpath']).'[['.$sort.']]');
389
+ $echo_str .= "\n\t\t\t\t".'<tr '.( $highlighted ? 'class="wfu-highlighted" ' : '' ).'onmouseover="var actions=document.getElementsByName(\'wfu_file_actions\'); for (var i=0; i<actions.length; i++) {actions[i].style.visibility=\'hidden\';} document.getElementById(\'wfu_file_actions_'.$ii.'\').style.visibility=\'visible\'" onmouseout="var actions=document.getElementsByName(\'wfu_file_actions\'); for (var i=0; i<actions.length; i++) {actions[i].style.visibility=\'hidden\';}">';
390
+ $echo_str .= "\n\t\t\t\t\t".'<th class="check-column">';
391
  if ( $is_included || $can_be_included ) $echo_str .= "\n\t\t\t\t\t\t".'<input class="wfu_selectors'.( $is_included ? ' wfu_included' : '' ).' wfu_selcode_'.$file_code.'" type="checkbox" onchange="wfu_adminbrowser_selector_changed(this);" />';
392
  else $echo_str .= "\n\t\t\t\t\t\t".'<input type="checkbox" disabled="disabled" />';
393
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
394
+ $echo_str .= "\n\t\t\t\t\t".'<td class="column-primary" data-colname="Name">';
395
  if ( $is_included || $can_be_included )
396
  $echo_str .= "\n\t\t\t\t\t\t".'<a id="wfu_file_link_'.$ii.'" class="row-title" href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_details&file='.$file_code.'" title="View and edit file details" style="font-weight:normal;'.( $is_included ? '' : ' display:none;' ).'">'.$file['name'].'</a>';
397
  if ( !$is_included )
436
  }
437
  $echo_str .= "\n\t\t\t\t\t\t".'</div>';
438
  $echo_str .= "\n\t\t\t\t\t\t".'<div id="wfu_file_download_container_'.$ii.'" style="display: none;"></div>';
439
+ $echo_str .= "\n\t\t\t\t\t\t".'<button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>';
440
  $echo_str .= "\n\t\t\t\t\t".'</td>';
441
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Size">'.$file['size'].'</td>';
442
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Date">'.get_date_from_gmt(date("Y-m-d H:i:s", $file['mdate']), "d/m/Y H:i:s").'</td>';
443
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Uploaded By">'.$file['user'].'</td>';
444
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="User Data">';
445
  if ( $is_included ) {
446
  if ( count($file['filedata']->userdata) > 0 ) {
447
  $echo_str .= "\n\t\t\t\t\t\t".'<select multiple="multiple" style="width:100%; height:40px; background:none; font-size:small;">';
463
  $echo_str .= "\n\t".'</div>';
464
  $echo_str .= "\n".'</div>';
465
  }
466
+ if ( $located_file_found ) {
467
+ $handler = 'function() { wfu_focus_table_on_highlighted_file("wfu_adminbrowser_table"); }';
468
+ $echo_str .= "\n\t".'<script type="text/javascript">if(window.addEventListener) { window.addEventListener("load", '.$handler.', false); } else if(window.attachEvent) { window.attachEvent("onload", '.$handler.'); } else { window["onload"] = '.$handler.'; }</script>';
469
+ }
470
 
471
  return $echo_str;
472
  }
901
  global $wpdb;
902
  $table_name1 = $wpdb->prefix . "wfu_log";
903
  $siteurl = site_url();
904
+ $allow_obsolete = false;
905
+ $file_exists = true;
906
+ $file_belongs = true;
907
+ $admin_can_edit = true;
908
+
909
+ //if $file_code starts with 'byID:', then it contains a db record ID and not
910
+ //a file path; in this case we show the properties of the specific record
911
+ //and all linked ones, even if it is obsolete; this is only allowed for
912
+ //admins
913
+ if ( substr($file_code, 0, 5) == "byID:" ) {
914
+ $allow_obsolete = true;
915
+ $file_code = substr($file_code, 5);
916
+ }
917
 
918
  $user = wp_get_current_user();
919
  $is_admin = current_user_can( 'manage_options' );
920
  //check if user is allowed to view file details
921
  if ( !$is_admin ) {
922
+ if ( $allow_obsolete ) return;
923
  return;
924
  }
925
+ if ( $allow_obsolete ) {
926
+ $file_code = wfu_sanitize_int($file_code);
927
+ $initialrec = wfu_get_file_rec_from_id($file_code, true);
928
+ if ( $initialrec == null ) return;
929
+
930
+ //get all associated file records
931
+ $filerecs = wfu_get_rec_new_history($initialrec->idlog);
932
+ //get the latest record of this upload
933
+ $filerec = $filerecs[count($filerecs) - 1];
934
+ $filerec->userdata = $initialrec->userdata;
935
 
936
+ $filepath = wfu_path_rel2abs($filerec->filepath);
937
+ //in the case of $allow_obsolete we need to check if the file exists and
938
+ //if it belongs to the current record
939
+ $latestrec = wfu_get_file_rec($filepath, true);
940
+ $file_exists = ( $latestrec != null );
941
+ $file_belongs = ( $file_exists && $latestrec->idlog == $filerec->idlog );
942
+ $admin_can_edit = $file_exists;
943
 
944
+ //extract file parts and file properties
945
+ $parts = pathinfo($filepath);
946
+ if ( $file_exists ) $stat = stat($filepath);
947
+ else $stat['mtime'] = '';
948
+ }
949
+ else {
950
+ $file_code = wfu_sanitize_code($file_code);
951
+ $dec_file = wfu_get_filepath_from_safe($file_code);
952
+ if ( $dec_file === false ) return;
953
 
954
+ //extract file browser data from $file variable
955
+ $ret = wfu_extract_sortdata_from_path($dec_file);
956
+ $filepath = wfu_path_rel2abs($ret['path']);
957
+
958
+ //check if user is allowed to perform this action
959
+ if ( !wfu_current_user_owes_file($filepath) ) return;
960
 
961
+ //get file data from database with user data
962
+ $filerec = wfu_get_file_rec($filepath, true);
963
+ if ( $filerec == null ) return;
964
 
965
+ //extract sort info and construct contained dir
966
+ $parts = pathinfo($filepath);
967
+ $dir_code = wfu_safe_store_filepath(wfu_path_abs2rel($parts['dirname']).'[['.$ret['sort'].']]');
968
+
969
+ $stat = stat($filepath);
970
+ }
971
 
972
  $echo_str = '<div class="regev_wrap">';
973
  if ( $errorstatus == 'error' ) {
977
  }
978
  //show file detais
979
  $echo_str .= "\n\t".'<h2>Detais of File: '.$parts['basename'].'</h2>';
980
+ if ( !$file_exists ) {
981
+ $echo_str .= "\n\t\t".'<div class="notice notice-warning">';
982
+ $echo_str .= "\n\t\t\t".'<p>File does not exist on the server anymore!</p>';
983
+ $echo_str .= "\n\t\t".'</div>';
984
+ }
985
+ elseif ( !$file_belongs ) {
986
+ $echo_str .= "\n\t\t".'<div class="notice notice-warning">';
987
+ $echo_str .= "\n\t\t\t".'<p>This record is old. The file is associated with another record.</p>';
988
+ $echo_str .= "\n\t\t".'</div>';
989
+ }
990
  $echo_str .= "\n\t".'<div style="margin-top:10px;">';
991
  if ( $is_admin ) {
992
  $invoker_action = ( $invoker == '' ? false : wfu_get_browser_params_from_safe($invoker) );
993
  $goback_action = ( $invoker_action === false ? 'file_browser&dir='.$dir_code : $invoker_action );
994
+ if ( substr($goback_action, 0, 18) == "wfu_uploaded_files" )
995
+ $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/admin.php?page='.$goback_action.'" class="button" title="go back">Go back</a>';
996
+ elseif ( $goback_action != "no_referer" )
997
+ $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action='.$goback_action.'" class="button" title="go back">Go back</a>';
998
  $echo_str .= "\n\t\t".'<form enctype="multipart/form-data" name="editfiledetails" id="editfiledetails" method="post" action="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=edit_filedetails" class="validate">';
999
  }
1000
  $echo_str .= "\n\t\t\t".'<h3 style="margin-bottom: 10px; margin-top: 40px;">Upload Details</h3>';
1001
  $echo_str .= "\n\t\t\t".'<input type="hidden" name="action" value="edit_filedetails" />';
1002
+ //$echo_str .= "\n\t\t\t".'<input type="hidden" name="dir" value="'.$dir_code.'">';
1003
+ $echo_str .= "\n\t\t\t".'<input type="hidden" name="invoker" value="'.$invoker.'">';
1004
+ $echo_str .= "\n\t\t\t".'<input type="hidden" name="file" value="'.( $allow_obsolete ? 'byID:'.$file_code : $file_code ).'">';
1005
  $echo_str .= "\n\t\t\t".'<table class="form-table">';
1006
  $echo_str .= "\n\t\t\t\t".'<tbody>';
1007
  if ( $is_admin ) {
1019
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
1020
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
1021
  $echo_str .= "\n\t\t\t\t\t\t\t".'<select id="wfu_filedetails_users" disabled="disabled">';
1022
+ //get all users
1023
+ $users = get_users();
1024
  foreach ( $users as $userid => $user )
1025
+ $echo_str .= "\n\t\t\t\t\t\t\t\t".'<option value="'.$user->ID.'"'.( $filerec->uploaduserid == $user->ID ? ' selected="selected"' : '' ).'>'.$user->display_name.' ('.$user->user_login.')</option>';
1026
  $echo_str .= "\n\t\t\t\t\t\t\t".'</select>';
1027
+ if ( $admin_can_edit ) {
1028
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<a class="button" id="btn_change" href="" onclick="document.getElementById(\'wfu_filedetails_users\').disabled = false; this.style.display = \'none\'; document.getElementById(\'btn_ok\').style.display = \'inline-block\'; document.getElementById(\'btn_cancel\').style.display = \'inline-block\'; return false;"'.( $is_admin ? '' : ' style="display:none;"' ).'>Change User</a>';
1029
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<a class="button" id="btn_ok" href="" onclick="document.getElementById(\'wfu_filedetails_users\').disabled = true; document.getElementById(\'btn_change\').style.display = \'inline-block\'; this.style.display=\'none\'; document.getElementById(\'btn_cancel\').style.display = \'none\'; document.getElementById(\'wfu_filedetails_userid\').value = document.getElementById(\'wfu_filedetails_users\').value; wfu_filedetails_changed(); return false;" style="display:none;">Ok</a>';
1030
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<a class="button" id="btn_cancel" href="" onclick="document.getElementById(\'wfu_filedetails_users\').disabled = true; document.getElementById(\'btn_change\').style.display = \'inline-block\'; this.style.display=\'none\'; document.getElementById(\'btn_ok\').style.display = \'none\'; document.getElementById(\'wfu_filedetails_users\').value = document.getElementById(\'wfu_filedetails_userid\').value; return false;" style="display:none;">Cancel</a>';
1031
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="hidden" id="wfu_filedetails_userid" name="wfu_filedetails_userid" value="'.$filerec->uploaduserid.'" />';
1032
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="hidden" id="wfu_filedetails_userid_default" value="'.$filerec->uploaduserid.'" />';
1033
+ }
1034
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
1035
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
1036
  }
1039
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>File Size</label>';
1040
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
1041
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
1042
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="text" value="'.$filerec->filesize.'" readonly="readonly" style="width:auto;" />';
1043
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
1044
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
1045
  $echo_str .= "\n\t\t\t\t\t".'<tr>';
1047
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>File Date</label>';
1048
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
1049
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
1050
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="text" value="'.( $file_exists ? get_date_from_gmt(date("Y-m-d H:i:s", $stat['mtime']), "d/m/Y H:i:s") : '' ).'" readonly="readonly" style="width:auto;" />';
1051
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
1052
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
1053
  $echo_str .= "\n\t\t\t\t\t".'<tr>';
1055
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>Uploaded From Page</label>';
1056
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
1057
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
1058
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="text" value="'.get_the_title($filerec->pageid).' ('.$filerec->pageid.')'.'" readonly="readonly" style="width:50%;" />';
1059
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
1060
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
1061
  if ( $is_admin ) {
1064
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>Upload Plugin ID</label>';
1065
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
1066
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
1067
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<input type="text" value="'.$filerec->sid.'" readonly="readonly" style="width:auto;" />';
1068
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
1069
  $echo_str .= "\n\t\t\t\t\t".'</tr>';
1070
  }
1080
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label></label>';
1081
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
1082
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
1083
+ //read all linked older records
1084
+ $filerecs = wfu_get_rec_old_history($filerec->idlog);
 
 
 
 
 
 
 
1085
  //construct report from db records
1086
  $rep = '';
1087
+ foreach ( $filerecs as $rec ) {
1088
+ $username = wfu_get_username_by_id($rec->userid);
1089
+ $fileparts = pathinfo($rec->filepath);
1090
  if ( $rep != '' ) $rep .= "<br />";
1091
+ $rep .= '<strong>['.get_date_from_gmt($rec->date_from).']</strong> ';
1092
+ if ( $rec->action == 'upload' )
1093
  $rep .= 'File uploaded with name <strong>'.$fileparts['basename'].'</strong> by user <strong>'.$username.'</strong>';
1094
+ elseif ( $rec->action == 'include' )
1095
  $rep .= 'File included in database with name <strong>'.$fileparts['basename'].'</strong> by user <strong>'.$username.'</strong>';
1096
+ elseif ( $rec->action == 'download' )
1097
  $rep .= 'File downloaded by user <strong>'.$username.'</strong>';
1098
+ elseif ( $rec->action == 'rename' )
1099
  $rep .= 'File renamed to <strong>'.$fileparts['basename'].'</strong> by user <strong>'.$username.'</strong>';
1100
+ elseif ( $rec->action == 'delete' )
1101
  $rep .= 'File deleted by user <strong>'.$username.'</strong>';
1102
+ elseif ( $rec->action == 'modify' )
1103
  $rep .= 'File userdata modified by user <strong>'.$username.'</strong>';
1104
+ elseif ( $rec->action == 'changeuser' )
1105
  $rep .= 'File upload user modified by user <strong>'.$username.'</strong>';
1106
  }
1107
  $echo_str .= "\n\t\t\t\t\t\t\t".'<div style="border:1px solid #dfdfdf; border-radius:3px; width:50%; overflow:scroll; padding:6px; height:100px; background-color:#eee;">';
1116
  $echo_str .= "\n\t\t\t".'<h3 style="margin-bottom: 10px; margin-top: 40px;">User Data Details</h3>';
1117
  $echo_str .= "\n\t\t\t".'<table class="form-table">';
1118
  $echo_str .= "\n\t\t\t\t".'<tbody>';
1119
+ if ( count($filerec->userdata) > 0 ) {
1120
+ foreach ( $filerec->userdata as $userdata ) {
1121
  $echo_str .= "\n\t\t\t\t\t".'<tr>';
1122
  $echo_str .= "\n\t\t\t\t\t\t".'<th scope="row">';
1123
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>'.$userdata->property.'</label>';
1124
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
1125
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
1126
  // $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_value_'.$userdata->propkey.'" name="wfu_filedetails_userdata" type="text"'.( $is_admin ? '' : ' readonly="readonly"' ).' value="'.$userdata->propvalue.'" />';
1127
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<textarea id="wfu_filedetails_userdata_value_'.$userdata->propkey.'" name="wfu_filedetails_userdata" '.( ($is_admin && $admin_can_edit) ? '' : ' readonly="readonly"' ).' value="'.$userdata->propvalue.'">'.$userdata->propvalue.'</textarea>';
1128
  $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_default_'.$userdata->propkey.'" type="hidden" value="'.$userdata->propvalue.'" />';
1129
  $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_'.$userdata->propkey.'" name="wfu_filedetails_userdata_'.$userdata->propkey.'" type="hidden" value="'.$userdata->propvalue.'" />';
1130
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
1141
  }
1142
  $echo_str .= "\n\t\t\t\t".'</tbody>';
1143
  $echo_str .= "\n\t\t\t".'</table>';
1144
+ if ( ($is_admin && $admin_can_edit) ) {
1145
  $echo_str .= "\n\t\t\t".'<p class="submit">';
1146
  $echo_str .= "\n\t\t\t\t".'<input id="dp_filedetails_submit_fields" type="submit" class="button-primary" name="submit" value="Update" disabled="disabled" />';
1147
  $echo_str .= "\n\t\t\t".'</p>';
1158
  function wfu_edit_filedetails($file_code) {
1159
  global $wpdb;
1160
  $table_name2 = $wpdb->prefix . "wfu_userdata";
1161
+ $allow_obsolete = false;
1162
+
1163
+ if ( substr($file_code, 0, 5) == "byID:" ) {
1164
+ $allow_obsolete = true;
1165
+ $file_code = substr($file_code, 5);
1166
+ }
1167
 
1168
  $user = wp_get_current_user();
1169
  $is_admin = current_user_can( 'manage_options' );
1170
  //check if user is allowed to view file details
1171
  if ( !$is_admin ) {
1172
+ if ( $allow_obsolete ) return;
1173
  return;
1174
  }
1175
+ if ( $allow_obsolete ) {
1176
+ $file_code = wfu_sanitize_int($file_code);
1177
+ $initialrec = wfu_get_file_rec_from_id($file_code, true);
1178
+ if ( $initialrec == null ) return;
1179
+
1180
+ //get all associated file records
1181
+ $filerecs = wfu_get_rec_new_history($initialrec->idlog);
1182
+ //get the latest record of this upload
1183
+ $filerec = $filerecs[count($filerecs) - 1];
1184
+ $filerec->userdata = $initialrec->userdata;
1185
 
1186
+ $filepath = wfu_path_rel2abs($filerec->filepath);
1187
+ $latestrec = wfu_get_file_rec($filepath, true);
1188
+ //if $latestrec is null then this means that file does not exist
1189
+ if ( $latestrec == null ) return;
1190
+ //if the record is obsolete then do not proceed
1191
+ if ( $latestrec->idlog != $filerec->idlog ) return;
1192
+ }
1193
+ else {
1194
+ $file_code = wfu_sanitize_code($file_code);
1195
+ $dec_file = wfu_get_filepath_from_safe($file_code);
1196
+ if ( $dec_file === false ) return;
1197
 
1198
+ $filepath = wfu_path_rel2abs(wfu_flatten_path($dec_file));
1199
+
1200
+ //check if user is allowed to perform this action
1201
+ if ( !wfu_current_user_owes_file($filepath) ) return;
1202
 
1203
+ //get file data from database with user data
1204
+ $filerec = wfu_get_file_rec($filepath, true);
1205
+ if ( $filerec == null ) return;
1206
+ }
1207
 
1208
  if ( isset($_POST['submit']) ) {
1209
  if ( $_POST['submit'] == "Update" ) {
1210
+ if ( !is_array($filerec->userdata) ) $filerec->userdata = array();
1211
  //check for errors
1212
  $is_error = false;
1213
+ foreach ( $filerec->userdata as $userdata ) {
1214
  if ( !isset($_POST['wfu_filedetails_userdata_'.$userdata->propkey]) ) {
1215
  $is_error = true;
1216
  break;
1219
  if ( !$is_error ) {
1220
  $now_date = date('Y-m-d H:i:s');
1221
  $userdata_count = 0;
1222
+ foreach ( $filerec->userdata as $userdata ) {
1223
  $userdata_count ++;
1224
  //make existing userdata record obsolete
1225
  $wpdb->update($table_name2,
1248
  )
1249
  );
1250
  }
1251
+ if ( $userdata_count > 0 ) wfu_log_action('modify:'.$now_date, $filepath, $user->ID, '', 0, 0, '', null);
1252
  }
1253
+ if ( isset($_POST['wfu_filedetails_userid']) && $_POST['wfu_filedetails_userid'] != $filerec->uploaduserid ) {
1254
+ wfu_log_action('changeuser:'.$_POST['wfu_filedetails_userid'], $filepath, $user->ID, '', 0, 0, '', null);
1255
  }
1256
  }
1257
  }
lib/wfu_admin_log.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- function wfu_view_log($page = 1, $only_table_rows = false) {
4
  $a = func_get_args(); switch(WFU_FUNCTION_HOOK(__FUNCTION__, $a, $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
5
  global $wpdb;
6
  $siteurl = site_url();
@@ -9,9 +9,17 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
9
  $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
10
 
11
  if ( !current_user_can( 'manage_options' ) ) return;
 
 
12
  //get log data from database
13
  $files_total = $wpdb->get_var('SELECT COUNT(idlog) FROM '.$table_name1);
14
- $filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' ORDER BY date_from DESC'.( WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS") > 0 ? ' LIMIT '.WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS").' OFFSET '.(($page - 1) * (int)WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS")) : '' ));
 
 
 
 
 
 
15
 
16
  $echo_str = "";
17
  if ( !$only_table_rows ) {
@@ -22,30 +30,31 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
22
  $echo_str .= "\n\t".'<div style="position:relative;">';
23
  $echo_str .= wfu_add_loading_overlay("\n\t\t", "historylog");
24
  $echo_str .= "\n\t\t".'<div class="wfu_historylog_header" style="width: 100%;">';
25
- if ( WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS") > 0 ) {
26
- $pages = ceil($files_total / WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS"));
27
- $echo_str .= wfu_add_pagination_header("\n\t\t\t", "historylog", 1, $pages);
 
28
  }
29
  $echo_str .= "\n\t\t".'</div>';
30
- $echo_str .= "\n\t\t".'<table id="wfu_historylog_table" class="wp-list-table widefat fixed striped">';
31
  $echo_str .= "\n\t\t\t".'<thead>';
32
  $echo_str .= "\n\t\t\t\t".'<tr>';
33
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="5%" style="text-align:center;">';
34
  $echo_str .= "\n\t\t\t\t\t\t".'<label>#</label>';
35
  $echo_str .= "\n\t\t\t\t\t".'</th>';
36
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="15%" style="text-align:left;">';
37
- $echo_str .= "\n\t\t\t\t\t\t".'<label>Date</label>';
38
  $echo_str .= "\n\t\t\t\t\t".'</th>';
39
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" style="text-align:center;">';
40
  $echo_str .= "\n\t\t\t\t\t\t".'<label>Action</label>';
41
  $echo_str .= "\n\t\t\t\t\t".'</th>';
42
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="30%" style="text-align:left;">';
43
- $echo_str .= "\n\t\t\t\t\t\t".'<label>File</label>';
44
  $echo_str .= "\n\t\t\t\t\t".'</th>';
45
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="15%" style="text-align:center;">';
46
  $echo_str .= "\n\t\t\t\t\t\t".'<label>User</label>';
47
  $echo_str .= "\n\t\t\t\t\t".'</th>';
48
- $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="25%" style="text-align:left;">';
49
  $echo_str .= "\n\t\t\t\t\t\t".'<label>Remarks</label>';
50
  $echo_str .= "\n\t\t\t\t\t".'</th>';
51
  $echo_str .= "\n\t\t\t\t".'</tr>';
@@ -56,9 +65,11 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
56
  $userdatarecs = $wpdb->get_results('SELECT * FROM '.$table_name2);
57
  $deletedfiles = array();
58
  $filecodes = array();
 
59
  $time0 = strtotime("0000-00-00 00:00:00");
60
- $i = ($page - 1) * (int)WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS");
61
- foreach ( $filerecs as $filerec ) {
 
62
  $remarks = '';
63
  if ( $filerec->action == 'delete' ) array_push($deletedfiles, $filerec->linkedto);
64
  elseif ( $filerec->action == 'rename' ) {
@@ -79,7 +90,7 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
79
  }
80
  }
81
  if ( $remarks != '' ) {
82
- $remarks = "\n\t\t\t\t\t\t".'<select multiple="multiple" style="width:100%; height:40px; background:none; font-size:small; overflow:scroll;">'.$remarks;
83
  $remarks .= "\n\t\t\t\t\t\t".'</select>';
84
  }
85
  }
@@ -98,30 +109,51 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
98
  $remarks = "\n\t\t\t\t\t\t".'<textarea style="width:100%; resize:vertical; background:none;" readonly="readonly">'.$info.'</textarea>';
99
  }
100
  $i ++;
101
- $otheraction = ( $filerec->action == 'other' );
102
- $echo_str .= "\n\t\t\t\t".'<tr>';
103
- $echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:center;">'.$i.'</td>';
104
- $echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:left;">'.get_date_from_gmt($filerec->date_from).'</td>';
105
- $echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:center;">'.$filerec->action.'</td>';
106
- if ( !$otheraction ) {
107
- $echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:left;">';
108
- if ( $filerec->action == 'datasubmit' ) $echo_str .= "\n\t\t\t\t\t\t".'<span>N/A</span>';
109
- elseif ( in_array($filerec->linkedto, $deletedfiles) || in_array($filerec->idlog, $deletedfiles) ) $echo_str .= "\n\t\t\t\t\t\t".'<span>'.$filerec->filepath.'</span>';
110
- else {
111
- $lid = 0;
112
- if ( $filerec->action == 'upload' || $filerec->action == 'include' ) $lid = $filerec->idlog;
113
- elseif ( $filerec->linkedto > 0 ) $lid = $filerec->linkedto;
114
- if ( $lid > 0 && file_exists(wfu_path_rel2abs($filerec->filepath)) ) {
115
- if ( !isset($filecodes[$lid]) ) $filecodes[$lid] = wfu_safe_store_filepath($filerec->filepath);
116
- $logpagecode = wfu_safe_store_browser_params('view_log&tag='.$page);
117
- $echo_str .= "\n\t\t\t\t\t\t".'<a class="row-title" href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_details&file='.$filecodes[$lid].'&invoker='.$logpagecode.'" title="View and edit file details" style="font-weight:normal;">'.$filerec->filepath.'</a>';
118
  }
119
- else $echo_str .= "\n\t\t\t\t\t\t".'<span>'.$filerec->filepath.'</span>';
120
  }
121
- $echo_str .= "\n\t\t\t\t\t".'</td>';
122
- $echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:center;">'.wfu_get_username_by_id($filerec->userid).'</td>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  }
124
- $echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:left;"'.( $otheraction ? ' colspan="3"' : '' ).'>';
 
 
 
 
 
125
  $echo_str .= $remarks;
126
  $echo_str .= "\n\t\t\t\t\t".'</td>';
127
  $echo_str .= "\n\t\t\t\t".'</tr>';
@@ -133,6 +165,10 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
133
  $echo_str .= "\n\t".'</div>';
134
  $echo_str .= "\n".'</div>';
135
  }
 
 
 
 
136
 
137
  return $echo_str;
138
  }
1
  <?php
2
 
3
+ function wfu_view_log($page = 1, $only_table_rows = false, $located_rec = -1) {
4
  $a = func_get_args(); switch(WFU_FUNCTION_HOOK(__FUNCTION__, $a, $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
5
  global $wpdb;
6
  $siteurl = site_url();
9
  $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
10
 
11
  if ( !current_user_can( 'manage_options' ) ) return;
12
+
13
+ $maxrows = (int)WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS");
14
  //get log data from database
15
  $files_total = $wpdb->get_var('SELECT COUNT(idlog) FROM '.$table_name1);
16
+ //if we need to locate and focus on a specific record, then we need to
17
+ //recalculate and define the right page
18
+ if ( $located_rec > 0 && $maxrows > 0 ) {
19
+ $files_before = $wpdb->get_var('SELECT COUNT(idlog) FROM '.$table_name1.' WHERE idlog > '.(int)$located_rec);
20
+ $page = floor( $files_before / $maxrows ) + 1;
21
+ }
22
+ $filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' ORDER BY date_from DESC'.( $maxrows > 0 ? ' LIMIT '.$maxrows.' OFFSET '.(($page - 1) * $maxrows) : '' ));
23
 
24
  $echo_str = "";
25
  if ( !$only_table_rows ) {
30
  $echo_str .= "\n\t".'<div style="position:relative;">';
31
  $echo_str .= wfu_add_loading_overlay("\n\t\t", "historylog");
32
  $echo_str .= "\n\t\t".'<div class="wfu_historylog_header" style="width: 100%;">';
33
+ if ( $maxrows > 0 ) {
34
+ $pages = max(ceil($files_total / $maxrows), 1);
35
+ if ( $page > $pages ) $page = $pages;
36
+ $echo_str .= wfu_add_pagination_header("\n\t\t\t", "historylog", $page, $pages);
37
  }
38
  $echo_str .= "\n\t\t".'</div>';
39
+ $echo_str .= "\n\t\t".'<table id="wfu_historylog_table" class="wfu-historylog wp-list-table widefat fixed striped">';
40
  $echo_str .= "\n\t\t\t".'<thead>';
41
  $echo_str .= "\n\t\t\t\t".'<tr>';
42
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="5%" class="manage-column">';
43
  $echo_str .= "\n\t\t\t\t\t\t".'<label>#</label>';
44
  $echo_str .= "\n\t\t\t\t\t".'</th>';
45
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="30%" class="manage-column column-primary">';
46
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>File</label>';
47
  $echo_str .= "\n\t\t\t\t\t".'</th>';
48
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" class="manage-column">';
49
  $echo_str .= "\n\t\t\t\t\t\t".'<label>Action</label>';
50
  $echo_str .= "\n\t\t\t\t\t".'</th>';
51
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="15%" class="manage-column">';
52
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>Date</label>';
53
  $echo_str .= "\n\t\t\t\t\t".'</th>';
54
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="15%" class="manage-column">';
55
  $echo_str .= "\n\t\t\t\t\t\t".'<label>User</label>';
56
  $echo_str .= "\n\t\t\t\t\t".'</th>';
57
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="25%" class="manage-column">';
58
  $echo_str .= "\n\t\t\t\t\t\t".'<label>Remarks</label>';
59
  $echo_str .= "\n\t\t\t\t\t".'</th>';
60
  $echo_str .= "\n\t\t\t\t".'</tr>';
65
  $userdatarecs = $wpdb->get_results('SELECT * FROM '.$table_name2);
66
  $deletedfiles = array();
67
  $filecodes = array();
68
+ $logpagecode = wfu_safe_store_browser_params('view_log&tag='.$page);
69
  $time0 = strtotime("0000-00-00 00:00:00");
70
+ $i = ($page - 1) * $maxrows;
71
+ $filerecs_count = count($filerecs);
72
+ foreach ( $filerecs as $ind => $filerec ) {
73
  $remarks = '';
74
  if ( $filerec->action == 'delete' ) array_push($deletedfiles, $filerec->linkedto);
75
  elseif ( $filerec->action == 'rename' ) {
90
  }
91
  }
92
  if ( $remarks != '' ) {
93
+ $remarks = "\n\t\t\t\t\t\t".'<select multiple="multiple" style="width:100%; height:40px; background:none; font-size:small; overflow:scroll; resize:vertical;">'.$remarks;
94
  $remarks .= "\n\t\t\t\t\t\t".'</select>';
95
  }
96
  }
109
  $remarks = "\n\t\t\t\t\t\t".'<textarea style="width:100%; resize:vertical; background:none;" readonly="readonly">'.$info.'</textarea>';
110
  }
111
  $i ++;
112
+ $echo_str .= "\n\t\t\t\t".'<tr'.( $located_rec > 0 && $filerec->idlog == $located_rec ? ' class="wfu-highlighted"' : '' ).'>';
113
+ $echo_str .= "\n\t\t\t\t\t".'<th style="word-wrap: break-word;">'.$i.'</th>';
114
+ $echo_str .= "\n\t\t\t\t\t".'<td class="column-primary" data-colname="File">';
115
+ if ( $filerec->action == 'other' ) $echo_str .= "\n\t\t\t\t\t\t".'<span>Other action not related to file</span>';
116
+ elseif ( $filerec->action == 'datasubmit' ) $echo_str .= "\n\t\t\t\t\t\t".'<span>Submission of data without file</span>';
117
+ elseif ( in_array($filerec->linkedto, $deletedfiles) || in_array($filerec->idlog, $deletedfiles) ) $echo_str .= "\n\t\t\t\t\t\t".'<span>'.$filerec->filepath.'</span>';
118
+ else {
119
+ //find newest linked record
120
+ $newestidlog = $filerec->idlog;
121
+ $newestind = $ind;
122
+ $parind = $ind;
123
+ while ( $parind >= 0 && $filerecs[$newestind]->date_to != "0000-00-00 00:00:00" ) {
124
+ if ( isset($filerecs[$parind]->linkedto) && $filerecs[$parind]->linkedto == $newestidlog ) {
125
+ $newestind = $parind;
126
+ $newestidlog = $filerecs[$parind]->idlog;
 
 
127
  }
128
+ $parind --;
129
  }
130
+ //find oldest linked record
131
+ $oldestidlog = $filerec->idlog;
132
+ $oldestind = $ind;
133
+ $parind = $ind;
134
+ while ( $parind < $filerecs_count && isset($filerecs[$oldestind]->linkedto) ) {
135
+ if ( $filerecs[$parind]->idlog == $filerecs[$oldestind]->linkedto ) {
136
+ $oldestind = $parind;
137
+ $oldestidlog = $filerecs[$parind]->idlog;
138
+ }
139
+ $parind ++;
140
+ }
141
+ $lid = $oldestidlog;
142
+ //make the file linkable only if the record is still valid, the
143
+ //filename has not changed (due to a rename action) and the file
144
+ //exists
145
+ if ( $filerecs[$newestind]->date_to == "0000-00-00 00:00:00" && $filerec->filepath == $filerecs[$newestind]->filepath && file_exists(wfu_path_rel2abs($filerec->filepath)) ) {
146
+ if ( !isset($filecodes[$lid]) ) $filecodes[$lid] = wfu_safe_store_filepath($filerec->filepath);
147
+ $echo_str .= "\n\t\t\t\t\t\t".'<a class="row-title" href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_details&file='.$filecodes[$lid].'&invoker='.$logpagecode.'" title="View and edit file details" style="font-weight:normal;">'.$filerec->filepath.'</a>';
148
+ }
149
+ else $echo_str .= "\n\t\t\t\t\t\t".'<span>'.$filerec->filepath.'</span>';
150
  }
151
+ $echo_str .= "\n\t\t\t\t\t\t".'<button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>';
152
+ $echo_str .= "\n\t\t\t\t\t".'</td>';
153
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Action">'.( $filerec->action != 'other' && $filerec->action != 'datasubmit' ? $filerec->action : '' ).'</td>';
154
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Date">'.get_date_from_gmt($filerec->date_from).'</td>';
155
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="User">'.wfu_get_username_by_id($filerec->userid).'</td>';
156
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Remarks">';
157
  $echo_str .= $remarks;
158
  $echo_str .= "\n\t\t\t\t\t".'</td>';
159
  $echo_str .= "\n\t\t\t\t".'</tr>';
165
  $echo_str .= "\n\t".'</div>';
166
  $echo_str .= "\n".'</div>';
167
  }
168
+ if ( $located_rec > 0 ) {
169
+ $handler = 'function() { wfu_focus_table_on_highlighted_file("wfu_historylog_table"); }';
170
+ $echo_str .= "\n\t".'<script type="text/javascript">if(window.addEventListener) { window.addEventListener("load", '.$handler.', false); } else if(window.attachEvent) { window.attachEvent("onload", '.$handler.'); } else { window["onload"] = '.$handler.'; }</script>';
171
+ }
172
 
173
  return $echo_str;
174
  }
lib/wfu_admin_uploadedfiles.php ADDED
@@ -0,0 +1,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wfu_uploadedfiles_menu() {
4
+ $_GET = stripslashes_deep($_GET);
5
+ $tag = (!empty($_GET['tag']) ? $_GET['tag'] : '1');
6
+ $page = max((int)$tag, 1);
7
+ echo wfu_uploadedfiles_manager($page);
8
+ }
9
+
10
+ function wfu_uploadedfiles_manager($page = 1, $only_table_rows = false) {
11
+ global $wpdb;
12
+ $table_name1 = $wpdb->prefix . "wfu_log";
13
+ $table_name3 = $wpdb->prefix . "wfu_dbxqueue";
14
+
15
+ if ( !current_user_can( 'manage_options' ) ) return;
16
+
17
+ $siteurl = site_url();
18
+ $maxrows = (int)WFU_VAR("WFU_UPLOADEDFILES_TABLE_MAXROWS");
19
+
20
+ //get log data from database
21
+ $files_total = $wpdb->get_var('SELECT COUNT(idlog) FROM '.$table_name1.' WHERE action = \'upload\'');
22
+ $filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' WHERE action = \'upload\' ORDER BY date_from DESC'.( $maxrows > 0 ? ' LIMIT '.$maxrows.' OFFSET '.(($page - 1) * $maxrows) : '' ));
23
+
24
+ //get last record already read
25
+ $last_idlog = get_option( "wordpress_file_upload_last_idlog", array( "pre" => 0, "post" => 0, "time" => 0 ) );
26
+
27
+ //prepare html
28
+ $echo_str = "";
29
+ if ( !$only_table_rows ) {
30
+ //Update last_idlog option so that next time Uploaded Files menu item is
31
+ //pressed files have been read.
32
+ //Option last_idlog requires a minimum interval of some seconds, defined
33
+ //by advanced variable WFU_UPLOADEDFILES_RESET_TIME, before it can be
34
+ //updated. This way, if the admin presses Uploaded Files menu item two
35
+ //times immediately, the same number of unread files will not change.
36
+ //It is noted that last_idlog option uses two values, 'pre' and 'post'.
37
+ //The way they are updated makes sure that the number of unread files
38
+ //gets reset only when Uploaded Files menu item is pressed and not
39
+ //when the admin browses through the pages of the list (when pagination
40
+ //is activated).
41
+ $limit = (int)WFU_VAR("WFU_UPLOADEDFILES_RESET_TIME");
42
+ if ( $limit == -1 || time() > $last_idlog["time"] + $limit ) {
43
+ $last_idlog["pre"] = $last_idlog["post"];
44
+ $last_idlog["post"] = $wpdb->get_var('SELECT MAX(idlog) FROM '.$table_name1);
45
+ $last_idlog["time"] = time();
46
+ update_option( "wordpress_file_upload_last_idlog", $last_idlog );
47
+ }
48
+
49
+ $echo_str .= "\n".'<div class="wrap">';
50
+ $echo_str .= "\n\t".'<h2>List of Uploaded Files</h2>';
51
+ $echo_str .= "\n\t".'<div style="position:relative;">';
52
+ $echo_str .= wfu_add_loading_overlay("\n\t\t", "uploadedfiles");
53
+ $echo_str .= "\n\t\t".'<div class="wfu_uploadedfiles_header" style="width: 100%;">';
54
+ if ( $maxrows > 0 ) {
55
+ $pages = ceil($files_total / $maxrows);
56
+ $echo_str .= wfu_add_pagination_header("\n\t\t\t", "uploadedfiles", $page, $pages);
57
+ }
58
+ $echo_str .= "\n\t\t".'</div>';
59
+ $echo_str .= "\n\t\t".'<table id="wfu_uploadedfiles_table" class="wfu-uploadedfiles wp-list-table widefat fixed striped">';
60
+ $echo_str .= "\n\t\t\t".'<thead>';
61
+ $echo_str .= "\n\t\t\t\t".'<tr>';
62
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="5%" class="manage-column">';
63
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>#</label>';
64
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
65
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="30%" class="manage-column column-primary">';
66
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>File</label>';
67
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
68
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" class="manage-column">';
69
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>Upload Date</label>';
70
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
71
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" class="manage-column">';
72
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>User</label>';
73
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
74
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" class="manage-column">';
75
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>Properties</label>';
76
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
77
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="25%" class="manage-column">';
78
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>Remarks</label>';
79
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
80
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" class="manage-column">';
81
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>Actions</label>';
82
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
83
+ $echo_str .= "\n\t\t\t\t".'</tr>';
84
+ $echo_str .= "\n\t\t\t".'</thead>';
85
+ $echo_str .= "\n\t\t\t".'<tbody>';
86
+ }
87
+ //echo the number of unread uploaded files in order to update the
88
+ //notification bubble of the toplevel menu item
89
+ $unread_files_count = wfu_get_unread_files_count($last_idlog["pre"]);
90
+ $echo_str .= "\n\t\t\t".'<!-- wfu_uploadedfiles_unread['.$unread_files_count.'] -->';
91
+
92
+ $i = ($page - 1) * $maxrows;
93
+ $abspath_notrailing_slash = substr(wfu_abspath(), 0, -1);
94
+ $pagecode = wfu_safe_store_browser_params('wfu_uploaded_files&tag='.$page);
95
+ $nopagecode = wfu_safe_store_browser_params('no_referer');
96
+ foreach ( $filerecs as $filerec ) {
97
+ $i ++;
98
+ $initialrec = $filerec;
99
+ //get all newer associated file records
100
+ $filerecs = wfu_get_rec_new_history($initialrec->idlog);
101
+ //get the latest record of this upload
102
+ $filerec = $filerecs[count($filerecs) - 1];
103
+ $filedata = wfu_get_filedata_from_rec($filerec, false, true, false);
104
+ if ( $filedata == null ) $filedata = array();
105
+
106
+ $echo_str .= "\n\t\t\t\t".'<tr class="wfu_row-'.$i.( $initialrec->idlog > $last_idlog["pre"] ? ' wfu_unread' : '' ).'">';
107
+ $file_relpath = ( substr($filerec->filepath, 0, 4) == 'abs:' ? substr($filerec->filepath, 4) : $filerec->filepath );
108
+ $file_abspath = wfu_path_rel2abs($filerec->filepath);
109
+ $displayed_data = array(
110
+ "file" => $file_relpath,
111
+ "date" => get_date_from_gmt($initialrec->date_from),
112
+ "user" => wfu_get_username_by_id($filerec->uploaduserid),
113
+ "properties" => '',
114
+ "remarks" => '<div class="wfu-remarks-container"></div>',
115
+ "actions" => ''
116
+ );
117
+ $properties = wfu_init_uploadedfiles_properties();
118
+ $actions = wfu_init_uploadedfiles_actions();
119
+ $remarks = '';
120
+ //check if file is stored in FTP location
121
+ $file_in_ftp = ( substr($file_abspath, 0, 6) == 'ftp://' || substr($file_abspath, 0, 7) == 'ftps://' || substr($file_abspath, 0, 7) == 'sftp://' );
122
+ //check if file resides inside WP root
123
+ $file_in_root = ( !$file_in_ftp && substr($file_abspath, 0, strlen($abspath_notrailing_slash)) == $abspath_notrailing_slash );
124
+ //check if file exists for non-ftp uploads
125
+ $file_exists = ( $file_in_ftp ? true : file_exists($file_abspath) );
126
+ //check if record is obsolete
127
+ $obsolete = ( $filerec->date_to != "0000-00-00 00:00:00" );
128
+ //check if file is associated with Media item
129
+ $has_media = ( $file_in_root && $file_exists && !$obsolete && isset($filedata["media"]) );
130
+
131
+ //update properties
132
+ $properties['status']['icon'] = ( $file_exists ? ( $obsolete ? "obsolete" : "ok" ) : "notexists" );
133
+ $properties['userdata']['visible'] = ( count(wfu_get_userdata_from_rec($filerec)) > 0 );
134
+ if ( $has_media ) {
135
+ $properties['media']['visible'] = true;
136
+ $properties['media']['remarks'] = 'File is associated with Media item ID <strong>'.$filedata["media"]["attach_id"].'</strong>';
137
+ }
138
+ $properties['ftp']['visible'] = $file_in_ftp;
139
+
140
+ //update actions
141
+ $details_href_net = $siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_details&file=byID:'.$filerec->idlog;
142
+ $actions['details']['href'] = $details_href_net.'&invoker='.$nopagecode;
143
+ if ( WFU_VAR("WFU_UPLOADEDFILES_DEFACTION") == "details" )
144
+ $displayed_data["file"] = '<a href="'.$details_href_net.'&invoker='.$pagecode.'" title="Go to file details">'.$file_relpath.'</a>';
145
+ if ( $has_media ) {
146
+ $actions['media']['visible'] = true;
147
+ $actions['media']['href'] = get_attachment_link( $filedata["media"]["attach_id"] );
148
+ }
149
+ if ( $file_in_root && $file_exists && !$obsolete ) {
150
+ $only_path = wfu_basedir($file_relpath);
151
+ $dir_code = wfu_safe_store_filepath($only_path.'{{'.wfu_basename($file_relpath).'}}');
152
+ $filelink = $siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=file_browser&dir='.$dir_code;
153
+ $actions['adminbrowser']['visible'] = true;
154
+ $actions['adminbrowser']['href'] = $filelink;
155
+ $actions['download']['visible'] = true;
156
+ $actions['download']['href'] = $filelink;
157
+ if ( WFU_VAR("WFU_UPLOADEDFILES_DEFACTION") == "adminbrowser" )
158
+ $displayed_data["file"] = '<a href="'.$filelink.'" title="Open file in File Browser">'.$file_relpath.'</a>';
159
+ }
160
+ $historylog_href = $siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&action=view_log&invoker='.$initialrec->idlog;
161
+ $actions['historylog']['href'] = $historylog_href;
162
+ if ( WFU_VAR("WFU_UPLOADEDFILES_DEFACTION") == "historylog" )
163
+ $displayed_data["file"] = '<a href="'.$historylog_href.'" title="Go to View Log record of file">'.$file_relpath.'</a>';
164
+ if ( ( $file_in_ftp || $file_in_root ) && $file_exists && !$obsolete ) {
165
+ $actions['link']['visible'] = true;
166
+ $filelink = $file_relpath;
167
+ if ( $file_in_root ) $filelink = site_url().( substr($filelink, 0, 1) == '/' ? '' : '/' ).$filelink;
168
+ $actions['link']['href'] = $filelink;
169
+ if ( WFU_VAR("WFU_UPLOADEDFILES_DEFACTION") == "link" )
170
+ $displayed_data["file"] = '<a href="'.$filelink.'" title="Open file link">'.$file_relpath.'</a>';
171
+ }
172
+
173
+ $displayed_data["properties"] = wfu_render_uploadedfiles_properties($properties, $i);
174
+ $displayed_data["actions"] = wfu_render_uploadedfiles_actions($actions);
175
+ $echo_str .= "\n\t\t\t\t\t".'<th style="word-wrap: break-word;">'.$i.'</th>';
176
+ $echo_str .= "\n\t\t\t\t\t".'<td class="column-primary" data-colname="File">'.$displayed_data["file"];
177
+ $echo_str .= "\n\t\t\t\t\t\t".'<button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>';
178
+ $echo_str .= "\n\t\t\t\t\t".'</td>';
179
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Upload Date">'.$displayed_data["date"].'</td>';
180
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="User">'.$displayed_data["user"].'</td>';
181
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Properties">'.$displayed_data["properties"].'</td>';
182
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Remarks">'.$displayed_data["remarks"].'</td>';
183
+ $echo_str .= "\n\t\t\t\t\t".'<td data-colname="Actions">'.$displayed_data["actions"].'</td>';
184
+ $echo_str .= "\n\t\t\t\t".'</tr>';
185
+ }
186
+ if ( !$only_table_rows ) {
187
+ $echo_str .= "\n\t\t\t".'</tbody>';
188
+ $echo_str .= "\n\t\t".'</table>';
189
+ $echo_str .= "\n\t".'</div>';
190
+ $handler = 'function() { wfu_attach_uploadedfiles_events(); }';
191
+ $echo_str .= "\n\t".'<script type="text/javascript">if(window.addEventListener) { window.addEventListener("load", '.$handler.', false); } else if(window.attachEvent) { window.attachEvent("onload", '.$handler.'); } else { window["onload"] = '.$handler.'; }</script>';
192
+ $echo_str .= "\n".'</div>';
193
+ }
194
+
195
+ return $echo_str;
196
+ }
197
+
198
+ function wfu_init_uploadedfiles_properties() {
199
+ $props["status"] = array(
200
+ "icon" => "obsolete",
201
+ "icon-list" => array(
202
+ "ok" => "dashicons-yes",
203
+ "notexists" => "dashicons-trash",
204
+ "obsolete" => "dashicons-warning"
205
+ ),
206
+ "title" => "",
207
+ "title-list" => array(
208
+ "ok" => "File is Ok",
209
+ "notexists" => "File does not exist",
210
+ "obsolete" => "Record is invalid"
211
+ ),
212
+ "visible" => true,
213
+ "remarks" => '',
214
+ "remarks-list" => array(
215
+ "ok" => "File uploaded successfully to the website",
216
+ "notexists" => "File does not exist anymore in the website",
217
+ "obsolete" => "Record is not valid anymore"
218
+ ),
219
+ "code" => wfu_create_random_string(6)
220
+ );
221
+ $props["userdata"] = array(
222
+ "icon" => "dashicons-id-alt",
223
+ "title" => "File has user data",
224
+ "visible" => false,
225
+ "remarks" => 'File has user data, accessible in File Details',
226
+ "code" => wfu_create_random_string(6)
227
+ );
228
+ $props["media"] = array(
229
+ "icon" => "dashicons-admin-media",
230
+ "title" => "File is associated with Media item",
231
+ "visible" => false,
232
+ "remarks" => 'File is associated with Media item',
233
+ "code" => wfu_create_random_string(6)
234
+ );
235
+ $props["ftp"] = array(
236
+ "icon" => "wfu-dashicons-ftp",
237
+ "title" => "File saved in FTP",
238
+ "visible" => false,
239
+ "remarks" => 'File has been saved in FTP location',
240
+ "code" => wfu_create_random_string(6)
241
+ );
242
+
243
+ return $props;
244
+ }
245
+
246
+ function wfu_init_uploadedfiles_actions() {
247
+ $actions["details"] = array(
248
+ "icon" => "dashicons-info",
249
+ "title" => "View file details",
250
+ "visible" => true,
251
+ "href" => ""
252
+ );
253
+ $actions["media"] = array(
254
+ "icon" => "wfu-dashicons-media-external",
255
+ "title" => "Open associated Media item",
256
+ "visible" => false,
257
+ "href" => ""
258
+ );
259
+ $actions["adminbrowser"] = array(
260
+ "icon" => "dashicons-portfolio",
261
+ "title" => "Locate file in File Browser",
262
+ "visible" => false,
263
+ "href" => ""
264
+ );
265
+ $actions["historylog"] = array(
266
+ "icon" => "dashicons-backup",
267
+ "title" => "Locate file record in View Log",
268
+ "visible" => true,
269
+ "href" => ""
270
+ );
271
+ $actions["link"] = array(
272
+ "icon" => "dashicons-external",
273
+ "title" => "Open file link",
274
+ "visible" => false,
275
+ "href" => ""
276
+ );
277
+ $actions["download"] = array(
278
+ "icon" => "dashicons-download",
279
+ "title" => "Download file",
280
+ "visible" => false,
281
+ "href" => ""
282
+ );
283
+
284
+ return $actions;
285
+ }
286
+
287
+ function wfu_render_uploadedfiles_properties($props, $index) {
288
+ $i = 0;
289
+ $echo_str = "";
290
+ foreach ( $props as $key => $prop ) {
291
+ $ii = $i + 1;
292
+ $iconclass = $prop['icon'];
293
+ if ( isset($prop['icon-list']) ) $iconclass = $prop['icon-list'][$prop['icon']];
294
+ $title = $prop['title'];
295
+ if ( isset($prop['title-list']) ) $title = $prop['title-list'][$prop['icon']];
296
+ $remarks = $prop['remarks'];
297
+ if ( isset($prop['remarks-list']) ) $remarks = $prop['remarks-list'][$prop['icon']];
298
+ $echo_str .= '<div id="p_'.$index.'_'.$ii.'" class="wfu-properties dashicons '.$iconclass.( $i == 0 ? '' : ' wfu-dashicons-after' ).( $prop['visible'] ? '' : ' wfu-dashicons-hidden' ).'" title="'.$title.'"><input type="hidden" class="wfu-remarks" value="'.wfu_plugin_encode_string($remarks).'" /></div>';
299
+ $i ++;
300
+ }
301
+
302
+ return $echo_str;
303
+ }
304
+
305
+ function wfu_render_uploadedfiles_actions($actions) {
306
+ $i = 0;
307
+ $echo_str = "";
308
+ foreach ( $actions as $key => $action ) {
309
+ $iconclass = $action['icon'];
310
+ if ( isset($action['icon-list']) ) $iconclass = $action['icon-list'][$action['icon']];
311
+ $title = $action['title'];
312
+ if ( isset($action['title-list']) ) $title = $action['title-list'][$action['icon']];
313
+ $echo_str .= '<a class="dashicons '.$iconclass.( $i == 0 ? '' : ' wfu-dashicons-after' ).( $action['visible'] ? '' : ' wfu-dashicons-hidden' ).'" href="'.$action['href'].'" target="_blank" title="'.$title.'"></a>';
314
+ $i ++;
315
+ }
316
+
317
+ return $echo_str;
318
+ }
319
+
320
+ ?>
lib/wfu_ajaxactions.php CHANGED
@@ -647,6 +647,20 @@ function wfu_ajax_action_get_historylog_page() {
647
  die(apply_filters('_wfu_ajax_action_get_historylog_page', 'wfu_historylog_page_success:'.wfu_plugin_encode_string($rows)));
648
  }
649
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650
  function wfu_ajax_action_get_adminbrowser_page() {
651
  if ( !isset($_POST['code']) || !isset($_POST['token']) || !isset($_POST['page']) ) die();
652
 
647
  die(apply_filters('_wfu_ajax_action_get_historylog_page', 'wfu_historylog_page_success:'.wfu_plugin_encode_string($rows)));
648
  }
649
 
650
+ function wfu_ajax_action_get_uploadedfiles_page() {
651
+ if ( !isset($_POST['token']) || !isset($_POST['page']) ) die();
652
+ check_ajax_referer( 'wfu-uploadedfiles-page', 'token' );
653
+ if ( !current_user_can( 'manage_options' ) ) die();
654
+ if ( WFU_VAR("WFU_UPLOADEDFILES_TABLE_MAXROWS") <= 0 ) die();
655
+
656
+ $_POST = stripslashes_deep($_POST);
657
+
658
+ $page = wfu_sanitize_int($_POST['page']);
659
+ $rows = wfu_uploadedfiles_manager($page, true);
660
+
661
+ die(apply_filters('_wfu_ajax_action_get_uploadedfiles_page', 'wfu_uploadedfiles_page_success:'.wfu_plugin_encode_string($rows)));
662
+ }
663
+
664
  function wfu_ajax_action_get_adminbrowser_page() {
665
  if ( !isset($_POST['code']) || !isset($_POST['token']) || !isset($_POST['page']) ) die();
666
 
lib/wfu_blocks.php CHANGED
@@ -216,6 +216,7 @@ function wfu_prepare_uploadform_block($params, $additional_params, $occurrence_i
216
  $uploadform_item["js"] = "GlobalData.WFU[".$data["ID"]."].uploadform = { ".
217
  "attachActions: function(clickaction, changeaction) {}, ".
218
  "reset: function() {}, ".
 
219
  "submit: function() {}, ".
220
  "lock: function() {}, ".
221
  "unlock: function() {}, ".
216
  $uploadform_item["js"] = "GlobalData.WFU[".$data["ID"]."].uploadform = { ".
217
  "attachActions: function(clickaction, changeaction) {}, ".
218
  "reset: function() {}, ".
219
+ "resetDummy: function() {}, ".
220
  "submit: function() {}, ".
221
  "lock: function() {}, ".
222
  "unlock: function() {}, ".
lib/wfu_constants.php CHANGED
@@ -3,233 +3,237 @@
3
  $siteurl = site_url();
4
 
5
  /************ Translatable Strings ************/
6
- //plugin default values
7
- DEFINE("WFU_UPLOADTITLE", __('Upload files', 'wp-file-upload'));
8
- DEFINE("WFU_SELECTBUTTON", __('Select File', 'wp-file-upload'));
9
- DEFINE("WFU_UPLOADBUTTON", __('Upload File', 'wp-file-upload'));
10
- DEFINE("WFU_NOTIFYSUBJECT", __('File Upload Notification', 'wp-file-upload'));
11
- DEFINE("WFU_NOTIFYMESSAGE", __("Dear Recipient,%n%%n% This is an automatic delivery message to notify you that a new file has been uploaded.%n%%n%Best Regards", 'wp-file-upload'));
12
- DEFINE("WFU_SUCCESSMESSAGE", __('File %filename% uploaded successfully', 'wp-file-upload'));
13
- DEFINE("WFU_WARNINGMESSAGE", __('File %filename% uploaded successfully but with warnings', 'wp-file-upload'));
14
- DEFINE("WFU_ERRORMESSAGE", __('File %filename% not uploaded', 'wp-file-upload'));
15
- DEFINE("WFU_WAITMESSAGE", __('File %filename% is being uploaded', 'wp-file-upload'));
16
- DEFINE("WFU_USERDATALABEL", __('Your message', 'wp-file-upload')."|t:text|s:left|r:0|a:0|p:inline|d:");
17
- DEFINE("WFU_CAPTCHAPROMPT", __('Please fill in the above words: ', 'wp-file-upload'));
18
- DEFINE("WFU_UPLOADMEDIABUTTON", __('Upload Media', 'wp-file-upload'));
19
- DEFINE("WFU_VIDEONAME", __('videostream', 'wp-file-upload'));
20
- DEFINE("WFU_IMAGENAME", __('screenshot', 'wp-file-upload'));
21
- DEFINE("WFU_CONSENTQUESTION", __('By activating this option I agree to let the website keep my personal data', 'wp-file-upload'));
22
- //browser default values
23
- DEFINE("WFU_FILETITLE", __('File', 'wp-file-upload'));
24
- DEFINE("WFU_DATETITLE", __('Date', 'wp-file-upload'));
25
- DEFINE("WFU_SIZETITLE", __('Size', 'wp-file-upload'));
26
- DEFINE("WFU_USERTITLE", __('User', 'wp-file-upload'));
27
- DEFINE("WFU_POSTTITLE", __('Page', 'wp-file-upload'));
28
- DEFINE("WFU_FIELDSTITLE", __('User Fields', 'wp-file-upload'));
29
- DEFINE("WFU_DOWNLOADLABEL", __('Download', 'wp-file-upload'));
30
- DEFINE("WFU_DOWNLOADTITLE", __('Download this file', 'wp-file-upload'));
31
- DEFINE("WFU_DELETELABEL", __('Delete', 'wp-file-upload'));
32
- DEFINE("WFU_DELETETITLE", __('Delete this file', 'wp-file-upload'));
33
- DEFINE("WFU_SORTTITLE", __('Sort list based on this column', 'wp-file-upload'));
34
- DEFINE("WFU_GUESTTITLE", __('guest', 'wp-file-upload'));
35
- DEFINE("WFU_UNKNOWNTITLE", __('unknown', 'wp-file-upload'));
36
- //error messages
37
- DEFINE("WFU_ERROR_ADMIN_FTPDIR_RESOLVE", __("Error. Could not resolve ftp target filedir. Check the domain in 'ftpinfo' attribute.", "wp-file-upload"));
38
- DEFINE("WFU_ERROR_ADMIN_FTPINFO_INVALID", __("Error. Invalid ftp information. Check 'ftpinfo' attribute.", "wp-file-upload"));
39
- DEFINE("WFU_ERROR_ADMIN_FTPINFO_EXTRACT", __("Error. Could not extract ftp information from 'ftpinfo' attribute. Check its syntax.", "wp-file-upload"));
40
- DEFINE("WFU_ERROR_ADMIN_FTPFILE_RESOLVE", __("Error. Could not resolve ftp target filename. Check the domain in 'ftpinfo' attribute.", "wp-file-upload"));
41
- DEFINE("WFU_ERROR_ADMIN_FTPSOURCE_FAIL", __("Error. Could not open source file for ftp upload. Check if file is accessible.", "wp-file-upload"));
42
- DEFINE("WFU_ERROR_ADMIN_FTPTRANSFER_FAIL", __("Error. Could not send data to ftp target file.", "wp-file-upload"));
43
- DEFINE("WFU_ERROR_ADMIN_FTPHOST_FAIL", __("Error. Could not connect to ftp host. Check the domain in 'ftpinfo' attribute.", "wp-file-upload"));
44
- DEFINE("WFU_ERROR_ADMIN_FTPLOGIN_FAIL", __("Error. Could not authenticate to ftp host. Check username and password in 'ftpinfo' attribute.", "wp-file-upload"));
45
- DEFINE("WFU_ERROR_ADMIN_SFTPINIT_FAIL", __("Error. Could not initialize sftp subsystem. Please check if the server supports sftp.", "wp-file-upload"));
46
- DEFINE("WFU_ERROR_ADMIN_SFTP_UNSUPPORTED", __("Error. The web server does not support sftp.", "wp-file-upload"));
47
- DEFINE("WFU_ERROR_ADMIN_FILE_PHP_SIZE", __("Error. The upload size limit of PHP directive upload_max_filesize is preventing the upload of big files.\nPHP directive upload_max_filesize limit is: ".ini_get("upload_max_filesize").".\nTo increase the limit change the value of the directive from php.ini.\nIf you don't have access to php.ini, then try adding the following line to your .htaccess file:\n\nphp_value upload_max_filesize 10M\n\n(adjust the size according to your needs)\n\nThe file .htaccess is found in your website root directory (where index.php is found).\nIf your don't have this file, then create it.\nIf this does not work either, then contact your domain provider.", "wp-file-upload"));
48
- DEFINE("WFU_ERROR_ADMIN_FILE_PHP_TIME", __("The upload time limit of PHP directive max_input_time is preventing the upload of big files.\nPHP directive max_input_time limit is: ".ini_get("max_input_time")." seconds.\nTo increase the limit change the value of the directive from php.ini.\nIf you don't have access to php.ini, then add the following line to your .htaccess file:\n\nphp_value max_input_time 500\n\n(adjust the time according to your needs)\n\nThe file .htaccess is found in your website root directory (where index.php is found).\nIf your don't have this file, then create it.\nIf this does not work either, then contact your domain provider.", "wp-file-upload"));
49
- DEFINE("WFU_ERROR_ADMIN_DIR_PERMISSION", __("Error. Permission denied to write to target folder.\nCheck and correct read/write permissions of target folder.", "wp-file-upload"));
50
- DEFINE("WFU_ERROR_ADMIN_FILE_WRONGEXT", __("Error. This file was rejected because its extension is not correct. Its proper filename is: ", "wp-file-upload"));
51
- DEFINE("WFU_ERROR_ADMIN_DOS_ATTACK", __("Too many files are uploaded in a short period of time. This may be a Denial-Of-Service attack, so file was rejected. Please check the upload log for suspicious behaviour.", "wp-file-upload"));
52
- DEFINE("WFU_ERROR_DOS_ATTACK", __("File not uploaded in order to prevent overflow of the website. Please contact administrator.", "wp-file-upload"));
53
- DEFINE("WFU_ERROR_DIR_EXIST", __("Target folder doesn't exist.", "wp-file-upload"));
54
- DEFINE("WFU_ERROR_DIR_NOTEMP", __("Upload failed! Missing a temporary folder.", "wp-file-upload"));
55
- DEFINE("WFU_ERROR_DIR_PERMISSION", __("Upload failed! Permission denied to write to target folder.", "wp-file-upload"));
56
- DEFINE("WFU_ERROR_FILE_ALLOW", __("File not allowed.", "wp-file-upload"));
57
- DEFINE("WFU_ERROR_FILE_REJECT", __("File is suspicious and was rejected.", "wp-file-upload"));
58
- DEFINE("WFU_ERROR_FILE_PLUGIN_SIZE", __("The uploaded file exceeds the file size limit.", "wp-file-upload"));
59
- DEFINE("WFU_ERROR_FILE_PLUGIN_2GBSIZE", __("The uploaded file exceeds 2GB and is not supported by this server.", "wp-file-upload"));
60
- DEFINE("WFU_ERROR_FILE_PHP_SIZE", __("Upload failed! The uploaded file exceeds the file size limit of the server. Please contact the administrator.", "wp-file-upload"));
61
- DEFINE("WFU_ERROR_FILE_PHP_TIME", __("Upload failed! The duration of the upload exceeded the time limit of the server. Please contact the administrator.", "wp-file-upload"));
62
- DEFINE("WFU_ERROR_FILE_HTML_SIZE", __("Upload failed! The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.", "wp-file-upload"));
63
- DEFINE("WFU_ERROR_FILE_PARTIAL", __("Upload failed! The uploaded file was only partially uploaded.", "wp-file-upload"));
64
- DEFINE("WFU_ERROR_FILE_NOTHING", __("Upload failed! No file was uploaded.", "wp-file-upload"));
65
- DEFINE("WFU_ERROR_FILE_WRITE", __("Upload failed! Failed to write file to disk.", "wp-file-upload"));
66
- DEFINE("WFU_ERROR_FILE_MOVE", __("Upload failed! Error occured while moving temporary file. Please contact administrator.", "wp-file-upload"));
67
- DEFINE("WFU_ERROR_FILE_CANCELLED", __("Upload cancelled!", "wp-file-upload"));
68
- DEFINE("WFU_ERROR_UPLOAD_STOPPED", __("Upload failed! A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help.", "wp-file-upload"));
69
- DEFINE("WFU_ERROR_UPLOAD_FAILED_WHILE", __("Upload failed! Error occured while attemting to upload the file.", "wp-file-upload"));
70
- DEFINE("WFU_ERROR_UPLOAD_FAILED", __("Upload failed!", "wp-file-upload"));
71
- DEFINE("WFU_ERROR_UPLOAD_NOFILESELECTED", __("No file!", "wp-file-upload"));
72
- DEFINE("WFU_ERROR_UPLOAD_CANCELLED", __("Upload failed! The upload has been canceled by the user or the browser dropped the connection.", "wp-file-upload"));
73
- DEFINE("WFU_ERROR_UNKNOWN", __("Upload failed! Unknown error.", "wp-file-upload"));
74
- DEFINE("WFU_ERROR_CONTACT_ADMIN", __("Please contact the administrator.", "wp-file-upload"));
75
- DEFINE("WFU_ERROR_REMOTESERVER_NORESULT", __("No result from remote server!", "wp-file-upload"));
76
- DEFINE("WFU_ERROR_JSONPARSE_FILEMESSAGE", __(" but with warnings", "wp-file-upload"));
77
- DEFINE("WFU_ERROR_JSONPARSE_MESSAGE", __("Warning: JSON parse error.", "wp-file-upload"));
78
- DEFINE("WFU_ERROR_JSONPARSE_ADMINMESSAGE", __("Upload parameters of this file, passed as JSON string to the handler, could not be parsed.", "wp-file-upload"));
79
- DEFINE("WFU_ERROR_JSONPARSE_HEADERMESSAGE", __("Warning: JSON parse error.", "wp-file-upload"));
80
- DEFINE("WFU_ERROR_JSONPARSE_HEADERADMINMESSAGE", __("UploadStates, passed as JSON string to the handler, could not be parsed.", "wp-file-upload"));
81
- DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE0", __("Redirection to classic form functionality occurred due to unknown error.", "wp-file-upload"));
82
- DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE1", __("Redirection to classic form functionality occurred because AJAX is not supported.", "wp-file-upload"));
83
- DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE2", __("Redirection to classic form functionality occurred because HTML5 is not supported.", "wp-file-upload"));
84
- DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE3", __("Redirection to classic form functionality occurred due to JSON parse error.", "wp-file-upload"));
85
- DEFINE("WFU_ERROR_ENABLE_POPUPS", __("Please enable popup windows from the browser's settings!", "wp-file-upload"));
86
- DEFINE("WFU_ERROR_USERDATA_EMPTY", __("cannot be empty!", "wp-file-upload"));
87
- DEFINE("WFU_ERROR_USERDATANUMBER_INVALID", __("number not valid!", "wp-file-upload"));
88
- DEFINE("WFU_ERROR_USERDATAEMAIL_INVALID", __("email not valid!", "wp-file-upload"));
89
- DEFINE("WFU_ERROR_USERDATACONFIRMEMAIL_NOMATCH", __("emails do not match!", "wp-file-upload"));
90
- DEFINE("WFU_ERROR_USERDATACONFIRMEMAIL_NOBASE", __("no base email field in group!", "wp-file-upload"));
91
- DEFINE("WFU_ERROR_USERDATACONFIRMPASSWORD_NOMATCH", __("passwords do not match!", "wp-file-upload"));
92
- DEFINE("WFU_ERROR_USERDATACONFIRMPASSWORD_NOBASE", __("no base password field in group!", "wp-file-upload"));
93
- DEFINE("WFU_ERROR_USERDATACHECKBOX_NOTCHECKED", __("checkbox unchecked!", "wp-file-upload"));
94
- DEFINE("WFU_ERROR_USERDATARADIO_NOTSELECTED", __("no option selected!", "wp-file-upload"));
95
- DEFINE("WFU_ERROR_USERDATALIST_NOITEMSELECTED", __("no item selected!", "wp-file-upload"));
96
- DEFINE("WFU_ERROR_SAME_PLUGINID", __("There are more than one instances of the plugin in this page with the same id. Please change it.", "wp-file-upload"));
97
- DEFINE("WFU_ERROR_PAGE_OBSOLETE", __("Cannot edit the shortcode because the page has been modified. Please reload the page.", "wp-file-upload"));
98
- DEFINE("WFU_ERROR_WEBCAM_NOTSUPPORTED", __("Your browser does not support webcam capture!", "wp-file-upload"));
99
- DEFINE("WFU_ERROR_WEBCAM_VIDEO_NOTSUPPORTED", __("Your browser does not support video recording from the webcam!", "wp-file-upload"));
100
- DEFINE("WFU_ERROR_WEBCAM_VIDEO_NOTHINGRECORDED", __("No video was recorded!", "wp-file-upload"));
101
- DEFINE("WFU_ERROR_CAPTCHA_OLDPHP", __("ERROR: Captcha not supported! You have an old PHP version. Upgrade your PHP or use RecaptchaV2 (no account).", "wp-file-upload"));
102
- DEFINE("WFU_ERROR_CAPTCHA_MULTIPLE_NOTALLOWED", __("ERROR: Only one instance of RecaptchaV1 can exist on the same page. Please notify administrator.", "wp-file-upload"));
103
- DEFINE("WFU_ERROR_CAPTCHA_MULTIPLE_NOTALLOWED_ADMIN", __("ERROR: Only one instance of RecaptchaV1 can exist on the same page. Please use RecaptchaV1 (no account).", "wp-file-upload"));
104
- DEFINE("WFU_ERROR_CAPTCHA_NOSITEKEY", __("ERROR: No site key. Please contact administrator!", "wp-file-upload"));
105
- DEFINE("WFU_ERROR_CAPTCHA_NOSITEKEY_ADMIN", __("ERROR: No site key defined! Please go to the plugin settings in Dashboard to define Google Recaptcha keys.", "wp-file-upload"));
106
- DEFINE("WFU_ERROR_CAPTCHA_NOCHALLENGE", __("Bad captcha image!", "wp-file-upload"));
107
- DEFINE("WFU_ERROR_CAPTCHA_NOINPUT", __("No input!", "wp-file-upload"));
108
- DEFINE("WFU_ERROR_CAPTCHA_EMPTY", __("Captcha not completed!", "wp-file-upload"));
109
- DEFINE("WFU_ERROR_CAPTCHA_WRONGCAPTCHA", __("Wrong captcha!", "wp-file-upload"));
110
- DEFINE("WFU_ERROR_CAPTCHA_REFRESHING", __("Error refreshing captcha!", "wp-file-upload"));
111
- DEFINE("WFU_ERROR_CAPTCHA_UNKNOWNERROR", __("Unknown captcha error!", "wp-file-upload"));
112
- DEFINE("WFU_ERROR_CAPTCHA_NOTSUPPORTED", __("Captcha not supported by your browser!", "wp-file-upload"));
113
- DEFINE("WFU_ERROR_CAPTCHA_MISSINGINPUTSECRET", __("the secret parameter is missing", "wp-file-upload"));
114
- DEFINE("WFU_ERROR_CAPTCHA_INVALIDINPUTSECRET", __("the secret parameter is invalid or malformed", "wp-file-upload"));
115
- DEFINE("WFU_ERROR_CAPTCHA_MISSINGINPUTRESPONSE", __("the response parameter is missing", "wp-file-upload"));
116
- DEFINE("WFU_ERROR_CAPTCHA_INVALIDINPUTRESPONSE", __("the response parameter is invalid or malformed", "wp-file-upload"));
117
- DEFINE("WFU_ERROR_REDIRECTION_NODRAGDROP", __("Please do not use drag drop due to an internal problem.", "wp-file-upload"));
118
- DEFINE("WFU_ERROR_CHUNKEDUPLOAD_UNIQUEIDEMPTY", __("Error during chunked upload. Unique ID empty in chunk %d", "wp-file-upload"));
119
- DEFINE("WFU_ERROR_CHUNKEDUPLOAD_NOTALLOWED", __("Chunked upload is not allowed!", "wp-file-upload"));
120
- DEFINE("WFU_ERROR_CHUNKEDUPLOAD_ABORTED", __("Chunked upload aborted due to error in previous chunk!", "wp-file-upload"));
121
- DEFINE("WFU_ERROR_CHUNKEDUPLOAD_CONCATFAILED", __("Chunked upload failed, final file could not be created!", "wp-file-upload"));
122
- DEFINE("WFU_ERROR_ADMIN_CHUNKWRITEFAILED", __("Could not write file chuck to destination on chunk %d", "wp-file-upload"));
123
- DEFINE("WFU_ERROR_ADMIN_CHUNKENLARGEFAILED", __("Could not enlarge destination file on chunk %d", "wp-file-upload"));
124
- DEFINE("WFU_ERROR_ADMIN_CHUNKHANDLEFAILED", __("Could not open file handles on chunk %d", "wp-file-upload"));
125
- DEFINE("WFU_BROWSER_DOWNLOADFILE_NOTALLOWED", __("You are not allowed to download this file!", "wp-file-upload"));
126
- DEFINE("WFU_BROWSER_DOWNLOADFILE_NOTEXIST", __("File does not exist!", "wp-file-upload"));
127
- DEFINE("WFU_BROWSER_DOWNLOADFILE_FAILED", __("Could not download file!", "wp-file-upload"));
128
- DEFINE("WFU_BROWSER_DELETEFILE_NOTALLOWED", __("You are not allowed to delete this file!", "wp-file-upload"));
129
- DEFINE("WFU_BROWSER_DELETEFILE_FAILED", __("File was not deleted!", "wp-file-upload"));
130
- DEFINE("WFU_BROWSER_DELETEFILES_ALLFAILED", __("No file was deleted!", "wp-file-upload"));
131
- DEFINE("WFU_BROWSER_DELETEFILES_SOMEFAILED", __("Some files were not deleted!", "wp-file-upload"));
132
- //warning messages
133
- DEFINE("WFU_WARNING_FILE_EXISTS", __("Upload skipped! File already exists.", "wp-file-upload"));
134
- DEFINE("WFU_WARNING_FILE_SUSPICIOUS", __("The extension of the file does not match its contents.", "wp-file-upload"));
135
- DEFINE("WFU_WARNING_ADMIN_FILE_SUSPICIOUS", __("Upload succeeded but the file is suspicious because its contents do not match its extension. Its proper filename is: ", "wp-file-upload"));
136
- DEFINE("WFU_WARNING_NOFILES_SELECTED", __("No files have been selected!", "wp-file-upload"));
137
- DEFINE("WFU_WARNING_CONSENT_NOTCOMPLETED", __("Please complete the consent question before continuing the upload!", "wp-file-upload"));
138
- DEFINE("WFU_WARNING_WPFILEBASE_NOTUPDATED_NOFILES", __("WPFilebase Plugin not updated because there were no files uploaded.", "wp-file-upload"));
139
- DEFINE("WFU_WARNING_NOTIFY_NOTSENT_NOFILES", __("Notification email was not sent because there were no files uploaded.", "wp-file-upload"));
140
- DEFINE("WFU_WARNING_NOTIFY_NOTSENT_NORECIPIENTS", __("Notification email was not sent because no recipients were defined. Please check notifyrecipients attribute in the shortcode.", "wp-file-upload"));
141
- DEFINE("WFU_WARNING_NOTIFY_NOTSENT_UNKNOWNERROR", __("Notification email was not sent due to an error. Please check notifyrecipients, notifysubject and notifymessage attributes for errors.", "wp-file-upload"));
142
- DEFINE("WFU_WARNING_REDIRECT_NOTEXECUTED_EMPTY", __("Redirection not executed because redirection link is empty. Please check redirectlink attribute.", "wp-file-upload"));
143
- DEFINE("WFU_WARNING_REDIRECT_NOTEXECUTED_FILESFAILED", __("Redirection not executed because not all files were successfully uploaded.", "wp-file-upload"));
144
- DEFINE("WFU_WARNING_POTENTIAL_DOS_EMAIL_SUBJECT", __("Potential Denial-Of-Service Attack on {SITE}", "wp-file-upload"));
145
- DEFINE("WFU_WARNING_POTENTIAL_DOS_EMAIL_MESSAGE", __("Hello admin\n\nThis is a message from Wordpress File Upload Plugin to notify you that a potential Denial-Of-Service attack has been detected on {SITE}.\n\nThe plugin detected more than {FILENUM} uploads within {INTERVAL} seconds.\n\nAll file uploads that exceed this limit are rejected to protect the website from overflowing.\n\nPlease check the upload history log in the plugin's area in Dashboard for any suspicious behaviour.\n\nA new message will follow if the situation remains.\n\nThanks", "wp-file-upload"));
146
- DEFINE("WFU_WARNING_ALT_IPTANUS_SERVER_ACTIVATED", __("You have activated an alternative insecure Iptanus Services Server. For details please contact info@iptanus.com.", "wp-file-upload"));
147
- DEFINE("WFU_WARNING_IPTANUS_SERVER_UNREACHABLE", __("Iptanus Services Server is unreachable. This may cause problems in some plugin functions. Please contact info@iptanus.com for details.", "wp-file-upload"));
148
- //admin area messages
149
- DEFINE("WFU_DASHBOARD_ADD_SHORTCODE_REJECTED", __("Failed to add the shortcode to the page/post. Please try again. If the message persists, contact administrator.", "wp-file-upload"));
150
- DEFINE("WFU_DASHBOARD_EDIT_SHORTCODE_REJECTED", __("Failed to edit the shortcode because the contents of the page changed. Try again to edit the shortcode.", "wp-file-upload"));
151
- DEFINE("WFU_DASHBOARD_DELETE_SHORTCODE_REJECTED", __("Failed to delete the shortcode because the contents of the page changed. Try again to delete it.", "wp-file-upload"));
152
- DEFINE("WFU_DASHBOARD_PAGE_OBSOLETE", __("The page containing the shortcode has been modified and it is no longer valid. Please go back to reload the shortcode.", "wp-file-upload"));
153
- DEFINE("WFU_DASHBOARD_UPDATE_SHORTCODE_REJECTED", __("Failed to update the shortcode because the contents of the page changed. Go back to reload the shortcode.", "wp-file-upload"));
154
- DEFINE("WFU_DASHBOARD_UPDATE_SHORTCODE_FAILED", __("Failed to update the shortcode. Please try again. If the problem persists, go back and reload the shortcode.", "wp-file-upload"));
155
- //test messages
156
- DEFINE("WFU_TESTMESSAGE_MESSAGE", __('This is a test message', 'wp-file-upload'));
157
- DEFINE("WFU_TESTMESSAGE_ADMINMESSAGE", __('This is a test administrator message', 'wp-file-upload'));
158
- DEFINE("WFU_TESTMESSAGE_FILE1_HEADER", __('File testfile 1 under test', 'wp-file-upload'));
159
- DEFINE("WFU_TESTMESSAGE_FILE1_MESSAGE", __('File testfile 1 message', 'wp-file-upload'));
160
- DEFINE("WFU_TESTMESSAGE_FILE1_ADMINMESSAGE", __('File testfile 1 administrator message', 'wp-file-upload'));
161
- DEFINE("WFU_TESTMESSAGE_FILE2_HEADER", __('File testfile 2 under test', 'wp-file-upload'));
162
- DEFINE("WFU_TESTMESSAGE_FILE2_MESSAGE", __('File testfile 2 message', 'wp-file-upload'));
163
- DEFINE("WFU_TESTMESSAGE_FILE2_ADMINMESSAGE", __('File testfile 2 administrator message', 'wp-file-upload'));
164
- //variables tool-tips
165
- DEFINE("WFU_VARIABLE_TITLE_USERID", __("Insert variable %userid% inside text. It will be replaced by the id of the current user.", "wp-file-upload"));
166
- DEFINE("WFU_VARIABLE_TITLE_USERNAME", __("Insert variable %username% inside text. It will be replaced by the username of the current user.", "wp-file-upload"));
167
- DEFINE("WFU_VARIABLE_TITLE_USEREMAIL", __("Insert variable %useremail% inside text. It will be replaced by the email of the current user.", "wp-file-upload"));
168
- DEFINE("WFU_VARIABLE_TITLE_FILENAME", __("Insert variable %filename% inside text. It will be replaced by the filename of the uploaded file.", "wp-file-upload"));
169
- DEFINE("WFU_VARIABLE_TITLE_FILEPATH", __("Insert variable %filepath% inside text. It will be replaced by the full filepath of the uploaded file.", "wp-file-upload"));
170
- DEFINE("WFU_VARIABLE_TITLE_BLOGID", __("Insert variable %blogid% inside text. It will be replaced by the blog id of the website.", "wp-file-upload"));
171
- DEFINE("WFU_VARIABLE_TITLE_PAGEID", __("Insert variable %pageid% inside text. It will be replaced by the id of the current page.", "wp-file-upload"));
172
- DEFINE("WFU_VARIABLE_TITLE_PAGETITLE", __("Insert variable %pagetitle% inside text. It will be replaced by the title of the current page.", "wp-file-upload"));
173
- DEFINE("WFU_VARIABLE_TITLE_USERDATAXXX", __("Insert variable %userdataXXX% inside text. Select the user field from the drop-down list. It will be replaced by the value that the user entered in this field.", "wp-file-upload"));
174
- DEFINE("WFU_VARIABLE_TITLE_N", __("Insert variable %n% inside text to denote a line change.", "wp-file-upload"));
175
- //other plugin values
176
- DEFINE("WFU_NOTIFY_TESTMODE", __("Test Mode", "wp-file-upload"));
177
- DEFINE("WFU_SUBDIR_SELECTDIR", __("select dir...", "wp-file-upload"));
178
- DEFINE("WFU_SUBDIR_TYPEDIR", __("type dir", "wp-file-upload"));
179
- DEFINE("WFU_SUCCESSMESSAGE_DETAILS", __('Upload path: %filepath%', 'wp-file-upload'));
180
- DEFINE("WFU_FAILMESSAGE_DETAILS", __('Failed upload path: %filepath%', 'wp-file-upload'));
181
- DEFINE("WFU_USERDATA_REQUIREDLABEL", __(' (required)', 'wp-file-upload'));
182
- DEFINE("WFU_PAGEEXIT_PROMPT", __('Files are being uploaded. Are you sure you want to exit the page?', 'wp-file-upload'));
183
- DEFINE("WFU_MESSAGE_CAPTCHA_CHECKING", __("checking captcha...", "wp-file-upload"));
184
- DEFINE("WFU_MESSAGE_CAPTCHA_REFRESHING", __("refreshing...", "wp-file-upload"));
185
- DEFINE("WFU_MESSAGE_CAPTCHA_OK", __("correct captcha", "wp-file-upload"));
186
- DEFINE("WFU_CONFIRMBOX_CAPTION", __("click to continue the upload", "wp-file-upload"));
187
- DEFINE("WFU_BROWSER_DELETEFILE_PROMPT", __("Are you sure you want to delete this file?", "wp-file-upload"));
188
- DEFINE("WFU_BROWSER_DELETEFILES_PROMPT", __("Are you sure you want to delete these files?", "wp-file-upload"));
189
- DEFINE("WFU_BROWSER_BULKACTION_TITLE", __("Bulk Actions", "wp-file-upload"));
190
- DEFINE("WFU_BROWSER_BULKACTION_LABEL", __("Apply", "wp-file-upload"));
191
- DEFINE("WFU_PAGINATION_PAGE", __("Page", "wp-file-upload"));
192
- DEFINE("WFU_PAGINATION_OF", __("of ", "wp-file-upload"));
193
- DEFINE("WFU_CANCEL_UPLOAD_PROMPT", __("Are you sure that you want to cancel the upload?", "wp-file-upload"));
194
- DEFINE("WFU_FILE_CANCEL_HINT", __("cancel upload of this file", "wp-file-upload"));
195
- DEFINE("WFU_UPLOAD_STATE0", __("Upload in progress", "wp-file-upload"));
196
- DEFINE("WFU_UPLOAD_STATE1", __("Upload in progress with warnings!", "wp-file-upload"));
197
- DEFINE("WFU_UPLOAD_STATE2", __("Upload in progress but some files already failed!", "wp-file-upload"));
198
- DEFINE("WFU_UPLOAD_STATE3", __("Upload in progress but no files uploaded so far!", "wp-file-upload"));
199
- DEFINE("WFU_UPLOAD_STATE4", __("All files uploaded successfully", "wp-file-upload"));
200
- DEFINE("WFU_UPLOAD_STATE5", __("All files uploaded successfully but there are warnings!", "wp-file-upload"));
201
- DEFINE("WFU_UPLOAD_STATE5_SINGLEFILE", __("File uploaded successfully but there are warnings!", "wp-file-upload"));
202
- DEFINE("WFU_UPLOAD_STATE6", __("Some files failed to upload!", "wp-file-upload"));
203
- DEFINE("WFU_UPLOAD_STATE7", __("All files failed to upload", "wp-file-upload"));
204
- DEFINE("WFU_UPLOAD_STATE7_SINGLEFILE", __("File failed to upload", "wp-file-upload"));
205
- DEFINE("WFU_UPLOAD_STATE8", __("There are no files to upload!", "wp-file-upload"));
206
- DEFINE("WFU_UPLOAD_STATE9", __("Test upload message", "wp-file-upload"));
207
- DEFINE("WFU_UPLOAD_STATE10", __("JSON parse warning!", "wp-file-upload"));
208
- DEFINE("WFU_UPLOAD_STATE11", __("please wait while redirecting...", "wp-file-upload"));
209
- DEFINE("WFU_UPLOAD_STATE12", __("Upload failed!", "wp-file-upload"));
210
- DEFINE("WFU_UPLOAD_STATE13", __("Submitting data", "wp-file-upload"));
211
- DEFINE("WFU_UPLOAD_STATE14", __("Data submitted successfully!", "wp-file-upload"));
212
- DEFINE("WFU_UPLOAD_STATE15", __("Data were not submitted!", "wp-file-upload"));
213
- DEFINE("WFU_UPLOAD_STATE16", __("Cancelling upload", "wp-file-upload"));
214
- DEFINE("WFU_UPLOAD_STATE17", __("Upload cancelled!", "wp-file-upload"));
215
- DEFINE("WFU_PAGE_PLUGINEDITOR_BUTTONTITLE", __("Open visual shortcode editor in new window", "wp-file-upload"));
216
- DEFINE("WFU_PAGE_PLUGINEDITOR_LOADING", __("loading visual editor", "wp-file-upload"));
217
- DEFINE("WFU_CONFIRM_CLEARFILES", __("Clear file list?", "wp-file-upload"));
218
- DEFINE("WFU_DROP_HERE_MESSAGE", __('DROP HERE', 'wp-file-upload'));
219
- //webcam values
220
- DEFINE("WFU_WEBCAM_RECVIDEO_BTN", __('record video', 'wp-file-upload'));
221
- DEFINE("WFU_WEBCAM_TAKEPIC_BTN", __('take a picture', 'wp-file-upload'));
222
- DEFINE("WFU_WEBCAM_TURNONOFF_BTN", __('turn webcam on/off', 'wp-file-upload'));
223
- DEFINE("WFU_WEBCAM_GOLIVE_BTN", __('go live again', 'wp-file-upload'));
224
- DEFINE("WFU_WEBCAM_STOPREC_BTN", __('end recording', 'wp-file-upload'));
225
- DEFINE("WFU_WEBCAM_PLAY_BTN", __('play', 'wp-file-upload'));
226
- DEFINE("WFU_WEBCAM_PAUSE_BTN", __('pause', 'wp-file-upload'));
227
- DEFINE("WFU_WEBCAM_GOBACK_BTN", __('go to the beginning', 'wp-file-upload'));
228
- DEFINE("WFU_WEBCAM_GOFWD_BTN", __('go to the end', 'wp-file-upload'));
229
- //widget values
230
- DEFINE("WFU_WIDGET_PLUGINFORM_TITLE", __('Wordpress File Upload Form', 'wp-file-upload'));
231
- DEFINE("WFU_WIDGET_PLUGINFORM_DESCRIPTION", __('Wordpress File Upload plugin uploader for sidebars', 'wp-file-upload'));
232
- DEFINE("WFU_WIDGET_SIDEBAR_DEFAULTTITLE", __('Upload Files', 'wp-file-upload'));
 
 
 
 
233
 
234
  /*********** Environment Variables ************/
235
  //plugin default values
@@ -306,6 +310,7 @@ $GLOBALS["WFU_GLOBALS"] += array(
306
  "WFU_PHP_ARRAY_MAXLEN" => array( "Max PHP Array Length", "string", "10000", "The maximum allowable number of items of a PHP array." ),
307
  "WFU_ADMINBROWSER_TABLE_MAXROWS" => array( "Admin Browser Rows Per Page", "integer", 25, "The number of rows per page of the admin browser. A value equal to zero or less denotes no pagination." ),
308
  "WFU_HISTORYLOG_TABLE_MAXROWS" => array( "History Log Table Rows Per Page", "integer", 25, "The number of rows per page of the History Log table." ),
 
309
  "WFU_ALTERNATIVE_RANDOMIZER" => array( "Use Alternative Randomizer", "string", "false", "On fast web servers the plugin's generator of random strings may not work properly causing various problems. If it is set to true, an alternative randomizer method is employed that works for fast web servers. It can be 'true' or 'false'." ),
310
  "WFU_FORCE_NOTIFICATIONS" => array( "Force Email Notifications", "string", "false", "Send email notifications (if they are activated) even if no file has been uploaded. It can be 'true' or 'false'." ),
311
  "WFU_UPDATE_MEDIA_ON_DELETE" => array( "Update Media on Delete", "string", "true", "When an uploaded file is deleted then delete also the corresponding Media Library item if exists. It can be 'true' or 'false'." ),
@@ -325,7 +330,10 @@ $GLOBALS["WFU_GLOBALS"] += array(
325
  "WFU_US_DBOPTION_LIFE" => array( "DB Option User State Life", "integer", 1800, "Defines the maximum time of inactivity of a user state, when user state is saved in DB option table." ),
326
  "WFU_PD_VISIBLE_OPLEVELS" => array( "Personal Data Visible Operation Levels", "integer", 3, "Defines how deep administrators can go into personal data operation details. A value of -1 denotes that there is no limit." ),
327
  "WFU_PD_VISIBLE_PERLEVELS" => array( "Personal Data Visible Permission Levels", "integer", 2, "Defines how deep administrators can go into personal data permission details. A value of -1 denotes that there is no limit." ),
328
- "WFU_PD_VISIBLE_LOGLEVELS" => array( "Personal Data Visible Log Action Levels", "integer", 2, "Defines how deep administrators can go into personal data log action details. A value of -1 denotes that there is no limit." )
 
 
 
329
  );
330
  //color definitions
331
  $GLOBALS["WFU_GLOBALS"] += array(
3
  $siteurl = site_url();
4
 
5
  /************ Translatable Strings ************/
6
+ function wfu_initialize_i18n_strings() {
7
+ if ( defined("WFU_I18_LOADED") ) return;
8
+ DEFINE("WFU_I18_LOADED", 1);
9
+ //plugin default values
10
+ DEFINE("WFU_UPLOADTITLE", __('Upload files', 'wp-file-upload'));
11
+ DEFINE("WFU_SELECTBUTTON", __('Select File', 'wp-file-upload'));
12
+ DEFINE("WFU_UPLOADBUTTON", __('Upload File', 'wp-file-upload'));
13
+ DEFINE("WFU_NOTIFYSUBJECT", __('File Upload Notification', 'wp-file-upload'));
14
+ DEFINE("WFU_NOTIFYMESSAGE", __("Dear Recipient,%n%%n% This is an automatic delivery message to notify you that a new file has been uploaded.%n%%n%Best Regards", 'wp-file-upload'));
15
+ DEFINE("WFU_SUCCESSMESSAGE", __('File %filename% uploaded successfully', 'wp-file-upload'));
16
+ DEFINE("WFU_WARNINGMESSAGE", __('File %filename% uploaded successfully but with warnings', 'wp-file-upload'));
17
+ DEFINE("WFU_ERRORMESSAGE", __('File %filename% not uploaded', 'wp-file-upload'));
18
+ DEFINE("WFU_WAITMESSAGE", __('File %filename% is being uploaded', 'wp-file-upload'));
19
+ DEFINE("WFU_USERDATALABEL", __('Your message', 'wp-file-upload')."|t:text|s:left|r:0|a:0|p:inline|d:");
20
+ DEFINE("WFU_CAPTCHAPROMPT", __('Please fill in the above words: ', 'wp-file-upload'));
21
+ DEFINE("WFU_UPLOADMEDIABUTTON", __('Upload Media', 'wp-file-upload'));
22
+ DEFINE("WFU_VIDEONAME", __('videostream', 'wp-file-upload'));
23
+ DEFINE("WFU_IMAGENAME", __('screenshot', 'wp-file-upload'));
24
+ DEFINE("WFU_CONSENTQUESTION", __('By activating this option I agree to let the website keep my personal data', 'wp-file-upload'));
25
+ //browser default values
26
+ DEFINE("WFU_FILETITLE", __('File', 'wp-file-upload'));
27
+ DEFINE("WFU_DATETITLE", __('Date', 'wp-file-upload'));
28
+ DEFINE("WFU_SIZETITLE", __('Size', 'wp-file-upload'));
29
+ DEFINE("WFU_USERTITLE", __('User', 'wp-file-upload'));
30
+ DEFINE("WFU_POSTTITLE", __('Page', 'wp-file-upload'));
31
+ DEFINE("WFU_FIELDSTITLE", __('User Fields', 'wp-file-upload'));
32
+ DEFINE("WFU_DOWNLOADLABEL", __('Download', 'wp-file-upload'));
33
+ DEFINE("WFU_DOWNLOADTITLE", __('Download this file', 'wp-file-upload'));
34
+ DEFINE("WFU_DELETELABEL", __('Delete', 'wp-file-upload'));
35
+ DEFINE("WFU_DELETETITLE", __('Delete this file', 'wp-file-upload'));
36
+ DEFINE("WFU_SORTTITLE", __('Sort list based on this column', 'wp-file-upload'));
37
+ DEFINE("WFU_GUESTTITLE", __('guest', 'wp-file-upload'));
38
+ DEFINE("WFU_UNKNOWNTITLE", __('unknown', 'wp-file-upload'));
39
+ //error messages
40
+ DEFINE("WFU_ERROR_ADMIN_FTPDIR_RESOLVE", __("Error. Could not resolve ftp target filedir. Check the domain in 'ftpinfo' attribute.", "wp-file-upload"));
41
+ DEFINE("WFU_ERROR_ADMIN_FTPINFO_INVALID", __("Error. Invalid ftp information. Check 'ftpinfo' attribute.", "wp-file-upload"));
42
+ DEFINE("WFU_ERROR_ADMIN_FTPINFO_EXTRACT", __("Error. Could not extract ftp information from 'ftpinfo' attribute. Check its syntax.", "wp-file-upload"));
43
+ DEFINE("WFU_ERROR_ADMIN_FTPFILE_RESOLVE", __("Error. Could not resolve ftp target filename. Check the domain in 'ftpinfo' attribute.", "wp-file-upload"));
44
+ DEFINE("WFU_ERROR_ADMIN_FTPSOURCE_FAIL", __("Error. Could not open source file for ftp upload. Check if file is accessible.", "wp-file-upload"));
45
+ DEFINE("WFU_ERROR_ADMIN_FTPTRANSFER_FAIL", __("Error. Could not send data to ftp target file.", "wp-file-upload"));
46
+ DEFINE("WFU_ERROR_ADMIN_FTPHOST_FAIL", __("Error. Could not connect to ftp host. Check the domain in 'ftpinfo' attribute.", "wp-file-upload"));
47
+ DEFINE("WFU_ERROR_ADMIN_FTPLOGIN_FAIL", __("Error. Could not authenticate to ftp host. Check username and password in 'ftpinfo' attribute.", "wp-file-upload"));
48
+ DEFINE("WFU_ERROR_ADMIN_SFTPINIT_FAIL", __("Error. Could not initialize sftp subsystem. Please check if the server supports sftp.", "wp-file-upload"));
49
+ DEFINE("WFU_ERROR_ADMIN_SFTP_UNSUPPORTED", __("Error. The web server does not support sftp.", "wp-file-upload"));
50
+ DEFINE("WFU_ERROR_ADMIN_FILE_PHP_SIZE", __("Error. The upload size limit of PHP directive upload_max_filesize is preventing the upload of big files.\nPHP directive upload_max_filesize limit is: ".ini_get("upload_max_filesize").".\nTo increase the limit change the value of the directive from php.ini.\nIf you don't have access to php.ini, then try adding the following line to your .htaccess file:\n\nphp_value upload_max_filesize 10M\n\n(adjust the size according to your needs)\n\nThe file .htaccess is found in your website root directory (where index.php is found).\nIf your don't have this file, then create it.\nIf this does not work either, then contact your domain provider.", "wp-file-upload"));
51
+ DEFINE("WFU_ERROR_ADMIN_FILE_PHP_TIME", __("The upload time limit of PHP directive max_input_time is preventing the upload of big files.\nPHP directive max_input_time limit is: ".ini_get("max_input_time")." seconds.\nTo increase the limit change the value of the directive from php.ini.\nIf you don't have access to php.ini, then add the following line to your .htaccess file:\n\nphp_value max_input_time 500\n\n(adjust the time according to your needs)\n\nThe file .htaccess is found in your website root directory (where index.php is found).\nIf your don't have this file, then create it.\nIf this does not work either, then contact your domain provider.", "wp-file-upload"));
52
+ DEFINE("WFU_ERROR_ADMIN_DIR_PERMISSION", __("Error. Permission denied to write to target folder.\nCheck and correct read/write permissions of target folder.", "wp-file-upload"));
53
+ DEFINE("WFU_ERROR_ADMIN_FILE_WRONGEXT", __("Error. This file was rejected because its extension is not correct. Its proper filename is: ", "wp-file-upload"));
54
+ DEFINE("WFU_ERROR_ADMIN_DOS_ATTACK", __("Too many files are uploaded in a short period of time. This may be a Denial-Of-Service attack, so file was rejected. Please check the upload log for suspicious behaviour.", "wp-file-upload"));
55
+ DEFINE("WFU_ERROR_DOS_ATTACK", __("File not uploaded in order to prevent overflow of the website. Please contact administrator.", "wp-file-upload"));
56
+ DEFINE("WFU_ERROR_DIR_EXIST", __("Target folder doesn't exist.", "wp-file-upload"));
57
+ DEFINE("WFU_ERROR_DIR_NOTEMP", __("Upload failed! Missing a temporary folder.", "wp-file-upload"));
58
+ DEFINE("WFU_ERROR_DIR_PERMISSION", __("Upload failed! Permission denied to write to target folder.", "wp-file-upload"));
59
+ DEFINE("WFU_ERROR_FILE_ALLOW", __("File not allowed.", "wp-file-upload"));
60
+ DEFINE("WFU_ERROR_FILE_REJECT", __("File is suspicious and was rejected.", "wp-file-upload"));
61
+ DEFINE("WFU_ERROR_FILE_PLUGIN_SIZE", __("The uploaded file exceeds the file size limit.", "wp-file-upload"));
62
+ DEFINE("WFU_ERROR_FILE_PLUGIN_2GBSIZE", __("The uploaded file exceeds 2GB and is not supported by this server.", "wp-file-upload"));
63
+ DEFINE("WFU_ERROR_FILE_PHP_SIZE", __("Upload failed! The uploaded file exceeds the file size limit of the server. Please contact the administrator.", "wp-file-upload"));
64
+ DEFINE("WFU_ERROR_FILE_PHP_TIME", __("Upload failed! The duration of the upload exceeded the time limit of the server. Please contact the administrator.", "wp-file-upload"));
65
+ DEFINE("WFU_ERROR_FILE_HTML_SIZE", __("Upload failed! The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.", "wp-file-upload"));
66
+ DEFINE("WFU_ERROR_FILE_PARTIAL", __("Upload failed! The uploaded file was only partially uploaded.", "wp-file-upload"));
67
+ DEFINE("WFU_ERROR_FILE_NOTHING", __("Upload failed! No file was uploaded.", "wp-file-upload"));
68
+ DEFINE("WFU_ERROR_FILE_WRITE", __("Upload failed! Failed to write file to disk.", "wp-file-upload"));
69
+ DEFINE("WFU_ERROR_FILE_MOVE", __("Upload failed! Error occured while moving temporary file. Please contact administrator.", "wp-file-upload"));
70
+ DEFINE("WFU_ERROR_FILE_CANCELLED", __("Upload cancelled!", "wp-file-upload"));
71
+ DEFINE("WFU_ERROR_UPLOAD_STOPPED", __("Upload failed! A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help.", "wp-file-upload"));
72
+ DEFINE("WFU_ERROR_UPLOAD_FAILED_WHILE", __("Upload failed! Error occured while attemting to upload the file.", "wp-file-upload"));
73
+ DEFINE("WFU_ERROR_UPLOAD_FAILED", __("Upload failed!", "wp-file-upload"));
74
+ DEFINE("WFU_ERROR_UPLOAD_NOFILESELECTED", __("No file!", "wp-file-upload"));
75
+ DEFINE("WFU_ERROR_UPLOAD_CANCELLED", __("Upload failed! The upload has been canceled by the user or the browser dropped the connection.", "wp-file-upload"));
76
+ DEFINE("WFU_ERROR_UNKNOWN", __("Upload failed! Unknown error.", "wp-file-upload"));
77
+ DEFINE("WFU_ERROR_CONTACT_ADMIN", __("Please contact the administrator.", "wp-file-upload"));
78
+ DEFINE("WFU_ERROR_REMOTESERVER_NORESULT", __("No result from remote server!", "wp-file-upload"));
79
+ DEFINE("WFU_ERROR_JSONPARSE_FILEMESSAGE", __(" but with warnings", "wp-file-upload"));
80
+ DEFINE("WFU_ERROR_JSONPARSE_MESSAGE", __("Warning: JSON parse error.", "wp-file-upload"));
81
+ DEFINE("WFU_ERROR_JSONPARSE_ADMINMESSAGE", __("Upload parameters of this file, passed as JSON string to the handler, could not be parsed.", "wp-file-upload"));
82
+ DEFINE("WFU_ERROR_JSONPARSE_HEADERMESSAGE", __("Warning: JSON parse error.", "wp-file-upload"));
83
+ DEFINE("WFU_ERROR_JSONPARSE_HEADERADMINMESSAGE", __("UploadStates, passed as JSON string to the handler, could not be parsed.", "wp-file-upload"));
84
+ DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE0", __("Redirection to classic form functionality occurred due to unknown error.", "wp-file-upload"));
85
+ DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE1", __("Redirection to classic form functionality occurred because AJAX is not supported.", "wp-file-upload"));
86
+ DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE2", __("Redirection to classic form functionality occurred because HTML5 is not supported.", "wp-file-upload"));
87
+ DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE3", __("Redirection to classic form functionality occurred due to JSON parse error.", "wp-file-upload"));
88
+ DEFINE("WFU_ERROR_ENABLE_POPUPS", __("Please enable popup windows from the browser's settings!", "wp-file-upload"));
89
+ DEFINE("WFU_ERROR_USERDATA_EMPTY", __("cannot be empty!", "wp-file-upload"));
90
+ DEFINE("WFU_ERROR_USERDATANUMBER_INVALID", __("number not valid!", "wp-file-upload"));
91
+ DEFINE("WFU_ERROR_USERDATAEMAIL_INVALID", __("email not valid!", "wp-file-upload"));
92
+ DEFINE("WFU_ERROR_USERDATACONFIRMEMAIL_NOMATCH", __("emails do not match!", "wp-file-upload"));
93
+ DEFINE("WFU_ERROR_USERDATACONFIRMEMAIL_NOBASE", __("no base email field in group!", "wp-file-upload"));
94
+ DEFINE("WFU_ERROR_USERDATACONFIRMPASSWORD_NOMATCH", __("passwords do not match!", "wp-file-upload"));
95
+ DEFINE("WFU_ERROR_USERDATACONFIRMPASSWORD_NOBASE", __("no base password field in group!", "wp-file-upload"));
96
+ DEFINE("WFU_ERROR_USERDATACHECKBOX_NOTCHECKED", __("checkbox unchecked!", "wp-file-upload"));
97
+ DEFINE("WFU_ERROR_USERDATARADIO_NOTSELECTED", __("no option selected!", "wp-file-upload"));
98
+ DEFINE("WFU_ERROR_USERDATALIST_NOITEMSELECTED", __("no item selected!", "wp-file-upload"));
99
+ DEFINE("WFU_ERROR_SAME_PLUGINID", __("There are more than one instances of the plugin in this page with the same id. Please change it.", "wp-file-upload"));
100
+ DEFINE("WFU_ERROR_PAGE_OBSOLETE", __("Cannot edit the shortcode because the page has been modified. Please reload the page.", "wp-file-upload"));
101
+ DEFINE("WFU_ERROR_WEBCAM_NOTSUPPORTED", __("Your browser does not support webcam capture!", "wp-file-upload"));
102
+ DEFINE("WFU_ERROR_WEBCAM_VIDEO_NOTSUPPORTED", __("Your browser does not support video recording from the webcam!", "wp-file-upload"));
103
+ DEFINE("WFU_ERROR_WEBCAM_VIDEO_NOTHINGRECORDED", __("No video was recorded!", "wp-file-upload"));
104
+ DEFINE("WFU_ERROR_CAPTCHA_OLDPHP", __("ERROR: Captcha not supported! You have an old PHP version. Upgrade your PHP or use RecaptchaV2 (no account).", "wp-file-upload"));
105
+ DEFINE("WFU_ERROR_CAPTCHA_MULTIPLE_NOTALLOWED", __("ERROR: Only one instance of RecaptchaV1 can exist on the same page. Please notify administrator.", "wp-file-upload"));
106
+ DEFINE("WFU_ERROR_CAPTCHA_MULTIPLE_NOTALLOWED_ADMIN", __("ERROR: Only one instance of RecaptchaV1 can exist on the same page. Please use RecaptchaV1 (no account).", "wp-file-upload"));
107
+ DEFINE("WFU_ERROR_CAPTCHA_NOSITEKEY", __("ERROR: No site key. Please contact administrator!", "wp-file-upload"));
108
+ DEFINE("WFU_ERROR_CAPTCHA_NOSITEKEY_ADMIN", __("ERROR: No site key defined! Please go to the plugin settings in Dashboard to define Google Recaptcha keys.", "wp-file-upload"));
109
+ DEFINE("WFU_ERROR_CAPTCHA_NOCHALLENGE", __("Bad captcha image!", "wp-file-upload"));
110
+ DEFINE("WFU_ERROR_CAPTCHA_NOINPUT", __("No input!", "wp-file-upload"));
111
+ DEFINE("WFU_ERROR_CAPTCHA_EMPTY", __("Captcha not completed!", "wp-file-upload"));
112
+ DEFINE("WFU_ERROR_CAPTCHA_WRONGCAPTCHA", __("Wrong captcha!", "wp-file-upload"));
113
+ DEFINE("WFU_ERROR_CAPTCHA_REFRESHING", __("Error refreshing captcha!", "wp-file-upload"));
114
+ DEFINE("WFU_ERROR_CAPTCHA_UNKNOWNERROR", __("Unknown captcha error!", "wp-file-upload"));
115
+ DEFINE("WFU_ERROR_CAPTCHA_NOTSUPPORTED", __("Captcha not supported by your browser!", "wp-file-upload"));
116
+ DEFINE("WFU_ERROR_CAPTCHA_MISSINGINPUTSECRET", __("the secret parameter is missing", "wp-file-upload"));
117
+ DEFINE("WFU_ERROR_CAPTCHA_INVALIDINPUTSECRET", __("the secret parameter is invalid or malformed", "wp-file-upload"));
118
+ DEFINE("WFU_ERROR_CAPTCHA_MISSINGINPUTRESPONSE", __("the response parameter is missing", "wp-file-upload"));
119
+ DEFINE("WFU_ERROR_CAPTCHA_INVALIDINPUTRESPONSE", __("the response parameter is invalid or malformed", "wp-file-upload"));
120
+ DEFINE("WFU_ERROR_REDIRECTION_NODRAGDROP", __("Please do not use drag drop due to an internal problem.", "wp-file-upload"));
121
+ DEFINE("WFU_ERROR_CHUNKEDUPLOAD_UNIQUEIDEMPTY", __("Error during chunked upload. Unique ID empty in chunk %d", "wp-file-upload"));
122
+ DEFINE("WFU_ERROR_CHUNKEDUPLOAD_NOTALLOWED", __("Chunked upload is not allowed!", "wp-file-upload"));
123
+ DEFINE("WFU_ERROR_CHUNKEDUPLOAD_ABORTED", __("Chunked upload aborted due to error in previous chunk!", "wp-file-upload"));
124
+ DEFINE("WFU_ERROR_CHUNKEDUPLOAD_CONCATFAILED", __("Chunked upload failed, final file could not be created!", "wp-file-upload"));
125
+ DEFINE("WFU_ERROR_ADMIN_CHUNKWRITEFAILED", __("Could not write file chuck to destination on chunk %d", "wp-file-upload"));
126
+ DEFINE("WFU_ERROR_ADMIN_CHUNKENLARGEFAILED", __("Could not enlarge destination file on chunk %d", "wp-file-upload"));
127
+ DEFINE("WFU_ERROR_ADMIN_CHUNKHANDLEFAILED", __("Could not open file handles on chunk %d", "wp-file-upload"));
128
+ DEFINE("WFU_BROWSER_DOWNLOADFILE_NOTALLOWED", __("You are not allowed to download this file!", "wp-file-upload"));
129
+ DEFINE("WFU_BROWSER_DOWNLOADFILE_NOTEXIST", __("File does not exist!", "wp-file-upload"));
130
+ DEFINE("WFU_BROWSER_DOWNLOADFILE_FAILED", __("Could not download file!", "wp-file-upload"));
131
+ DEFINE("WFU_BROWSER_DELETEFILE_NOTALLOWED", __("You are not allowed to delete this file!", "wp-file-upload"));
132
+ DEFINE("WFU_BROWSER_DELETEFILE_FAILED", __("File was not deleted!", "wp-file-upload"));
133
+ DEFINE("WFU_BROWSER_DELETEFILES_ALLFAILED", __("No file was deleted!", "wp-file-upload"));
134
+ DEFINE("WFU_BROWSER_DELETEFILES_SOMEFAILED", __("Some files were not deleted!", "wp-file-upload"));
135
+ //warning messages
136
+ DEFINE("WFU_WARNING_FILE_EXISTS", __("Upload skipped! File already exists.", "wp-file-upload"));
137
+ DEFINE("WFU_WARNING_FILE_SUSPICIOUS", __("The extension of the file does not match its contents.", "wp-file-upload"));
138
+ DEFINE("WFU_WARNING_ADMIN_FILE_SUSPICIOUS", __("Upload succeeded but the file is suspicious because its contents do not match its extension. Its proper filename is: ", "wp-file-upload"));
139
+ DEFINE("WFU_WARNING_NOFILES_SELECTED", __("No files have been selected!", "wp-file-upload"));
140
+ DEFINE("WFU_WARNING_CONSENT_NOTCOMPLETED", __("Please complete the consent question before continuing the upload!", "wp-file-upload"));
141
+ DEFINE("WFU_WARNING_WPFILEBASE_NOTUPDATED_NOFILES", __("WPFilebase Plugin not updated because there were no files uploaded.", "wp-file-upload"));
142
+ DEFINE("WFU_WARNING_NOTIFY_NOTSENT_NOFILES", __("Notification email was not sent because there were no files uploaded.", "wp-file-upload"));
143
+ DEFINE("WFU_WARNING_NOTIFY_NOTSENT_NORECIPIENTS", __("Notification email was not sent because no recipients were defined. Please check notifyrecipients attribute in the shortcode.", "wp-file-upload"));
144
+ DEFINE("WFU_WARNING_NOTIFY_NOTSENT_UNKNOWNERROR", __("Notification email was not sent due to an error. Please check notifyrecipients, notifysubject and notifymessage attributes for errors.", "wp-file-upload"));
145
+ DEFINE("WFU_WARNING_REDIRECT_NOTEXECUTED_EMPTY", __("Redirection not executed because redirection link is empty. Please check redirectlink attribute.", "wp-file-upload"));
146
+ DEFINE("WFU_WARNING_REDIRECT_NOTEXECUTED_FILESFAILED", __("Redirection not executed because not all files were successfully uploaded.", "wp-file-upload"));
147
+ DEFINE("WFU_WARNING_POTENTIAL_DOS_EMAIL_SUBJECT", __("Potential Denial-Of-Service Attack on {SITE}", "wp-file-upload"));
148
+ DEFINE("WFU_WARNING_POTENTIAL_DOS_EMAIL_MESSAGE", __("Hello admin\n\nThis is a message from Wordpress File Upload Plugin to notify you that a potential Denial-Of-Service attack has been detected on {SITE}.\n\nThe plugin detected more than {FILENUM} uploads within {INTERVAL} seconds.\n\nAll file uploads that exceed this limit are rejected to protect the website from overflowing.\n\nPlease check the upload history log in the plugin's area in Dashboard for any suspicious behaviour.\n\nA new message will follow if the situation remains.\n\nThanks", "wp-file-upload"));
149
+ DEFINE("WFU_WARNING_ALT_IPTANUS_SERVER_ACTIVATED", __("You have activated an alternative insecure Iptanus Services Server. For details please contact info@iptanus.com.", "wp-file-upload"));
150
+ DEFINE("WFU_WARNING_IPTANUS_SERVER_UNREACHABLE", __("Iptanus Services Server is unreachable. This may cause problems in some plugin functions. Please contact info@iptanus.com for details.", "wp-file-upload"));
151
+ //admin area messages
152
+ DEFINE("WFU_DASHBOARD_ADD_SHORTCODE_REJECTED", __("Failed to add the shortcode to the page/post. Please try again. If the message persists, contact administrator.", "wp-file-upload"));
153
+ DEFINE("WFU_DASHBOARD_EDIT_SHORTCODE_REJECTED", __("Failed to edit the shortcode because the contents of the page changed. Try again to edit the shortcode.", "wp-file-upload"));
154
+ DEFINE("WFU_DASHBOARD_DELETE_SHORTCODE_REJECTED", __("Failed to delete the shortcode because the contents of the page changed. Try again to delete it.", "wp-file-upload"));
155
+ DEFINE("WFU_DASHBOARD_PAGE_OBSOLETE", __("The page containing the shortcode has been modified and it is no longer valid. Please go back to reload the shortcode.", "wp-file-upload"));
156
+ DEFINE("WFU_DASHBOARD_UPDATE_SHORTCODE_REJECTED", __("Failed to update the shortcode because the contents of the page changed. Go back to reload the shortcode.", "wp-file-upload"));
157
+ DEFINE("WFU_DASHBOARD_UPDATE_SHORTCODE_FAILED", __("Failed to update the shortcode. Please try again. If the problem persists, go back and reload the shortcode.", "wp-file-upload"));
158
+ //test messages
159
+ DEFINE("WFU_TESTMESSAGE_MESSAGE", __('This is a test message', 'wp-file-upload'));
160
+ DEFINE("WFU_TESTMESSAGE_ADMINMESSAGE", __('This is a test administrator message', 'wp-file-upload'));
161
+ DEFINE("WFU_TESTMESSAGE_FILE1_HEADER", __('File testfile 1 under test', 'wp-file-upload'));
162
+ DEFINE("WFU_TESTMESSAGE_FILE1_MESSAGE", __('File testfile 1 message', 'wp-file-upload'));
163
+ DEFINE("WFU_TESTMESSAGE_FILE1_ADMINMESSAGE", __('File testfile 1 administrator message', 'wp-file-upload'));
164
+ DEFINE("WFU_TESTMESSAGE_FILE2_HEADER", __('File testfile 2 under test', 'wp-file-upload'));
165
+ DEFINE("WFU_TESTMESSAGE_FILE2_MESSAGE", __('File testfile 2 message', 'wp-file-upload'));
166
+ DEFINE("WFU_TESTMESSAGE_FILE2_ADMINMESSAGE", __('File testfile 2 administrator message', 'wp-file-upload'));
167
+ //variables tool-tips
168
+ DEFINE("WFU_VARIABLE_TITLE_USERID", __("Insert variable %userid% inside text. It will be replaced by the id of the current user.", "wp-file-upload"));
169
+ DEFINE("WFU_VARIABLE_TITLE_USERNAME", __("Insert variable %username% inside text. It will be replaced by the username of the current user.", "wp-file-upload"));
170
+ DEFINE("WFU_VARIABLE_TITLE_USEREMAIL", __("Insert variable %useremail% inside text. It will be replaced by the email of the current user.", "wp-file-upload"));
171
+ DEFINE("WFU_VARIABLE_TITLE_FILENAME", __("Insert variable %filename% inside text. It will be replaced by the filename of the uploaded file.", "wp-file-upload"));
172
+ DEFINE("WFU_VARIABLE_TITLE_FILEPATH", __("Insert variable %filepath% inside text. It will be replaced by the full filepath of the uploaded file.", "wp-file-upload"));
173
+ DEFINE("WFU_VARIABLE_TITLE_BLOGID", __("Insert variable %blogid% inside text. It will be replaced by the blog id of the website.", "wp-file-upload"));
174
+ DEFINE("WFU_VARIABLE_TITLE_PAGEID", __("Insert variable %pageid% inside text. It will be replaced by the id of the current page.", "wp-file-upload"));
175
+ DEFINE("WFU_VARIABLE_TITLE_PAGETITLE", __("Insert variable %pagetitle% inside text. It will be replaced by the title of the current page.", "wp-file-upload"));
176
+ DEFINE("WFU_VARIABLE_TITLE_USERDATAXXX", __("Insert variable %userdataXXX% inside text. Select the user field from the drop-down list. It will be replaced by the value that the user entered in this field.", "wp-file-upload"));
177
+ DEFINE("WFU_VARIABLE_TITLE_N", __("Insert variable %n% inside text to denote a line change.", "wp-file-upload"));
178
+ //other plugin values
179
+ DEFINE("WFU_NOTIFY_TESTMODE", __("Test Mode", "wp-file-upload"));
180
+ DEFINE("WFU_SUBDIR_SELECTDIR", __("select dir...", "wp-file-upload"));
181
+ DEFINE("WFU_SUBDIR_TYPEDIR", __("type dir", "wp-file-upload"));
182
+ DEFINE("WFU_SUCCESSMESSAGE_DETAILS", __('Upload path: %filepath%', 'wp-file-upload'));
183
+ DEFINE("WFU_FAILMESSAGE_DETAILS", __('Failed upload path: %filepath%', 'wp-file-upload'));
184
+ DEFINE("WFU_USERDATA_REQUIREDLABEL", __(' (required)', 'wp-file-upload'));
185
+ DEFINE("WFU_PAGEEXIT_PROMPT", __('Files are being uploaded. Are you sure you want to exit the page?', 'wp-file-upload'));
186
+ DEFINE("WFU_MESSAGE_CAPTCHA_CHECKING", __("checking captcha...", "wp-file-upload"));
187
+ DEFINE("WFU_MESSAGE_CAPTCHA_REFRESHING", __("refreshing...", "wp-file-upload"));
188
+ DEFINE("WFU_MESSAGE_CAPTCHA_OK", __("correct captcha", "wp-file-upload"));
189
+ DEFINE("WFU_CONFIRMBOX_CAPTION", __("click to continue the upload", "wp-file-upload"));
190
+ DEFINE("WFU_BROWSER_DELETEFILE_PROMPT", __("Are you sure you want to delete this file?", "wp-file-upload"));
191
+ DEFINE("WFU_BROWSER_DELETEFILES_PROMPT", __("Are you sure you want to delete these files?", "wp-file-upload"));
192
+ DEFINE("WFU_BROWSER_BULKACTION_TITLE", __("Bulk Actions", "wp-file-upload"));
193
+ DEFINE("WFU_BROWSER_BULKACTION_LABEL", __("Apply", "wp-file-upload"));
194
+ DEFINE("WFU_PAGINATION_PAGE", __("Page", "wp-file-upload"));
195
+ DEFINE("WFU_PAGINATION_OF", __("of ", "wp-file-upload"));
196
+ DEFINE("WFU_CANCEL_UPLOAD_PROMPT", __("Are you sure that you want to cancel the upload?", "wp-file-upload"));
197
+ DEFINE("WFU_FILE_CANCEL_HINT", __("cancel upload of this file", "wp-file-upload"));
198
+ DEFINE("WFU_UPLOAD_STATE0", __("Upload in progress", "wp-file-upload"));
199
+ DEFINE("WFU_UPLOAD_STATE1", __("Upload in progress with warnings!", "wp-file-upload"));
200
+ DEFINE("WFU_UPLOAD_STATE2", __("Upload in progress but some files already failed!", "wp-file-upload"));
201
+ DEFINE("WFU_UPLOAD_STATE3", __("Upload in progress but no files uploaded so far!", "wp-file-upload"));
202
+ DEFINE("WFU_UPLOAD_STATE4", __("All files uploaded successfully", "wp-file-upload"));
203
+ DEFINE("WFU_UPLOAD_STATE5", __("All files uploaded successfully but there are warnings!", "wp-file-upload"));
204
+ DEFINE("WFU_UPLOAD_STATE5_SINGLEFILE", __("File uploaded successfully but there are warnings!", "wp-file-upload"));
205
+ DEFINE("WFU_UPLOAD_STATE6", __("Some files failed to upload!", "wp-file-upload"));
206
+ DEFINE("WFU_UPLOAD_STATE7", __("All files failed to upload", "wp-file-upload"));
207
+ DEFINE("WFU_UPLOAD_STATE7_SINGLEFILE", __("File failed to upload", "wp-file-upload"));
208
+ DEFINE("WFU_UPLOAD_STATE8", __("There are no files to upload!", "wp-file-upload"));
209
+ DEFINE("WFU_UPLOAD_STATE9", __("Test upload message", "wp-file-upload"));
210
+ DEFINE("WFU_UPLOAD_STATE10", __("JSON parse warning!", "wp-file-upload"));
211
+ DEFINE("WFU_UPLOAD_STATE11", __("please wait while redirecting...", "wp-file-upload"));
212
+ DEFINE("WFU_UPLOAD_STATE12", __("Upload failed!", "wp-file-upload"));
213
+ DEFINE("WFU_UPLOAD_STATE13", __("Submitting data", "wp-file-upload"));
214
+ DEFINE("WFU_UPLOAD_STATE14", __("Data submitted successfully!", "wp-file-upload"));
215
+ DEFINE("WFU_UPLOAD_STATE15", __("Data were not submitted!", "wp-file-upload"));
216
+ DEFINE("WFU_UPLOAD_STATE16", __("Cancelling upload", "wp-file-upload"));
217
+ DEFINE("WFU_UPLOAD_STATE17", __("Upload cancelled!", "wp-file-upload"));
218
+ DEFINE("WFU_PAGE_PLUGINEDITOR_BUTTONTITLE", __("Open visual shortcode editor in new window", "wp-file-upload"));
219
+ DEFINE("WFU_PAGE_PLUGINEDITOR_LOADING", __("loading visual editor", "wp-file-upload"));
220
+ DEFINE("WFU_CONFIRM_CLEARFILES", __("Clear file list?", "wp-file-upload"));
221
+ DEFINE("WFU_DROP_HERE_MESSAGE", __('DROP HERE', 'wp-file-upload'));
222
+ //webcam values
223
+ DEFINE("WFU_WEBCAM_RECVIDEO_BTN", __('record video', 'wp-file-upload'));
224
+ DEFINE("WFU_WEBCAM_TAKEPIC_BTN", __('take a picture', 'wp-file-upload'));
225
+ DEFINE("WFU_WEBCAM_TURNONOFF_BTN", __('turn webcam on/off', 'wp-file-upload'));
226
+ DEFINE("WFU_WEBCAM_GOLIVE_BTN", __('go live again', 'wp-file-upload'));
227
+ DEFINE("WFU_WEBCAM_STOPREC_BTN", __('end recording', 'wp-file-upload'));
228
+ DEFINE("WFU_WEBCAM_PLAY_BTN", __('play', 'wp-file-upload'));
229
+ DEFINE("WFU_WEBCAM_PAUSE_BTN", __('pause', 'wp-file-upload'));
230
+ DEFINE("WFU_WEBCAM_GOBACK_BTN", __('go to the beginning', 'wp-file-upload'));
231
+ DEFINE("WFU_WEBCAM_GOFWD_BTN", __('go to the end', 'wp-file-upload'));
232
+ //widget values
233
+ DEFINE("WFU_WIDGET_PLUGINFORM_TITLE", __('Wordpress File Upload Form', 'wp-file-upload'));
234
+ DEFINE("WFU_WIDGET_PLUGINFORM_DESCRIPTION", __('Wordpress File Upload plugin uploader for sidebars', 'wp-file-upload'));
235
+ DEFINE("WFU_WIDGET_SIDEBAR_DEFAULTTITLE", __('Upload Files', 'wp-file-upload'));
236
+ }
237
 
238
  /*********** Environment Variables ************/
239
  //plugin default values
310
  "WFU_PHP_ARRAY_MAXLEN" => array( "Max PHP Array Length", "string", "10000", "The maximum allowable number of items of a PHP array." ),
311
  "WFU_ADMINBROWSER_TABLE_MAXROWS" => array( "Admin Browser Rows Per Page", "integer", 25, "The number of rows per page of the admin browser. A value equal to zero or less denotes no pagination." ),
312
  "WFU_HISTORYLOG_TABLE_MAXROWS" => array( "History Log Table Rows Per Page", "integer", 25, "The number of rows per page of the History Log table." ),
313
+ "WFU_UPLOADEDFILES_TABLE_MAXROWS" => array( "Uploaded Files Table Rows Per Page", "integer", 25, "The number of rows per page of the Uploaded Files table." ),
314
  "WFU_ALTERNATIVE_RANDOMIZER" => array( "Use Alternative Randomizer", "string", "false", "On fast web servers the plugin's generator of random strings may not work properly causing various problems. If it is set to true, an alternative randomizer method is employed that works for fast web servers. It can be 'true' or 'false'." ),
315
  "WFU_FORCE_NOTIFICATIONS" => array( "Force Email Notifications", "string", "false", "Send email notifications (if they are activated) even if no file has been uploaded. It can be 'true' or 'false'." ),
316
  "WFU_UPDATE_MEDIA_ON_DELETE" => array( "Update Media on Delete", "string", "true", "When an uploaded file is deleted then delete also the corresponding Media Library item if exists. It can be 'true' or 'false'." ),
330
  "WFU_US_DBOPTION_LIFE" => array( "DB Option User State Life", "integer", 1800, "Defines the maximum time of inactivity of a user state, when user state is saved in DB option table." ),
331
  "WFU_PD_VISIBLE_OPLEVELS" => array( "Personal Data Visible Operation Levels", "integer", 3, "Defines how deep administrators can go into personal data operation details. A value of -1 denotes that there is no limit." ),
332
  "WFU_PD_VISIBLE_PERLEVELS" => array( "Personal Data Visible Permission Levels", "integer", 2, "Defines how deep administrators can go into personal data permission details. A value of -1 denotes that there is no limit." ),
333
+ "WFU_PD_VISIBLE_LOGLEVELS" => array( "Personal Data Visible Log Action Levels", "integer", 2, "Defines how deep administrators can go into personal data log action details. A value of -1 denotes that there is no limit." ),
334
+ "WFU_UPLOADEDFILES_MENU" => array( "Uploaded Files Menu State", "string", "true", "Defines whether the Uploaded Files Dashboard menu item will be shown or not. It can be 'true' or 'false'." ),
335
+ "WFU_UPLOADEDFILES_DEFACTION" => array( "Uploaded Files Default Action", "string", "adminbrowser", "Defines the default action that will be executed when a file link is pressed in Uploaded Files page. It can be 'details', 'adminbrowser', 'historylog', 'link' and 'none'." ),
336
+ "WFU_UPLOADEDFILES_RESET_TIME" => array( "Uploaded Files Reset Time", "integer", 5, "Defines the interval in seconds before the unread uploaded files can be marked as read. A value of -1 denotes that there is no interval." )
337
  );
338
  //color definitions
339
  $GLOBALS["WFU_GLOBALS"] += array(
lib/wfu_functions.php CHANGED
@@ -720,13 +720,20 @@ function wfu_basedir($path) {
720
 
721
  function wfu_path_abs2rel($path) {
722
  $abspath_notrailing_slash = substr(wfu_abspath(), 0, -1);
723
- // return ( substr($path, 0, 6) == 'ftp://' || substr($path, 0, 7) == 'ftps://' || substr($path, 0, 7) == 'sftp://' ? $path : str_replace($abspath_notrailing_slash, "", $path) );
724
- return ( substr($path, 0, 6) == 'ftp://' || substr($path, 0, 7) == 'ftps://' || substr($path, 0, 7) == 'sftp://' ? $path : substr($path, strlen($abspath_notrailing_slash)) );
 
 
 
 
 
725
  }
726
 
727
  function wfu_path_rel2abs($path) {
728
  if ( substr($path, 0, 1) == "/" ) $path = substr($path, 1);
729
- return ( substr($path, 0, 6) == 'ftp://' || substr($path, 0, 7) == 'ftps://' || substr($path, 0, 7) == 'sftp://' ? $path : wfu_abspath().$path );
 
 
730
  }
731
 
732
  function wfu_delete_file_execute($filepath, $userid) {
@@ -794,17 +801,37 @@ function wfu_upload_plugin_directory( $path ) {
794
  return $dirparts[count($dirparts) - 1];
795
  }
796
 
797
- //function to extract sort information from path, which is stored as [[-sort]] inside the path
 
798
  function wfu_extract_sortdata_from_path($path) {
799
- $pos1 = strpos($path, '[[');
800
- $pos2 = strpos($path, ']]');
801
  $ret['path'] = $path;
802
  $ret['sort'] = "";
 
 
 
 
 
803
  if ( $pos1 !== false && $pos2 !== false )
804
  if ( $pos2 > $pos1 ) {
805
  $ret['sort'] = substr($path, $pos1 + 2, $pos2 - $pos1 - 2);
806
  $ret['path'] = str_replace('[['.$ret['sort'].']]', '', $path);
807
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
808
  return $ret;
809
  }
810
 
@@ -1439,6 +1466,13 @@ function wfu_get_username_by_id($id) {
1439
  return $username;
1440
  }
1441
 
 
 
 
 
 
 
 
1442
  //get the most current database record for file $filepath and also include any userdata if $include_userdata is true
1443
  function wfu_get_file_rec($filepath, $include_userdata) {
1444
  global $wpdb;
@@ -1470,10 +1504,18 @@ function wfu_get_file_rec($filepath, $include_userdata) {
1470
  }
1471
 
1472
  //get database record for id
1473
- function wfu_get_file_rec_from_id($idlog) {
1474
  global $wpdb;
1475
  $table_name1 = $wpdb->prefix . "wfu_log";
 
 
1476
  $filerec = $wpdb->get_row('SELECT * FROM '.$table_name1.' WHERE idlog = '.$idlog);
 
 
 
 
 
 
1477
 
1478
  return $filerec;
1479
  }
@@ -1483,9 +1525,8 @@ function wfu_get_userdata_from_id($idlog) {
1483
  $table_name2 = $wpdb->prefix . "wfu_userdata";
1484
 
1485
  $userdata = array();
1486
- $filerec = wfu_get_file_rec_from_id($idlog);
1487
- if ( $filerec != null && $filerec->uploadid != '' ) {
1488
- $filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0 ORDER BY propkey');
1489
  foreach ( $filerec->userdata as $item ) {
1490
  $arrayitem = array(
1491
  "property" => $item->property,
@@ -1493,11 +1534,30 @@ function wfu_get_userdata_from_id($idlog) {
1493
  );
1494
  array_push($userdata, $arrayitem);
1495
  }
1496
- }
1497
 
1498
  return $userdata;
1499
  }
1500
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1501
  function wfu_get_latest_rec_from_id($idlog) {
1502
  global $wpdb;
1503
  $table_name1 = $wpdb->prefix . "wfu_log";
@@ -1508,6 +1568,32 @@ function wfu_get_latest_rec_from_id($idlog) {
1508
  return $filerec;
1509
  }
1510
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1511
  /**
1512
  * gets the filedata property from file record in database
1513
  *
720
 
721
  function wfu_path_abs2rel($path) {
722
  $abspath_notrailing_slash = substr(wfu_abspath(), 0, -1);
723
+ if ( substr($path, 0, 6) == 'ftp://' || substr($path, 0, 7) == 'ftps://' || substr($path, 0, 7) == 'sftp://' ) return $path;
724
+ else {
725
+ $is_outside_root = ( substr($path, 0, strlen($abspath_notrailing_slash)) != $abspath_notrailing_slash );
726
+ if ( $is_outside_root ) return 'abs:'.$path;
727
+ // else return str_replace($abspath_notrailing_slash, "", $path);
728
+ else return substr($path, strlen($abspath_notrailing_slash));
729
+ }
730
  }
731
 
732
  function wfu_path_rel2abs($path) {
733
  if ( substr($path, 0, 1) == "/" ) $path = substr($path, 1);
734
+ if ( substr($path, 0, 6) == 'ftp://' || substr($path, 0, 7) == 'ftps://' || substr($path, 0, 7) == 'sftp://' ) return $path;
735
+ elseif ( substr($path, 0, 4) == 'abs:' ) return substr($path, 4);
736
+ else return wfu_abspath().$path;
737
  }
738
 
739
  function wfu_delete_file_execute($filepath, $userid) {
801
  return $dirparts[count($dirparts) - 1];
802
  }
803
 
804
+ //function to extract sort, filename or filter information from path, which are
805
+ //stored as [[-sort]], {{filename}} or ((filter)) inside the path
806
  function wfu_extract_sortdata_from_path($path) {
 
 
807
  $ret['path'] = $path;
808
  $ret['sort'] = "";
809
+ $ret['file'] = "";
810
+ $ret['filter'] = "";
811
+ //extract sort info
812
+ $pos1 = strpos($path, '[[');
813
+ $pos2 = strpos($path, ']]');
814
  if ( $pos1 !== false && $pos2 !== false )
815
  if ( $pos2 > $pos1 ) {
816
  $ret['sort'] = substr($path, $pos1 + 2, $pos2 - $pos1 - 2);
817
  $ret['path'] = str_replace('[['.$ret['sort'].']]', '', $path);
818
  }
819
+ //extract filename info
820
+ $pos1 = strpos($path, '{{');
821
+ $pos2 = strpos($path, '}}');
822
+ if ( $pos1 !== false && $pos2 !== false )
823
+ if ( $pos2 > $pos1 ) {
824
+ $ret['file'] = substr($path, $pos1 + 2, $pos2 - $pos1 - 2);
825
+ $ret['path'] = str_replace('{{'.$ret['file'].'}}', '', $path);
826
+ }
827
+ //extract filter info
828
+ $pos1 = strpos($path, '((');
829
+ $pos2 = strpos($path, '))');
830
+ if ( $pos1 !== false && $pos2 !== false )
831
+ if ( $pos2 > $pos1 ) {
832
+ $ret['filter'] = substr($path, $pos1 + 2, $pos2 - $pos1 - 2);
833
+ $ret['path'] = str_replace('(('.$ret['filter'].'))', '', $path);
834
+ }
835
  return $ret;
836
  }
837
 
1466
  return $username;
1467
  }
1468
 
1469
+ function wfu_get_unread_files_count($last_idlog) {
1470
+ $a = func_get_args(); switch(WFU_FUNCTION_HOOK(__FUNCTION__, $a, $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
1471
+ global $wpdb;
1472
+ $table_name1 = $wpdb->prefix . "wfu_log";
1473
+ return $wpdb->get_var('SELECT COUNT(idlog) FROM '.$table_name1.' WHERE action = \'upload\' AND idlog > '.(int)$last_idlog);
1474
+ }
1475
+
1476
  //get the most current database record for file $filepath and also include any userdata if $include_userdata is true
1477
  function wfu_get_file_rec($filepath, $include_userdata) {
1478
  global $wpdb;
1504
  }
1505
 
1506
  //get database record for id
1507
+ function wfu_get_file_rec_from_id($idlog, $include_userdata = false) {
1508
  global $wpdb;
1509
  $table_name1 = $wpdb->prefix . "wfu_log";
1510
+ $table_name2 = $wpdb->prefix . "wfu_userdata";
1511
+
1512
  $filerec = $wpdb->get_row('SELECT * FROM '.$table_name1.' WHERE idlog = '.$idlog);
1513
+ if ( $filerec != null && $include_userdata ) {
1514
+ $filerec->userdata = null;
1515
+ if ( $filerec->uploadid != '' ) {
1516
+ $filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0 ORDER BY propkey');
1517
+ }
1518
+ }
1519
 
1520
  return $filerec;
1521
  }
1525
  $table_name2 = $wpdb->prefix . "wfu_userdata";
1526
 
1527
  $userdata = array();
1528
+ $filerec = wfu_get_file_rec_from_id($idlog, true);
1529
+ if ( $filerec != null && $filerec->userdata != null )
 
1530
  foreach ( $filerec->userdata as $item ) {
1531
  $arrayitem = array(
1532
  "property" => $item->property,
1534
  );
1535
  array_push($userdata, $arrayitem);
1536
  }
 
1537
 
1538
  return $userdata;
1539
  }
1540
 
1541
+ function wfu_get_userdata_from_rec($filerec) {
1542
+ global $wpdb;
1543
+ $table_name2 = $wpdb->prefix . "wfu_userdata";
1544
+
1545
+ $userdata = array();
1546
+ if ( $filerec->uploadid != '' ) {
1547
+ $filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0 ORDER BY propkey');
1548
+ if ( $filerec->userdata != null )
1549
+ foreach ( $filerec->userdata as $item ) {
1550
+ $arrayitem = array(
1551
+ "property" => $item->property,
1552
+ "value" => $item->propvalue
1553
+ );
1554
+ array_push($userdata, $arrayitem);
1555
+ }
1556
+ }
1557
+
1558
+ return $userdata;
1559
+ }
1560
+
1561
  function wfu_get_latest_rec_from_id($idlog) {
1562
  global $wpdb;
1563
  $table_name1 = $wpdb->prefix . "wfu_log";
1568
  return $filerec;
1569
  }
1570
 
1571
+ function wfu_get_rec_new_history($idlog) {
1572
+ global $wpdb;
1573
+ $table_name1 = $wpdb->prefix . "wfu_log";
1574
+ $filerecs = array();
1575
+ $filerec = $wpdb->get_row('SELECT * FROM '.$table_name1.' WHERE idlog = '.$idlog);
1576
+ while ( $filerec != null ) {
1577
+ array_push($filerecs, $filerec);
1578
+ $filerec = $wpdb->get_row('SELECT * FROM '.$table_name1.' WHERE linkedto = '.$filerec->idlog);
1579
+ }
1580
+
1581
+ return $filerecs;
1582
+ }
1583
+
1584
+ function wfu_get_rec_old_history($idlog) {
1585
+ global $wpdb;
1586
+ $table_name1 = $wpdb->prefix . "wfu_log";
1587
+ $filerecs = array();
1588
+ $filerec = $wpdb->get_row('SELECT * FROM '.$table_name1.' WHERE idlog = '.$idlog);
1589
+ while ( $filerec != null ) {
1590
+ array_push($filerecs, $filerec);
1591
+ $filerec = ( $filerec->linkedto > 0 ? $wpdb->get_row('SELECT * FROM '.$table_name1.' WHERE idlog = '.$filerec->linkedto) : null );
1592
+ }
1593
+
1594
+ return $filerecs;
1595
+ }
1596
+
1597
  /**
1598
  * gets the filedata property from file record in database
1599
  *
lib/wfu_template.php CHANGED
@@ -1479,6 +1479,21 @@ this.reset = function() {
1479
  document.getElementById("uploadform_$ID").reset();
1480
  }
1481
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1482
  /**
1483
  * submits the upload form
1484
  *
@@ -1553,6 +1568,7 @@ this.files = function() {
1553
  </script><?php /****************************************************************
1554
  the following lines contain the HTML output
1555
  ****************************************************************************/ ?>
 
1556
  <form class="file_input_uploadform" id="uploadform_$ID" name="uploadform_$ID" method="post" enctype="multipart/form-data" style="<?php echo $styles_form; ?>">
1557
  <?php if ( $testmode ): ?>
1558
  <input align="center" type="button" id="input_$ID" value="<?php echo $label; ?>" class="file_input_button" style="<?php echo $styles; ?>" onmouseout="javascript: document.getElementById('input_$ID').className = 'file_input_button';" onmouseover="javascript: document.getElementById('input_$ID').className = 'file_input_button_hover';" onclick="alert('<?php echo WFU_NOTIFY_TESTMODE; ?>');" />
@@ -4074,74 +4090,74 @@ this._focused = function(obj) {
4074
  <!-- **** the following lines contain the HTML code of each field type ***** -->
4075
  <?php if ( !$testmode ): ?>
4076
  <?php if ( $p["type"] == "text" ): ?>
4077
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4078
  <?php elseif ( $p["type"] == "multitext" ): ?>
4079
- <textarea id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" form="uploadform_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?>><?php echo $p["default"]; ?></textarea>
4080
  <?php elseif ( $p["type"] == "number" ): ?>
4081
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4082
  <?php elseif ( $p["type"] == "email" ): ?>
4083
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message file_userdata_$ID_emailgroup_<?php echo $p["group"]; ?>" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4084
  <?php elseif ( $p["type"] == "confirmemail" ): ?>
4085
  <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4086
  <?php elseif ( $p["type"] == "password" ): ?>
4087
- <input type="password" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message file_userdata_$ID_passwordgroup_<?php echo $p["group"]; ?>" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4088
  <?php elseif ( $p["type"] == "confirmpassword" ): ?>
4089
- <input type="password" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4090
  <?php elseif ( $p["type"] == "checkbox" ): ?>
4091
- <input type="checkbox" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_checkbox" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" style="display:none;" onfocus="GlobalData.WFU[$ID].userdata._focused(this);" />
4092
  <label id="userdata_$ID_checklabel_<?php echo $p["key"]; ?>" class="file_userdata_checkbox_description" for="userdata_$ID_field_<?php echo $p["key"]; ?>" style="display:none;"><?php echo $p["data"]; ?></label>
4093
  <?php elseif ( $p["type"] == "radiobutton" ): ?>
4094
- <input type="radio" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_radiobutton" name="userdata_$ID_radiogroup_<?php echo $p["group"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" style="display:none;" onfocus="GlobalData.WFU[$ID].userdata._focused(document.getElementById('userdata_$ID_field_<?php echo $p["key"]; ?>'));" />
4095
  <label id="userdata_$ID_radiolabel_<?php echo $p["key"]; ?>" class="file_userdata_radiobutton_label" for="userdata_$ID_field_<?php echo $p["key"]; ?>" style="display:none;"><?php echo $p["data"]; ?></label>
4096
  <?php elseif ( $p["type"] == "date" ): ?>
4097
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" readonly="readonly" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4098
  <?php elseif ( $p["type"] == "time" ): ?>
4099
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" readonly="readonly" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4100
  <?php elseif ( $p["type"] == "datetime" ): ?>
4101
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" readonly="readonly" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4102
  <?php elseif ( $p["type"] == "list" ): ?>
4103
- <select id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_listbox" multiple="multiple" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" value="<?php echo $p["default"]; ?>" onfocus="GlobalData.WFU[$ID].userdata._focused(this);">
4104
  <option id="userdata_$ID_listitem_<?php echo $p["key"]; ?>" style="display:none;"></option>
4105
  </select>
4106
  <?php elseif ( $p["type"] == "dropdown" ): ?>
4107
- <select id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_dropdown" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="uploadform_$ID" value="<?php echo $p["default"]; ?>" onfocus="GlobalData.WFU[$ID].userdata._focused(this);">
4108
  <option id="userdata_$ID_listitem_<?php echo $p["key"]; ?>" style="display:none;"></option>
4109
  </select>
4110
  <?php endif ?>
4111
  <input id="userdata_$ID_props_<?php echo $p["key"]; ?>" type="hidden" value="p:<?php echo $p["hintposition"]; ?>" />
4112
  <?php else: ?>
4113
  <?php if ( $p["type"] == "text" ): ?>
4114
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="Test value" autocomplete="off" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4115
  <?php elseif ( $p["type"] == "multitext" ): ?>
4116
- <textarea id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="Test value" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?>>Test message</textarea>
4117
  <?php elseif ( $p["type"] == "number" ): ?>
4118
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="100" autocomplete="off" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4119
  <?php elseif ( $p["type"] == "email" ): ?>
4120
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message file_userdata_emailgroup_<?php echo $p["group"]; ?>" value="user@domain.com" autocomplete="off" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4121
  <?php elseif ( $p["type"] == "confirmemail" ): ?>
4122
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="Test message" autocomplete="off" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4123
  <?php elseif ( $p["type"] == "password" ): ?>
4124
- <input type="password" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message file_userdata_passwordgroup_<?php echo $p["group"]; ?>" value="Test" autocomplete="off" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4125
  <?php elseif ( $p["type"] == "confirmpassword" ): ?>
4126
- <input type="password" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="Test" autocomplete="off" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4127
  <?php elseif ( $p["type"] == "checkbox" ): ?>
4128
- <input type="checkbox" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_checkbox" autocomplete="off" form="uploadform_$ID" readonly="readonly" />
4129
  <label id="userdata_$ID_checklabel_<?php echo $p["key"]; ?>" for="userdata_$ID_field_<?php echo $p["key"]; ?>" style="display:none;">[list]</label>
4130
  <?php elseif ( $p["type"] == "radiobutton" ): ?>
4131
- <input type="radio" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_radiobutton" name="userdata_$ID_radiogroup_<?php echo $p["group"]; ?>" autocomplete="off" form="uploadform_$ID" readonly="readonly" />
4132
  <label id="userdata_$ID_radiolabel_<?php echo $p["key"]; ?>" for="userdata_$ID_field_<?php echo $p["key"]; ?>" style="display:none;">[list]</label>
4133
  <?php elseif ( $p["type"] == "date" ): ?>
4134
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="off" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4135
  <?php elseif ( $p["type"] == "time" ): ?>
4136
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="off" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4137
  <?php elseif ( $p["type"] == "datetime" ): ?>
4138
- <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="off" form="uploadform_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4139
  <?php elseif ( $p["type"] == "list" ): ?>
4140
- <select id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_listbox" multiple="multiple" autocomplete="off" form="uploadform_$ID" readonly="readonly">
4141
  <option>Test value</option>
4142
  </select>
4143
  <?php elseif ( $p["type"] == "dropdown" ): ?>
4144
- <select id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_dropdown" autocomplete="off" form="uploadform_$ID" readonly="readonly">
4145
  <option>Test value</option>
4146
  </select>
4147
  <?php endif ?>
1479
  document.getElementById("uploadform_$ID").reset();
1480
  }
1481
 
1482
+ /**
1483
+ * resets the dummy form
1484
+ *
1485
+ * The dummy form is a second form element created only for acting as the form
1486
+ * element of userdata fields. This way userdata fields autofill attribute can
1487
+ * work normally. When userdata fields need to be cleared, the dummy form needs
1488
+ * to be reset as well, so that any autofill styling (like yellow background in
1489
+ * input elements) is cleared.
1490
+ *
1491
+ * @return void
1492
+ */
1493
+ this.resetDummy = function() {
1494
+ document.getElementById("dummy_$ID").reset();
1495
+ }
1496
+
1497
  /**
1498
  * submits the upload form
1499
  *
1568
  </script><?php /****************************************************************
1569
  the following lines contain the HTML output
1570
  ****************************************************************************/ ?>
1571
+ <form id="dummy_$ID" style="display:none;"></form>
1572
  <form class="file_input_uploadform" id="uploadform_$ID" name="uploadform_$ID" method="post" enctype="multipart/form-data" style="<?php echo $styles_form; ?>">
1573
  <?php if ( $testmode ): ?>
1574
  <input align="center" type="button" id="input_$ID" value="<?php echo $label; ?>" class="file_input_button" style="<?php echo $styles; ?>" onmouseout="javascript: document.getElementById('input_$ID').className = 'file_input_button';" onmouseover="javascript: document.getElementById('input_$ID').className = 'file_input_button_hover';" onclick="alert('<?php echo WFU_NOTIFY_TESTMODE; ?>');" />
4090
  <!-- **** the following lines contain the HTML code of each field type ***** -->
4091
  <?php if ( !$testmode ): ?>
4092
  <?php if ( $p["type"] == "text" ): ?>
4093
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4094
  <?php elseif ( $p["type"] == "multitext" ): ?>
4095
+ <textarea id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" form="dummy_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?>><?php echo $p["default"]; ?></textarea>
4096
  <?php elseif ( $p["type"] == "number" ): ?>
4097
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4098
  <?php elseif ( $p["type"] == "email" ): ?>
4099
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message file_userdata_$ID_emailgroup_<?php echo $p["group"]; ?>" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4100
  <?php elseif ( $p["type"] == "confirmemail" ): ?>
4101
  <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4102
  <?php elseif ( $p["type"] == "password" ): ?>
4103
+ <input type="password" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message file_userdata_$ID_passwordgroup_<?php echo $p["group"]; ?>" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4104
  <?php elseif ( $p["type"] == "confirmpassword" ): ?>
4105
+ <input type="password" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="<?php echo $p["default"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4106
  <?php elseif ( $p["type"] == "checkbox" ): ?>
4107
+ <input type="checkbox" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_checkbox" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" style="display:none;" onfocus="GlobalData.WFU[$ID].userdata._focused(this);" />
4108
  <label id="userdata_$ID_checklabel_<?php echo $p["key"]; ?>" class="file_userdata_checkbox_description" for="userdata_$ID_field_<?php echo $p["key"]; ?>" style="display:none;"><?php echo $p["data"]; ?></label>
4109
  <?php elseif ( $p["type"] == "radiobutton" ): ?>
4110
+ <input type="radio" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_radiobutton" name="userdata_$ID_radiogroup_<?php echo $p["group"]; ?>" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" style="display:none;" onfocus="GlobalData.WFU[$ID].userdata._focused(document.getElementById('userdata_$ID_field_<?php echo $p["key"]; ?>'));" />
4111
  <label id="userdata_$ID_radiolabel_<?php echo $p["key"]; ?>" class="file_userdata_radiobutton_label" for="userdata_$ID_field_<?php echo $p["key"]; ?>" style="display:none;"><?php echo $p["data"]; ?></label>
4112
  <?php elseif ( $p["type"] == "date" ): ?>
4113
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" readonly="readonly" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4114
  <?php elseif ( $p["type"] == "time" ): ?>
4115
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" readonly="readonly" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4116
  <?php elseif ( $p["type"] == "datetime" ): ?>
4117
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" readonly="readonly" onfocus="GlobalData.WFU[$ID].userdata._focused(this);"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4118
  <?php elseif ( $p["type"] == "list" ): ?>
4119
+ <select id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_listbox" multiple="multiple" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" value="<?php echo $p["default"]; ?>" onfocus="GlobalData.WFU[$ID].userdata._focused(this);">
4120
  <option id="userdata_$ID_listitem_<?php echo $p["key"]; ?>" style="display:none;"></option>
4121
  </select>
4122
  <?php elseif ( $p["type"] == "dropdown" ): ?>
4123
+ <select id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_dropdown" autocomplete="<?php echo ( $p["donotautocomplete"] ? 'off' : 'on' ); ?>" form="dummy_$ID" value="<?php echo $p["default"]; ?>" onfocus="GlobalData.WFU[$ID].userdata._focused(this);">
4124
  <option id="userdata_$ID_listitem_<?php echo $p["key"]; ?>" style="display:none;"></option>
4125
  </select>
4126
  <?php endif ?>
4127
  <input id="userdata_$ID_props_<?php echo $p["key"]; ?>" type="hidden" value="p:<?php echo $p["hintposition"]; ?>" />
4128
  <?php else: ?>
4129
  <?php if ( $p["type"] == "text" ): ?>
4130
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="Test value" autocomplete="off" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4131
  <?php elseif ( $p["type"] == "multitext" ): ?>
4132
+ <textarea id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="Test value" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?>>Test message</textarea>
4133
  <?php elseif ( $p["type"] == "number" ): ?>
4134
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="100" autocomplete="off" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4135
  <?php elseif ( $p["type"] == "email" ): ?>
4136
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message file_userdata_emailgroup_<?php echo $p["group"]; ?>" value="user@domain.com" autocomplete="off" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4137
  <?php elseif ( $p["type"] == "confirmemail" ): ?>
4138
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="Test message" autocomplete="off" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4139
  <?php elseif ( $p["type"] == "password" ): ?>
4140
+ <input type="password" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message file_userdata_passwordgroup_<?php echo $p["group"]; ?>" value="Test" autocomplete="off" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4141
  <?php elseif ( $p["type"] == "confirmpassword" ): ?>
4142
+ <input type="password" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" value="Test" autocomplete="off" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4143
  <?php elseif ( $p["type"] == "checkbox" ): ?>
4144
+ <input type="checkbox" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_checkbox" autocomplete="off" form="dummy_$ID" readonly="readonly" />
4145
  <label id="userdata_$ID_checklabel_<?php echo $p["key"]; ?>" for="userdata_$ID_field_<?php echo $p["key"]; ?>" style="display:none;">[list]</label>
4146
  <?php elseif ( $p["type"] == "radiobutton" ): ?>
4147
+ <input type="radio" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_radiobutton" name="userdata_$ID_radiogroup_<?php echo $p["group"]; ?>" autocomplete="off" form="dummy_$ID" readonly="readonly" />
4148
  <label id="userdata_$ID_radiolabel_<?php echo $p["key"]; ?>" for="userdata_$ID_field_<?php echo $p["key"]; ?>" style="display:none;">[list]</label>
4149
  <?php elseif ( $p["type"] == "date" ): ?>
4150
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="off" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4151
  <?php elseif ( $p["type"] == "time" ): ?>
4152
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="off" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4153
  <?php elseif ( $p["type"] == "datetime" ): ?>
4154
+ <input type="text" id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_message" autocomplete="off" form="dummy_$ID" readonly="readonly"<?php echo ( $p["labelposition"] == "placeholder" ? ' placeholder="'.$p["label"].'"' : '' ); ?> />
4155
  <?php elseif ( $p["type"] == "list" ): ?>
4156
+ <select id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_listbox" multiple="multiple" autocomplete="off" form="dummy_$ID" readonly="readonly">
4157
  <option>Test value</option>
4158
  </select>
4159
  <?php elseif ( $p["type"] == "dropdown" ): ?>
4160
+ <select id="userdata_$ID_field_<?php echo $p["key"]; ?>" class="file_userdata_dropdown" autocomplete="off" form="dummy_$ID" readonly="readonly">
4161
  <option>Test value</option>
4162
  </select>
4163
  <?php endif ?>
readme.txt CHANGED
@@ -22,7 +22,7 @@ You can use it to capture screenshots or video from your webcam and upload it to
22
 
23
  You can even use it as a simple contact (or any other type of) form to submit data without including a file.
24
 
25
- The plugin includes a file browser to access and manage the uploaded files from the Dashboard (only for admins currently).
26
 
27
  Several filters and actions before and after file upload enable extension of its capabilities.
28
 
@@ -46,11 +46,13 @@ The characteristics of the plugin are:
46
  * It supports filters and actions before and after file upload.
47
  * It contains a visual editor for customizing the plugin easily without any knowledge of shortcodes or programming
48
  * It supports logging of upload events or management of files, which can be viewed by admins through the Dashboard.
49
- * It includes a file browser in the Dashboard, from where admins can view the uploaded files and manage them.
 
50
  * It supports multilingual characters and localization.
51
 
52
  The plugin is translated in the following languages:
53
 
 
54
  * German
55
  * French, kindly provided by Thomas Bastide of http://www.omicronn.fr/ and improved by other contributors
56
  * Serbian, kindly provided by Andrijana Nikolic of http://webhostinggeeks.com/
@@ -147,6 +149,14 @@ There is an option in plugin's settings in Dashboard to relax the CSS rules, so
147
 
148
  == Changelog ==
149
 
 
 
 
 
 
 
 
 
150
  = 4.6.2 =
151
  * corrected consent_status warning when updating user profile and Personal Data is off
152
  * user fields code improved for better data autofill behaviour
@@ -770,6 +780,9 @@ Initial version.
770
 
771
  == Upgrade Notice ==
772
 
 
 
 
773
  = 4.6.2 =
774
  Minor update to fix some bugs and introduce some code improvements.
775
 
22
 
23
  You can even use it as a simple contact (or any other type of) form to submit data without including a file.
24
 
25
+ The plugin displays the list of uploaded files in a separate top-level menu in Dashboard and includes a file browser to access and manage the uploaded files (only for admins currently).
26
 
27
  Several filters and actions before and after file upload enable extension of its capabilities.
28
 
46
  * It supports filters and actions before and after file upload.
47
  * It contains a visual editor for customizing the plugin easily without any knowledge of shortcodes or programming
48
  * It supports logging of upload events or management of files, which can be viewed by admins through the Dashboard.
49
+ * It includes an Uploaded Files top-level menu item in the Dashboard, from where admins can view the uploaded files.
50
+ * It includes a file browser in the Dashboard, from where admins can manage the files.
51
  * It supports multilingual characters and localization.
52
 
53
  The plugin is translated in the following languages:
54
 
55
+ * Portuguese, kindly provided by Rui Alao
56
  * German
57
  * French, kindly provided by Thomas Bastide of http://www.omicronn.fr/ and improved by other contributors
58
  * Serbian, kindly provided by Andrijana Nikolic of http://webhostinggeeks.com/
149
 
150
  == Changelog ==
151
 
152
+ = 4.7.0 =
153
+ * added Uploaded Files top-level Dashboard menu item, showing all the uploaded files and highlighting the new ones
154
+ * added Portuguese translation from Rui Alao
155
+ * checked and verified compatibility with Gutenberg
156
+ * plugin initialization actions moved to plugins_loaded filter
157
+ * fixed bug clearing userdata fields when Select File is pressed
158
+ * File Browser and View Log tables modified to become more responsive especially for small screens
159
+
160
  = 4.6.2 =
161
  * corrected consent_status warning when updating user profile and Personal Data is off
162
  * user fields code improved for better data autofill behaviour
780
 
781
  == Upgrade Notice ==
782
 
783
+ = 4.7.0 =
784
+ Significant update to introduce some new features and improvements and fix some bugs.
785
+
786
  = 4.6.2 =
787
  Minor update to fix some bugs and introduce some code improvements.
788
 
release_notes.txt CHANGED
@@ -1,3 +1,10 @@
1
- <!-- --><span>Version 4.6.2 is a regular minor update bringing some code improvements and bug fixes. Most important one is better <strong>autofill</strong> behaviour of <strong>user fields</strong>.<br />
 
 
 
 
 
 
 
2
  For more details about this version's changes please visit the Release Notes of the plugin's </span><a href="http://www.iptanus.com/wordpress-plugins/wordpress-file-upload/">support page</a><span>.</span><!-- -->
3
  <!-- -->
1
+ <!-- --><span><strong>Version 4.7.0</strong> is a <strong>significant update</strong> introducing a new feature and some improvements and it fixes some bugs as follows:</span>
2
+ <ul style="list-style: disc; padding-left: 30px;">
3
+ <li>A top level Dashboard menu item has been added, <strong>Uploaded Files</strong>, where the uploaded files are shown for quick reference. The menu item displays the </span><span style="text-decoration: underline;">number of new uploads</span><span> in a bubble, just like Wordpress displays the number of pending updates of the website. The uploaded files' list displays the <strong>files</strong>, <strong>useful information</strong> about them (upload date, user, whether they have userdata or associated Media Library item etc.) and provides some <strong>quick actions</strong>, such as opening of the file links, of File Details page, location of the files in File Browser and View Log and download of the files.</li>
4
+ <li>Added <strong>Portuguese</strong> translation kindly provided by <strong>Rui Alao</strong>.</li>
5
+ <li>Checked and verified compatibility with <strong>Gutenberg</strong>, the new Wordpress editor. Read this <a target="_blank" href="https://www.iptanus.com/wordpress-file-upload-and-gutenberg/" title="WordPress File Upload and Gutenberg">article</a> for more details.</li>
6
+ <li>Fixed a frustrating bug </span><span style="text-decoration: underline;">clearing userdata fields</span><span> when Select File was pressed.</li>
7
+ <li><strong>File Browser</strong> and <strong>View Log</strong> tables modified to become more <strong>responsive</strong> especially for small screens.</li>
8
+ </ul>
9
  For more details about this version's changes please visit the Release Notes of the plugin's </span><a href="http://www.iptanus.com/wordpress-plugins/wordpress-file-upload/">support page</a><span>.</span><!-- -->
10
  <!-- -->
wordpress_file_upload.php CHANGED
@@ -4,7 +4,7 @@ if( !session_id() ) { session_start(); }
4
  /*
5
  Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
6
  Description: Simple interface to upload files from a page.
7
- Version: 4.6.2
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
@@ -48,17 +48,21 @@ DEFINE("WPFILEUPLOAD_PLUGINFILE", __FILE__);
48
  DEFINE("WPFILEUPLOAD_DIR", plugin_dir_url( WPFILEUPLOAD_PLUGINFILE ));
49
  DEFINE("ABSWPFILEUPLOAD_DIR", plugin_dir_path( WPFILEUPLOAD_PLUGINFILE ));
50
  add_shortcode("wordpress_file_upload", "wordpress_file_upload_handler");
51
- load_plugin_textdomain('wp-file-upload', false, dirname(plugin_basename (__FILE__)).'/languages');
52
- /* load styles and scripts for front pages */
53
- if ( !is_admin() ) {
54
- add_action( 'wp_enqueue_scripts', 'wfu_enqueue_frontpage_scripts' );
55
- }
56
- add_action('admin_init', 'wordpress_file_upload_admin_init');
57
- add_action('admin_menu', 'wordpress_file_upload_add_admin_pages');
58
  register_activation_hook(__FILE__,'wordpress_file_upload_install');
59
  register_deactivation_hook(__FILE__,'wordpress_file_upload_uninstall');
 
60
  add_action('plugins_loaded', 'wordpress_file_upload_update_db_check');
61
- //ajax actions
 
 
 
 
 
 
 
 
 
62
  add_action('wp_ajax_wfu_ajax_action', 'wfu_ajax_action_callback');
63
  add_action('wp_ajax_nopriv_wfu_ajax_action', 'wfu_ajax_action_callback');
64
  add_action('wp_ajax_wfu_ajax_action_ask_server', 'wfu_ajax_action_ask_server');
@@ -78,30 +82,35 @@ add_action('wp_ajax_wfu_ajax_action_download_file_monitor', 'wfu_ajax_action_dow
78
  add_action('wp_ajax_nopriv_wfu_ajax_action_download_file_monitor', 'wfu_ajax_action_download_file_monitor');
79
  add_action('wp_ajax_wfu_ajax_action_edit_shortcode', 'wfu_ajax_action_edit_shortcode');
80
  add_action('wp_ajax_wfu_ajax_action_get_historylog_page', 'wfu_ajax_action_get_historylog_page');
 
81
  add_action('wp_ajax_wfu_ajax_action_get_adminbrowser_page', 'wfu_ajax_action_get_adminbrowser_page');
82
  add_action('wp_ajax_wfu_ajax_action_include_file', 'wfu_ajax_action_include_file');
83
  add_action('wp_ajax_wfu_ajax_action_update_envar', 'wfu_ajax_action_update_envar');
84
  add_action('wp_ajax_wfu_ajax_action_transfer_command', 'wfu_ajax_action_transfer_command');
85
  add_action('wp_ajax_wfu_ajax_action_pdusers_get_users', 'wfu_ajax_action_pdusers_get_users');
 
86
  add_action( 'show_user_profile', 'wfu_show_consent_profile_fields' );
87
  add_action( 'edit_user_profile', 'wfu_show_consent_profile_fields' );
88
  add_action( 'personal_options_update', 'wfu_update_consent_profile_fields' );
89
  add_action( 'edit_user_profile_update', 'wfu_update_consent_profile_fields' );
90
- wfu_include_lib();
91
- //store the User State handler in a global variable for easy access by the
92
- //plugin's routines
93
- $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
94
- $wfu_user_state_handler = $plugin_options['userstatehandler'];
95
- //add abspath in session for use by downloader; exclude internal ajax requests
96
- if ( !isset($_POST["action"]) || ( $_POST["action"] != "wfu_ajax_action_wfu_call_async" && $_POST["action"] != "wfu_ajax_action_load_hook_code" ) )
97
- WFU_USVAR_store_session('wfu_ABSPATH', wfu_abspath());
98
- //widget
99
- add_action( 'widgets_init', 'register_wfu_widget' );
100
  //Media editor custom properties
101
  if ( is_admin() ) add_action( 'attachment_submitbox_misc_actions', 'wfu_media_editor_properties', 11 );
102
  //register internal filter that is executed before upload for classic uploader
103
  add_filter("_wfu_before_upload", "wfu_classic_before_upload_handler", 10, 2);
 
104
 
 
 
 
 
 
 
 
 
 
 
 
 
105
 
106
  function register_wfu_widget() {
107
  register_widget( 'WFU_Widget' );
4
  /*
5
  Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
6
  Description: Simple interface to upload files from a page.
7
+ Version: 4.7.0
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
48
  DEFINE("WPFILEUPLOAD_DIR", plugin_dir_url( WPFILEUPLOAD_PLUGINFILE ));
49
  DEFINE("ABSWPFILEUPLOAD_DIR", plugin_dir_path( WPFILEUPLOAD_PLUGINFILE ));
50
  add_shortcode("wordpress_file_upload", "wordpress_file_upload_handler");
51
+ //activation-deactivation hooks
 
 
 
 
 
 
52
  register_activation_hook(__FILE__,'wordpress_file_upload_install');
53
  register_deactivation_hook(__FILE__,'wordpress_file_upload_uninstall');
54
+ add_action('plugins_loaded', 'wordpress_file_upload_initialize');
55
  add_action('plugins_loaded', 'wordpress_file_upload_update_db_check');
56
+ //widget
57
+ add_action( 'widgets_init', 'register_wfu_widget' );
58
+ //admin hooks
59
+ add_action('admin_init', 'wordpress_file_upload_admin_init');
60
+ add_action('admin_menu', 'wordpress_file_upload_add_admin_pages');
61
+ // load styles and scripts for front pages
62
+ if ( !is_admin() ) {
63
+ add_action( 'wp_enqueue_scripts', 'wfu_enqueue_frontpage_scripts' );
64
+ }
65
+ //general ajax actions
66
  add_action('wp_ajax_wfu_ajax_action', 'wfu_ajax_action_callback');
67
  add_action('wp_ajax_nopriv_wfu_ajax_action', 'wfu_ajax_action_callback');
68
  add_action('wp_ajax_wfu_ajax_action_ask_server', 'wfu_ajax_action_ask_server');
82
  add_action('wp_ajax_nopriv_wfu_ajax_action_download_file_monitor', 'wfu_ajax_action_download_file_monitor');
83
  add_action('wp_ajax_wfu_ajax_action_edit_shortcode', 'wfu_ajax_action_edit_shortcode');
84
  add_action('wp_ajax_wfu_ajax_action_get_historylog_page', 'wfu_ajax_action_get_historylog_page');
85
+ add_action('wp_ajax_wfu_ajax_action_get_uploadedfiles_page', 'wfu_ajax_action_get_uploadedfiles_page');
86
  add_action('wp_ajax_wfu_ajax_action_get_adminbrowser_page', 'wfu_ajax_action_get_adminbrowser_page');
87
  add_action('wp_ajax_wfu_ajax_action_include_file', 'wfu_ajax_action_include_file');
88
  add_action('wp_ajax_wfu_ajax_action_update_envar', 'wfu_ajax_action_update_envar');
89
  add_action('wp_ajax_wfu_ajax_action_transfer_command', 'wfu_ajax_action_transfer_command');
90
  add_action('wp_ajax_wfu_ajax_action_pdusers_get_users', 'wfu_ajax_action_pdusers_get_users');
91
+ //personal data related actions
92
  add_action( 'show_user_profile', 'wfu_show_consent_profile_fields' );
93
  add_action( 'edit_user_profile', 'wfu_show_consent_profile_fields' );
94
  add_action( 'personal_options_update', 'wfu_update_consent_profile_fields' );
95
  add_action( 'edit_user_profile_update', 'wfu_update_consent_profile_fields' );
 
 
 
 
 
 
 
 
 
 
96
  //Media editor custom properties
97
  if ( is_admin() ) add_action( 'attachment_submitbox_misc_actions', 'wfu_media_editor_properties', 11 );
98
  //register internal filter that is executed before upload for classic uploader
99
  add_filter("_wfu_before_upload", "wfu_classic_before_upload_handler", 10, 2);
100
+ wfu_include_lib();
101
 
102
+ function wordpress_file_upload_initialize() {
103
+ $a = func_get_args(); switch(WFU_FUNCTION_HOOK(__FUNCTION__, $a, $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
104
+ load_plugin_textdomain('wp-file-upload', false, dirname(plugin_basename (__FILE__)).'/languages');
105
+ wfu_initialize_i18n_strings();
106
+ //store the User State handler in a global variable for easy access by the
107
+ //plugin's routines
108
+ $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
109
+ $GLOBALS["wfu_user_state_handler"] = $plugin_options['userstatehandler'];
110
+ //add abspath in session for use by downloader; exclude internal ajax requests
111
+ if ( !isset($_POST["action"]) || ( $_POST["action"] != "wfu_ajax_action_wfu_call_async" && $_POST["action"] != "wfu_ajax_action_load_hook_code" ) )
112
+ WFU_USVAR_store_session('wfu_ABSPATH', wfu_abspath());
113
+ }
114
 
115
  function register_wfu_widget() {
116
  register_widget( 'WFU_Widget' );