Version Description
- added the ability to submit the upload form without a file, just like a contact form
- added attribute allownofile in uploader shortcode; if enabled then the upload form can be submitted without selection of a file
- added wfu_before_data_submit and wfu_after_data_submit filters which are invoked when the upload form is submitted without a file
- added advanced debug options for more comprehensive and deep troubleshooting
- added internal filters for advanced hooking of ajax handlers
- fixed several security problems
- fixed bug that was generating an error when automatic subfolders were activated and the upload folder did not exist
- corrected bug where single quote, double quote and backslash characters in user fields were not saved correctly (they were escaped)
- fixed bug where any changes made to the user data (e.g. through a filter) were not included in the email message
- added unique_id variable in wfu_before_file_check and wfu_after_file_upload filters
- changed column titles in the tables of plugin instances in Main tab in Dashboard
- fixed bug where if a user field was modified from the file editor, custom columns were changing order
Download this release
Release Info
Developer | nickboss |
Plugin | WordPress File Upload |
Version | 3.11.0 |
Comparing to | |
See all releases |
Code changes from version 3.10.0 to 3.11.0
- css/wordpress_file_upload_adminstyle.css +1 -1
- css/wordpress_file_upload_reset.css +1 -1
- css/wordpress_file_upload_style.css +1 -1
- css/wordpress_file_upload_style_relaxed.css +1 -1
- css/wordpress_file_upload_style_safe.css +1 -1
- css/wordpress_file_upload_style_safe_relaxed.css +1 -1
- js/getElementsByClassName-1.0.1.js +12 -4
- js/json2.js +18 -8
- js/wordpress_file_upload_adminfunctions.js +367 -264
- js/wordpress_file_upload_functions.js +308 -192
- languages/wp-file-upload-de_DE.mo +0 -0
- languages/wp-file-upload-de_DE.po +29 -17
- languages/wp-file-upload-el_GR.mo +0 -0
- languages/wp-file-upload-el_GR.po +29 -17
- languages/wp-file-upload-en_US.mo +0 -0
- languages/wp-file-upload-en_US.po +29 -17
- languages/wp-file-upload-es_ES.mo +0 -0
- languages/wp-file-upload-es_ES.po +29 -17
- languages/wp-file-upload-fr_FR.mo +0 -0
- languages/wp-file-upload-fr_FR.po +29 -17
- languages/wp-file-upload-it_IT.mo +0 -0
- languages/wp-file-upload-it_IT.po +29 -17
- languages/wp-file-upload-nl_NL.mo +0 -0
- languages/wp-file-upload-nl_NL.po +29 -17
- languages/wp-file-upload-pl_PL.mo +0 -0
- languages/wp-file-upload-pl_PL.po +29 -17
- languages/wp-file-upload-sr_RS.mo +0 -0
- languages/wp-file-upload-sr_RS.po +29 -17
- languages/wp-file-upload-sv_SE.mo +0 -0
- languages/wp-file-upload-sv_SE.po +29 -17
- languages/wp-file-upload-zh_CN.mo +0 -0
- languages/wp-file-upload-zh_CN.po +29 -17
- languages/wp-file-upload.pot +29 -17
- lib/wfu_admin.php +4 -2
- lib/wfu_admin_log.php +4 -2
- lib/wfu_admin_maintenance.php +1 -0
- lib/wfu_ajaxactions.php +141 -52
- lib/wfu_attributes.php +14 -0
- lib/wfu_blocks.php +5 -1
- lib/wfu_constants.php +9 -1
- lib/wfu_functions.php +135 -40
- lib/wfu_io.php +4 -0
- lib/wfu_message.php +7 -1
- lib/wfu_processfiles.php +107 -77
- lib/wfu_security.php +4 -0
- readme.txt +28 -4
- release_notes.txt +8 -2
- vendor/datetimepicker/jquery-ui-timepicker-addon.min.css +1 -3
- vendor/datetimepicker/jquery-ui-timepicker-addon.min.js +1 -83
- wordpress_file_upload.php +9 -1
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}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;cursor:default;z-index:1}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}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}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}
|
1 |
+
div.wfu_shortcode_container{display:inline-block;position:relative;width:50%;padding:0;margin:0;background:none;border:none}textarea.wfu_shortcode{width:100%}div.wfu_container{margin-top:10px}div.wfu_help_container{display:inline-block;position:relative;top:4px;padding:0;margin:0;background:none;border:none}div.wfu_help_container img{visibility:hidden}table.wfu_main_table th:hover div.wfu_help_container img{visibility:visible}table.wfu_inner_table th:hover div.wfu_help_container img{visibility:visible}div.wfu_restore_container{display:inline-block;position:relative;top:4px;padding:0;margin:0;background:none;border:none}div.wfu_restore_container img{visibility:hidden}table.wfu_main_table th:hover div.wfu_restore_container img{visibility:visible}table.wfu_inner_table th:hover div.wfu_restore_container img{visibility:visible}div.wfu_td_div{display:block;position:relative;width:100%;height:100%;padding:0;margin:0;background:none;border:none}div.wfu_container input.wfu_long_text{width:100%}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 tr:nth-child(even){background-color:transparent}table.wfu_main_table table.wfu_inner_table tr{background-color:transparent}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{background-color:#ddd}table.wfu_main_table tr.wfu_subcategory>th{padding-top:0;padding-bottom:0}select.wfu_variable{padding:0;margin:0;height:auto;font-size:smaller;background-color:#ddd;border:1px solid #ccc;color:rgb(51,51,51);-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}span.wfu_variable{padding:1px;margin:0;font-size:smaller;background-color:#ddd;border:1px solid #ccc;color:rgb(51,51,51);-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}div.wfu_date_container{display:inline-block;position:relative;width:auto;height:100%;padding:0;margin:0;background:none;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)}option.wfu_select_folders_option_default{color:blue}div.wfu_subfolder_nav_container{width:40px;margin:0;padding:0;border:none;background:none;display:inline-block;vertical-align:top}table.wfu_subfolder_nav{table-layout:fixed;width:100%;margin:0;padding:0;border:none;background:none;border-spacing:1px}table.wfu_subfolder_nav tr{margin:0;padding:0;border:none;background:none}table.wfu_subfolder_nav td{margin:0;padding:0;border:none;background:none;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:black;font-weight:700}table.wfu_subfolder_nav button.button:disabled{color:silver}.button.wfu_subfolder_nav_pressed,.button.wfu_subfolder_nav_pressed:hover,.button.wfu_subfolder_nav_pressed:focus{background:royalblue}div.wfu_subfolder_tools_container{width:75%;margin:0;padding:0;border:none;background:none}table.wfu_subfolder_tools{table-layout:fixed;width:100%;margin:0;padding:0;border:none;background:none}table.wfu_subfolder_tools tr{margin:0;padding:0;border:none;background:none}table.wfu_subfolder_tools td{margin:0;padding:0;border:none;background:none;font-size:smaller}table.wfu_subfolder_tools td div{margin:0;padding:0;border:none;background:none;position:relative}table.wfu_subfolder_tools label{display:block;padding:0;margin:0;line-height:1}table.wfu_subfolder_tools input{width:100%;padding:0;margin:0}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 0;width:17px;font-size:smaller;height:17px;line-height:1;position:absolute;bottom:2px}table.wfu_subfolder_tools button.button:disabled{color:silver}table.wfu_subfolder_tools button.button:disabled img{opacity:.4}.wfu_subfolder_tools_disabled{color:silver}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:white;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:none;margin:0;padding:0;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td{border:none;background:none;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:none;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_mchecklist_item:hover img{visibility:visible}div.wfu_mchecklist_checkall{display:inline-block;vertical-align:top;margin:0 0 0 10px}div.wfu_rolelist_checkbtn,div.wfu_userlist_checkbtn,div.wfu_postlist_checkbtn,div.wfu_bloglist_checkbtn{display:inline-block;vertical-align:top;margin:0 0 0 10px}table.wfu_rolelist_container,table.wfu_userlist_container,table.wfu_postlist_container,table.wfu_bloglist_container,table.wfu_stringmatch_container{border:none;background:none;margin:0;padding:0;border-spacing:0}table.wfu_rolelist_container tr:nth-child(odd),table.wfu_userlist_container tr:nth-child(odd),table.wfu_postlist_container tr:nth-child(odd),table.wfu_bloglist_container tr:nth-child(odd){border:none;background:none;background-color:transparent;margin:0;padding:0}table.wfu_rolelist_container td,table.wfu_userlist_container td,table.wfu_postlist_container td,table.wfu_bloglist_container td,table.wfu_stringmatch_container td{width:1%;border:none;background:none;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:white;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_on,div.wfu_onoff_container_off{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:rgb(6,109,171);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:rgb(204,204,204);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:none;border:none}div.wfu_placements_container{display:inline-block;position:relative;width:100%;height:300px;background-color:white;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:none;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_base{display:block;position:absolute;width:80px;height:30px;left:-1px;top:-1px;background-color:#ddd;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;padding:4px;cursor:default;font-size:12px;line-height:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4;white-space:normal}div.wfu_component_box{display:inline-block;position:relative;width:80px;height:30px;background-color:#ddd;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;padding:4px;cursor:default;font-size:12px;line-height:1;z-index:1;white-space:normal}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_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;position:relative;width:8px;height:26px;background-color:transparent;border:1px solid transparent;margin:6px -8px;padding:0 8px;cursor:default;z-index:1}div.wfu_component_separator_hor{display:block;position:relative;width:100%;height:8px;background-color:transparent;border:1px solid transparent;margin:-8px 0;padding:8px 0;cursor:default;z-index:1}div.wfu_component_bar_hor{position:absolute;width:auto;height:4px;left:10px;right:0;background-color:silver;border:none;margin:11px 0 0 0;padding:0;display:none}div.wfu_component_bar_ver{position:absolute;width:4px;height:40px;background-color:silver;border:none;margin:-6px 0 0 11px;padding:0;display:none}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_userdata_container,div.wfu_formdata_container{display:block;position:relative;width:100%;height:100%;padding:0;margin:0;background:none;border:none}label.wfu_formdata_label{margin-right:6px}.wfu_formdata_props{padding-left:20px}div.wfu_userdata_action,div.wfu_formdata_action{display:inline-block;position:relative;top:2px;width:16px;height:16px;padding:0;margin:0;background:none;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_userdata_action:hover,div.wfu_formdata_action:hover{border:1px solid #aaa}div.wfu_userdata_action.wfu_userdata_action_disabled:hover,div.wfu_formdata_action.wfu_formdata_action_disabled:hover{border:1px solid transparent}div.wfu_userdata_action>img,div.wfu_formdata_action>img{width:12px;height:12px}div.wfu_userdata_action_disabled>img,div.wfu_formdata_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_userdata_line,div.wfu_formdata_line_container{display:block;position:relative;padding:0;margin:0;background:none;border:none;white-space:nowrap}table.wfu_formdata_props_table{background:none;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:none;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:none;border:none;white-space:nowrap;z-index:1}input[type="text"].wp-color-picker{width:75px}input[type="button"].wp-picker-clear{width:62px}span.wfu_save_label{background-color:aliceblue;color:limegreen;border-radius:6px;padding:1px 2px;box-shadow:1px 1px 1px;font-size:smaller;opacity:0}span.wfu_save_label_fail{background-color:beige;color:lightcoral;border-radius:6px;padding:1px 2px;box-shadow:1px 1px 1px;font-size:smaller;opacity:0}div.wfu_global_dialog_container{position:fixed;width:100%;height:100%;top:0;left:0;margin:0;padding:0;border:none;background:none;z-index:1;display:none}table.wfu_main_table table.wfu_columns_container{border:none;background:none;margin:0;padding:0;border-spacing:0}table.wfu_main_table table.wfu_columns_container tr{background:none}table.wfu_main_table table.wfu_columns_container td{border:none;background:none;margin:0;padding:0;vertical-align:top;width:auto}table.wfu_main_table table.wfu_columnprops_container{border:none;background:none;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:none}table.wfu_main_table table.wfu_columnprops_container td{border:none;background:none;margin:0;padding:0;vertical-align:middle;width:auto}table.wfu_main_table table.wfu_columnprops_container_disabled label{color:#ccc}table.wfu_main_table table.wfu_columnprops_container label.wfu_columnprops_label_disabled{color:#ccc}button.wfu_columns_addbutton{font-size:smaller}option.wfu_columns_item_required{color:gray}
|
css/wordpress_file_upload_reset.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}
|
css/wordpress_file_upload_style.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
input[type=text].file_input_textbox{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:#fff;color:#000}input[type=text].file_input_textbox:disabled{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:#fff;color:silver}input[type=text].file_input_textbox_nofile{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:red;color:#000}form.file_input_uploadform{position:relative;width:100px;height:27px;overflow:hidden;margin:0;padding:0}input[type=button].file_input_button{width:100px;height:27px;position:absolute;top:0;margin:0;padding:0;background-color:#EEE;color:#555;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input[type=button].file_input_button:disabled,input[type=button].file_input_button_hover,input[type=button].file_input_button_hover:disabled{width:100px;height:27px;position:absolute;margin:0;padding:0;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;top:0}input[type=button].file_input_button_hover{color:#111;border-color:#333;border-radius:2px}input[type=button].file_input_button:disabled,input[type=button].file_input_button_hover:disabled{color:silver;border-color:#BBB;border-radius:2px}input[type=button].file_input_submit,input[type=button].file_input_submit:focus,input[type=button].file_input_submit:hover{-webkit-border-radius:2px;-moz-border-radius:2px;height:27px;position:relative;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-khtml-border-radius:2px;width:100px;margin:0;padding:0}input[type=button].file_input_submit{color:#555;border-color:#BBB;border-radius:2px}input[type=button].file_input_submit:focus,input[type=button].file_input_submit:hover{color:#111;border-color:#333;border-radius:2px}input[type=button].file_input_submit:disabled{width:100px;height:27px;position:relative;margin:0;padding:0;background-color:#EEE;color:silver;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input[type=file].file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}div.file_progress_bar{display:block;position:relative;width:100px;border:1px solid #333;margin:0;padding:4px}div.file_progress_inner{display:block;width:100%;height:6px;margin:0;padding:0;border:1px solid silver;background-color:#fff}span.file_progress_noanimation,span.file_progress_progressive,span.file_progress_shuffle{height:6px;padding:0;border-style:none;background-color:#2bc253;position:relative;display:block;margin:0;overflow:hidden}img.file_progress_imagesafe{width:100%;height:6px}span.file_progress_noanimation{width:0}span.file_progress_progressive{width:auto}span.file_progress_shuffle{width:25%;-webkit-animation:shuffle 1s linear infinite alternate;-moz-animation:shuffle 1s linear infinite alternate;-o-animation:shuffle 1s linear infinite alternate;animation:shuffle 1s linear infinite alternate}span.file_progress_progressive:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;-webkit-animation:lengthen 2s linear infinite;-moz-animation:lengthen 2s linear infinite;-o-animation:lengthen 2s linear infinite;animation:lengthen 2s linear infinite;overflow:hidden}@-webkit-keyframes shuffle{from{left:0}to{left:75%}}@-moz-keyframes shuffle{from{left:0}to{left:75%}}@-o-keyframes shuffle{from{left:0}to{left:75%}}@keyframes shuffle{from{left:0}to{left:75%}}@-webkit-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-moz-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-o-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}span.file_messagebox_inner{display:block;width:340px;margin:0;font-size:small;padding:10px;border-style:solid;border-width:1px;border-color:#D3D3D3;background-color:#F5F5F5;color:#000;line-height:1.2}table.file_table_clean,td.file_td_clean{border:none;border-spacing:0;padding:0;color:#000}div.file_div_clean{display:table;position:relative;margin:0;padding:0;border-style:none;background:0 0;color:#000;line-height:1;vertical-align:middle}div.file_div_clean_responsive_container{display:block;position:relative;margin:0;padding:0;border-style:none;background:0 0;color:#000;line-height:1;vertical-align:middle}div.file_div_clean_responsive{display:inline-block;position:relative;margin:0;padding:0;border-style:none;background:0 0;color:#000;line-height:1;vertical-align:middle}div.file_space_clean{display:block;margin:0 0 2px;padding:0;border-style:none;background:0 0;color:#000}table.file_table_clean{margin:0;background:0 0;width:auto}td.file_td_clean{margin:0;background:0 0;vertical-align:middle}span.subfolder_label{margin:0;padding:0;border-style:none;background:0 0;color:#000}div.subfolder_container{margin:0;padding:0;height:25px;border-style:none;background:0 0;color:#000;position:relative;display:inline-block}div.subfolder_autoplus_container{margin:0;padding:0 20px 0 0;border-style:none;background:0 0;display:inline-block;width:100%;height:100%}div.subfolder_autoplus_select_container{position:absolute;width:100%;height:100%;top:0;left:100%;margin:0 0 0 -20px;padding:0;border:none;background:0 0;overflow:hidden}select.subfolder_autoplus_dropdown,select.subfolder_autoplus_dropdown:disabled,select.subfolder_autoplus_dropdown_prompt{width:100%;left:-100%;position:absolute;border:none;padding:0}input[type=text].subfolder_autoplus{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0}input[type=text].subfolder_autoplus:disabled{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;color:silver}input[type=text].subfolder_autoplus_match{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;font-weight:700;font-style:italic}input[type=text].subfolder_autoplus_match:disabled{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;font-weight:700;font-style:italic;color:silver}input[type=text].subfolder_autoplus_empty{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;color:silver;font-style:italic}input[type=text].subfolder_autoplus_prompt{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;background:red}select.subfolder_dropdown{margin:0;padding:0;height:25px;border:none;background:0 0;color:#000}select.subfolder_autoplus_dropdown{height:100%;background:0 0;color:#000;margin:0 0 0 20px}select.subfolder_dropdown_prompt{margin:0;padding:0;height:25px;border:none;background:red;color:#000}select.subfolder_autoplus_dropdown_prompt{height:100%;background:red;color:#000;margin:0 0 0 20px}select.subfolder_dropdown:disabled{margin:0;padding:0;height:25px;border:none;background:0 0;color:silver}select.subfolder_autoplus_dropdown:disabled{height:100%;background:0 0;color:silver;margin:0 0 0 20px}select.subfolder_autoplus_dropdown option,select.subfolder_autoplus_dropdown_prompt option,select.subfolder_dropdown option,select.subfolder_dropdown_prompt option{background:#fff;color:#000}span.file_title_clean{margin:0;padding:0;border-style:none;background:0 0;color:#000}div.file_userdata_fieldwrapper,div.file_userdata_fieldwrapper_required,div.file_userdata_fieldwrapper_required_empty{position:relative;display:inline-block;width:60%;height:25px;margin:0;padding:0;background:0 0;border:none;box-shadow:none}div.file_userdata_fieldwrapper div.wfu_fieldwrapper_overlay,div.file_userdata_fieldwrapper_required div.wfu_fieldwrapper_overlay{position:absolute;display:none;width:100%;height:100%;margin:0;padding:0;background:0 0;border:none;box-shadow:none;z-index:1000001}div.file_userdata_fieldwrapper_required_empty div.wfu_fieldwrapper_overlay{position:absolute;display:block;width:100%;height:100%;margin:0;padding:0;background:0 0;border:2px solid red;box-shadow:none;z-index:1000001}div.file_userdata_radio_wrapper{position:relative;display:inline-block;margin:0;padding:0;background:0 0;border:none;box-shadow:none}div.file_userdata_container{margin:0;padding:0;white-space:nowrap;position:relative}label.file_userdata_label{margin:0;width:40%;display:inline-block}.file_userdata_message,.file_userdata_message_required{width:100%;height:100%;margin:0;padding:0;border:1px solid #BBB;background:0 0;color:#000}.file_userdata_message:disabled,.file_userdata_message_required:disabled{width:100%;height:100%;margin:0;padding:0;border:1px solid #BBB;background:0 0;color:silver}.file_userdata_message_required_empty{width:100%;height:100%;margin:0;padding:0;border:1px solid #BBB;box-shadow:inset 0 0 2px 2px red;color:#000}.file_userdata_message_required_empty::after{content:'not empty'}div.file_userdata_hint:after,div.file_userdata_hint:before{content:'';display:inline-block;position:absolute}.file_userdata_checkbox_description{width:100%;height:100%;white-space:normal}.file_userdata_dropdown,.file_userdata_listbox{width:100%;height:100%}div.file_userdata_hint{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_none{display:none}div.file_userdata_hint_inline{position:absolute;display:table;background:#eee;border:none;padding:6px;margin:auto 0;box-shadow:none;z-index:1000000}div.file_userdata_hint_bottom:after,div.file_userdata_hint_bottom:before,div.file_userdata_hint_left:after,div.file_userdata_hint_left:before,div.file_userdata_hint_right:after,div.file_userdata_hint_right:before,div.file_userdata_hint_top:after,div.file_userdata_hint_top:before{content:'';display:inline-block}div.file_userdata_hint_bottom,div.file_userdata_hint_left,div.file_userdata_hint_right,div.file_userdata_hint_top{background:#eee;padding:6px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000;position:absolute}div.file_userdata_hint_right{border:1px solid red;border-radius:6px;margin-left:10px}div.file_userdata_hint_right:before{position:absolute;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint_right:after{position:absolute;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_left{border:1px solid red;border-radius:6px;margin-right:10px}div.file_userdata_hint_left:before{position:absolute;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #eee;border-left-color:red;right:-8px;top:6px}div.file_userdata_hint_left:after{position:absolute;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #eee;right:-6px;top:7px}div.file_userdata_hint_top{border:1px solid red;border-radius:6px;margin-bottom:10px}div.file_userdata_hint_top:before{position:absolute;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #eee;border-top-color:red;bottom:-8px;left:6px}div.file_userdata_hint_top:after{position:absolute;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #eee;bottom:-6px;left:7px}div.file_userdata_hint_bottom{border:1px solid red;border-radius:6px;margin-top:10px}div.file_userdata_hint_bottom:before{position:absolute;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #eee;border-bottom-color:red;top:-8px;left:6px}div.file_userdata_hint_bottom:after{position:absolute;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #eee;top:-6px;left:7px}table.file_messageblock_table{margin:0;padding:0;border:none}td.file_messageblock_header_td{border:1px solid #ddd;margin:0;padding:0}div.file_messageblock_header{margin:0;padding:2px}label.file_messageblock_header_label{font-weight:700;font-size:12px;line-height:1}td.file_messageblock_arrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;vertical-align:middle}div.file_messageblock_header_arrow_down,div.file_messageblock_header_arrow_up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;margin:5px 1px 1px 5px;font-size:0;line-height:0}div.file_messageblock_header_arrow_up{border-bottom:5px solid #555}div.file_messageblock_header_arrow_down{border-top:5px solid #555}td.file_messageblock_subheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_subheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_subheader_messagelabel{font-weight:400;font-size:12px;line-height:1}div.file_messageblock_subheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7;overflow:scroll}label.file_messageblock_subheader_debugmessage_label{margin:0;padding:0;background:0 0;border:none;font-weight:700}div.file_messageblock_subheader_debugmessage_container{margin:0 0 0 20px;padding:0;background:0 0;border:none;font-size:10px}label.file_messageblock_subheader_adminmessagelabel{font-weight:400;font-size:12px;font-style:italic;line-height:1}label.file_messageblock_fileheader_label,td.file_messageblock_filenumber_td{font-weight:700;font-size:11px;line-height:1}td.file_messageblock_filenumber_td{width:30px;margin:0;padding:2px;text-align:center;vertical-align:middle;border:1px solid #ddd}td.file_messageblock_fileheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_fileheader{margin:0;padding:2px}td.file_messageblock_filearrow_td{margin:0;padding:0;width:20px;border:1px solid #ddd;vertical-align:middle}div.file_messageblock_file_arrow_down,div.file_messageblock_file_arrow_up{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;margin:5px 1px 1px 6px;font-size:0;line-height:0}div.file_messageblock_file_arrow_up{border-bottom:4px solid #555}div.file_messageblock_file_arrow_down{border-top:4px solid #555}td.file_messageblock_filesubheaderempty_td{width:30px;margin:0;padding:0;border:1px solid #ddd}td.file_messageblock_filesubheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_filesubheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_filesubheader_messagelabel{font-weight:400;font-size:11px;line-height:1}div.file_messageblock_filesubheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7}label.file_messageblock_filesubheader_adminmessagelabel{font-weight:400;font-size:11px;font-style:italic;line-height:1}div.wfu_overlay_editor{width:18px;height:18px;padding:2px;box-shadow:1px 1px 2px #aaa;position:absolute;top:0;left:0;z-index:2;display:none;background-color:#fff;line-height:1}.wfu_browser_container:hover div.wfu_overlay_editor,.wfu_container:hover div.wfu_overlay_editor{display:block}div.wfu_overlay_editor:hover{background-color:#ff0}button.wfu_overlay_editor_button,button.wfu_overlay_editor_button:focus{background:0 0;border:none;margin:0;padding:0;width:100%;height:100%;outline:0}img.wfu_overlay_editor_img{vertical-align:top}div.wfu_overlay_container{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background-color:rgba(255,255,255,.7);z-index:2;display:none}table.wfu_overlay_table,table.wfu_overlay_table td,table.wfu_overlay_table tr{border:none;margin:0;padding:0;background:0 0;width:100%;height:100%}table.wfu_overlay_table td{text-align:center;vertical-align:middle}div.wfu_overlay_container_inner{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background:0 0}div.wfu_overlay_container label{margin-left:4px}div.wfu_file_webcam_inner{position:relative;background:0 0;border:none;padding:0;margin:0;width:100%;height:100%}div.wfu_webcam_notsupported{border:1px inset}div.wfu_webcam_notsupported label.wfu_webcam_notsupported_label{display:inline!important;font-size:smaller;color:red}div.wfu_file_webcam_off{width:100%;height:100%;margin:0;padding:0;border:0;background-color:#000}div.wfu_file_webcam_off img{max-width:100%;max-height:100%;padding:0;margin:0}div.wfu_file_webcam_off svg{position:absolute;top:0;left:0;fill:rgba(255,255,255,.5);width:100%;height:100%;padding:0;margin:0}div.wfu_file_webcam_nav_container{position:relative;border:none;background:0 0;padding:0;margin:0}div.wfu_file_webcam_nav{display:block;position:absolute;border:none;padding:4px;margin:0;left:0;right:0;height:30px;bottom:0;z-index:1;overflow:hidden}div.wfu_rec_ready{background-color:transparent}div.wfu_recording,div.wfu_stream_ready{background-color:rgba(0,0,0,.8)}div.wfu_stream_ready{display:none}div.wfu_file_webcam_btn_time,table.wfu_file_webcam_btn_time_tb,td.wfu_file_webcam_btn_time_td,tr.wfu_file_webcam_btn_time_tr{background:0 0;border:none;padding:0}div.wfu_file_webcam_inner:hover div.wfu_stream_ready{display:block}svg.wfu_file_webcam_btn,svg.wfu_file_webcam_btn_disabled{float:left;height:100%}svg.wfu_file_webcam_btn:hover{border-radius:4px;box-shadow:0 0 4px #aaa}svg.wfu_file_webcam_btn_onoff{fill:#fff;position:absolute;display:none;height:22px;width:22px;top:2px;right:2px;padding:0 0 2px 3px;z-index:1}div.wfu_file_webcam_inner:hover svg.wfu_file_webcam_btn_onoff{display:block}svg.wfu_file_webcam_btn_video{fill:#fff;padding:2px}svg.wfu_file_webcam_btn_video_disabled{fill:rgba(255,255,255,.3);padding:2px}svg.wfu_file_webcam_btn_record{fill:red}svg.wfu_recording{animation:blink-animation 1s steps(3,start) infinite;-webkit-animation:blink-animation 1s steps(3,start) infinite}svg.wfu_recording:hover{border-radius:0;box-shadow:none}@keyframes blink-animation{to{visibility:hidden}}@-webkit-keyframes blink-animation{to{visibility:hidden}}svg.wfu_file_webcam_btn_stop{fill:#fff}svg.wfu_file_webcam_btn_play{fill:#32cd32}svg.wfu_file_webcam_btn_play_disabled{fill:rgba(255,255,255,.3)}svg.wfu_file_webcam_btn_pause{fill:#fff}svg.wfu_file_webcam_btn_pause_disabled{fill:rgba(255,255,255,.3)}div.wfu_file_webcam_btn_pos{position:relative;float:left;background:0 0;border:none;margin:0 8px 0 3px;padding:0;width:calc(100% - 200px);max-width:100px;height:100%}svg.wfu_file_webcam_btn_bar{position:absolute;height:100%;top:0;width:calc(100% + 5px);fill:#fff}svg.wfu_file_webcam_btn_pointer{position:absolute;top:4px;bottom:4px;width:5px;height:calc(100% - 8px);fill:#fff}svg.wfu_file_webcam_btn_back,svg.wfu_file_webcam_btn_fwd{fill:#fff;padding:0 2px}video.wfu_file_webcam_box{max-width:100%;max-height:100%;padding:0;margin:0}div.wfu_file_webcam_btn_time{position:relative;float:right;margin:0;height:100%}table.wfu_file_webcam_btn_time_tb{margin:0;border-collapse:collapse;height:100%}td.wfu_file_webcam_btn_time_td{vertical-align:middle}div.wfu_file_webcam_btn_time label{color:#fff;font-size:smaller;vertical-align:middle}svg.wfu_file_webcam_btn_picture{fill:#ff0;float:right;padding:2px;height:calc(100% - 4px)}
|
1 |
+
input[type="text"].file_input_textbox{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid;border-color:#BBB;background-color:white;color:black}input[type="text"].file_input_textbox:disabled{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid;border-color:#BBB;background-color:white;color:silver}input[type="text"].file_input_textbox_nofile{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid;border-color:#BBB;background-color:red;color:black}form.file_input_uploadform{position:relative;width:100px;height:27px;overflow:hidden;margin:0;padding:0}input[type="button"].file_input_button{width:100px;height:27px;position:absolute;top:0;margin:0;padding:0;background-color:#EEE;color:#555;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input[type="button"].file_input_button_hover{width:100px;height:27px;position:absolute;top:0;margin:0;padding:0;background-color:#EEE;color:#111;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#333;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input[type="button"].file_input_button:disabled,input[type="button"].file_input_button_hover:disabled{width:100px;height:27px;position:absolute;top:0;margin:0;padding:0;background-color:#EEE;color:silver;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input[type="button"].file_input_submit{width:100px;height:27px;position:relative;margin:0;padding:0;background-color:#EEE;color:#555;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input[type="button"].file_input_submit:hover,input[type="button"].file_input_submit:focus{width:100px;height:27px;position:relative;margin:0;padding:0;background-color:#EEE;color:#111;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#333;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input[type="button"].file_input_submit:disabled{width:100px;height:27px;position:relative;margin:0;padding:0;background-color:#EEE;color:silver;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input[type="file"].file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}div.file_progress_bar{display:block;position:relative;width:100px;border:1px solid #333;margin:0;padding:4px}div.file_progress_inner{display:block;width:100%;height:6px;margin:0;padding:0;border:1px solid silver;background-color:white}img.file_progress_imagesafe{width:100%;height:6px}span.file_progress_noanimation{display:block;width:0%;height:6px;margin:0;padding:0;border-style:none;background-color:rgb(43,194,83);position:relative;overflow:hidden}span.file_progress_progressive{display:block;width:auto;height:6px;margin:0;padding:0;border-style:none;background-color:rgb(43,194,83);position:relative;overflow:hidden}span.file_progress_shuffle{display:block;width:25%;height:6px;margin:0;padding:0;border-style:none;background-color:rgb(43,194,83);position:relative;-webkit-animation:shuffle 1s linear infinite alternate;-moz-animation:shuffle 1s linear infinite alternate;-o-animation:shuffle 1s linear infinite alternate;animation:shuffle 1s linear infinite alternate;overflow:hidden}span.file_progress_progressive:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;-webkit-animation:lengthen 2s linear infinite;-moz-animation:lengthen 2s linear infinite;-o-animation:lengthen 2s linear infinite;animation:lengthen 2s linear infinite;overflow:hidden}@-webkit-keyframes shuffle{from{left:0%}to{left:75%}}@-moz-keyframes shuffle{from{left:0%}to{left:75%}}@-o-keyframes shuffle{from{left:0%}to{left:75%}}@keyframes shuffle{from{left:0%}to{left:75%}}@-webkit-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-moz-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-o-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}span.file_messagebox_inner{display:block;width:340px;margin:0;font-size:small;padding:10px;border-style:solid;border-width:1px;border-color:#D3D3D3;background-color:#F5F5F5;color:black;line-height:1.2}div.file_div_clean{display:table;position:relative;margin:0;padding:0;border-style:none;background:none;color:black;line-height:1;vertical-align:middle}div.file_div_clean_responsive_container{display:block;position:relative;margin:0;padding:0;border-style:none;background:none;color:black;line-height:1;vertical-align:middle}div.file_div_clean_responsive{display:inline-block;position:relative;margin:0;padding:0;border-style:none;background:none;color:black;line-height:1;vertical-align:middle}div.file_space_clean{display:block;margin:0 0 2px 0;padding:0;border-style:none;background:none;color:black}table.file_table_clean{margin:0;padding:0;border:none;border-spacing:0;background:none;color:black;width:auto}td.file_td_clean{margin:0;padding:0;border:none;border-spacing:0;background:none;color:black;vertical-align:middle}span.subfolder_label{margin:0;padding:0;border-style:none;background:none;color:black}div.subfolder_container{margin:0;padding:0;height:25px;border-style:none;background:none;color:black;position:relative;display:inline-block}div.subfolder_autoplus_container{margin:0;padding:0 20px 0 0;border-style:none;background:none;display:inline-block;width:100%;height:100%}div.subfolder_autoplus_select_container{position:absolute;width:100%;height:100%;top:0;left:100%;margin:0 0 0 -20px;padding:0;border:none;background:none;overflow:hidden}input[type="text"].subfolder_autoplus{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0}input[type="text"].subfolder_autoplus:disabled{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;color:silver}input[type="text"].subfolder_autoplus_match{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;font-weight:700;font-style:italic}input[type="text"].subfolder_autoplus_match:disabled{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;font-weight:700;font-style:italic;color:silver}input[type="text"].subfolder_autoplus_empty{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;color:silver;font-style:italic}input[type="text"].subfolder_autoplus_prompt{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;background:red}select.subfolder_dropdown{margin:0;padding:0;height:25px;border:none;background:none;color:black}select.subfolder_autoplus_dropdown{width:100%;height:100%;left:-100%;position:absolute;margin-left:20px;margin-top:0;margin-bottom:0;margin-right:0;padding:0;border:none;background:none;color:black}select.subfolder_dropdown_prompt{margin:0;padding:0;height:25px;border:none;background:red;color:black}select.subfolder_autoplus_dropdown_prompt{width:100%;height:100%;left:-100%;position:absolute;margin-left:20px;background:red;margin-top:0;margin-bottom:0;margin-right:0;padding:0;border:none;color:black}select.subfolder_dropdown:disabled{margin:0;padding:0;height:25px;border:none;background:none;color:silver}select.subfolder_autoplus_dropdown:disabled{width:100%;height:100%;left:-100%;position:absolute;margin-left:20px;margin-top:0;margin-bottom:0;margin-right:0;padding:0;border:none;background:none;color:silver}select.subfolder_dropdown option,select.subfolder_dropdown_prompt option{background:white;color:black}select.subfolder_autoplus_dropdown option,select.subfolder_autoplus_dropdown_prompt option{background:white;color:black}span.file_title_clean{margin:0;padding:0;border-style:none;background:none;color:black}div.file_userdata_fieldwrapper,div.file_userdata_fieldwrapper_required,div.file_userdata_fieldwrapper_required_empty{position:relative;display:inline-block;width:60%;height:25px;margin:0;padding:0;background:none;border:none;box-shadow:none}div.file_userdata_fieldwrapper div.wfu_fieldwrapper_overlay,div.file_userdata_fieldwrapper_required div.wfu_fieldwrapper_overlay{position:absolute;display:none;width:100%;height:100%;margin:0;padding:0;background:none;border:none;box-shadow:none;z-index:1000001}div.file_userdata_fieldwrapper_required_empty div.wfu_fieldwrapper_overlay{position:absolute;display:block;width:100%;height:100%;margin:0;padding:0;background:none;border:2px solid red;box-shadow:none;z-index:1000001}div.file_userdata_radio_wrapper{position:relative;display:inline-block;margin:0;padding:0;background:none;border:none;box-shadow:none}div.file_userdata_container{margin:0;padding:0;white-space:nowrap;position:relative}label.file_userdata_label{margin:0;width:40%;display:inline-block}.file_userdata_message,.file_userdata_message_required{width:100%;height:100%;margin:0;padding:0;border:1px solid;border-color:#BBB;background:none;color:black}.file_userdata_message:disabled,.file_userdata_message_required:disabled{width:100%;height:100%;margin:0;padding:0;border:1px solid;border-color:#BBB;background:none;color:silver}.file_userdata_message_required_empty{width:100%;height:100%;margin:0;padding:0;border:1px solid;border-color:#BBB;box-shadow:inset 0 0 2px 2px red;color:black}.file_userdata_message_required_empty::after{content:'not empty'}.file_userdata_checkbox_description{width:100%;height:100%;white-space:normal}.file_userdata_listbox,.file_userdata_dropdown{width:100%;height:100%}div.file_userdata_hint{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint:before{content:'';position:absolute;display:inline-block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint:after{content:'';position:absolute;display:inline-block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_none{display:none}div.file_userdata_hint_inline{position:absolute;display:table;background:#eee;border:none;padding:6px;margin:auto 0;box-shadow:none;z-index:1000000}div.file_userdata_hint_right{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_right:before{content:'';position:absolute;display:inline-block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint_right:after{content:'';position:absolute;display:inline-block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_left{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-right:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_left:before{content:'';position:absolute;display:inline-block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #eee;border-left-color:red;right:-8px;top:6px}div.file_userdata_hint_left:after{content:'';position:absolute;display:inline-block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #eee;right:-6px;top:7px}div.file_userdata_hint_top{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-bottom:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_top:before{content:'';position:absolute;display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #eee;border-top-color:red;bottom:-8px;left:6px}div.file_userdata_hint_top:after{content:'';position:absolute;display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #eee;bottom:-6px;left:7px}div.file_userdata_hint_bottom{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-top:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_bottom:before{content:'';position:absolute;display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #eee;border-bottom-color:red;top:-8px;left:6px}div.file_userdata_hint_bottom:after{content:'';position:absolute;display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #eee;top:-6px;left:7px}table.file_messageblock_table{margin:0;padding:0;border:none}td.file_messageblock_header_td{border:1px solid #ddd;margin:0;padding:0}div.file_messageblock_header{margin:0;padding:2px}label.file_messageblock_header_label{font-weight:700;font-size:12px;line-height:1}td.file_messageblock_arrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;vertical-align:middle}div.file_messageblock_header_arrow_up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #555;margin:5px 1px 1px 5px;font-size:0;line-height:0;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink)}div.file_messageblock_header_arrow_down{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #555;margin:5px 1px 1px 5px;font-size:0;line-height:0;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink)}td.file_messageblock_subheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_subheader_message{margin:0;padding:2px;background:none}label.file_messageblock_subheader_messagelabel{font-weight:400;font-size:12px;line-height:1}div.file_messageblock_subheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7;overflow:scroll}label.file_messageblock_subheader_debugmessage_label{margin:0;padding:0;background:none;border:none;font-weight:700}div.file_messageblock_subheader_debugmessage_container{margin:0 0 0 20px;padding:0;background:none;border:none;font-size:10px}label.file_messageblock_subheader_adminmessagelabel{font-weight:400;font-size:12px;font-style:italic;line-height:1}td.file_messageblock_filenumber_td{width:30px;margin:0;padding:2px;text-align:center;vertical-align:middle;font-weight:700;font-size:11px;line-height:1;border:1px solid #ddd}td.file_messageblock_fileheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_fileheader{margin:0;padding:2px}label.file_messageblock_fileheader_label{font-weight:700;font-size:11px;line-height:1}td.file_messageblock_filearrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;border:1px solid #ddd;vertical-align:middle}div.file_messageblock_file_arrow_up{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid #555;margin:5px 1px 1px 6px;font-size:0;line-height:0;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink)}div.file_messageblock_file_arrow_down{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #555;margin:5px 1px 1px 6px;font-size:0;line-height:0;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink)}td.file_messageblock_filesubheaderempty_td{width:30px;margin:0;padding:0;border:1px solid #ddd}td.file_messageblock_filesubheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_filesubheader_message{margin:0;padding:2px;background:none}label.file_messageblock_filesubheader_messagelabel{font-weight:400;font-size:11px;line-height:1}div.file_messageblock_filesubheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7}label.file_messageblock_filesubheader_adminmessagelabel{font-weight:400;font-size:11px;font-style:italic;line-height:1}div.wfu_overlay_editor{width:18px;height:18px;padding:2px;box-shadow:1px 1px 2px #aaa;position:absolute;top:0;left:0;z-index:2;display:none;background-color:white;line-height:1}.wfu_container:hover div.wfu_overlay_editor,.wfu_browser_container:hover div.wfu_overlay_editor{display:block}div.wfu_overlay_editor:hover{background-color:yellow}button.wfu_overlay_editor_button,button.wfu_overlay_editor_button:focus{background:none;border:none;margin:0;padding:0;width:100%;height:100%;outline:none}img.wfu_overlay_editor_img{vertical-align:top}div.wfu_overlay_container{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background-color:rgba(255,255,255,.7);z-index:2;display:none}table.wfu_overlay_table,table.wfu_overlay_table tr,table.wfu_overlay_table td{border:none;margin:0;padding:0;background:none;width:100%;height:100%}table.wfu_overlay_table td{text-align:center;vertical-align:middle}div.wfu_overlay_container_inner{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background:none}div.wfu_overlay_container label{margin-left:4px}div.wfu_file_webcam_inner{position:relative;background:none;border:none;padding:0;margin:0;width:100%;height:100%}div.wfu_webcam_notsupported{border:1px inset}div.wfu_webcam_notsupported label.wfu_webcam_notsupported_label{display:inline!important;font-size:smaller;color:red}div.wfu_file_webcam_off{width:100%;height:100%;margin:0;padding:0;border:0;background-color:black}div.wfu_file_webcam_off img{max-width:100%;max-height:100%;padding:0;margin:0}div.wfu_file_webcam_off svg{position:absolute;top:0;left:0;fill:rgba(255,255,255,.5);width:100%;height:100%;padding:0;margin:0}div.wfu_file_webcam_nav_container{position:relative;border:none;background:none;padding:0;margin:0}div.wfu_file_webcam_nav{display:block;position:absolute;border:none;padding:4px;margin:0;left:0;right:0;height:30px;bottom:0;z-index:1;overflow:hidden}div.wfu_rec_ready{background-color:transparent}div.wfu_recording{background-color:rgba(0,0,0,.8)}div.wfu_stream_ready{background-color:rgba(0,0,0,.8);display:none}div.wfu_file_webcam_inner:hover div.wfu_stream_ready{display:block}svg.wfu_file_webcam_btn,svg.wfu_file_webcam_btn_disabled{float:left;height:100%}svg.wfu_file_webcam_btn:hover{border-radius:4px;box-shadow:0 0 4px #aaa}svg.wfu_file_webcam_btn_onoff{fill:white;position:absolute;display:none;height:22px;width:22px;top:2px;right:2px;padding:0 0 2px 3px;z-index:1}div.wfu_file_webcam_inner:hover svg.wfu_file_webcam_btn_onoff{display:block}svg.wfu_file_webcam_btn_video{fill:white;padding:2px}svg.wfu_file_webcam_btn_video_disabled{fill:rgba(255,255,255,.3);padding:2px}svg.wfu_file_webcam_btn_record{fill:red}svg.wfu_recording{animation:blink-animation 1s steps(3,start) infinite;-webkit-animation:blink-animation 1s steps(3,start) infinite}svg.wfu_recording:hover{border-radius:0;box-shadow:none}@keyframes blink-animation{to{visibility:hidden}}@-webkit-keyframes blink-animation{to{visibility:hidden}}svg.wfu_file_webcam_btn_stop{fill:white}svg.wfu_file_webcam_btn_play{fill:limegreen}svg.wfu_file_webcam_btn_play_disabled{fill:rgba(255,255,255,.3)}svg.wfu_file_webcam_btn_pause{fill:white}svg.wfu_file_webcam_btn_pause_disabled{fill:rgba(255,255,255,.3)}div.wfu_file_webcam_btn_pos{position:relative;float:left;background:none;border:none;margin:0 8px 0 3px;padding:0;width:calc(100% - 200px);max-width:100px;height:100%}svg.wfu_file_webcam_btn_bar{position:absolute;height:100%;top:0;width:calc(100% + 5px);fill:white}svg.wfu_file_webcam_btn_pointer{position:absolute;top:4px;bottom:4px;width:5px;height:calc(100% - 8px);fill:white}svg.wfu_file_webcam_btn_back{fill:white;padding:0 2px}svg.wfu_file_webcam_btn_fwd{fill:white;padding:0 2px}video.wfu_file_webcam_box{max-width:100%;max-height:100%;padding:0;margin:0}div.wfu_file_webcam_btn_time{position:relative;float:right;background:none;border:none;margin:0;padding:0;height:100%}table.wfu_file_webcam_btn_time_tb{margin:0;padding:0;border:none;border-collapse:collapse;background:none;height:100%}tr.wfu_file_webcam_btn_time_tr{border:none;padding:0;background:none}td.wfu_file_webcam_btn_time_td{border:none;padding:0;background:none;vertical-align:middle}div.wfu_file_webcam_btn_time label{color:white;font-size:smaller;vertical-align:middle}svg.wfu_file_webcam_btn_picture{fill:yellow;float:right;padding:2px;height:calc(100% - 4px)}
|
css/wordpress_file_upload_style_relaxed.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
input[type=text].file_input_textbox,input[type=text].file_input_textbox:disabled,input[type=text].file_input_textbox_nofile{position:relative}form.file_input_uploadform{position:relative;overflow:hidden;margin:0;padding:0}input[type=file].file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}div.file_progress_bar{display:block;position:relative;width:100px;border:1px solid #333;margin:0;padding:4px}div.file_progress_inner{display:block;width:100%;height:6px;margin:0;padding:0;border:1px solid silver;background-color:#fff}span.file_progress_noanimation,span.file_progress_progressive,span.file_progress_shuffle{height:6px;padding:0;border-style:none;background-color:#2bc253;position:relative;display:block;margin:0;overflow:hidden}img.file_progress_imagesafe{width:100%;height:6px}span.file_progress_noanimation{width:0}span.file_progress_progressive{width:auto}span.file_progress_shuffle{width:25%;-webkit-animation:shuffle 1s linear infinite alternate;-moz-animation:shuffle 1s linear infinite alternate;-o-animation:shuffle 1s linear infinite alternate;animation:shuffle 1s linear infinite alternate}span.file_progress_progressive:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;-webkit-animation:lengthen 2s linear infinite;-moz-animation:lengthen 2s linear infinite;-o-animation:lengthen 2s linear infinite;animation:lengthen 2s linear infinite;overflow:hidden}@-webkit-keyframes shuffle{from{left:0}to{left:75%}}@-moz-keyframes shuffle{from{left:0}to{left:75%}}@-o-keyframes shuffle{from{left:0}to{left:75%}}@keyframes shuffle{from{left:0}to{left:75%}}@-webkit-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-moz-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-o-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}span.file_messagebox_inner{display:block;width:340px;margin:0;font-size:small;padding:10px;border-style:solid;border-width:1px;border-color:#D3D3D3;background-color:#F5F5F5;line-height:1.2}div.file_div_clean{display:table;position:relative;margin:0;padding:0;border-style:none;background:0 0;line-height:1;vertical-align:middle}div.file_div_clean_responsive_container{display:block;position:relative;margin:0;padding:0;border-style:none;background:0 0;line-height:1;vertical-align:middle}div.file_div_clean_responsive{display:inline-block;position:relative;margin:0;padding:0;border-style:none;background:0 0;line-height:1;vertical-align:middle}div.file_space_clean{display:block;margin:0 0 2px;padding:0;border-style:none;background:0 0}table.file_table_clean{margin:0;padding:0;border:none;border-spacing:0;background:0 0;width:auto}td.file_td_clean{margin:0;padding:0;border:none;border-spacing:0;background:0 0;vertical-align:middle}div.subfolder_container{margin:0;padding:0;border-style:none;background:0 0;position:relative;display:inline-block}div.subfolder_autoplus_container{margin:0;padding:0 20px 0 0;border-style:none;background:0 0;display:inline-block;width:100%;height:100%}div.subfolder_autoplus_select_container{position:absolute;width:100%;height:100%;top:0;left:100%;margin:0 0 0 -20px;padding:0;border:none;background:0 0;overflow:hidden}select.subfolder_autoplus_dropdown,select.subfolder_autoplus_dropdown:disabled,select.subfolder_autoplus_dropdown_prompt{width:100%;left:-100%;position:absolute;margin-left:20px;height:100%}input[type=text].subfolder_autoplus,input[type=text].subfolder_autoplus:disabled{width:100%}input[type=text].subfolder_autoplus_match,input[type=text].subfolder_autoplus_match:disabled{width:100%;font-weight:700;font-style:italic}input[type=text].subfolder_autoplus_empty{width:100%;font-style:italic}input[type=text].subfolder_autoplus_prompt{width:100%;background:red}select.subfolder_autoplus_dropdown_prompt,select.subfolder_dropdown_prompt{background:red}select.subfolder_autoplus_dropdown option,select.subfolder_autoplus_dropdown_prompt option,select.subfolder_dropdown option,select.subfolder_dropdown_prompt option{background:#fff}div.file_userdata_fieldwrapper,div.file_userdata_fieldwrapper_required,div.file_userdata_fieldwrapper_required_empty{position:relative;display:inline-block;width:60%;margin:0;padding:0;background:0 0;border:none;box-shadow:none}div.file_userdata_fieldwrapper div.wfu_fieldwrapper_overlay,div.file_userdata_fieldwrapper_required div.wfu_fieldwrapper_overlay{position:absolute;display:none;width:100%;height:100%;margin:0;padding:0;background:0 0;border:none;box-shadow:none;z-index:1000001}div.file_userdata_fieldwrapper_required_empty div.wfu_fieldwrapper_overlay{position:absolute;display:block;width:100%;height:100%;margin:0;padding:0;background:0 0;border:2px solid red;box-shadow:none;z-index:1000001}div.file_userdata_radio_wrapper{position:relative;display:inline-block;margin:0;padding:0;background:0 0;border:none;box-shadow:none}div.file_userdata_container{margin:0;padding:0;white-space:nowrap;position:relative}label.file_userdata_label{width:40%;display:inline-block}.file_userdata_checkbox_description,.file_userdata_dropdown,.file_userdata_listbox,.file_userdata_message,.file_userdata_message:disabled,.file_userdata_message_required,.file_userdata_message_required:disabled{width:100%;height:100%}.file_userdata_message_required_empty{width:100%;height:100%;box-shadow:inset 0 0 2px 2px red}.file_userdata_message_required_empty::after{content:'not empty'}div.file_userdata_hint:after,div.file_userdata_hint:before{content:'';display:inline-block;position:absolute}.file_userdata_checkbox_description{white-space:normal}div.file_userdata_hint{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_none{display:none}div.file_userdata_hint_inline{position:absolute;display:table;background:#eee;border:none;padding:6px;margin:auto 0;box-shadow:none;z-index:1000000}div.file_userdata_hint_bottom:after,div.file_userdata_hint_bottom:before,div.file_userdata_hint_left:after,div.file_userdata_hint_left:before,div.file_userdata_hint_right:after,div.file_userdata_hint_right:before,div.file_userdata_hint_top:after,div.file_userdata_hint_top:before{content:'';display:inline-block}div.file_userdata_hint_bottom,div.file_userdata_hint_left,div.file_userdata_hint_right,div.file_userdata_hint_top{background:#eee;padding:6px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000;position:absolute}div.file_userdata_hint_right{border:1px solid red;border-radius:6px;margin-left:10px}div.file_userdata_hint_right:before{position:absolute;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint_right:after{position:absolute;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_left{border:1px solid red;border-radius:6px;margin-right:10px}div.file_userdata_hint_left:before{position:absolute;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #eee;border-left-color:red;right:-8px;top:6px}div.file_userdata_hint_left:after{position:absolute;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #eee;right:-6px;top:7px}div.file_userdata_hint_top{border:1px solid red;border-radius:6px;margin-bottom:10px}div.file_userdata_hint_top:before{position:absolute;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #eee;border-top-color:red;bottom:-8px;left:6px}div.file_userdata_hint_top:after{position:absolute;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #eee;bottom:-6px;left:7px}div.file_userdata_hint_bottom{border:1px solid red;border-radius:6px;margin-top:10px}div.file_userdata_hint_bottom:before{position:absolute;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #eee;border-bottom-color:red;top:-8px;left:6px}div.file_userdata_hint_bottom:after{position:absolute;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #eee;top:-6px;left:7px}table.file_messageblock_table{margin:0;padding:0;border:none}td.file_messageblock_header_td{border:1px solid #ddd;margin:0;padding:0}div.file_messageblock_header{margin:0;padding:2px}label.file_messageblock_header_label{font-weight:700;font-size:12px;line-height:1}td.file_messageblock_arrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;vertical-align:middle}div.file_messageblock_header_arrow_down,div.file_messageblock_header_arrow_up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;margin:5px 1px 1px 5px;font-size:0;line-height:0}div.file_messageblock_header_arrow_up{border-bottom:5px solid #555}div.file_messageblock_header_arrow_down{border-top:5px solid #555}td.file_messageblock_subheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_subheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_subheader_messagelabel{font-weight:400;font-size:12px;line-height:1}div.file_messageblock_subheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7;overflow:scroll}label.file_messageblock_subheader_debugmessage_label{margin:0;padding:0;background:0 0;border:none;font-weight:700}div.file_messageblock_subheader_debugmessage_container{margin:0 0 0 20px;padding:0;background:0 0;border:none;font-size:10px}label.file_messageblock_subheader_adminmessagelabel{font-weight:400;font-size:12px;font-style:italic;line-height:1}label.file_messageblock_fileheader_label,td.file_messageblock_filenumber_td{font-weight:700;font-size:11px;line-height:1}td.file_messageblock_filenumber_td{width:30px;margin:0;padding:2px;text-align:center;vertical-align:middle;border:1px solid #ddd}td.file_messageblock_fileheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_fileheader{margin:0;padding:2px}td.file_messageblock_filearrow_td{margin:0;padding:0;width:20px;border:1px solid #ddd;vertical-align:middle}div.file_messageblock_file_arrow_down,div.file_messageblock_file_arrow_up{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;margin:5px 1px 1px 6px;font-size:0;line-height:0}div.file_messageblock_file_arrow_up{border-bottom:4px solid #555}div.file_messageblock_file_arrow_down{border-top:4px solid #555}td.file_messageblock_filesubheaderempty_td{width:30px;margin:0;padding:0;border:1px solid #ddd}td.file_messageblock_filesubheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_filesubheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_filesubheader_messagelabel{font-weight:400;font-size:11px;line-height:1}div.file_messageblock_filesubheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7}label.file_messageblock_filesubheader_adminmessagelabel{font-weight:400;font-size:11px;font-style:italic;line-height:1}div.wfu_overlay_editor{width:18px;height:18px;padding:2px;box-shadow:1px 1px 2px #aaa;position:absolute;top:0;left:0;z-index:2;display:none;background-color:#fff;line-height:1}.wfu_browser_container:hover div.wfu_overlay_editor,.wfu_container:hover div.wfu_overlay_editor{display:block}div.wfu_overlay_editor:hover{background-color:#ff0}button.wfu_overlay_editor_button,button.wfu_overlay_editor_button:focus{background:0 0;border:none;margin:0;padding:0;width:100%;height:100%;outline:0}img.wfu_overlay_editor_img{vertical-align:top}div.wfu_overlay_container{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background-color:rgba(255,255,255,.7);z-index:2;display:none}table.wfu_overlay_table,table.wfu_overlay_table td,table.wfu_overlay_table tr{border:none;margin:0;padding:0;background:0 0;width:100%;height:100%}table.wfu_overlay_table td{text-align:center;vertical-align:middle}div.wfu_overlay_container_inner{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background:0 0}div.wfu_overlay_container label{margin-left:4px}div.wfu_file_webcam_inner{position:relative;background:0 0;border:none;padding:0;margin:0;width:100%;height:100%}div.wfu_webcam_notsupported{border:1px inset}div.wfu_webcam_notsupported label.wfu_webcam_notsupported_label{display:inline!important;font-size:smaller;color:red}div.wfu_file_webcam_off{width:100%;height:100%;margin:0;padding:0;border:0;background-color:#000}div.wfu_file_webcam_off img{max-width:100%;max-height:100%;padding:0;margin:0}div.wfu_file_webcam_off svg{position:absolute;top:0;left:0;fill:rgba(255,255,255,.5);width:100%;height:100%;padding:0;margin:0}div.wfu_file_webcam_nav_container{position:relative;border:none;background:0 0;padding:0;margin:0}div.wfu_file_webcam_nav{display:block;position:absolute;border:none;padding:4px;margin:0;left:0;right:0;height:30px;bottom:0;z-index:1;overflow:hidden}div.wfu_rec_ready{background-color:transparent}div.wfu_recording,div.wfu_stream_ready{background-color:rgba(0,0,0,.8)}div.wfu_stream_ready{display:none}div.wfu_file_webcam_btn_time,table.wfu_file_webcam_btn_time_tb,td.wfu_file_webcam_btn_time_td,tr.wfu_file_webcam_btn_time_tr{background:0 0;border:none;padding:0}div.wfu_file_webcam_inner:hover div.wfu_stream_ready{display:block}svg.wfu_file_webcam_btn,svg.wfu_file_webcam_btn_disabled{float:left;height:100%}svg.wfu_file_webcam_btn:hover{border-radius:4px;box-shadow:0 0 4px #aaa}svg.wfu_file_webcam_btn_onoff{fill:#fff;position:absolute;display:none;height:22px;width:22px;top:2px;right:2px;padding:0 0 2px 3px;z-index:1}div.wfu_file_webcam_inner:hover svg.wfu_file_webcam_btn_onoff{display:block}svg.wfu_file_webcam_btn_video{fill:#fff;padding:2px}svg.wfu_file_webcam_btn_video_disabled{fill:rgba(255,255,255,.3);padding:2px}svg.wfu_file_webcam_btn_record{fill:red}svg.wfu_recording{animation:blink-animation 1s steps(3,start) infinite;-webkit-animation:blink-animation 1s steps(3,start) infinite}svg.wfu_recording:hover{border-radius:0;box-shadow:none}@keyframes blink-animation{to{visibility:hidden}}@-webkit-keyframes blink-animation{to{visibility:hidden}}svg.wfu_file_webcam_btn_stop{fill:#fff}svg.wfu_file_webcam_btn_play{fill:#32cd32}svg.wfu_file_webcam_btn_play_disabled{fill:rgba(255,255,255,.3)}svg.wfu_file_webcam_btn_pause{fill:#fff}svg.wfu_file_webcam_btn_pause_disabled{fill:rgba(255,255,255,.3)}div.wfu_file_webcam_btn_pos{position:relative;float:left;background:0 0;border:none;margin:0 8px 0 3px;padding:0;width:calc(100% - 200px);max-width:100px;height:100%}svg.wfu_file_webcam_btn_bar{position:absolute;height:100%;top:0;width:calc(100% + 5px);fill:#fff}svg.wfu_file_webcam_btn_pointer{position:absolute;top:4px;bottom:4px;width:5px;height:calc(100% - 8px);fill:#fff}svg.wfu_file_webcam_btn_back,svg.wfu_file_webcam_btn_fwd{fill:#fff;padding:0 2px}video.wfu_file_webcam_box{max-width:100%;max-height:100%;padding:0;margin:0}div.wfu_file_webcam_btn_time{position:relative;float:right;margin:0;height:100%}table.wfu_file_webcam_btn_time_tb{margin:0;border-collapse:collapse;height:100%}td.wfu_file_webcam_btn_time_td{vertical-align:middle}div.wfu_file_webcam_btn_time label{color:#fff;font-size:smaller;vertical-align:middle}svg.wfu_file_webcam_btn_picture{fill:#ff0;float:right;padding:2px;height:calc(100% - 4px)}
|
1 |
+
input[type="text"].file_input_textbox{position:relative}input[type="text"].file_input_textbox:disabled{position:relative}input[type="text"].file_input_textbox_nofile{position:relative}form.file_input_uploadform{position:relative;overflow:hidden;margin:0;padding:0}input[type="button"].file_input_button_hover{}input[type="button"].file_input_submit{}input[type="button"].file_input_submit:disabled{}input[type="file"].file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}div.file_progress_bar{display:block;position:relative;width:100px;border:1px solid #333;margin:0;padding:4px}div.file_progress_inner{display:block;width:100%;height:6px;margin:0;padding:0;border:1px solid silver;background-color:white}img.file_progress_imagesafe{width:100%;height:6px}span.file_progress_noanimation{display:block;width:0%;height:6px;margin:0;padding:0;border-style:none;background-color:rgb(43,194,83);position:relative;overflow:hidden}span.file_progress_progressive{display:block;width:auto;height:6px;margin:0;padding:0;border-style:none;background-color:rgb(43,194,83);position:relative;overflow:hidden}span.file_progress_shuffle{display:block;width:25%;height:6px;margin:0;padding:0;border-style:none;background-color:rgb(43,194,83);position:relative;-webkit-animation:shuffle 1s linear infinite alternate;-moz-animation:shuffle 1s linear infinite alternate;-o-animation:shuffle 1s linear infinite alternate;animation:shuffle 1s linear infinite alternate;overflow:hidden}span.file_progress_progressive:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;-webkit-animation:lengthen 2s linear infinite;-moz-animation:lengthen 2s linear infinite;-o-animation:lengthen 2s linear infinite;animation:lengthen 2s linear infinite;overflow:hidden}@-webkit-keyframes shuffle{from{left:0%}to{left:75%}}@-moz-keyframes shuffle{from{left:0%}to{left:75%}}@-o-keyframes shuffle{from{left:0%}to{left:75%}}@keyframes shuffle{from{left:0%}to{left:75%}}@-webkit-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-moz-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-o-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}span.file_messagebox_inner{display:block;width:340px;margin:0;font-size:small;padding:10px;border-style:solid;border-width:1px;border-color:#D3D3D3;background-color:#F5F5F5;line-height:1.2}div.file_div_clean{display:table;position:relative;margin:0;padding:0;border-style:none;background:none;line-height:1;vertical-align:middle}div.file_div_clean_responsive_container{display:block;position:relative;margin:0;padding:0;border-style:none;background:none;line-height:1;vertical-align:middle}div.file_div_clean_responsive{display:inline-block;position:relative;margin:0;padding:0;border-style:none;background:none;line-height:1;vertical-align:middle}div.file_space_clean{display:block;margin:0 0 2px 0;padding:0;border-style:none;background:none}table.file_table_clean{margin:0;padding:0;border:none;border-spacing:0;background:none;width:auto}td.file_td_clean{margin:0;padding:0;border:none;border-spacing:0;background:none;vertical-align:middle}span.subfolder_label{}div.subfolder_container{margin:0;padding:0;border-style:none;background:none;position:relative;display:inline-block}div.subfolder_autoplus_container{margin:0;padding:0 20px 0 0;border-style:none;background:none;display:inline-block;width:100%;height:100%}div.subfolder_autoplus_select_container{position:absolute;width:100%;height:100%;top:0;left:100%;margin:0 0 0 -20px;padding:0;border:none;background:none;overflow:hidden}input[type="text"].subfolder_autoplus{width:100%}input[type="text"].subfolder_autoplus:disabled{width:100%}input[type="text"].subfolder_autoplus_match{width:100%;font-weight:700;font-style:italic}input[type="text"].subfolder_autoplus_match:disabled{width:100%;font-weight:700;font-style:italic}input[type="text"].subfolder_autoplus_empty{width:100%;font-style:italic}input[type="text"].subfolder_autoplus_prompt{width:100%;background:red}select.subfolder_autoplus_dropdown{width:100%;height:100%;left:-100%;position:absolute;margin-left:20px}select.subfolder_dropdown_prompt{background:red}select.subfolder_autoplus_dropdown_prompt{width:100%;height:100%;left:-100%;position:absolute;margin-left:20px;background:red}select.subfolder_autoplus_dropdown:disabled{width:100%;height:100%;left:-100%;position:absolute;margin-left:20px}select.subfolder_dropdown option,select.subfolder_dropdown_prompt option{background:white}select.subfolder_autoplus_dropdown option,select.subfolder_autoplus_dropdown_prompt option{background:white}div.file_userdata_fieldwrapper,div.file_userdata_fieldwrapper_required,div.file_userdata_fieldwrapper_required_empty{position:relative;display:inline-block;width:60%;margin:0;padding:0;background:none;border:none;box-shadow:none}div.file_userdata_fieldwrapper div.wfu_fieldwrapper_overlay,div.file_userdata_fieldwrapper_required div.wfu_fieldwrapper_overlay{position:absolute;display:none;width:100%;height:100%;margin:0;padding:0;background:none;border:none;box-shadow:none;z-index:1000001}div.file_userdata_fieldwrapper_required_empty div.wfu_fieldwrapper_overlay{position:absolute;display:block;width:100%;height:100%;margin:0;padding:0;background:none;border:2px solid red;box-shadow:none;z-index:1000001}div.file_userdata_radio_wrapper{position:relative;display:inline-block;margin:0;padding:0;background:none;border:none;box-shadow:none}div.file_userdata_container{margin:0;padding:0;white-space:nowrap;position:relative}label.file_userdata_label{width:40%;display:inline-block}.file_userdata_message,.file_userdata_message_required{width:100%;height:100%}.file_userdata_message:disabled,.file_userdata_message_required:disabled{width:100%;height:100%}.file_userdata_message_required_empty{width:100%;height:100%;box-shadow:inset 0 0 2px 2px red}.file_userdata_message_required_empty::after{content:'not empty'}.file_userdata_checkbox_description{width:100%;height:100%;white-space:normal}.file_userdata_listbox,.file_userdata_dropdown{width:100%;height:100%}div.file_userdata_hint{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint:before{content:'';position:absolute;display:inline-block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint:after{content:'';position:absolute;display:inline-block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_none{display:none}div.file_userdata_hint_inline{position:absolute;display:table;background:#eee;border:none;padding:6px;margin:auto 0;box-shadow:none;z-index:1000000}div.file_userdata_hint_right{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_right:before{content:'';position:absolute;display:inline-block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint_right:after{content:'';position:absolute;display:inline-block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_left{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-right:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_left:before{content:'';position:absolute;display:inline-block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #eee;border-left-color:red;right:-8px;top:6px}div.file_userdata_hint_left:after{content:'';position:absolute;display:inline-block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #eee;right:-6px;top:7px}div.file_userdata_hint_top{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-bottom:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_top:before{content:'';position:absolute;display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #eee;border-top-color:red;bottom:-8px;left:6px}div.file_userdata_hint_top:after{content:'';position:absolute;display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #eee;bottom:-6px;left:7px}div.file_userdata_hint_bottom{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-top:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_bottom:before{content:'';position:absolute;display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #eee;border-bottom-color:red;top:-8px;left:6px}div.file_userdata_hint_bottom:after{content:'';position:absolute;display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #eee;top:-6px;left:7px}table.file_messageblock_table{margin:0;padding:0;border:none}td.file_messageblock_header_td{border:1px solid #ddd;margin:0;padding:0}div.file_messageblock_header{margin:0;padding:2px}label.file_messageblock_header_label{font-weight:700;font-size:12px;line-height:1}td.file_messageblock_arrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;vertical-align:middle}div.file_messageblock_header_arrow_up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #555;margin:5px 1px 1px 5px;font-size:0;line-height:0;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink)}div.file_messageblock_header_arrow_down{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #555;margin:5px 1px 1px 5px;font-size:0;line-height:0;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink)}td.file_messageblock_subheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_subheader_message{margin:0;padding:2px;background:none}label.file_messageblock_subheader_messagelabel{font-weight:400;font-size:12px;line-height:1}div.file_messageblock_subheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7;overflow:scroll}label.file_messageblock_subheader_debugmessage_label{margin:0;padding:0;background:none;border:none;font-weight:700}div.file_messageblock_subheader_debugmessage_container{margin:0 0 0 20px;padding:0;background:none;border:none;font-size:10px}label.file_messageblock_subheader_adminmessagelabel{font-weight:400;font-size:12px;font-style:italic;line-height:1}td.file_messageblock_filenumber_td{width:30px;margin:0;padding:2px;text-align:center;vertical-align:middle;font-weight:700;font-size:11px;line-height:1;border:1px solid #ddd}td.file_messageblock_fileheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_fileheader{margin:0;padding:2px}label.file_messageblock_fileheader_label{font-weight:700;font-size:11px;line-height:1}td.file_messageblock_filearrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;border:1px solid #ddd;vertical-align:middle}div.file_messageblock_file_arrow_up{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid #555;margin:5px 1px 1px 6px;font-size:0;line-height:0;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink)}div.file_messageblock_file_arrow_down{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #555;margin:5px 1px 1px 6px;font-size:0;line-height:0;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink)}td.file_messageblock_filesubheaderempty_td{width:30px;margin:0;padding:0;border:1px solid #ddd}td.file_messageblock_filesubheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_filesubheader_message{margin:0;padding:2px;background:none}label.file_messageblock_filesubheader_messagelabel{font-weight:400;font-size:11px;line-height:1}div.file_messageblock_filesubheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7}label.file_messageblock_filesubheader_adminmessagelabel{font-weight:400;font-size:11px;font-style:italic;line-height:1}div.wfu_overlay_editor{width:18px;height:18px;padding:2px;box-shadow:1px 1px 2px #aaa;position:absolute;top:0;left:0;z-index:2;display:none;background-color:white;line-height:1}.wfu_container:hover div.wfu_overlay_editor,.wfu_browser_container:hover div.wfu_overlay_editor{display:block}div.wfu_overlay_editor:hover{background-color:yellow}button.wfu_overlay_editor_button,button.wfu_overlay_editor_button:focus{background:none;border:none;margin:0;padding:0;width:100%;height:100%;outline:none}img.wfu_overlay_editor_img{vertical-align:top}div.wfu_overlay_container{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background-color:rgba(255,255,255,.7);z-index:2;display:none}table.wfu_overlay_table,table.wfu_overlay_table tr,table.wfu_overlay_table td{border:none;margin:0;padding:0;background:none;width:100%;height:100%}table.wfu_overlay_table td{text-align:center;vertical-align:middle}div.wfu_overlay_container_inner{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background:none}div.wfu_overlay_container label{margin-left:4px}div.wfu_file_webcam_inner{position:relative;background:none;border:none;padding:0;margin:0;width:100%;height:100%}div.wfu_webcam_notsupported{border:1px inset}div.wfu_webcam_notsupported label.wfu_webcam_notsupported_label{display:inline!important;font-size:smaller;color:red}div.wfu_file_webcam_off{width:100%;height:100%;margin:0;padding:0;border:0;background-color:black}div.wfu_file_webcam_off img{max-width:100%;max-height:100%;padding:0;margin:0}div.wfu_file_webcam_off svg{position:absolute;top:0;left:0;fill:rgba(255,255,255,.5);width:100%;height:100%;padding:0;margin:0}div.wfu_file_webcam_nav_container{position:relative;border:none;background:none;padding:0;margin:0}div.wfu_file_webcam_nav{display:block;position:absolute;border:none;padding:4px;margin:0;left:0;right:0;height:30px;bottom:0;z-index:1;overflow:hidden}div.wfu_rec_ready{background-color:transparent}div.wfu_recording{background-color:rgba(0,0,0,.8)}div.wfu_stream_ready{background-color:rgba(0,0,0,.8);display:none}div.wfu_file_webcam_inner:hover div.wfu_stream_ready{display:block}svg.wfu_file_webcam_btn,svg.wfu_file_webcam_btn_disabled{float:left;height:100%}svg.wfu_file_webcam_btn:hover{border-radius:4px;box-shadow:0 0 4px #aaa}svg.wfu_file_webcam_btn_onoff{fill:white;position:absolute;display:none;height:22px;width:22px;top:2px;right:2px;padding:0 0 2px 3px;z-index:1}div.wfu_file_webcam_inner:hover svg.wfu_file_webcam_btn_onoff{display:block}svg.wfu_file_webcam_btn_video{fill:white;padding:2px}svg.wfu_file_webcam_btn_video_disabled{fill:rgba(255,255,255,.3);padding:2px}svg.wfu_file_webcam_btn_record{fill:red}svg.wfu_recording{animation:blink-animation 1s steps(3,start) infinite;-webkit-animation:blink-animation 1s steps(3,start) infinite}svg.wfu_recording:hover{border-radius:0;box-shadow:none}@keyframes blink-animation{to{visibility:hidden}}@-webkit-keyframes blink-animation{to{visibility:hidden}}svg.wfu_file_webcam_btn_stop{fill:white}svg.wfu_file_webcam_btn_play{fill:limegreen}svg.wfu_file_webcam_btn_play_disabled{fill:rgba(255,255,255,.3)}svg.wfu_file_webcam_btn_pause{fill:white}svg.wfu_file_webcam_btn_pause_disabled{fill:rgba(255,255,255,.3)}div.wfu_file_webcam_btn_pos{position:relative;float:left;background:none;border:none;margin:0 8px 0 3px;padding:0;width:calc(100% - 200px);max-width:100px;height:100%}svg.wfu_file_webcam_btn_bar{position:absolute;height:100%;top:0;width:calc(100% + 5px);fill:white}svg.wfu_file_webcam_btn_pointer{position:absolute;top:4px;bottom:4px;width:5px;height:calc(100% - 8px);fill:white}svg.wfu_file_webcam_btn_back{fill:white;padding:0 2px}svg.wfu_file_webcam_btn_fwd{fill:white;padding:0 2px}video.wfu_file_webcam_box{max-width:100%;max-height:100%;padding:0;margin:0}div.wfu_file_webcam_btn_time{position:relative;float:right;background:none;border:none;margin:0;padding:0;height:100%}table.wfu_file_webcam_btn_time_tb{margin:0;padding:0;border:none;border-collapse:collapse;background:none;height:100%}tr.wfu_file_webcam_btn_time_tr{border:none;padding:0;background:none}td.wfu_file_webcam_btn_time_td{border:none;padding:0;background:none;vertical-align:middle}div.wfu_file_webcam_btn_time label{color:white;font-size:smaller;vertical-align:middle}svg.wfu_file_webcam_btn_picture{fill:yellow;float:right;padding:2px;height:calc(100% - 4px)}
|
css/wordpress_file_upload_style_safe.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
input.file_input_textbox
|
1 |
+
input.file_input_textbox{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid;border-color:#BBB;background-color:white;color:black}input.file_input_textbox:disabled{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid;border-color:#BBB;background-color:white;color:silver}input.file_input_textbox_nofile{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid;border-color:#BBB;background-color:red;color:black}input.file_input_button{width:100px;height:27px;position:absolute;top:0;margin:0;padding:0;background-color:#EEE;color:#555;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input.file_input_button_hover{width:100px;height:27px;position:absolute;top:0;margin:0;padding:0;background-color:#EEE;color:#111;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#333;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input.file_input_button:disabled,input.file_input_button_hover:disabled{width:100px;height:27px;position:absolute;top:0;margin:0;padding:0;background-color:#EEE;color:silver;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input.file_input_submit{width:100px;height:27px;position:relative;margin:0;padding:0;background-color:#EEE;color:#555;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input.file_input_submit:hover,input.file_input_submit:focus{width:100px;height:27px;position:relative;margin:0;padding:0;background-color:#EEE;color:#111;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#333;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input.file_input_submit:disabled{width:100px;height:27px;position:relative;margin:0;padding:0;background-color:#EEE;color:silver;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px}input.file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}
|
css/wordpress_file_upload_style_safe_relaxed.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
input.file_input_textbox
|
1 |
+
input.file_input_textbox{position:relative}input.file_input_textbox:disabled{position:relative}input.file_input_textbox_nofile{position:relative}input.file_input_button_hover{}input.file_input_submit{}input.file_input_submit:disabled{}input.file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}
|
js/getElementsByClassName-1.0.1.js
CHANGED
@@ -1,4 +1,12 @@
|
|
1 |
-
var getElementsByClassName=function(className,tag,elm){if(document.getElementsByClassName)getElementsByClassName=function(className,tag,elm){elm=elm||document;var elements=elm.getElementsByClassName(className),nodeName=tag?new RegExp("\\b"+tag+"\\b","i"):null,returnElements=[],current;for(var i=0,il=elements.length;i<il;i+=1){current=elements[i];if(!nodeName||nodeName.test(current.nodeName))returnElements.push(current)}
|
2 |
-
|
3 |
-
|
4 |
-
elements
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var getElementsByClassName=function(className,tag,elm){if(document.getElementsByClassName){getElementsByClassName=function(className,tag,elm){elm=elm||document;var elements=elm.getElementsByClassName(className),nodeName=(tag)?new RegExp("\\b"+tag+"\\b","i"):null,returnElements=[],current;for(var i=0,il=elements.length;i<il;i+=1){current=elements[i];if(!nodeName||nodeName.test(current.nodeName)){returnElements.push(current)}}
|
2 |
+
return returnElements}}
|
3 |
+
else if(document.evaluate){getElementsByClassName=function(className,tag,elm){tag=tag||"*";elm=elm||document;var classes=className.split(" "),classesToCheck="",xhtmlNamespace="http://www.w3.org/1999/xhtml",namespaceResolver=(document.documentElement.namespaceURI===xhtmlNamespace)?xhtmlNamespace:null,returnElements=[],elements,node;for(var j=0,jl=classes.length;j<jl;j+=1){classesToCheck+="[contains(concat(' ', @class, ' '), ' "+classes[j]+" ')]"}
|
4 |
+
try{elements=document.evaluate(".//"+tag+classesToCheck,elm,namespaceResolver,0,null)}
|
5 |
+
catch(e){elements=document.evaluate(".//"+tag+classesToCheck,elm,null,0,null)}
|
6 |
+
while((node=elements.iterateNext())){returnElements.push(node)}
|
7 |
+
return returnElements}}
|
8 |
+
else{getElementsByClassName=function(className,tag,elm){tag=tag||"*";elm=elm||document;var classes=className.split(" "),classesToCheck=[],elements=(tag==="*"&&elm.all)?elm.all:elm.getElementsByTagName(tag),current,returnElements=[],match;for(var k=0,kl=classes.length;k<kl;k+=1){classesToCheck.push(new RegExp("(^|\\s)"+classes[k]+"(\\s|$)"))}
|
9 |
+
for(var l=0,ll=elements.length;l<ll;l+=1){current=elements[l];match=!1;for(var m=0,ml=classesToCheck.length;m<ml;m+=1){match=classesToCheck[m].test(current.className);if(!match){break}}
|
10 |
+
if(match){returnElements.push(current)}}
|
11 |
+
return returnElements}}
|
12 |
+
return getElementsByClassName(className,tag,elm)}
|
js/json2.js
CHANGED
@@ -1,8 +1,18 @@
|
|
1 |
-
var JSON;if(!JSON)JSON={};
|
2 |
-
|
3 |
-
/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={
|
4 |
-
gap,partial,value=holder[key];if(value&&typeof value===
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var JSON;if(!JSON){JSON={}}(function(){"use strict";function f(n){return n<10?'0'+n:n}
|
2 |
+
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z':null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}
|
3 |
+
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}
|
4 |
+
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key)}
|
5 |
+
if(typeof rep==='function'){value=rep.call(holder,key,value)}
|
6 |
+
switch(typeof value){case 'string':return quote(value);case 'number':return isFinite(value)?String(value):'null';case 'boolean':case 'null':return String(value);case 'object':if(!value){return 'null'}
|
7 |
+
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null'}
|
8 |
+
v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v}
|
9 |
+
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==='string'){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}}
|
10 |
+
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v}}
|
11 |
+
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' '}}else if(typeof space==='string'){indent=space}
|
12 |
+
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify')}
|
13 |
+
return str('',{'':value})}}
|
14 |
+
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}
|
15 |
+
return reviver.call(holder,key,value)}
|
16 |
+
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return '\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})}
|
17 |
+
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j}
|
18 |
+
throw new SyntaxError('JSON.parse')}}}())
|
js/wordpress_file_upload_adminfunctions.js
CHANGED
@@ -1,269 +1,372 @@
|
|
1 |
-
var DraggedItem=null;var ShortcodeNextSave=0;var ShortcodeTimeOut=null;var ShortcodeString="";var Autosave
|
2 |
-
|
3 |
-
function wfu_admin_onoff_clicked(key){var onoff=document.getElementById("wfu_attribute_"+key);var container=document.getElementById("wfu_wrapper");var shadows=document.getElementsByClassName("wfu_shadow_"+key,"div",container);var shadows_inv=document.getElementsByClassName("wfu_shadow_"+key+"_inv","div",container);var status=onoff.className.substr(onoff.className.length-2)=="on";status=!status;if(status){document.getElementById("wfu_attribute_value_"+key).value="true";onoff.className="wfu_onoff_container_on";
|
4 |
-
|
5 |
-
|
6 |
-
"
|
7 |
-
|
8 |
-
|
9 |
-
"
|
10 |
-
function
|
11 |
-
|
12 |
-
|
13 |
-
function
|
14 |
-
function
|
15 |
-
|
16 |
-
|
17 |
-
function
|
18 |
-
|
19 |
-
|
20 |
-
function
|
21 |
-
var
|
22 |
-
function
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
function
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
function
|
41 |
-
document.getElementById(
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
function
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
item.
|
50 |
-
|
51 |
-
function
|
52 |
-
|
53 |
-
function
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
function
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
key)
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
function
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
function
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
function
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
function
|
111 |
-
function
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
function
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
function wfu_update_text_value(e){e=e||window.event;var item=e.target;var attribute=item.id.replace("wfu_attribute_","");var val=item.value;val=val.replace(/(\r\n|\n|\r)/gm,"%n%");val=val.replace(/\"/gm,"%dq%");val=val.replace(/\[/gm,"%brl%");val=val.replace(/\]/gm,"%brr%");if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+attribute).value=val;wfu_generate_shortcode()}}
|
127 |
function wfu_update_date_value(e){e=e||window.event;var item=e.target;var attribute=item.id.replace("wfu_attribute_","");var val=item.value;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+attribute).value=val;wfu_generate_shortcode()}}
|
128 |
function wfu_update_stringmatch_textvalue(e){e=e||window.event;var item=e.target;var attribute=item.id.replace("wfu_attribute_","");attribute=attribute.replace("_matchfield","").replace("_matchvalue","");wfu_update_stringmatch_value(attribute)}
|
129 |
-
function wfu_update_triplecolor_value(e){e=e||window.event;var item=e.target;var attribute=item.id.replace("wfu_attribute_","");attribute=attribute.replace("_color","");attribute=attribute.replace("_bgcolor","");attribute=attribute.replace("_borcolor","");item=document.getElementById("wfu_attribute_"+attribute+"_color");var val=item.value+","+document.getElementById("wfu_attribute_"+attribute+"_bgcolor").value+","+document.getElementById("wfu_attribute_"+attribute+"_borcolor").value;if(val!==item.oldVal){item.oldVal=
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
"
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
function
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
function wfu_insert_variable(obj){var attr=obj.className.replace("wfu_variable wfu_variable_","");var inp=document.getElementById("wfu_attribute_"+attr);var pos=inp.selectionStart;var prevval=inp.value;inp.value=prevval.substr(0,pos)+obj.innerHTML+prevval.substr(pos);wfu_update_text_value({target:inp})}
|
163 |
function wfu_insert_userfield_variable(obj){var attr=obj.className.replace("wfu_variable wfu_variable_","");var inp=document.getElementById("wfu_attribute_"+attr);var pos=inp.selectionStart;var prevval=inp.value;inp.value=prevval.substr(0,pos)+obj.value+prevval.substr(pos);obj.value="%userdataXXX%";wfu_update_text_value({target:inp})}
|
164 |
-
function wfu_columns_itemclicked(obj,attribute){var select=obj.parentNode;if(select.tagName!=
|
165 |
-
|
166 |
-
|
167 |
-
source.options[i].
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
if(
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
function
|
178 |
-
|
179 |
-
function
|
180 |
-
function
|
181 |
-
|
182 |
-
function
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
function
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
"
|
230 |
-
|
231 |
-
"
|
232 |
-
"
|
233 |
-
"
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var DraggedItem=null;var ShortcodeNextSave=0;var ShortcodeTimeOut=null;var ShortcodeString="";var Autosave=!1;var PageObsolete=!1;var PageUpdating=!1;var CheckObsolescenceTimeOut=5000;jQuery(document).ready(function($){$('.wfu_color_field').wpColorPicker({change:function(event,ui){event.target.value=ui.color.toString();if(event.target.name=="wfu_text_elements")wfu_update_text_value(event);else if(event.target.name=="wfu_triplecolor_elements")wfu_update_triplecolor_value(event)}})});function wfu_admin_activate_tab(key){var tabs=document.getElementById("wfu_tab_container");var tab,tabkey;for(var i=0;i<tabs.childNodes.length;i++){tab=tabs.childNodes[i];if(tab.nodeType===1){tabkey=tab.id.substr(8);if(tab.className.indexOf("nav-tab-active")>-1){tab.className="nav-tab";document.getElementById("wfu_container_"+tabkey).style.display="none"}}}
|
2 |
+
document.getElementById("wfu_tab_"+key).className="nav-tab nav-tab-active";document.getElementById("wfu_container_"+key).style.display="block"}
|
3 |
+
function wfu_admin_onoff_clicked(key){var onoff=document.getElementById("wfu_attribute_"+key);var container=document.getElementById("wfu_wrapper");var shadows=document.getElementsByClassName("wfu_shadow_"+key,"div",container);var shadows_inv=document.getElementsByClassName("wfu_shadow_"+key+"_inv","div",container);var status=(onoff.className.substr(onoff.className.length-2)=="on");status=!status;if(status){document.getElementById("wfu_attribute_value_"+key).value="true";onoff.className="wfu_onoff_container_on";for(var i=0;i<shadows.length;i++)shadows[i].style.display="none";for(var i=0;i<shadows_inv.length;i++)shadows_inv[i].style.display="block"}
|
4 |
+
else{document.getElementById("wfu_attribute_value_"+key).value="false";onoff.className="wfu_onoff_container_off";for(var i=0;i<shadows.length;i++)shadows[i].style.display="block";for(var i=0;i<shadows_inv.length;i++)shadows_inv[i].style.display="none"}
|
5 |
+
wfu_generate_shortcode();if(key=="userdata"||key=="formdata")wfu_update_formfield_variables()}
|
6 |
+
function wfu_admin_radio_clicked(key){var radios=document.getElementsByName("wfu_radioattribute_"+key);var container=document.getElementById("wfu_wrapper");var shadows=document.getElementsByClassName("wfu_shadow_"+key,"div",container);var shadows_inv=document.getElementsByClassName("wfu_shadow_"+key+"_inv","div",container);var val="";for(i=0;i<radios.length;i++)
|
7 |
+
if(radios[i].checked)val=radios[i].value;var status=(val.substr(0,1)=="*");if(status){val=val.substr(1);for(var i=0;i<shadows.length;i++)shadows[i].style.display="none";for(var i=0;i<shadows_inv.length;i++)shadows_inv[i].style.display="block"}
|
8 |
+
else{for(var i=0;i<shadows.length;i++)shadows[i].style.display="block";for(var i=0;i<shadows_inv.length;i++)shadows_inv[i].style.display="none"}
|
9 |
+
document.getElementById("wfu_attribute_value_"+key).value=val;wfu_generate_shortcode()}
|
10 |
+
function wfu_addEventHandler(obj,evt,handler){if(obj.addEventListener){obj.addEventListener(evt,handler,!1)}
|
11 |
+
else if(obj.attachEvent){obj.attachEvent('on'+evt,handler)}
|
12 |
+
else{obj['on'+evt]=handler}}
|
13 |
+
function wfu_attach_separator_dragdrop_events(){var container=document.getElementById('wfu_placements_container');var item;for(var i=0;i<container.childNodes.length;i++){item=container.childNodes[i];if(item.className=="wfu_component_separator_hor"||item.className=="wfu_component_separator_ver"){wfu_addEventHandler(item,'dragenter',wfu_separator_dragenter);wfu_addEventHandler(item,'dragover',wfu_default_dragover);wfu_addEventHandler(item,'dragleave',wfu_separator_dragleave);wfu_addEventHandler(item,'drop',wfu_separator_drop)}}}
|
14 |
+
function wfu_Attach_Admin_DragDrop_Events(){if(window.FileReader){var container=document.getElementById('wfu_placements_container');if(container){var available_container=document.getElementById('wfu_componentlist_container');var item;for(var i=0;i<container.childNodes.length;i++){item=container.childNodes[i];if(item.className=="wfu_component_box"){wfu_addEventHandler(item,'dragstart',wfu_component_dragstart);wfu_addEventHandler(item,'dragend',wfu_component_dragend)}}
|
15 |
+
for(var i=0;i<available_container.childNodes.length;i++){item=available_container.childNodes[i];if(item.className=="wfu_component_box_container"){for(var ii=0;ii<item.childNodes.length;ii++){if(item.childNodes[ii].className=="wfu_component_box wfu_inbase"){wfu_addEventHandler(item.childNodes[ii],'dragstart',wfu_component_dragstart);wfu_addEventHandler(item.childNodes[ii],'dragend',wfu_component_dragend)}}}}
|
16 |
+
item=document.getElementById('wfu_componentlist_dragdrop');wfu_addEventHandler(item,'dragenter',wfu_componentlist_dragenter);wfu_addEventHandler(item,'dragover',wfu_default_dragover);wfu_addEventHandler(item,'dragleave',wfu_componentlist_dragleave);wfu_addEventHandler(item,'drop',wfu_componentlist_drop);wfu_attach_separator_dragdrop_events()}}}
|
17 |
+
function wfu_componentlist_dragenter(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}
|
18 |
+
if(!DraggedItem)return!1;var item=document.getElementById('wfu_componentlist_dragdrop');if(item.className.indexOf("wfu_componentlist_dragdrop_dragover")==-1)
|
19 |
+
item.className+=" wfu_componentlist_dragdrop_dragover";return!1}
|
20 |
+
function wfu_componentlist_dragleave(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}
|
21 |
+
if(!DraggedItem)return!1;var item=document.getElementById('wfu_componentlist_dragdrop');item.className=item.className.replace(" wfu_componentlist_dragdrop_dragover","");return!1}
|
22 |
+
function wfu_componentlist_drop(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}
|
23 |
+
var component_raw=e.dataTransfer.getData("Component");if(!component_raw)return!1;var parts=component_raw.split("_");var component=parts[0];var multi_index=parseInt(parts[1]);var item=document.getElementById('wfu_component_box_'+component+'_'+multi_index);if(multi_index==0){item.className="wfu_component_box wfu_inbase";item.style.display="block";document.getElementById('wfu_component_box_container_'+component).appendChild(item)}
|
24 |
+
else item.parentNode.removeChild(item);var placements=wfu_admin_recreate_placements_text(null,"");wfu_admin_recreate_placements_panel(placements);document.getElementById("wfu_attribute_value_placements").value=placements;wfu_update_multiplacement_attributes();wfu_generate_shortcode();return!1}
|
25 |
+
function wfu_separator_dragenter(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}
|
26 |
+
if(!DraggedItem)return!1;if(e.target.className=="wfu_component_separator_hor"){var bar=document.getElementById('wfu_component_bar_hor');bar.style.top=e.target.offsetTop+"px";bar.style.display="block"}
|
27 |
+
else if(e.target.className=="wfu_component_separator_ver"){var bar=document.getElementById('wfu_component_bar_ver');bar.style.top=e.target.offsetTop+"px";bar.style.left=e.target.offsetLeft+"px";bar.style.display="block"}
|
28 |
+
return!1}
|
29 |
+
function wfu_default_dragover(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}
|
30 |
+
return!1}
|
31 |
+
function wfu_separator_dragleave(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}
|
32 |
+
if(!DraggedItem)return!1;if(e.target.className=="wfu_component_separator_hor"){var bar=document.getElementById('wfu_component_bar_hor');bar.style.display="none"}
|
33 |
+
else if(e.target.className=="wfu_component_separator_ver"){var bar=document.getElementById('wfu_component_bar_ver');bar.style.display="none"}
|
34 |
+
return!1}
|
35 |
+
function wfu_separator_drop(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}
|
36 |
+
var component_raw=e.dataTransfer.getData("Component");if(!component_raw)return!1;var parts=component_raw.split("_");var component=parts[0];var multi_index=parseInt(parts[1]);var item=document.getElementById('wfu_component_box_'+component+'_'+multi_index);item.style.display="none";item.className="wfu_component_box wfu_inbase";document.getElementById('wfu_component_box_container_'+component).appendChild(item);var placements=wfu_admin_recreate_placements_text(e.target,component);wfu_admin_recreate_placements_panel(placements);document.getElementById("wfu_attribute_value_placements").value=placements;wfu_update_multiplacement_attributes();wfu_generate_shortcode();return!1}
|
37 |
+
function wfu_component_dragstart(e){e=e||window.event;e.dataTransfer.setData("Component",e.target.id.replace("wfu_component_box_",""));if(e.target.className.indexOf("wfu_component_box_dragged")==-1){e.target.className+=" wfu_component_box_dragged";DraggedItem=e.target}
|
38 |
+
e.target.style.zIndex=3;var item=document.getElementById('wfu_componentlist_dragdrop');item.className="wfu_componentlist_dragdrop wfu_componentlist_dragdrop_dragover";item.style.display="block";return!1}
|
39 |
+
function wfu_component_dragend(e){e=e||window.event;DraggedItem=null;e.target.style.zIndex=1;var item=document.getElementById('wfu_componentlist_dragdrop');item.style.display="none";item.className="wfu_componentlist_dragdrop";e.target.className=e.target.className.replace(" wfu_component_box_dragged","");document.getElementById('wfu_component_bar_ver').style.display="none";document.getElementById('wfu_component_bar_hor').style.display="none";return!1}
|
40 |
+
function wfu_admin_recreate_placements_text(place,new_component){function add_item(component){if(placements!="")placements+=delim;placements+=component;delim=""}
|
41 |
+
var container=document.getElementById('wfu_placements_container');var delim="";var placements="";var component="";for(var i=0;i<container.childNodes.length;i++){item=container.childNodes[i];if(item.className=="wfu_component_separator_ver"){if(delim=="")delim="+";if(item==place){add_item(new_component);delim="+"}}
|
42 |
+
else if(item.className=="wfu_component_separator_hor"){delim="/";if(item==place){add_item(new_component);delim="/"}}
|
43 |
+
else if(item.className=="wfu_component_box")add_item(item.id.replace("wfu_component_box_","").replace(/_.*$/,""))}
|
44 |
+
return placements}
|
45 |
+
function wfu_admin_recreate_placements_panel(placements_text){var container=document.getElementById('wfu_placements_container');var item,placements,sections,itemname_raw,parts,multi_index,index_item;var itemname="";for(var i=0;i<container.childNodes.length;i++){item=container.childNodes[i];if(item.className=="wfu_component_box"){itemname_raw=item.id.replace("wfu_component_box_","");parts=itemname_raw.split("_");itemname=parts[0];multi_index=parseInt(parts[1]);if(multi_index==0){item.style.display="inline-block";item.className="wfu_component_box wfu_inbase";document.getElementById('wfu_component_box_container_'+itemname).appendChild(item)}
|
46 |
+
else item.parentNode.removeChild(item)}}
|
47 |
+
var box_containers=document.querySelectorAll('div.wfu_component_box_container');var component_used={};for(var i=0;i<box_containers.length;i++){itemname=box_containers[i].id.replace("wfu_component_box_container_","");component_used[itemname]=0;index_item=document.querySelector('div#'+box_containers[i].id+' div.wfu_component_box_index');if(index_item)index_item.innerHTML="1"}
|
48 |
+
container.innerHTML="";placements=placements_text.split("/");for(var i=0;i<placements.length;i++){item=document.createElement("DIV");item.className="wfu_component_separator_hor";item.setAttribute("draggable",!0);container.appendChild(item);item=document.createElement("DIV");item.className="wfu_component_separator_ver";item.setAttribute("draggable",!0);container.appendChild(item);sections=placements[i].split("+");for(var ii=0;ii<sections.length;ii++){item=document.querySelector('div#wfu_component_box_container_'+sections[ii]+' div.wfu_component_box.wfu_inbase');if(item){itemname_raw=item.id.replace("wfu_component_box_","");parts=itemname_raw.split("_");itemname=parts[0];multi_index=parseInt(parts[1]);if(multi_index==0)container.appendChild(item);else{component_used[itemname]++;item.id="wfu_component_box_"+itemname+"_"+(component_used[itemname]+1).toString();item.style.display="block";index_item=document.querySelector('div#'+item.id+' div.wfu_component_box_index');index_item.innerHTML=(component_used[itemname]+1).toString();item=item.cloneNode(!0);container.appendChild(item);item.id="wfu_component_box_"+itemname+"_"+component_used[itemname].toString();index_item=document.querySelector('div#'+item.id+' div.wfu_component_box_index');index_item.innerHTML=component_used[itemname].toString();wfu_addEventHandler(item,'dragstart',wfu_component_dragstart);wfu_addEventHandler(item,'dragend',wfu_component_dragend)}
|
49 |
+
item.className="wfu_component_box";item.style.display="inline-block";item=document.createElement("DIV");item.className="wfu_component_separator_ver";item.setAttribute("draggable",!0);container.appendChild(item)}}}
|
50 |
+
item=document.createElement("DIV");item.className="wfu_component_separator_hor";item.setAttribute("draggable",!0);container.appendChild(item);item=document.createElement("DIV");item.id="wfu_component_bar_hor";item.className="wfu_component_bar_hor";container.appendChild(item);item=document.createElement("DIV");item.id="wfu_component_bar_ver";item.className="wfu_component_bar_ver";container.appendChild(item);wfu_attach_separator_dragdrop_events()}
|
51 |
+
function wfu_update_multiplacement_attributes(){var box_containers=document.querySelectorAll('div.wfu_component_box_container');for(var i=0;i<box_containers.length;i++){itemname=box_containers[i].id.replace("wfu_component_box_container_","");var index_item=document.querySelector('div#'+box_containers[i].id+' div.wfu_component_box_index');if(index_item){var occurrences=Math.max(1,parseInt(index_item.innerHTML)-1);var dependencies=document.getElementsByName("wfu_attribute_governor_"+itemname);for(var j=0;j<dependencies.length;j++)
|
52 |
+
wfu_update_multiplacement_attribute(dependencies[j].value,occurrences);}}}
|
53 |
+
function wfu_update_multiplacement_attribute(attribute,occurrencies){if(attribute=='userdatalabel'){var attributes=document.querySelectorAll('div.wfu_formdata_container');var current=attributes.length;if(current<1)return;var base=attributes[0],tr0,tr;var i=2;while(i<=Math.max(current,occurrencies)){if(i>current){var new_attribute=attribute+i.toString();tr0=base.parentNode;while(tr0!=null&&tr0.tagName!='TR')tr0=tr0.parentNode;if(tr0==null||tr0.tagName!='TR')return;tr=tr0.cloneNode(!0);tr.id='tr_'+wfu_randomString(4);tr0.parentNode.appendChild(tr);var elem=document.querySelector('tr#'+tr.id+' label[for="wfu_attribute_'+attribute+'"]');elem.setAttribute('for','wfu_attribute_'+new_attribute);elem.innerHTML+=' ('+i.toString()+')';elem=document.querySelector('tr#'+tr.id+' input.wfu_attribute_governor');elem.setAttribute('name','wfu_attribute_governor_independent');elem.value=new_attribute;elem=document.querySelector('tr#'+tr.id+' div.wfu_formdata_container');elem.id+=i.toString();var def=document.getElementById('wfu_attribute_default_'+new_attribute);if(!def){def=document.createElement('INPUT');def.id='wfu_attribute_default_'+new_attribute;def.type='hidden';def.value=document.getElementById('wfu_attribute_default_'+attribute).value;document.getElementById('wfu_attribute_defaults').appendChild(def)}
|
54 |
+
var shortcode_value=document.getElementById('wfu_attribute_value_'+new_attribute);if(!shortcode_value){shortcode_value=document.createElement('INPUT');shortcode_value.id='wfu_attribute_value_'+new_attribute;shortcode_value.type='hidden';shortcode_value.value=def.value;document.getElementById('wfu_attribute_values').appendChild(shortcode_value)}
|
55 |
+
window['wfu_attribute_'+new_attribute+'_formtemplate']=window['wfu_attribute_'+attribute+'_formtemplate'];window['wfu_attribute_'+new_attribute+'_typeprops']=window['wfu_attribute_'+attribute+'_typeprops'];wfu_apply_value(new_attribute,'formfields',shortcode_value.value)}
|
56 |
+
else if(i>occurrencies){tr=attributes[i-1].parentNode;while(tr!=null&&tr.tagName!='TR')tr=tr.parentNode;if(tr==null||tr.tagName!='TR')return;tr.parentNode.removeChild(tr);wfu_update_formfield_variables()}
|
57 |
+
i++}
|
58 |
+
attributes=document.querySelectorAll('div.wfu_formdata_container');var names=[];for(var i=0;i<attributes.length;i++)
|
59 |
+
names.push(attributes[i].id.replace(/^wfu_attribute_/,""));var all_attributes=document.querySelectorAll('.wfu_formdata_all_attributes');for(var i=0;i<all_attributes.length;i++)all_attributes[i].value=names.join(",");wfu_formdata_update_all_updown_buttons(attribute)}}
|
60 |
+
function wfu_subfolders_input_changed(e){e=e||window.event;var item=e.target;var key=item.id.replace("wfu_subfolders_path_","");key=key.replace("wfu_subfolders_label_","");var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var tools_path=document.getElementById('wfu_subfolders_path_'+key);var tools_label=document.getElementById('wfu_subfolders_label_'+key);var tools_ok=document.getElementById('wfu_subfolders_ok_'+key);var old_path_value,old_label_value;var isnewitem=(document.getElementById('wfu_subfolders_isnewitem_'+key).value=="1");if(isnewitem){old_path_value="";old_label_value=""}
|
61 |
+
else{var items=list.data;item=items[list.selectedIndex];old_path_value=item.path;old_label_value=item.label}
|
62 |
+
if(tools_path.value==old_path_value&&tools_label.value==old_label_value){tools_ok.disabled=!0;if(!isnewitem)wfu_subfolders_update_nav(key)}
|
63 |
+
else{tools_ok.disabled=!1;var navs=document.getElementsByName('wfu_subfolder_nav_'+key);for(var i=0;i<navs.length;i++)navs[i].disabled=!0}}
|
64 |
+
function wfu_subfolders_auto_changed(key){var list=document.getElementById('wfu_attribute_'+key);var auto=document.getElementById('wfu_subfolders_auto_'+key);var editable=document.getElementById('wfu_subfolders_editable_'+key);var manualtext=document.getElementById('wfu_subfolders_manualtext_'+key);if(auto.checked){var manualvalue=document.getElementById("wfu_attribute_value_"+key).value;if(manualvalue.substr(0,4)!='auto')manualtext.value=manualvalue;editable.parentNode.style.display='inline';wfu_apply_value(key,'folderlist','auto'+(editable.checked?'+':''));list.disabled=!0}
|
65 |
+
else{list.disabled=!1;editable.parentNode.style.display='none';wfu_apply_value(key,'folderlist',manualtext.value)}}
|
66 |
+
function wfu_subfolders_up_clicked(key){var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var items=list.data;item=items[list.selectedIndex];var prevind=item.index-1;if(prevind<0)return;var prevpos=-1;var curind=list.selectedIndex-1;while(curind>=0){if(items[curind].level==item.level&&items[curind].index==prevind){prevpos=curind;break}
|
67 |
+
else curind --}
|
68 |
+
if(prevpos==-1)return;var children_count=0;curind=list.selectedIndex+1;while(curind<items.length){if(items[curind].level>item.level){children_count ++;curind ++}
|
69 |
+
else break}
|
70 |
+
items[prevpos].index=item.index;item.index=prevind;list.data=items.slice(0,prevpos).concat(items.slice(list.selectedIndex,list.selectedIndex+1+children_count)).concat(items.slice(prevpos,list.selectedIndex)).concat(items.slice(list.selectedIndex+1+children_count));var val=wfu_update_subfolder_list(key);list.selectedIndex=prevpos;wfu_subfolders_update_toolnav(key);item=list;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+key).value=val;wfu_generate_shortcode()}}
|
71 |
+
function wfu_subfolders_down_clicked(key){var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var items=list.data;item=items[list.selectedIndex];var nextind=item.index+1;var nextpos=-1;curind=list.selectedIndex+1;while(curind<items.length){if(items[curind].level==item.level){nextpos=curind;break}
|
72 |
+
else if(items[curind].level<item.level)break;else curind ++}
|
73 |
+
if(nextpos==-1)return;var next_children_count=0;curind=nextpos+1;while(curind<items.length){if(items[curind].level>item.level){next_children_count ++;curind ++}
|
74 |
+
else break}
|
75 |
+
items[nextpos].index=item.index;item.index=nextind;list.data=items.slice(0,list.selectedIndex).concat(items.slice(nextpos,nextpos+1+next_children_count)).concat(items.slice(list.selectedIndex,nextpos)).concat(items.slice(nextpos+1+next_children_count));var val=wfu_update_subfolder_list(key);list.selectedIndex=list.selectedIndex+next_children_count+1;wfu_subfolders_update_toolnav(key);item=list;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+key).value=val;wfu_generate_shortcode()}}
|
76 |
+
function wfu_subfolders_left_clicked(key){var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var items=list.data;item=items[list.selectedIndex];curind=list.selectedIndex+1;while(curind<items.length){if(items[curind].level>item.level){items[curind].level --;curind ++}
|
77 |
+
else break}
|
78 |
+
item.level --;var val=wfu_update_subfolder_list(key);list.data=wfu_decode_subfolder_list(key);wfu_subfolders_update_toolnav(key);item=list;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+key).value=val;wfu_generate_shortcode()}}
|
79 |
+
function wfu_subfolders_right_clicked(key){var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var items=list.data;item=items[list.selectedIndex];curind=list.selectedIndex+1;while(curind<items.length){if(items[curind].level>item.level){items[curind].level ++;curind ++}
|
80 |
+
else break}
|
81 |
+
item.level ++;var val=wfu_update_subfolder_list(key);list.data=wfu_decode_subfolder_list(key);wfu_subfolders_update_toolnav(key);item=list;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+key).value=val;wfu_generate_shortcode()}}
|
82 |
+
function wfu_subfolders_def_clicked(key){var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var items=list.data;item=items[list.selectedIndex];if(item.default)item.default=!1;else{for(var i=0;i<items.length;i++)
|
83 |
+
items[i].default=!1;item.default=!0}
|
84 |
+
var val=wfu_update_subfolder_list(key);wfu_subfolders_update_toolnav(key);item=list;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+key).value=val;wfu_generate_shortcode()}}
|
85 |
+
function wfu_subfolders_ok_clicked(key){var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var tools_path=document.getElementById('wfu_subfolders_path_'+key);var tools_label=document.getElementById('wfu_subfolders_label_'+key);if(tools_path.value==""||tools_label.value==""){alert("Path or label cannot be empty!");return}
|
86 |
+
var items=list.data;var isnewitem=(document.getElementById('wfu_subfolders_isnewitem_'+key).value=="1");if(isnewitem){var newlevel=parseInt(document.getElementById('wfu_subfolders_newitemlevel_'+key).value);var newitem={label:tools_label.value,path:tools_path.value,level:newlevel,default:!1};var newpos=parseInt(document.getElementById('wfu_subfolders_newitemindex_'+key).value);if(newpos>=items.length)items.push(newitem);else items.splice(newpos,0,newitem)}
|
87 |
+
else{item=items[list.selectedIndex];item.path=tools_path.value;item.label=tools_label.value}
|
88 |
+
var val=wfu_update_subfolder_list(key);list.data=wfu_decode_subfolder_list(key);wfu_subfolders_update_toolnav(key);item=list;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+key).value=val;wfu_generate_shortcode()}}
|
89 |
+
function wfu_subfolders_del_clicked(key){var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var items=list.data;item=items[list.selectedIndex];var children_count=0;curind=list.selectedIndex+1;while(curind<items.length){if(items[curind].level>item.level){children_count ++;curind ++}
|
90 |
+
else break}
|
91 |
+
if(children_count>0)
|
92 |
+
if(!confirm("Children items will be deleted as well. Proceed?"))return;items.splice(list.selectedIndex,1+children_count);var val=wfu_update_subfolder_list(key);list.data=wfu_decode_subfolder_list(key);wfu_subfolders_update_toolnav(key);item=list;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+key).value=val;wfu_generate_shortcode()}}
|
93 |
+
function wfu_subfolders_add_clicked(key){var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var items=list.data;var curpos=list.selectedIndex;item=items[curpos];var opts=list.options;var opt=document.createElement("option");opt.value="";opt.innerHTML="";opts.add(opt,curpos);list.selectedIndex=curpos;var tools_container=document.getElementById('wfu_subfolder_tools_'+key);var tools_path=document.getElementById('wfu_subfolders_path_'+key);var tools_label=document.getElementById('wfu_subfolders_label_'+key);var tools_ok=document.getElementById('wfu_subfolders_ok_'+key);var tools_browse=document.getElementById('wfu_subfolders_browse_'+key);tools_container.className="wfu_subfolder_tools_container";tools_label.disabled=!1;tools_ok.disabled=!0;document.getElementById('wfu_subfolders_isnewitem_'+key).value="1";document.getElementById('wfu_subfolders_newitemindex_'+key).value=curpos;document.getElementById('wfu_subfolders_newitemlevel_'+key).value=item.level;document.getElementById('wfu_subfolders_newitemlevel2_'+key).value="";tools_path.disabled=(item.level==0);tools_browse.disabled=(item.level==0);if(item.level==0){tools_path.value="{root}";tools_label.value="{upload folder}"}
|
94 |
+
else{tools_path.value="";tools_label.value=""}
|
95 |
+
var navs=document.getElementsByName('wfu_subfolder_nav_'+key);for(var i=0;i<navs.length;i++)navs[i].disabled=!0}
|
96 |
+
function wfu_subfolders_browse_clicked(key){var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var fd=null;try{var fd=new FormData()}
|
97 |
+
catch(e){}
|
98 |
+
if(fd==null)return;var container=document.getElementById('wfu_global_dialog_container');var dialog=document.getElementById('wfu_subfolders_browser_'+key);var btn=document.getElementById('wfu_subfolders_browse_'+key);var shadow=document.getElementById('wfu_subfolders_inner_shadow_'+key);var msgcont=document.getElementById('wfu_subfolders_browser_msgcont_'+key);var msg=document.getElementById('wfu_subfolders_browser_msg_'+key);var img=document.getElementById('wfu_subfolders_browser_img_'+key);var ok=document.getElementById('wfu_subfolders_browser_ok_'+key);var list=document.getElementById('wfu_subfolders_browser_list_'+key);while(list.options.length>0)list.options.remove(0);ok.disabled=!0;ok.onclick=function(){wfu_folder_browser_cancel_clicked(key)}
|
99 |
+
msg.innerHTML="loading folder contents...";img.style.display="inline";msgcont.style.display="block";container.style.display="block";dialog.style.display="block";dialog.style.left=(btn.offsetLeft+btn.offsetWidth-dialog.offsetWidth)+'px';dialog.style.top=(btn.offsetTop+btn.offsetHeight-dialog.offsetHeight)+'px';shadow.style.display="block";container.onclick=function(){wfu_folder_browser_cancel_clicked(key)};var path=document.getElementById('wfu_attribute_uploadpath').value;if(path.substr(path.length-1)=="/")path=path.substr(0,path.length-1);var paths=wfu_get_relative_path(key).split(",");var path1=path+paths[0];if(path1.substr(0)!="/")path1="/"+path1;var path2="";if(paths.length==2)path2=paths[1];fd.append("action","wfu_ajax_action_read_subfolders");fd.append("folder1",wfu_plugin_encode_string(path1));fd.append("folder2",wfu_plugin_encode_string(path2));xhr.key=key;xhr.addEventListener("load",wfu_readfolderComplete,!1);xhr.addEventListener("error",wfu_readfolderFailed,!1);xhr.addEventListener("abort",wfu_readfolderCanceled,!1);xhr.open("POST",AdminParams.wfu_ajax_url);xhr.send(fd)}
|
100 |
+
function wfu_readfolderComplete(evt){var key=evt.target.key;var msgcont=document.getElementById('wfu_subfolders_browser_msgcont_'+key);var msg=document.getElementById('wfu_subfolders_browser_msg_'+key);var img=document.getElementById('wfu_subfolders_browser_img_'+key);var list=document.getElementById('wfu_subfolders_browser_list_'+key);var ok=document.getElementById('wfu_subfolders_browser_ok_'+key);var tools_path=document.getElementById('wfu_subfolders_path_'+key);var tools_label=document.getElementById('wfu_subfolders_label_'+key);var txt=evt.target.responseText;if(txt!=-1){var start_text='wfu_read_subfolders:';var pos=evt.target.responseText.indexOf(start_text);if(pos==-1)pos=evt.target.responseText.length;var messages=evt.target.responseText.substr(0,pos);var response=evt.target.responseText.substr(pos+start_text.length,evt.target.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'){var filelist=wfu_plugin_decode_string(txt_value);var flist=filelist.split(",");var fcount=0;var opt;for(var i=0;i<flist.length;i++){if(flist[i]!=""){opt=document.createElement("option");opt.value=flist[i];opt.innerHTML=flist[i].replace("*"," ");list.add(opt);fcount ++}}
|
101 |
+
if(fcount==0){opt=document.createElement("option");opt.value="";opt.innerHTML="{empty}";opt.disabled=!0;list.add(opt)}
|
102 |
+
list.selectedIndex=-1;ok.onclick=function(){var val=list.options[list.selectedIndex].value;var level=parseInt(document.getElementById('wfu_subfolders_newitemlevel_'+key).value);if(val.substr(0,1)=="*"||level==0){document.getElementById('wfu_subfolders_newitemlevel_'+key).value=level+1;if(level>0)val=val.substr(1)}
|
103 |
+
tools_path.value=val;tools_label.value=val;wfu_folder_browser_cancel_clicked(key);wfu_subfolders_ok_clicked(key)}
|
104 |
+
msgcont.style.display="none"}
|
105 |
+
else if(txt_header=='error'){msg.innerHTML=txt_value;img.style.display="none";ok.disabled=!1}
|
106 |
+
else{msg.innerHTML='Unknown error';img.style.display="none";ok.disabled=!1}}}
|
107 |
+
function wfu_readfolderFailed(evt){var key=evt.target.key;var msg=document.getElementById('wfu_subfolders_browser_msg_'+key);var img=document.getElementById('wfu_subfolders_browser_img_'+key);var ok=document.getElementById('wfu_subfolders_browser_ok_'+key);msg.innerHTML='Unknown error';img.style.display="none";ok.disabled=!1}
|
108 |
+
function wfu_readfolderCanceled(evt){var key=evt.target.key;var msg=document.getElementById('wfu_subfolders_browser_msg_'+key);var img=document.getElementById('wfu_subfolders_browser_img_'+key);var ok=document.getElementById('wfu_subfolders_browser_ok_'+key);msg.innerHTML='Unknown error';img.style.display="none";ok.disabled=!1}
|
109 |
+
function wfu_subfolders_browser_list_changed(key){var list=document.getElementById('wfu_subfolders_browser_list_'+key);var ok=document.getElementById('wfu_subfolders_browser_ok_'+key);ok.disabled=(list.selectedIndex<0)}
|
110 |
+
function wfu_folder_browser_cancel_clicked(key){var container=document.getElementById('wfu_global_dialog_container');var dialog=document.getElementById('wfu_subfolders_browser_'+key);var btn=document.getElementById('wfu_subfolders_browse_'+key);var shadow=document.getElementById('wfu_subfolders_inner_shadow_'+key);container.onclick=null;shadow.style.display="none";dialog.style.display="none";container.style.display="none"}
|
111 |
+
function wfu_get_relative_path(key){var list=document.getElementById('wfu_attribute_'+key);if(list.selectedIndex<0)return;var items=list.data;var isnewitem=(document.getElementById('wfu_subfolders_isnewitem_'+key).value=="1");var level;if(isnewitem)level=parseInt(document.getElementById('wfu_subfolders_newitemlevel_'+key).value);else level=items[list.selectedIndex].level;var relpath="/";var curpos=list.selectedIndex-1;var curlevel=level;while(curpos>=0&&curlevel>1){if(items[curpos].level<curlevel){relpath="/"+items[curpos].path+relpath;curlevel=items[curpos].level}
|
112 |
+
curpos --}
|
113 |
+
if(isnewitem&&document.getElementById('wfu_subfolders_newitemlevel2_'+key).value=="1"&&level>0&&list.selectedIndex>0)
|
114 |
+
relpath+=","+items[list.selectedIndex-1].path;return relpath}
|
115 |
+
function wfu_subfolders_changed(key){wfu_update_subfolder_list(key);wfu_subfolders_update_toolnav(key)}
|
116 |
+
function wfu_subfolders_update_toolnav(key){var list=document.getElementById('wfu_attribute_'+key);var items,item,ind,nextind,prevlevel;var tools_container=document.getElementById('wfu_subfolder_tools_'+key);var tools_path=document.getElementById('wfu_subfolders_path_'+key);var tools_label=document.getElementById('wfu_subfolders_label_'+key);var tools_ok=document.getElementById('wfu_subfolders_ok_'+key);var tools_browse=document.getElementById('wfu_subfolders_browse_'+key);var auto=document.getElementById('wfu_subfolders_auto_'+key);document.getElementById('wfu_subfolders_isnewitem_'+key).value="";document.getElementById('wfu_subfolders_newitemindex_'+key).value="";document.getElementById('wfu_subfolders_newitemlevel_'+key).value="";document.getElementById('wfu_subfolders_newitemlevel2_'+key).value="";if(list.data==null){items=wfu_decode_subfolder_list(key);list.data=items}
|
117 |
+
else items=list.data;if(list.data.length===0){list.className='wfu_select_folders wfu_select_folders_empty';list.options[0].innerHTML=(auto.checked?'':'press here')}
|
118 |
+
else list.className='wfu_select_folders';if(list.selectedIndex<0){tools_container.className="wfu_subfolder_tools_container wfu_subfolder_tools_disabled";tools_path.disabled=!0;tools_label.disabled=!0;tools_ok.disabled=!0;tools_browse.disabled=!0;tools_label.value="";tools_path.value=""}
|
119 |
+
else if(list.selectedIndex>=list.options.length-1){tools_container.className="wfu_subfolder_tools_container";tools_label.disabled=!1;tools_ok.disabled=!0;document.getElementById('wfu_subfolders_isnewitem_'+key).value="1";document.getElementById('wfu_subfolders_newitemindex_'+key).value=items.length;var level;if(items.length==0)level=0;else if(items[items.length-1].level==0)level=1;else level=items[items.length-1].level;document.getElementById('wfu_subfolders_newitemlevel_'+key).value=level;document.getElementById('wfu_subfolders_newitemlevel2_'+key).value="1";tools_path.disabled=(level==0);tools_browse.disabled=!1;if(level==0){tools_path.value="{root}";tools_label.value="{upload folder}"}
|
120 |
+
else{tools_path.value="";tools_label.value=""}}
|
121 |
+
else{tools_container.className="wfu_subfolder_tools_container";tools_label.disabled=!1;tools_ok.disabled=!0;item=items[list.selectedIndex];tools_path.disabled=(item.level==0);tools_browse.disabled=(item.level==0);tools_label.value=item.label;tools_path.value=item.path}
|
122 |
+
var navs=document.getElementsByName('wfu_subfolder_nav_'+key);if(list.selectedIndex<0||list.selectedIndex>=list.options.length-1){for(var i=0;i<navs.length;i++)navs[i].disabled=!0}
|
123 |
+
else{wfu_subfolders_update_nav(key)}}
|
124 |
+
function wfu_subfolders_update_nav(key){var list=document.getElementById('wfu_attribute_'+key);var navs_up=document.getElementById('wfu_subfolders_up_'+key);var navs_down=document.getElementById('wfu_subfolders_down_'+key);var navs_left=document.getElementById('wfu_subfolders_left_'+key);var navs_right=document.getElementById('wfu_subfolders_right_'+key);var navs_add=document.getElementById('wfu_subfolders_add_'+key);var navs_def=document.getElementById('wfu_subfolders_def_'+key);var navs_del=document.getElementById('wfu_subfolders_del_'+key);var items=list.data;var item=items[list.selectedIndex];navs_up.disabled=(item.index<=0);ind=list.selectedIndex+1;nextind=0;while(ind<items.length){if(items[ind].level==item.level){nextind=items[ind].index;break}
|
125 |
+
else if(items[ind].level<item.level)break;else ind ++}
|
126 |
+
navs_down.disabled=(item.level==0||nextind==0);navs_left.disabled=((list.selectedIndex==0&&item.level<1)||(list.selectedIndex>0&&item.level<=1));if(list.selectedIndex>=1)prevlevel=items[list.selectedIndex-1].level;else prevlevel=0;navs_right.disabled=(item.level-prevlevel>0);navs_add.disabled=(item.level==0);navs_def.disabled=!1;navs_def.className="button"+(item.default?" wfu_subfolder_nav_pressed":"");navs_del.disabled=!1}
|
127 |
+
function wfu_decode_subfolder(data){var ret={label:"",path:"",level:0,default:!1};data=data.trim();var star_count=0;var is_default=!1;while(star_count<data.length){if(data.substr(star_count,1)=="*")star_count ++;else break}
|
128 |
+
data=data.substr(star_count,data.length-star_count);if(data.substr(0,1)=='&'){data=data.substr(1);is_default=!0}
|
129 |
+
ret.level=star_count;ret.default=is_default;var data_raw=data.split('/');if(data_raw.length==1){ret.path=data_raw[0];ret.label=data_raw[0]}
|
130 |
+
else if(data_raw.length>1){ret.path=data_raw[0];ret.label=data_raw[1]}
|
131 |
+
if(star_count==0){ret.path="{root}";if(ret.label=="")ret.label="{upload folder}"}
|
132 |
+
return ret}
|
133 |
+
function wfu_decode_subfolder_list(key){var opts=document.getElementById('wfu_attribute_'+key).options;var list=Array();var dir_levels=['root'];var last_index=[0];var subfolder_path;var prev_level=-1;for(var i=0;i<opts.length-1;i++){list.push(wfu_decode_subfolder(wfu_plugin_decode_string(opts[i].value)));if(dir_levels.length>list[i].level)dir_levels[list[i].level]=list[i].path;else dir_levels.push(list[i].path);subfolder_path="";for(j=1;j<=list[i].level;j++){subfolder_path+=dir_levels[j]+'/'}
|
134 |
+
list[i].fullpath=subfolder_path;if(last_index.length<=list[i].level)last_index.push(0);if(list[i].level>prev_level)list[i].index=0;else list[i].index=last_index[list[i].level]+1;last_index[list[i].level]=list[i].index;prev_level=list[i].level}
|
135 |
+
return list}
|
136 |
+
function wfu_update_subfolder_list(key){var opts=document.getElementById('wfu_attribute_'+key).options;var list=document.getElementById('wfu_attribute_'+key);var items=list.data;if(items==null)return;var value_raw,text_raw;var global_raw="";opts.length=items.length+1;for(var i=0;i<items.length;i ++){value_raw="";text_raw="";for(j=0;j<items[i].level;j ++){value_raw+="*";text_raw+=" "}
|
137 |
+
if(items[i].default){value_raw+="&";opts[i].className="wfu_select_folders_option_default"}
|
138 |
+
else opts[i].className="";value_raw+=items[i].path+'/'+items[i].label;text_raw+=items[i].label;opts[i].value=wfu_plugin_encode_string(value_raw);opts[i].innerHTML=text_raw;if(global_raw!="")global_raw+=",";global_raw+=value_raw}
|
139 |
+
opts[items.length].value="";opts[items.length].innerHTML="";return global_raw}
|
140 |
+
function wfu_userdata_edit_field(line,label,required){var item;for(var i=0;i<line.childNodes.length;i ++){item=line.childNodes[i];if(item.tagName=="INPUT"){if(item.type=="text"){item.value=label;wfu_attach_element_handlers(item,wfu_update_userfield_value)}
|
141 |
+
else if(item.type=="checkbox"){item.checked=required}}
|
142 |
+
else if(item.tagName=="DIV")item.className="wfu_userdata_action"}}
|
143 |
+
function wfu_formdata_edit_field(line,label,required){}
|
144 |
+
function wfu_formdata_get_field_props(key){var key_parts=key.split("_");var attribute=key_parts[0];var a='wfu_formfield_'+key;var fielddef=window['wfu_attribute_'+attribute+'_typeprops'][document.getElementById(a+'_type').value];var field={type:document.getElementById(a+'_type').value,label:document.getElementById(a+'_label').value,labelposition:document.getElementById(a+'_labelposition').value,required:(fielddef.required.substr(0,4)=="show"&&document.getElementById(a+'_required')?document.getElementById(a+'_required').checked:(fielddef.required.substr(5)=="true")),donotautocomplete:(fielddef.donotautocomplete.substr(0,4)=="show"&&document.getElementById(a+'_donotautocomplete')?document.getElementById(a+'_donotautocomplete').checked:(fielddef.donotautocomplete.substr(5)=="true")),validate:(fielddef.validate.substr(0,4)=="show"&&document.getElementById(a+'_validate')?document.getElementById(a+'_validate').checked:(fielddef.validate.substr(5)=="true")),typehook:(fielddef.typehook.substr(0,4)=="show"&&document.getElementById(a+'_typehook')?document.getElementById(a+'_typehook').checked:(fielddef.typehook.substr(5)=="true")),hintposition:(fielddef.hintposition.substr(0,4)=="show"&&document.getElementById(a+'_hintposition')?document.getElementById(a+'_hintposition').value:fielddef.hintposition.substr(5)),default:(fielddef.default.substr(0,4)=="show"&&document.getElementById(a+'_default')?document.getElementById(a+'_default').value:fielddef.default.substr(5)),data:(fielddef.data.substr(0,4)=="show"&&document.getElementById(a+'_data')?document.getElementById(a+'_data').value:fielddef.data.substr(5)),group:(fielddef.group.substr(0,4)=="show"&&document.getElementById(a+'_group')?document.getElementById(a+'_group').value:fielddef.group.substr(5)),format:(fielddef.format.substr(0,4)=="show"&&document.getElementById(a+'_format')?document.getElementById(a+'_format').value:fielddef.format.substr(5)),};return field}
|
145 |
+
function wfu_formdata_type_changed(key){var key_parts=key.split("_");var attribute=key_parts[0];var a='wfu_formfield_'+key;var line_container=document.getElementById(a+'_container');var field=wfu_formdata_get_field_props(key);var template=wfu_formdata_prepare_template(attribute,field,key);line_container.innerHTML=template;var formfield_elements=document.querySelectorAll('div#'+a+'_container input[name="wfu_formfield_elements"]');for(var i=0;i<formfield_elements.length;i++)wfu_attach_element_handlers(formfield_elements[i],wfu_update_formfield_value);wfu_formdata_update_buttons(key);wfu_update_formfield_value({target:line_container})}
|
146 |
+
function wfu_userdata_add_field(obj){var line=obj.parentNode;var newline=line.cloneNode(!0);wfu_userdata_edit_field(newline,"",!1);line.parentNode.insertBefore(newline,line.nextSibling)}
|
147 |
+
function wfu_formdata_add_field(key){var key_parts=key.split("_");var attribute=key_parts[0];var ind=key_parts[1];var container=document.getElementById('wfu_attribute_'+attribute);var prev=document.getElementById('wfu_formfield_'+key+'_container');var new_line_container=document.createElement('DIV');var new_key=attribute+'_'+wfu_randomString(4);new_line_container.id='wfu_formfield_'+new_key+'_container';new_line_container.className='wfu_formdata_line_container';container.insertBefore(new_line_container,prev.nextSibling);var field={type:'text',label:'',labelposition:'left',required:!1,donotautocomplete:!1,validate:!1,default:'',data:'',group:'',format:'',hintposition:'right',typehook:!1};var template=wfu_formdata_prepare_template(attribute,field,new_key);new_line_container.innerHTML=template;var formfield_elements=document.querySelectorAll('div#wfu_formfield_'+new_key+'_container input[name="wfu_formfield_elements"]');for(var i=0;i<formfield_elements.length;i++)wfu_attach_element_handlers(formfield_elements[i],wfu_update_formfield_value);wfu_formdata_update_buttons(key);wfu_formdata_update_buttons(new_key);wfu_update_formfield_value({target:new_line_container})}
|
148 |
+
function wfu_formdata_prepare_template(attribute,field,key){var template=wfu_plugin_decode_string(window['wfu_attribute_'+attribute+'_formtemplate']);var fielddef=window['wfu_attribute_'+attribute+'_typeprops'][field.type];var fielddef_array=window['wfu_attribute_'+attribute+'_typeprops'][0].split(",");var fieldprops_basic=["required","donotautocomplete","validate","typehook","labelposition","hintposition","default","data","group","format"];var labelpositions=["none","top","right","bottom","left"];var hintpositions=["none","inline","top","right","bottom","left"];template=template.replace(/\[\[key\]\]/g,key).replace(/\[\[t\]\]/g,field.type).replace(/\[\[label\]\]/g,field.label).replace(/\[\[s\]\]/g,field.labelposition).replace(/\[\[d\]\]/g,field.default).replace(/\[\[l\]\]/g,field.data).replace(/\[\[data_label\]\]/g,fielddef.data_label).replace(/\[\[g\]\]/g,field.group).replace(/\[\[f\]\]/g,field.format).replace(/\[\[p\]\]/g,field.hintposition);for(var i=0;i<fieldprops_basic.length;i++)template=template.replace(new RegExp("\\[\\["+fieldprops_basic[i]+"_hint\\]\\]","g"),fielddef[fieldprops_basic[i]+"_hint"]);for(var i=0;i<fielddef_array.length;i++)template=template.replace('[[type_'+fielddef_array[i]+'_selected]]',(fielddef_array[i]==field.type?' selected="selected"':''));for(var i=0;i<labelpositions.length;i++)template=template.replace('[[labelposition_'+labelpositions[i]+'_selected]]',(labelpositions[i]==field.labelposition?' selected="selected"':''));for(var i=0;i<hintpositions.length;i++)template=template.replace('[[hintposition_'+hintpositions[i]+'_selected]]',(hintpositions[i]==field.hintposition?' selected="selected"':''));template=template.replace('[[remove_disabled]]','');template=template.replace('[[up_disabled]]','');template=template.replace('[[down_disabled]]','');template=field.required?template.replace(/\[\[r\-\>\]\]|\[\[\<\-r\]\]/g,''):template.replace(/\[\[r\-\>\]\].*\[\[\<\-r\]\]/g,'');template=field.donotautocomplete?template.replace(/\[\[a\-\>\]\]|\[\[\<\-a\]\]/g,''):template.replace(/\[\[a\-\>\]\].*\[\[\<\-a\]\]/g,'');template=field.validate?template.replace(/\[\[v\-\>\]\]|\[\[\<\-v\]\]/g,''):template.replace(/\[\[v\-\>\]\].*\[\[\<\-v\]\]/g,'');template=field.typehook?template.replace(/\[\[h\-\>\]\]|\[\[\<\-h\]\]/g,''):template.replace(/\[\[h\-\>\]\].*\[\[\<\-h\]\]/g,'');template=fielddef.required.substr(0,4)=='show'?template.replace(/\[\[R\-\>\]\]|\[\[\<\-R\]\]/g,''):template.replace(/\[\[R\-\>\]\][^]*\[\[\<\-R\]\]/g,'');template=fielddef.donotautocomplete.substr(0,4)=='show'?template.replace(/\[\[A\-\>\]\]|\[\[\<\-A\]\]/g,''):template.replace(/\[\[A\-\>\]\][^]*\[\[\<\-A\]\]/g,'');template=fielddef.validate.substr(0,4)=='show'?template.replace(/\[\[V\-\>\]\]|\[\[\<\-V\]\]/g,''):template.replace(/\[\[V\-\>\]\][^]*\[\[\<\-V\]\]/g,'');template=fielddef.hintposition.substr(0,4)=='show'?template.replace(/\[\[P\-\>\]\]|\[\[\<\-P\]\]/g,''):template.replace(/\[\[P\-\>\]\][^]*\[\[\<\-P\]\]/g,'');template=fielddef.typehook.substr(0,4)=='show'?template.replace(/\[\[H\-\>\]\]|\[\[\<\-H\]\]/g,''):template.replace(/\[\[H\-\>\]\][^]*\[\[\<\-H\]\]/g,'');template=fielddef.default.substr(0,4)=='show'?template.replace(/\[\[D\-\>\]\]|\[\[\<\-D\]\]/g,''):template.replace(/\[\[D\-\>\]\][^]*\[\[\<\-D\]\]/g,'');template=fielddef.data.substr(0,4)=='show'?template.replace(/\[\[L\-\>\]\]|\[\[\<\-L\]\]/g,''):template.replace(/\[\[L\-\>\]\][^]*\[\[\<\-L\]\]/g,'');template=fielddef.group.substr(0,4)=='show'?template.replace(/\[\[G\-\>\]\]|\[\[\<\-G\]\]/g,''):template.replace(/\[\[G\-\>\]\][^]*\[\[\<\-G\]\]/g,'');template=fielddef.format.substr(0,4)=='show'?template.replace(/\[\[F\-\>\]\]|\[\[\<\-F\]\]/g,''):template.replace(/\[\[F\-\>\]\][^]*\[\[\<\-F\]\]/g,'');return template}
|
149 |
+
function wfu_userdata_remove_field(obj){var line=obj.parentNode;var container=line.parentNode;var first=null;for(var i=0;i<container.childNodes.length;i++)
|
150 |
+
if(container.childNodes[i].nodeType===1){first=container.childNodes[i];break}
|
151 |
+
if(line!=first){line.parentNode.removeChild(line);for(var i=0;i<first.childNodes.length;i++)
|
152 |
+
if(first.childNodes[i].nodeType===1){wfu_update_userfield_value({target:first.childNodes[i]});break}}}
|
153 |
+
function wfu_formdata_remove_field(key){var key_parts=key.split("_");var attribute=key_parts[0];var containers=document.querySelectorAll("div#wfu_attribute_"+attribute+" .wfu_formdata_line_container");if(containers.length<2)return;var container=document.getElementById('wfu_attribute_'+attribute);var line_container=document.getElementById('wfu_formfield_'+key+'_container');var line_container_index=0;for(var i=0;i<containers.length;i++)
|
154 |
+
if(containers[i]==line_container){line_container_index=i+1;break}
|
155 |
+
container.removeChild(line_container);containers=document.querySelectorAll("div#wfu_attribute_"+attribute+" .wfu_formdata_line_container");if(line_container_index>containers.length)line_container_index=containers.length;line_container=containers[line_container_index-1];var prev_key=line_container.id.replace(/^wfu_formfield_/,"").replace(/_container$/,"");wfu_formdata_update_buttons(prev_key);wfu_update_formfield_value({target:line_container})}
|
156 |
+
function wfu_formdata_move_field(key,direction){var key_parts=key.split("_");var attribute=key_parts[0];var all_attributes=document.querySelector("div#wfu_attribute_"+attribute+" .wfu_formdata_all_attributes").value.split(",");var attr_occur_index=all_attributes.indexOf(attribute)+1;var containers=document.querySelectorAll("div#wfu_attribute_"+attribute+" .wfu_formdata_line_container");var container=document.getElementById('wfu_attribute_'+attribute);var line_container=document.getElementById('wfu_formfield_'+key+'_container');var line_container_index=0;for(var i=0;i<containers.length;i++)
|
157 |
+
if(containers[i]==line_container){line_container_index=i+1;break}
|
158 |
+
if((direction=="up"&&attr_occur_index==1&&line_container_index==1)||(direction=="down"&&attr_occur_index==all_attributes.length&&line_container_index==containers.length))
|
159 |
+
return;var field=wfu_formdata_get_field_props(key);var other_attribute=attribute;var other_line_container=line_container;if(direction=="up"){if(line_container_index>1)
|
160 |
+
other_line_container=containers[line_container_index-2];else{other_attribute=all_attributes[attr_occur_index-2];var other_containers=document.querySelectorAll("div#wfu_attribute_"+other_attribute+" .wfu_formdata_line_container");other_line_container=other_containers[other_containers.length-1]}}
|
161 |
+
else{if(line_container_index<containers.length)
|
162 |
+
other_line_container=containers[line_container_index];else{other_attribute=all_attributes[attr_occur_index];var other_containers=document.querySelectorAll("div#wfu_attribute_"+other_attribute+" .wfu_formdata_line_container");other_line_container=other_containers[0]}}
|
163 |
+
var other_key=other_line_container.id.replace(/^wfu_formfield_/,"").replace(/_container$/,"");if(other_attribute==attribute){if(direction=="up")container.insertBefore(line_container,other_line_container);else container.insertBefore(other_line_container,line_container)}
|
164 |
+
else{var other_field=wfu_formdata_get_field_props(other_key);var template=wfu_formdata_prepare_template(other_attribute,field,other_key);other_line_container.innerHTML=template;var formfield_elements=document.querySelectorAll('div#wfu_formfield_'+other_key+'_container input[name="wfu_formfield_elements"]');for(var i=0;i<formfield_elements.length;i++)wfu_attach_element_handlers(formfield_elements[i],wfu_update_formfield_value);template=wfu_formdata_prepare_template(attribute,other_field,key);line_container.innerHTML=template;formfield_elements=document.querySelectorAll('div#wfu_formfield_'+key+'_container input[name="wfu_formfield_elements"]');for(var i=0;i<formfield_elements.length;i++)wfu_attach_element_handlers(formfield_elements[i],wfu_update_formfield_value);}
|
165 |
+
wfu_formdata_update_buttons(key);wfu_formdata_update_buttons(other_key);wfu_update_formfield_value({target:line_container});if(other_attribute!=attribute)wfu_update_formfield_value({target:other_line_container})}
|
166 |
+
function wfu_formdata_update_buttons(key){var key_parts=key.split("_");var attribute=key_parts[0];var all_attributes=document.querySelector("div#wfu_attribute_"+attribute+" .wfu_formdata_all_attributes").value.split(",");var attr_occur_index=all_attributes.indexOf(attribute)+1;var containers=document.querySelectorAll("div#wfu_attribute_"+attribute+" .wfu_formdata_line_container");var line_container=document.getElementById('wfu_formfield_'+key+'_container');var line_container_index=0;for(var i=0;i<containers.length;i++)
|
167 |
+
if(containers[i]==line_container){line_container_index=i+1;break}
|
168 |
+
var up_element=document.querySelector('div#wfu_formfield_'+key+'_container .wfu_formdata_action.wfu_formdata_action_up');var down_element=document.querySelector('div#wfu_formfield_'+key+'_container .wfu_formdata_action.wfu_formdata_action_down');var remove_elements=document.querySelectorAll('div#wfu_attribute_'+attribute+' .wfu_formdata_action_remove');up_element.className='wfu_formdata_action wfu_formdata_action_up'+(attr_occur_index==1&&line_container_index==1?' wfu_formdata_action_disabled':'');down_element.className='wfu_formdata_action wfu_formdata_action_down'+(attr_occur_index==all_attributes.length&&line_container_index==containers.length?' wfu_formdata_action_disabled':'');for(var i=0;i<remove_elements.length;i++)
|
169 |
+
remove_elements[i].className='wfu_formdata_action wfu_formdata_action_remove'+(remove_elements.length>1?'':' wfu_formdata_action_disabled');}
|
170 |
+
function wfu_formdata_update_all_updown_buttons(attribute){var all_attributes=document.querySelector("div#wfu_attribute_"+attribute+" .wfu_formdata_all_attributes").value.split(",");for(var i=0;i<all_attributes.length;i++){var ii=i+1;var containers=document.querySelectorAll("div#wfu_attribute_"+all_attributes[i]+" .wfu_formdata_line_container");for(var j=0;j<containers.length;j++){var jj=j+1;var key=containers[j].id.replace(/^wfu_formfield_/,"").replace(/_container$/,"");var up_element=document.querySelector('div#wfu_formfield_'+key+'_container .wfu_formdata_action.wfu_formdata_action_up');var down_element=document.querySelector('div#wfu_formfield_'+key+'_container .wfu_formdata_action.wfu_formdata_action_down');up_element.className='wfu_formdata_action wfu_formdata_action_up'+(ii==1&&jj==1?' wfu_formdata_action_disabled':'');down_element.className='wfu_formdata_action wfu_formdata_action_down'+(ii==all_attributes.length&&jj==containers.length?' wfu_formdata_action_disabled':'')}}}
|
171 |
+
function wfu_generate_shortcode(){var shortcode_tag=document.getElementById("wfu_shortcode_tag").value;var defaults=document.getElementById("wfu_attribute_defaults");var values=document.getElementById("wfu_attribute_values");var item;var attribute="";var value="";var shortcode_full="["+shortcode_tag;var shortcode="";for(var i=0;i<defaults.childNodes.length;i++){item=defaults.childNodes[i];if(item.nodeType===1){attribute=item.id.replace("wfu_attribute_default_","");value=document.getElementById("wfu_attribute_value_"+attribute).value;if(item.value!=value)
|
172 |
+
shortcode+=" "+attribute+"=\""+value+"\""}}
|
173 |
+
shortcode_full+=shortcode+"]";document.getElementById("wfu_shortcode").value=shortcode_full;ShortcodeString=shortcode.substr(1);if(document.getElementById("wfu_update_shortcode"))document.getElementById("wfu_update_shortcode").disabled=(wfu_plugin_encode_string(shortcode_full)==document.getElementById("wfu_shortcode_original_enc").value);if(Autosave)wfu_schedule_save_shortcode()}
|
174 |
function wfu_update_text_value(e){e=e||window.event;var item=e.target;var attribute=item.id.replace("wfu_attribute_","");var val=item.value;val=val.replace(/(\r\n|\n|\r)/gm,"%n%");val=val.replace(/\"/gm,"%dq%");val=val.replace(/\[/gm,"%brl%");val=val.replace(/\]/gm,"%brr%");if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+attribute).value=val;wfu_generate_shortcode()}}
|
175 |
function wfu_update_date_value(e){e=e||window.event;var item=e.target;var attribute=item.id.replace("wfu_attribute_","");var val=item.value;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+attribute).value=val;wfu_generate_shortcode()}}
|
176 |
function wfu_update_stringmatch_textvalue(e){e=e||window.event;var item=e.target;var attribute=item.id.replace("wfu_attribute_","");attribute=attribute.replace("_matchfield","").replace("_matchvalue","");wfu_update_stringmatch_value(attribute)}
|
177 |
+
function wfu_update_triplecolor_value(e){e=e||window.event;var item=e.target;var attribute=item.id.replace("wfu_attribute_","");attribute=attribute.replace("_color","");attribute=attribute.replace("_bgcolor","");attribute=attribute.replace("_borcolor","");item=document.getElementById("wfu_attribute_"+attribute+"_color");var val=item.value+","+document.getElementById("wfu_attribute_"+attribute+"_bgcolor").value+","+document.getElementById("wfu_attribute_"+attribute+"_borcolor").value;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+attribute).value=val;wfu_generate_shortcode()}}
|
178 |
+
function wfu_update_dimension_value(e){e=e||window.event;var item=e.target;var attribute=item.name.replace("wfu_dimension_elements_","");var group=document.getElementsByName(item.name);item=group[0];var val="";var dimname="";for(var i=0;i<group.length;i++){dimname=group[i].id.replace("wfu_attribute_"+attribute+"_","");if(val!=""&&group[i].value!="")val+=", ";if(group[i].value!="")val+=dimname+":"+group[i].value}
|
179 |
+
if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+attribute).value=val;wfu_generate_shortcode()}}
|
180 |
+
function wfu_update_ptext_value(e){e=e||window.event;var item=e.target;var attribute=item.id.replace("wfu_attribute_","");attribute=attribute.substr(2);var singular=document.getElementById("wfu_attribute_s_"+attribute).value;var plural=document.getElementById("wfu_attribute_p_"+attribute).value;var val=singular+"/"+plural;if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+attribute).value=val}
|
181 |
+
wfu_generate_shortcode()}
|
182 |
+
function wfu_update_mchecklist_value(attribute){var value="";var mchecklist=document.getElementById("wfu_attribute_"+attribute);var checkall=document.getElementById("wfu_attribute_"+attribute+"_all");if(checkall.checked){jQuery("#wfu_attribute_"+attribute+" input").prop('disabled',!0);jQuery("#wfu_attribute_"+attribute+" input").prop('checked',!0);value="all"}
|
183 |
+
else{jQuery("#wfu_attribute_"+attribute+" input").prop('disabled',!1);jQuery("#wfu_attribute_"+attribute+" input").each(function(){if(jQuery(this).prop('checked'))
|
184 |
+
value+=","+jQuery(this).next().html()});value=value.substr(1)}
|
185 |
+
document.getElementById("wfu_attribute_value_"+attribute).value=value;wfu_generate_shortcode()}
|
186 |
+
function wfu_update_rolelist_value(attribute){var value="";var rolelist=document.getElementById("wfu_attribute_"+attribute);var guests=document.getElementById("wfu_attribute_"+attribute+"_guests");var checkall=document.getElementById("wfu_attribute_"+attribute+"_all");if(checkall.checked){rolelist.disabled=!0;value="all"}
|
187 |
+
else{rolelist.disabled=!1;var options=rolelist.options;for(var i=0;i<options.length;i++)
|
188 |
+
if(options[i].selected){if(value!="")value+=",";value+=options[i].value}}
|
189 |
+
if(guests.checked){if(value!="")value+=",";value+="guests"}
|
190 |
+
document.getElementById("wfu_attribute_value_"+attribute).value=value;wfu_generate_shortcode()}
|
191 |
+
function wfu_update_userlist_value(attribute){var value="";var userlist=document.getElementById("wfu_attribute_"+attribute);var only_current=document.getElementById("wfu_attribute_"+attribute+"_current");var guests=document.getElementById("wfu_attribute_"+attribute+"_guests");var checkall=document.getElementById("wfu_attribute_"+attribute+"_all");if(only_current&&only_current.checked){userlist.disabled=!0;checkall.disabled=!0;guests.disabled=!0;value="current"}
|
192 |
+
else{checkall.disabled=!1;guests.disabled=!1;if(checkall.checked){userlist.disabled=!0;value="all"}
|
193 |
+
else{userlist.disabled=!1;var options=userlist.options;for(var i=0;i<options.length;i++)
|
194 |
+
if(options[i].selected){if(value!="")value+=",";value+=options[i].value}}
|
195 |
+
if(guests.checked){if(value!="")value+=",";value+="guests"}}
|
196 |
+
document.getElementById("wfu_attribute_value_"+attribute).value=value;wfu_generate_shortcode()}
|
197 |
+
function wfu_update_postlist_value(attribute){var value="";var userlist=Array();var checkall=Array();var postlist=document.getElementById("wfu_attribute_"+attribute+"_postlist").value.split(",");for(var i=0;i<postlist.length;i++){userlist.push(document.getElementById("wfu_attribute_"+attribute+"_"+postlist[i]));checkall.push(document.getElementById("wfu_attribute_"+attribute+"_all_"+postlist[i]))}
|
198 |
+
var only_current=document.getElementById("wfu_attribute_"+attribute+"_current");if(only_current&&only_current.checked){for(var i=0;i<postlist.length;i++){userlist[i].disabled=!0;checkall[i].disabled=!0}
|
199 |
+
value="current"}
|
200 |
+
else{var allchecked=!0;value="";for(var i=0;i<postlist.length;i++){checkall[i].disabled=!1;if(checkall[i].checked){userlist[i].disabled=!0;if(value!="")value+=",";value+="all"+postlist[i]}
|
201 |
+
else{userlist[i].disabled=!1;allchecked=!1;var options=userlist[i].options;for(var j=0;j<options.length;j++)
|
202 |
+
if(options[j].selected){if(value!="")value+=",";value+=options[j].value}}}
|
203 |
+
if(allchecked)value="all"}
|
204 |
+
document.getElementById("wfu_attribute_value_"+attribute).value=value;wfu_generate_shortcode()}
|
205 |
+
function wfu_update_bloglist_value(attribute){var value="";var bloglist=document.getElementById("wfu_attribute_"+attribute);var only_current=document.getElementById("wfu_attribute_"+attribute+"_current");var checkall=document.getElementById("wfu_attribute_"+attribute+"_all");if(only_current&&only_current.checked){bloglist.disabled=!0;checkall.disabled=!0;value="current"}
|
206 |
+
else{checkall.disabled=!1;if(checkall.checked){bloglist.disabled=!0;value="all"}
|
207 |
+
else{bloglist.disabled=!1;var options=bloglist.options;for(var i=0;i<options.length;i++)
|
208 |
+
if(options[i].selected){if(value!="")value+=",";value+=options[i].value}}}
|
209 |
+
document.getElementById("wfu_attribute_value_"+attribute).value=value;wfu_generate_shortcode()}
|
210 |
+
function wfu_update_stringmatch_value(attribute){var matchfield=document.getElementById("wfu_attribute_"+attribute+"_matchfield").value;var matchcriterion=document.getElementById("wfu_attribute_"+attribute+"_matchcriterion").value;var matchvalue=document.getElementById("wfu_attribute_"+attribute+"_matchvalue").value;matchfield=matchfield.replace(";","");if(matchfield.trim()=="")document.getElementById("wfu_attribute_value_"+attribute).value="";else document.getElementById("wfu_attribute_value_"+attribute).value="field:"+matchfield+";criterion:"+matchcriterion+";value:"+matchvalue;wfu_generate_shortcode()}
|
211 |
+
function wfu_update_userfield_value(e){e=e||window.event;var item=e.target;var line=item.parentNode;var container=line.parentNode;var fieldval="";var fieldreq=!1;var val="";for(var i=0;i<container.childNodes.length;i++){line=container.childNodes[i];if(line.tagName==="DIV"){for(var j=0;j<line.childNodes.length;j++)
|
212 |
+
if(line.childNodes[j].tagName=="INPUT"){if(line.childNodes[j].type=="text"){fieldval=line.childNodes[j].value;if(i==0)item=line.childNodes[j]}
|
213 |
+
else if(line.childNodes[j].type=="checkbox")
|
214 |
+
fieldreq=line.childNodes[j].checked}
|
215 |
+
if(val!=""&&fieldval!="")val+="/";if(fieldval!=""&&fieldreq)val+="*";if(fieldval!="")val+=fieldval}}
|
216 |
+
if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_userdatalabel").value=val;wfu_generate_shortcode();wfu_update_formfield_variables()}}
|
217 |
+
function wfu_update_formfield_value(e){e=e||window.event;var item=e.target;var attribute=item.id.match(/^wfu_formfield_(.*?)_/)[1];var containers=document.querySelectorAll("div#wfu_attribute_"+attribute+" .wfu_formdata_line_container");var val="";for(var i=0;i<containers.length;i++){var part="";var ind=containers[i].id.match(/^wfu_formfield_.*?_(.*?)_/)[1];var key=attribute+"_"+ind;var label=document.getElementById("wfu_formfield_"+key+"_label").value;if(label.trim()!=""){part=label.trim();var type=document.getElementById("wfu_formfield_"+key+"_type").value;var typeprops=window["wfu_attribute_"+attribute+"_typeprops"];part+="|t:"+type;part+="|s:"+document.getElementById("wfu_formfield_"+key+"_labelposition").value;if(typeprops[type].required.substr(0,4)=="show")part+="|r:"+(document.getElementById("wfu_formfield_"+key+"_required").checked?"1":"0");if(typeprops[type].donotautocomplete.substr(0,4)=="show")part+="|a:"+(document.getElementById("wfu_formfield_"+key+"_donotautocomplete").checked?"1":"0");if(typeprops[type].validate.substr(0,4)=="show")part+="|v:"+(document.getElementById("wfu_formfield_"+key+"_validate").checked?"1":"0");if(typeprops[type].typehook.substr(0,4)=="show")part+="|h:"+(document.getElementById("wfu_formfield_"+key+"_typehook").checked?"1":"0");if(typeprops[type].hintposition.substr(0,4)=="show")part+="|p:"+document.getElementById("wfu_formfield_"+key+"_hintposition").value;if(typeprops[type].default.substr(0,4)=="show")part+="|d:"+document.getElementById("wfu_formfield_"+key+"_default").value;if(typeprops[type].data.substr(0,4)=="show")part+="|l:"+document.getElementById("wfu_formfield_"+key+"_data").value;if(typeprops[type].group.substr(0,4)=="show")part+="|g:"+document.getElementById("wfu_formfield_"+key+"_group").value;if(typeprops[type].format.substr(0,4)=="show")part+="|f:"+document.getElementById("wfu_formfield_"+key+"_format").value}
|
218 |
+
if(part!=""){if(val!="")val+="/";val+=part}}
|
219 |
+
if(val!==item.oldVal){item.oldVal=val;document.getElementById("wfu_attribute_value_"+attribute).value=val;wfu_generate_shortcode();wfu_update_formfield_variables()}}
|
220 |
+
function wfu_update_formfield_variables(){var userdata=document.getElementById("wfu_attribute_value_userdatalabel");if(!userdata)return;var container=document.getElementById("wfu_wrapper");var shadows=document.getElementsByClassName("wfu_shadow_userdata","div",container);var selects=document.getElementsByName("wfu_formfield_select");for(var i=0;i<selects.length;i++)selects[i].style.display="none";if(shadows.length==0)return;if(shadows[0].style.display=="block")return;var options_str='<option style="display:none;">%userdataXXX%</option>';var userfields=userdata.value.replace(/\//g,"[/]").replace(/\(.*\)/,function(m){return m.replace(/\[\/\]/g,"/")}).split("[/]");var ind=2;while(document.getElementById("wfu_attribute_userdatalabel"+ind)){var userfields2=document.getElementById("wfu_attribute_value_userdatalabel"+ind).value.replace(/\//g,"[/]").replace(/\(.*\)/,function(m){return m.replace(/\[\/\]/g,"/")}).split("[/]");userfields=userfields.concat(userfields2);ind++}
|
221 |
+
var field="";var pos=0;ind=1;for(var i=0;i<userfields.length;i++){field=userfields[i];if(field[0]=="*")field=field.substr(1);pos=field.indexOf("|");if(pos>-1)field=field.substr(0,pos);if(field.trim()!=""){options_str+='<option value="%userdata'+ind+'%">'+ind+': '+field.trim()+'</option>';ind++}}
|
222 |
+
for(var i=0;i<selects.length;i++){selects[i].innerHTML=options_str;selects[i].style.display="inline-block"}}
|
223 |
+
function wfu_attach_element_handlers(item,handler){var elem_events=['DOMAttrModified','textInput','input','change','keypress','paste','focus','propertychange'];for(var i=0;i<elem_events.length;i++)
|
224 |
+
wfu_addEventHandler(item,elem_events[i],handler);}
|
225 |
+
function wfu_Attach_Admin_Events(autosave_shortcode){Autosave=autosave_shortcode;wfu_generate_shortcode();wfu_update_formfield_variables();wfu_Attach_Admin_DragDrop_Events();var text_elements=document.getElementsByName("wfu_text_elements");for(var i=0;i<text_elements.length;i++)wfu_attach_element_handlers(text_elements[i],wfu_update_text_value);var ptext_elements=document.getElementsByName("wfu_ptext_elements");for(var i=0;i<ptext_elements.length;i++)wfu_attach_element_handlers(ptext_elements[i],wfu_update_ptext_value);var stringmatch_elements=document.getElementsByName("wfu_stringmatch_elements");for(var i=0;i<stringmatch_elements.length;i++)wfu_attach_element_handlers(stringmatch_elements[i],wfu_update_stringmatch_textvalue);var triplecolor_elements=document.getElementsByName("wfu_triplecolor_elements");for(var i=0;i<triplecolor_elements.length;i++)wfu_attach_element_handlers(triplecolor_elements[i],wfu_update_triplecolor_value);var dimension_elements=document.getElementsByName("wfu_dimension_elements_widths");for(var i=0;i<dimension_elements.length;i++)wfu_attach_element_handlers(dimension_elements[i],wfu_update_dimension_value);dimension_elements=document.getElementsByName("wfu_dimension_elements_heights");for(var i=0;i<dimension_elements.length;i++)wfu_attach_element_handlers(dimension_elements[i],wfu_update_dimension_value);var userfield_elements=document.getElementsByName("wfu_userfield_elements");for(var i=0;i<userfield_elements.length;i++)wfu_attach_element_handlers(userfield_elements[i],wfu_update_userfield_value);var formfield_elements=document.getElementsByName("wfu_formfield_elements");for(var i=0;i<formfield_elements.length;i++)wfu_attach_element_handlers(formfield_elements[i],wfu_update_formfield_value);var subfolder_input_elements=document.getElementsByName("wfu_subfolder_tools_input");for(var i=0;i<subfolder_input_elements.length;i++)wfu_attach_element_handlers(subfolder_input_elements[i],wfu_subfolders_input_changed);var wfu_columnprops_elements=document.getElementsByName("wfu_columnprops_elements");for(var i=0;i<wfu_columnprops_elements.length;i++)wfu_attach_element_handlers(wfu_columnprops_elements[i],wfu_columnprops_element_changed);if(document.getElementById("wfu_shortcode_postid").value!="")setTimeout(function(){wfu_check_page_obsolescence()},CheckObsolescenceTimeOut)}
|
226 |
function wfu_insert_variable(obj){var attr=obj.className.replace("wfu_variable wfu_variable_","");var inp=document.getElementById("wfu_attribute_"+attr);var pos=inp.selectionStart;var prevval=inp.value;inp.value=prevval.substr(0,pos)+obj.innerHTML+prevval.substr(pos);wfu_update_text_value({target:inp})}
|
227 |
function wfu_insert_userfield_variable(obj){var attr=obj.className.replace("wfu_variable wfu_variable_","");var inp=document.getElementById("wfu_attribute_"+attr);var pos=inp.selectionStart;var prevval=inp.value;inp.value=prevval.substr(0,pos)+obj.value+prevval.substr(pos);obj.value="%userdataXXX%";wfu_update_text_value({target:inp})}
|
228 |
+
function wfu_columns_itemclicked(obj,attribute){var select=obj.parentNode;if(select.tagName!='SELECT')return;for(var i=0;i<select.options.length;i++)
|
229 |
+
select.options[i].selected=(select.options[i]==obj);wfu_update_column_props(attribute)}
|
230 |
+
function wfu_columns_buttonaction(attribute,action){var source=document.getElementById("wfu_attribute_"+attribute+"_sourcelist");var target=document.getElementById("wfu_attribute_"+attribute);if(action=="add"){for(var i=0;i<source.options.length;i++)
|
231 |
+
if(source.options[i].selected||source.options[i].className=="wfu_columns_item_required"){var found=!1;var sou=source.options[i].value.replace(/:.*/,"");for(var j=0;j<target.options.length;j++){var tar=target.options[j].value.replace(/:.*/,"");if(tar==sou){found=!0;break}}
|
232 |
+
if(!found){var parts=source.options[i].value.match(/(.*?):(.*?)\/(.*)/);var item_name=parts[1];var sorttype=(item_name=="custom"?"+-"+(parts[2]==""?"s":parts[2]):(parts[2]!=""?"-+"+parts[2]:""));var title=parts[3];if(item_name=="custom")item_name="custom1";var opt=document.createElement('OPTION');opt.value=item_name+":"+sorttype+"/"+source.options[i].innerHTML+"/"+title;opt.innerHTML=source.options[i].innerHTML+(title!=""&&title!=source.options[i].innerHTML?" ("+title+")":"");opt.className=source.options[i].className;opt.onclick=source.options[i].onclick;target.appendChild(opt);target.selectedIndex=target.options.length-1}}}
|
233 |
+
else if(action=="del"){var i=0;while(i<target.options.length){if(target.options[i].selected&&target.options[i].className!="wfu_columns_item_required")
|
234 |
+
target.options.remove(i);else i++}}
|
235 |
+
else if(action=="up"||action=="down"){var ind=-1;for(var i=0;i<target.options.length;i++)
|
236 |
+
if(target.options[i].selected&&ind==-1)ind=i;else if(target.options[i].selected&&ind>-1)
|
237 |
+
target.options[i].selected=!1;if(action=="up"&&ind>0)
|
238 |
+
target.insertBefore(target.options[ind],target.options[ind-1]);else if(action=="down"&&ind<target.options.length-1)
|
239 |
+
target.insertBefore(target.options[ind+1],target.options[ind])}
|
240 |
+
wfu_update_column_props(attribute);wfu_update_columns(attribute)}
|
241 |
+
function wfu_update_column_props(attribute){var target=document.getElementById("wfu_attribute_"+attribute);var props_table=document.getElementById("wfu_attribute_"+attribute+"_columnprops_container");var props_title=document.getElementById("wfu_attribute_"+attribute+"_columnprops_title");var props_title_label=document.getElementById("wfu_attribute_"+attribute+"_columnprops_title_label");var props_id=document.getElementById("wfu_attribute_"+attribute+"_columnprops_id");var props_id_label=document.getElementById("wfu_attribute_"+attribute+"_columnprops_id_label");var props_sort=document.getElementById("wfu_attribute_"+attribute+"_columnprops_sort");var props_sort_label=document.getElementById("wfu_attribute_"+attribute+"_columnprops_sort_label");var props_sorttype=document.getElementById("wfu_attribute_"+attribute+"_columnprops_sorttype");var props_sorttype_label=document.getElementById("wfu_attribute_"+attribute+"_columnprops_sorttype_label");var index=target.selectedIndex;if(props_sorttype.options[0].value=="")props_sorttype.options.remove(0);if(index==-1){props_table.className="wfu_columnprops_container wfu_columnprops_container_disabled";props_title.value="";props_title.disabled=!0;props_id.value="";props_id.disabled=!0;props_sort.checked=!1;props_sort.disabled=!0;props_sorttype.selectedIndex=-1;props_sorttype.disabled=!0}
|
242 |
+
else{var parts=target.options[index].value.match(/(.*?):(.*?)\/(.*?)\/(.*)/);var item_name=parts[1];var fieldid_enabled=(item_name.substr(0,6)=="custom");var fieldid_value=(fieldid_enabled?item_name.substr(6):"");var sortable_enabled=(parts[2]!="");var sortable=(sortable_enabled&&parts[2].substr(1,1)=="+");var sorttype_enabled=(sortable&&parts[2].substr(0,1)=="+");var sorttype=(sortable?parts[2].substr(2):"");var title=parts[4];props_table.className="wfu_columnprops_container";props_title.value=title;props_title.disabled=!1;props_id_label.className=(fieldid_enabled?"":"wfu_columnprops_label_disabled");props_id.value=fieldid_value;props_id.disabled=!fieldid_enabled;props_sort_label.className=(sortable_enabled?"":"wfu_columnprops_label_disabled");props_sort.checked=sortable;props_sort.disabled=!sortable_enabled;props_sorttype_label.className=(sorttype_enabled?"":"wfu_columnprops_label_disabled");props_sorttype.value=sorttype;props_sorttype.disabled=!sorttype_enabled}}
|
243 |
+
function wfu_columnprops_element_changed(e){e=e||window.event;var item=e.target;var attribute=item.id.match(/^wfu_attribute_(.*?)_columnprops_/)[1];var target=document.getElementById("wfu_attribute_"+attribute);var props_title=document.getElementById("wfu_attribute_"+attribute+"_columnprops_title");var props_id=document.getElementById("wfu_attribute_"+attribute+"_columnprops_id");var props_sort=document.getElementById("wfu_attribute_"+attribute+"_columnprops_sort");var props_sorttype=document.getElementById("wfu_attribute_"+attribute+"_columnprops_sorttype");var index=target.selectedIndex;if(index==-1)return;var parts=target.options[index].value.match(/(.*?):(.*?)\/(.*?)\/(.*)/);var item_name=parts[1];var flat_name=(item_name.substr(0,6)=="custom"?"custom":item_name);var fieldid_enabled=(flat_name=="custom");var fieldid_value=(fieldid_enabled?(parseInt(props_id.value)>=1?props_id.value:"1"):"");var sort=(parts[2]!=""?parts[2].substr(0,1)+(props_sort.checked?"+":"-")+(props_sorttype.value!=""?props_sorttype.value:(parts[2].substr(2)!=""?parts[2].substr(2):"s")):"");var label=parts[3];var title=(props_title.value!=""?props_title.value:label);target.options[index].value=flat_name+fieldid_value+":"+sort+"/"+label+"/"+title;target.options[index].innerHTML=label+(title!=label?" ("+title+")":"");wfu_update_column_props(attribute);wfu_update_columns(attribute)}
|
244 |
+
function wfu_update_columns(attribute){var target=document.getElementById("wfu_attribute_"+attribute);var columns="";for(var i=0;i<target.options.length;i++){var parts=target.options[i].value.match(/(.*?):(.*?)\/(.*?)\/(.*)/);var col=parts[1]+":"+(parts[2].substr(1,1)=="+"?parts[2].substr(2):"")+"/"+parts[4];if(columns!="")columns+=",";columns+=col}
|
245 |
+
document.getElementById("wfu_attribute_value_"+attribute).value=columns;wfu_generate_shortcode()}
|
246 |
+
function wfu_GetHttpRequestObject(){var xhr=null;try{xhr=new XMLHttpRequest()}
|
247 |
+
catch(e){try{xhr=new ActiveXObject("Msxml2.XMLHTTP")}
|
248 |
+
catch(e2){try{xhr=new ActiveXObject("Microsoft.XMLHTTP")}
|
249 |
+
catch(e){}}}
|
250 |
+
if(xhr==null&&window.createRequest){try{xmlhttp=window.createRequest()}
|
251 |
+
catch(e){}}
|
252 |
+
return xhr}
|
253 |
+
function wfu_plugin_encode_string(str){var i=0;var newstr="";var num;var hex="";for(i=0;i<str.length;i++){num=str.charCodeAt(i);if(num>=2048)num=(((num&16773120)|917504)<<4)+(((num&4032)|8192)<<2)+((num&63)|128);else if(num>=128)num=(((num&65472)|12288)<<2)+((num&63)|128);hex=num.toString(16);if(hex.length==1||hex.length==3||hex.length==5)hex="0"+hex;newstr+=hex}
|
254 |
+
return newstr}
|
255 |
+
function wfu_plugin_decode_string(str){var i=0;var newstr="";var num,val;while(i<str.length){num=parseInt(str.substr(i,2),16);if(num<128)val=num;else if(num<224)val=((num&31)<<6)+(parseInt(str.substr((i+=2),2),16)&63);else val=((num&15)<<12)+((parseInt(str.substr((i+=2),2),16)&63)<<6)+(parseInt(str.substr((i+=2),2),16)&63);newstr+=String.fromCharCode(val);i+=2}
|
256 |
+
return newstr}
|
257 |
+
function wfu_randomString(len){var chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";var string_length=len;var randomstring='';for(var i=0;i<string_length;i++){var rnum=Math.floor(Math.random()*chars.length);randomstring+=chars.substring(rnum,rnum+1)}
|
258 |
+
return randomstring}
|
259 |
+
function wfu_schedule_save_shortcode(){var d=new Date();var dt=ShortcodeNextSave-d.getTime();if(ShortcodeTimeOut!=null){clearTimeout(ShortcodeTimeOut);ShortcodeTimeOut=null}
|
260 |
+
if(dt<=0)wfu_save_shortcode();else ShortcodeTimeOut=setTimeout(function(){wfu_save_shortcode()},dt)}
|
261 |
+
function wfu_check_page_obsolescence(){if(PageObsolete||PageUpdating||document.getElementById("wfu_shortcode_postid").value=="")return}
|
262 |
+
function wfu_save_shortcode(){if(PageObsolete)return;var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;PageUpdating=!0;document.getElementById("wfu_update_failed_message").style.display="none";var url=AdminParams.wfu_ajax_url;params=new Array(8);params[0]=new Array(2);params[0][0]='action';params[0][1]='wfu_ajax_action_save_shortcode';params[1]=new Array(2);params[1][0]='shortcode';params[1][1]=wfu_plugin_encode_string(ShortcodeString);params[2]=new Array(2);params[2][0]='shortcode_original';params[2][1]=document.getElementById("wfu_shortcode_original_enc").value;params[3]=new Array(2);params[3][0]='post_id';params[3][1]=document.getElementById("wfu_shortcode_postid").value;params[4]=new Array(2);params[4][0]='post_hash';params[4][1]=document.getElementById("wfu_shortcode_posthash").value;params[5]=new Array(2);params[5][0]='shortcode_position';params[5][1]=document.getElementById("wfu_shortcode_position").value;params[6]=new Array(2);params[6][0]='shortcode_tag';params[6][1]=document.getElementById("wfu_shortcode_tag").value;params[7]=new Array(2);params[7][0]='widget_id';params[7][1]=document.getElementById("wfu_shortcode_widgetid").value;var parameters='';for(var i=0;i<params.length;i++){parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1])}
|
263 |
+
var d=new Date();if(Autosave)ShortcodeNextSave=d.getTime()+5000;else if(document.getElementById("wfu_update_shortcode"))document.getElementById("wfu_update_shortcode_wait").style.display="inline";xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){PageUpdating=!1;var start_text='wfu_save_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);pos=response.indexOf(":");var txt_header=response.substr(0,pos);txt_value=response.substr(pos+1,response.length-pos-1);if(txt_header=="success"){if(Autosave){document.getElementById("wfu_save_label").innerHTML="saved";document.getElementById("wfu_save_label").className="wfu_save_label";document.getElementById("wfu_save_label").style.opacity=1;wfu_fadeout_element(300);ShortcodeNextSave=d.getTime()+1000;if(ShortcodeTimeOut!=null)wfu_schedule_save_shortcode()}
|
264 |
+
else if(document.getElementById("wfu_update_shortcode")){document.getElementById("wfu_update_shortcode_wait").style.display="none";document.getElementById("wfu_update_shortcode").disabled=!0;if(window.plugin_window){window.plugin_window.location.reload(!0)}}
|
265 |
+
if(document.getElementById("wfu_shortcode_postid").value!=""){var shortcode_tag=document.getElementById("wfu_shortcode_tag").value;document.getElementById("wfu_shortcode_original_enc").value=wfu_plugin_encode_string("["+shortcode_tag+" "+ShortcodeString+"]");document.getElementById("wfu_shortcode_posthash").value=txt_value;setTimeout(function(){wfu_check_page_obsolescence()},CheckObsolescenceTimeOut)}}
|
266 |
+
else{if(Autosave){document.getElementById("wfu_save_label").innerHTML="not saved";document.getElementById("wfu_save_label").className="wfu_save_label_fail";document.getElementById("wfu_save_label").style.opacity=1;wfu_fadeout_element(300)}
|
267 |
+
if(txt_header=="fail"){if(txt_value=="post_modified"){PageObsolete=!0;if(document.getElementById("wfu_update_shortcode"))document.getElementById("wfu_update_shortcode").disabled=!0;document.getElementById("wfu_update_rejected_message").style.display="block"}
|
268 |
+
else{document.getElementById("wfu_update_failed_message").style.display="block"}}}}}};xhr.send(parameters)}
|
269 |
+
function wfu_adjust_opacity(opacity){document.getElementById("wfu_save_label").style.opacity=opacity}
|
270 |
+
function wfu_fadeout_element(interval){var reps=20.0;var op=0.0;for(var i=0;i<reps;i++){op=1.0-i/reps;setTimeout('wfu_adjust_opacity("'+op.toString()+'")',i*interval/reps)}
|
271 |
+
setTimeout('wfu_adjust_opacity("0.0")',i*interval/reps)}
|
272 |
+
function wfu_apply_value(attribute,type,value){if(type=="onoff"){document.getElementById("wfu_attribute_"+attribute).className="wfu_onoff_container_"+(value!="true"?"on":"off");wfu_admin_onoff_clicked(attribute)}
|
273 |
+
else if(type=="text"||type=="ltext"||type=="integer"||type=="float"||type=="mtext"||type=="color"){var item=document.getElementById("wfu_attribute_"+attribute);value=value.replace(/\%n\%/gm,"\n");value=value.replace(/\%dq\%/gm,"\"");value=value.replace(/\%brl\%/gm,"[");value=value.replace(/\%brr\%/gm,"]");if(type=="color"){var rgb=colourNameToHex(value);if(!rgb)rgb=value;jQuery('#wfu_attribute_'+attribute).wpColorPicker('color',rgb)}
|
274 |
+
item.value=value;wfu_update_text_value({target:item})}
|
275 |
+
else if(type=="date"){var item=document.getElementById("wfu_attribute_"+attribute);item.value=value;wfu_update_date_value({target:item})}
|
276 |
+
else if(type=="placements"){wfu_admin_recreate_placements_panel(value);document.getElementById("wfu_attribute_value_placements").value=value;wfu_generate_shortcode()}
|
277 |
+
else if(type=="radio"){var radios=document.getElementsByName("wfu_radioattribute_"+attribute);for(var i=0;i<radios.length;i++)
|
278 |
+
radios[i].checked=(radios[i].value==value||("*"+radios[i].value)==value);wfu_admin_radio_clicked(attribute)}
|
279 |
+
else if(type=="ptext"){value=value.replace(/\%n\%/gm,"\n");value=value.replace(/\%dq\%/gm,"\"");value=value.replace(/\%brl\%/gm,"[");value=value.replace(/\%brr\%/gm,"]");var parts=value.split("/");var singular=parts.length<1?"":parts[0];var plural=parts.length<2?singular:parts[1];var item1=document.getElementById("wfu_attribute_s_"+attribute);item1.value=singular;var item2=document.getElementById("wfu_attribute_p_"+attribute);item2.value=plural;wfu_update_ptext_value({target:item1});wfu_update_ptext_value({target:item2})}
|
280 |
+
else if(type=="mchecklist"){value=value.toLowerCase();if(value=="all")document.getElementById("wfu_attribute_"+attribute+"_all").checked=!0;else{document.getElementById("wfu_attribute_"+attribute+"_all").checked=!1;var items=value.split(",");for(var i=0;i<items.length;i++)items[i]=items[i].trim();jQuery("#wfu_attribute_"+attribute+" input").each(function(){jQuery(this).prop('checked',(items.indexOf(jQuery(this).next().html())>-1))})}
|
281 |
+
wfu_update_mchecklist_value(attribute)}
|
282 |
+
else if(type=="rolelist"){var item=document.getElementById("wfu_attribute_"+attribute);var checkall=document.getElementById("wfu_attribute_"+attribute+"_all");var default_administrator=(checkall.className.indexOf("wfu_default_administrator")>-1);var roles=value.split(",");if(roles.indexOf("all")>-1){checkall.checked=!0;for(var i=0;i<item.options.length;i++)
|
283 |
+
item.options[i].selected=(default_administrator&&item.options[i].value=="administrator");}
|
284 |
+
else{checkall.checked=!1;for(var i=0;i<roles.length;i++)roles[i]=roles[i].trim();for(var i=0;i<item.options.length;i++)
|
285 |
+
item.options[i].selected=(roles.indexOf(item.options[i].value)>-1);}
|
286 |
+
document.getElementById("wfu_attribute_"+attribute+"_guests").checked=(roles.indexOf("guests")>-1);wfu_update_rolelist_value(attribute)}
|
287 |
+
else if(type=="userlist"){var item=document.getElementById("wfu_attribute_"+attribute);var checkall=document.getElementById("wfu_attribute_"+attribute+"_all");var default_0=(checkall.className.indexOf("wfu_default_0")>-1);var only_current=document.getElementById("wfu_attribute_"+attribute+"_current");if(only_current&&value=="current"){only_current.checked=!0;checkall.checked=!1;document.getElementById("wfu_attribute_"+attribute+"_guests").checked=!1;for(var i=0;i<item.options.length;i++)
|
288 |
+
item.options[i].selected=(default_0&&i<1);}
|
289 |
+
else{if(only_current)only_current.checked=!1;var users=value.split(",");if(users.indexOf("all")>-1){checkall.checked=!0;for(var i=0;i<item.options.length;i++)
|
290 |
+
item.options[i].selected=(default_0&&i<1);}
|
291 |
+
else{checkall.checked=!1;for(var i=0;i<users.length;i++)users[i]=users[i].trim();for(var i=0;i<item.options.length;i++)
|
292 |
+
item.options[i].selected=(users.indexOf(item.options[i].value)>-1);}
|
293 |
+
document.getElementById("wfu_attribute_"+attribute+"_guests").checked=(users.indexOf("guests")>-1)}
|
294 |
+
wfu_update_userlist_value(attribute)}
|
295 |
+
else if(type=="postlist"){var userlist=Array();var checkall=Array();var postlist=document.getElementById("wfu_attribute_"+attribute+"_postlist").value.split(",");for(var i=0;i<postlist.length;i++){userlist.push(document.getElementById("wfu_attribute_"+attribute+"_"+postlist[i]));checkall.push(document.getElementById("wfu_attribute_"+attribute+"_all_"+postlist[i]))}
|
296 |
+
var only_current=document.getElementById("wfu_attribute_"+attribute+"_current");if(only_current&&value=="current"){only_current.checked=!0;for(var i=0;i<postlist.length;i++){checkall[i].checked=!1;for(var j=0;j<userlist[i].options.length;j++)userlist[i].options[j].selected=!1}}
|
297 |
+
else{if(only_current)only_current.checked=!1;var ids=value.split(",");for(var i=0;i<postlist.length;i++){if(value=="all"||ids.indexOf("all"+postlist[i])>-1)checkall[i].checked=!0;for(var j=0;j<userlist[i].options.length;j++)
|
298 |
+
userlist[i].options[j].selected=(ids.indexOf(userlist[i].options[j].value)>-1);}}
|
299 |
+
wfu_update_postlist_value(attribute)}
|
300 |
+
else if(type=="bloglist"){var only_current=document.getElementById("wfu_attribute_"+attribute+"_current");if(only_current&&value=="current"){only_current.checked=!0;document.getElementById("wfu_attribute_"+attribute+"_all").checked=!1;var item=document.getElementById("wfu_attribute_"+attribute);for(var i=0;i<item.options.length;i++)
|
301 |
+
item.options[i].selected=!1}
|
302 |
+
else{if(only_current)only_current.checked=!1;var blogs=value.split(",");if(value=="all")document.getElementById("wfu_attribute_"+attribute+"_all").checked=!0;else{document.getElementById("wfu_attribute_"+attribute+"_all").checked=!1;for(var i=0;i<blogs.length;i++)blogs[i]=blogs[i].trim();var item=document.getElementById("wfu_attribute_"+attribute);for(var i=0;i<item.options.length;i++)
|
303 |
+
item.options[i].selected=(blogs.indexOf(item.options[i].value)>-1);}}
|
304 |
+
wfu_update_bloglist_value(attribute)}
|
305 |
+
else if(type=="stringmatch"){var matchfield="";var matchcriterion="equal to";var matchvalue="";var matches=value.match(/^field:(.*?);\s*criterion:(.*?)\s*;\s*value:(.*)$/);if(matches&&matches.length==4){matchfield=matches[1];matchcriterion=matches[2];matchvalue=matches[3]}
|
306 |
+
document.getElementById("wfu_attribute_"+attribute+"_matchfield").value=matchfield;document.getElementById("wfu_attribute_"+attribute+"_matchcriterion").value=matchcriterion;document.getElementById("wfu_attribute_"+attribute+"_matchvalue").value=matchvalue;wfu_update_stringmatch_value(attribute)}
|
307 |
+
else if(type=="columns"){var source=document.getElementById("wfu_attribute_"+attribute+"_sourcelist");var target=document.getElementById("wfu_attribute_"+attribute);target.innerHTML="";var columns_flat=value.replace(/(:|\/).*?(,|$)/g,"$2").split(",");for(var i=0;i<source.options.length;i++){var parts=source.options[i].value.match(/(.*?):(.*?)\/(.*)/);var item_name=parts[1];if(source.options[i].className=="wfu_columns_item_required"&&columns_flat.indexOf(item_name)==-1){var sorttype=(item_name=="custom"?"+-"+(parts[2]==""?"s":parts[2]):(parts[2]!=""?"-+"+parts[2]:""));var title=parts[3];if(item_name=="custom")item_name="custom1";var opt=document.createElement('OPTION');opt.value=item_name+":"+sorttype+"/"+source.options[i].innerHTML+"/"+title;opt.innerHTML=source.options[i].innerHTML+(title!=""&&title!=source.options[i].innerHTML?" ("+title+")":"");opt.className=source.options[i].className;opt.onclick=source.options[i].onclick;target.appendChild(opt)}}
|
308 |
+
var columns=value.split(",");for(var i=0;i<columns.length;i++){var item_parts=columns[i].split("/",2);var item_name=item_parts[0];var item_title="";if(item_parts.length>1)item_title=item_parts[1];item_parts=item_name.split(":",2);item_name=item_parts[0];var flat_name=item_name.replace(/custom[0-9]+$/,"custom");var ind=-1;for(var j=0;j<source.options.length;j++){var sou=source.options[j].value.replace(/:.*/,"");if(sou==flat_name){ind=j;break}}
|
309 |
+
var already_exists=!1;for(var j=0;j<target.options.length;j++){var tar=target.options[j].value.replace(/:.*/,"");if(tar==item_name){already_exists=!0;break}}
|
310 |
+
if(item_name!="custom"&&ind>-1&&!already_exists){var parts=source.options[ind].value.match(/(.*?):(.*?)\/(.*)/);var sortable=(flat_name=="custom"||parts[2]!="");var sorttype=parts[2];var label=source.options[ind].innerHTML;var title=parts[3];var item_sort="";if(item_parts.length==1)item_sort=(flat_name=="custom"?"+-s":(sortable?"-+"+sorttype:""));else if(flat_name=="custom")item_sort="+"+(item_parts[1]==""?"-s":"+"+item_parts[1]);else item_sort=(sortable?"-"+(item_parts[1]==""?"-":"+")+sorttype:"");if(item_title=="")item_title=title;var opt=document.createElement('OPTION');opt.value=item_name+":"+item_sort+"/"+label+"/"+item_title;opt.innerHTML=label+(title!=label?" ("+title+")":"");opt.className=source.options[ind].className;opt.onclick=source.options[i].onclick;target.appendChild(opt)}}
|
311 |
+
wfu_update_column_props(attribute);wfu_update_columns(attribute)}
|
312 |
+
else if(type=="dimensions"){var dims=value.split(",");var details,nam,val,item;var group=document.getElementsByName("wfu_dimension_elements_"+attribute);for(var i=0;i<group.length;i++)group[i].value="";for(var i=0;i<dims.length;i++){details=dims[i].split(":",2);nam=details.length<1?"":details[0];val=details.length<2?nam:details[1];item=document.getElementById("wfu_attribute_"+attribute+"_"+nam.trim());if(item)item.value=val.trim()}
|
313 |
+
item=group[0];wfu_update_dimension_value({target:item})}
|
314 |
+
else if(type=="userfields"){var fields_arr=value.replace(/\//g,"[/]").replace(/\(.*\)/,function(m){return m.replace(/\[\/\]/g,"/")}).split("[/]");var is_req;var fields=Array();for(var i=0;i<fields_arr.length;i++){is_req=(fields_arr[i].substr(0,1)=="*");if(is_req)fields_arr[i]=fields_arr[i].substr(1);if(fields_arr[i]!="")fields.push({name:fields_arr[i],required:is_req})}
|
315 |
+
var container=document.getElementById("wfu_attribute_"+attribute);var first=null;var remove_array=Array();for(var i=0;i<container.childNodes.length;i++)
|
316 |
+
if(container.childNodes[i].nodeType===1){if(first==null)first=container.childNodes[i];else remove_array.push(container.childNodes[i])}
|
317 |
+
for(var i=0;i<remove_array.length;i++)container.removeChild(remove_array[i]);wfu_userdata_edit_field(first,"",!1);var newline;var prevline=first;for(var i=0;i<fields.length;i++){if(i==0)wfu_userdata_edit_field(first,fields[i].name,fields[i].required);else{newline=prevline.cloneNode(!0);wfu_userdata_edit_field(newline,fields[i].name,fields[i].required);container.insertBefore(newline,prevline.nextSibling);prevline=newline}}
|
318 |
+
var item;for(var i=0;i<first.childNodes.length;i++){item=first.childNodes[i];if(item.tagName=="INPUT")break}
|
319 |
+
wfu_update_userfield_value({target:item})}
|
320 |
+
else if(type=="formfields"){var fields=Array();var fielddefs=window['wfu_attribute_'+attribute+'_typeprops'];var fielddef_array=fielddefs[0].split(",");var defaults={};for(var i=0;i<fielddef_array.length;i++){var fielddef=fielddefs[fielddef_array[i]];var def={};def.type=fielddef_array[i];def.label="";def.labelposition=fielddef.labelposition.substr(5);def.required=(fielddef.required.substr(5)=="true");def.donotautocomplete=(fielddef.donotautocomplete.substr(5)=="true");def.validate=(fielddef.validate.substr(5)=="true");def.typehook=(fielddef.typehook.substr(5)=="true");def.hintposition=fielddef.hintposition.substr(5);def.default=fielddef.default.substr(5);def.data=fielddef.data.substr(5);def.group=fielddef.group.substr(5);def.format=fielddef.format.substr(5);defaults[fielddef_array[i]]=def}
|
321 |
+
var fields_arr=value.replace(/\//g,"[/]").replace(/\(.*\)/,function(m){return m.replace(/\[\/\]/g,"/")}).split("[/]");for(var i=0;i<fields_arr.length;i++){var field_raw=fields_arr[i].trim();var fieldprops={};for(prop in defaults.text)fieldprops[prop]=defaults.text[prop];if(field_raw.substr(0,1)=="*"){fieldprops.required=!0;field_raw=field_raw.substr(1)}
|
322 |
+
var field_parts=field_raw.split("|");if(field_parts[0].trim()!=""){var type_key=-1;var new_type="";for(var j=0;j<field_parts.length;j++){var part=field_parts[j].replace(/^\s+/gm,'');var flag=part.substr(0,2);var val=part.substr(2);if(flag=="t:"&&j>0&&fielddef_array.indexOf(val)>-1){new_type=val;type_key=j;break}}
|
323 |
+
if(new_type!=""){for(prop in defaults[new_type])fieldprops[prop]=defaults[new_type][prop];field_parts.splice(type_key,1)}
|
324 |
+
fieldprops.label=field_parts[0].trim();field_parts.splice(0,1);for(var j=0;j<field_parts.length;j++){var part=field_parts[j].replace(/^\s+/gm,'');var flag=part.substr(0,2);var val=part.substr(2);if(flag=="s:")fieldprops.labelposition=val;else if(flag=="r:")fieldprops.required=(val=="1");else if(flag=="a:")fieldprops.donotautocomplete=(val=="1");else if(flag=="v:")fieldprops.validate=(val=="1");else if(flag=="d:")fieldprops.default=val;else if(flag=="l:")fieldprops.data=val;else if(flag=="g:")fieldprops.group=val;else if(flag=="f:")fieldprops.format=val;else if(flag=="p:")fieldprops.hintposition=val;else if(flag=="h:")fieldprops.typehook=(val=="1")}
|
325 |
+
fields.push(fieldprops)}}
|
326 |
+
if(fields.length==0)fields.push(fieldprops_default);var container=document.getElementById('wfu_attribute_'+attribute);var containers=document.querySelectorAll("div#wfu_attribute_"+attribute+" .wfu_formdata_line_container");for(var i=1;i<containers.length;i ++)container.removeChild(containers[i]);var new_line_container=containers[0];for(var i=0;i<fields.length;i++){var new_key=attribute+'_'+wfu_randomString(4);var template=wfu_formdata_prepare_template(attribute,fields[i],new_key);if(i>0)new_line_container=document.createElement('DIV');new_line_container.id='wfu_formfield_'+new_key+'_container';new_line_container.className='wfu_formdata_line_container';if(i>0)container.insertBefore(new_line_container,null);new_line_container.innerHTML=template;wfu_formdata_update_buttons(new_key)}
|
327 |
+
var formfield_elements=document.querySelectorAll('div#wfu_attribute_'+attribute+' input[name="wfu_formfield_elements"]');for(var i=0;i<formfield_elements.length;i++)wfu_attach_element_handlers(formfield_elements[i],wfu_update_formfield_value);wfu_update_formfield_value({target:containers[0]})}
|
328 |
+
else if(type=="color-triplet"){var colors=value.split(",");for(var i=0;i<colors.length;i++)colors[i]=colors[i].trim();if(colors.length==2)colors=[colors[0],colors[1],"#000000"];else if(colors.length==1)colors=[colors[0],"#FFFFFF","#000000"];else if(colors.length<3)colors=["#000000","#FFFFFF","#000000"];var rgb=colourNameToHex(colors[0]);if(!rgb)rgb=colors[0];jQuery('#wfu_attribute_'+attribute+"_color").wpColorPicker('color',rgb);var item=document.getElementById("wfu_attribute_"+attribute+"_color");item.value=colors[0];rgb=colourNameToHex(colors[1]);if(!rgb)rgb=colors[1];jQuery('#wfu_attribute_'+attribute+"_bgcolor").wpColorPicker('color',rgb);document.getElementById("wfu_attribute_"+attribute+"_bgcolor").value=colors[1];rgb=colourNameToHex(colors[2]);if(!rgb)rgb=colors[2];jQuery('#wfu_attribute_'+attribute+"_borcolor").wpColorPicker('color',rgb);document.getElementById("wfu_attribute_"+attribute+"_borcolor").value=colors[2];wfu_update_triplecolor_value({target:item})}
|
329 |
+
else if(type=="folderlist"){var items=wfu_parse_folderlist_js(value);var opts=document.getElementById('wfu_attribute_'+attribute).options;while(opts.length>0)opts.remove(0);var opt,subfolder,subfolder_raw,text,stars,subvalue;for(var i=0;i<items.path.length;i++){subfolder=items.path[i];if(subfolder.substr(subfolder.length,1)=='/')subfolder=subfolder.substr(0,subfolder.length-1);subfolder_raw=subfolder.split("/");subfolder=subfolder_raw[subfolder_raw.length-1];stars=parseInt(items.level[i]);text="";subvalue="";for(var j=0;j<stars;j++){text+=" ";subvalue+="*"}
|
330 |
+
text+=items.label[i];if(items.default[i])subvalue+="&";if(subfolder=="")subvalue+="{root}/"+items.label[i];else subvalue+=subfolder+items.label[i];opt=document.createElement("option");if(items.default[i])opt.className="wfu_select_folders_option_default";else opt.className="";opt.value=wfu_plugin_encode_string(subvalue);opt.innerHTML=text;opts.add(opt)}
|
331 |
+
opt=document.createElement("option");opt.value="";opt.innerHTML="";opts.add(opt);var list=document.getElementById('wfu_attribute_'+attribute);list.data=wfu_decode_subfolder_list(attribute);wfu_subfolders_update_toolnav(attribute);item=list;if(value!==item.oldVal){item.oldVal=value;document.getElementById("wfu_attribute_value_"+attribute).value=value;wfu_generate_shortcode()}}}
|
332 |
+
function wfu_parse_folderlist_js(list){var ret=Object();ret.path=Array();ret.label=Array();ret.level=Array();ret.default=Array();if(list.substr(0,4)=='auto')return ret;var subfolders=list.split(",");if(subfolders.length==0)return ret;if(subfolders.length==1&&subfolders[0].trim()=="")return ret;var dir_levels=["root"];var prev_level=0;var level0_count=0;var _default=-1;var subfolder,star_count,start_spaces,is_default,subfolder_dir,subfolder_label,subfolder_path;for(var i=0;i<subfolders.length;i++){subfolder=subfolders[i].trim();star_count=0;start_spaces="";is_default=!1;while(star_count<subfolder.length){if(subfolder.substr(star_count,1)=="*"){star_count ++;start_spaces+=" "}
|
333 |
+
else break}
|
334 |
+
if(star_count-prev_level<=1&&(star_count>0||level0_count==0)){subfolder=subfolder.substr(star_count,subfolder.length-star_count);if(subfolder.substr(0,1)=='&'){subfolder=subfolder.substr(1);is_default=!0}
|
335 |
+
subfolder_items=subfolder.split("/");if(subfolder_items.length<2)subfolder_items.push("");if(subfolder_items[1]!=""){subfolder_dir=subfolder_items[0];subfolder_label=subfolder_items[1]}
|
336 |
+
else{subfolder_dir=subfolder;subfolder_label=subfolder}
|
337 |
+
if(subfolder_dir!=""){if(is_default&&_default==-1)_default=ret.path.length;else is_default=!1;if(star_count==0)level0_count=1;if(dir_levels.length>star_count)dir_levels[star_count]=subfolder_dir;else dir_levels.push(subfolder_dir);subfolder_path="";for(var i_count=1;i_count<=star_count;i_count++){subfolder_path+=dir_levels[i_count]+'/'}
|
338 |
+
ret.path.push(subfolder_path);ret.label.push(subfolder_label);ret.level.push(star_count);ret.default.push(is_default);prev_level=star_count}}}
|
339 |
+
return ret}
|
340 |
+
function colourNameToHex(colour)
|
341 |
+
{var colours={"aliceblue":"#f0f8ff","antiquewhite":"#faebd7","aqua":"#00ffff","aquamarine":"#7fffd4","azure":"#f0ffff","beige":"#f5f5dc","bisque":"#ffe4c4","black":"#000000","blanchedalmond":"#ffebcd","blue":"#0000ff","blueviolet":"#8a2be2","brown":"#a52a2a","burlywood":"#deb887","cadetblue":"#5f9ea0","chartreuse":"#7fff00","chocolate":"#d2691e","coral":"#ff7f50","cornflowerblue":"#6495ed","cornsilk":"#fff8dc","crimson":"#dc143c","cyan":"#00ffff","darkblue":"#00008b","darkcyan":"#008b8b","darkgoldenrod":"#b8860b","darkgray":"#a9a9a9","darkgreen":"#006400","darkkhaki":"#bdb76b","darkmagenta":"#8b008b","darkolivegreen":"#556b2f","darkorange":"#ff8c00","darkorchid":"#9932cc","darkred":"#8b0000","darksalmon":"#e9967a","darkseagreen":"#8fbc8f","darkslateblue":"#483d8b","darkslategray":"#2f4f4f","darkturquoise":"#00ced1","darkviolet":"#9400d3","deeppink":"#ff1493","deepskyblue":"#00bfff","dimgray":"#696969","dodgerblue":"#1e90ff","firebrick":"#b22222","floralwhite":"#fffaf0","forestgreen":"#228b22","fuchsia":"#ff00ff","gainsboro":"#dcdcdc","ghostwhite":"#f8f8ff","gold":"#ffd700","goldenrod":"#daa520","gray":"#808080","green":"#008000","greenyellow":"#adff2f","honeydew":"#f0fff0","hotpink":"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082","ivory":"#fffff0","khaki":"#f0e68c","lavender":"#e6e6fa","lavenderblush":"#fff0f5","lawngreen":"#7cfc00","lemonchiffon":"#fffacd","lightblue":"#add8e6","lightcoral":"#f08080","lightcyan":"#e0ffff","lightgoldenrodyellow":"#fafad2","lightgrey":"#d3d3d3","lightgreen":"#90ee90","lightpink":"#ffb6c1","lightsalmon":"#ffa07a","lightseagreen":"#20b2aa","lightskyblue":"#87cefa","lightslategray":"#778899","lightsteelblue":"#b0c4de","lightyellow":"#ffffe0","lime":"#00ff00","limegreen":"#32cd32","linen":"#faf0e6","magenta":"#ff00ff","maroon":"#800000","mediumaquamarine":"#66cdaa","mediumblue":"#0000cd","mediumorchid":"#ba55d3","mediumpurple":"#9370d8","mediumseagreen":"#3cb371","mediumslateblue":"#7b68ee","mediumspringgreen":"#00fa9a","mediumturquoise":"#48d1cc","mediumvioletred":"#c71585","midnightblue":"#191970","mintcream":"#f5fffa","mistyrose":"#ffe4e1","moccasin":"#ffe4b5","navajowhite":"#ffdead","navy":"#000080","oldlace":"#fdf5e6","olive":"#808000","olivedrab":"#6b8e23","orange":"#ffa500","orangered":"#ff4500","orchid":"#da70d6","palegoldenrod":"#eee8aa","palegreen":"#98fb98","paleturquoise":"#afeeee","palevioletred":"#d87093","papayawhip":"#ffefd5","peachpuff":"#ffdab9","peru":"#cd853f","pink":"#ffc0cb","plum":"#dda0dd","powderblue":"#b0e0e6","purple":"#800080","red":"#ff0000","rosybrown":"#bc8f8f","royalblue":"#4169e1","saddlebrown":"#8b4513","salmon":"#fa8072","sandybrown":"#f4a460","seagreen":"#2e8b57","seashell":"#fff5ee","sienna":"#a0522d","silver":"#c0c0c0","skyblue":"#87ceeb","slateblue":"#6a5acd","slategray":"#708090","snow":"#fffafa","springgreen":"#00ff7f","steelblue":"#4682b4","tan":"#d2b48c","teal":"#008080","thistle":"#d8bfd8","tomato":"#ff6347","turquoise":"#40e0d0","violet":"#ee82ee","wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5","yellow":"#ffff00","yellowgreen":"#9acd32"};if(typeof colours[colour.toLowerCase()]!='undefined')
|
342 |
+
return colours[colour.toLowerCase()];return!1}
|
343 |
+
function wfu_download_file(filepath_enc,ii,nonce){var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var url=AdminParams.wfu_ajax_url;params=new Array(3);params[0]=new Array(2);params[0][0]='action';params[0][1]='wfu_ajax_action_download_file_invoker';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]=nonce;var parameters='';for(var i=0;i<params.length;i++){parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1])}
|
344 |
+
xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){var start_text='wfu_ajax_action_download_file_invoker:';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.substr(0,16)=='wfu_download_id;'){var download_id=txt_header.substr(16);var container=document.getElementById('wfu_file_download_container_'+ii);container.innerHTML=txt_value;setTimeout('wfu_download_file_monitor(\''+filepath_enc+'\', '+ii+', \''+download_id+'\')',100)}}}};xhr.send(parameters)}
|
345 |
+
function wfu_download_file_monitor(filepath_enc,ii,id){var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var url=AdminParams.wfu_ajax_url;params=new Array(3);params[0]=new Array(2);params[0][0]='action';params[0][1]='wfu_ajax_action_download_file_monitor';params[1]=new Array(2);params[1][0]='file';params[1][1]=filepath_enc;params[2]=new Array(2);params[2][0]='id';params[2][1]=id;var parameters='';for(var i=0;i<params.length;i++){parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1])}
|
346 |
+
xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){var start_text='wfu_ajax_action_download_file_monitor:';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!='repeat'){var container=document.getElementById('wfu_file_download_container_'+ii);container.innerHTML=''}
|
347 |
+
else if(txt_header=='repeat'){setTimeout('wfu_download_file_monitor(\''+filepath_enc+'\', '+ii+', \''+txt_value+'\')',100)}}}};xhr.send(parameters)}
|
348 |
+
function wfu_filedetails_changed(e){var userdata_elements=document.getElementsByName("wfu_filedetails_userdata");var def,subm;var changed=!1,changed2=!1;for(var i=0;i<userdata_elements.length;i++){def=document.getElementById(userdata_elements[i].id.replace("wfu_filedetails_userdata_value_","wfu_filedetails_userdata_default_"));subm=document.getElementById(userdata_elements[i].id.replace("wfu_filedetails_userdata_value_","wfu_filedetails_userdata_"));subm.value=userdata_elements[i].value;if(userdata_elements[i].value!=def.value){changed=!0;break}}
|
349 |
+
if(document.getElementById("wfu_filedetails_userid"))
|
350 |
+
changed2=(document.getElementById("wfu_filedetails_userid").value!=document.getElementById("wfu_filedetails_userid_default").value);document.getElementById("dp_filedetails_submit_fields").disabled=!changed&&!changed2}
|
351 |
+
function wfu_Attach_FileDetails_Admin_Events(){var userdata_elements=document.getElementsByName("wfu_filedetails_userdata");for(var i=0;i<userdata_elements.length;i++)wfu_attach_element_handlers(userdata_elements[i],wfu_filedetails_changed);}
|
352 |
+
function wfu_update_browserpermission_option(type,id,immediate){var users=document.getElementById('wfu_fbperm_users');var roles=document.getElementById('wfu_fbperm_roles');var view=document.getElementById('wfu_fbperm_'+type+'_'+id+'_view');var dl=document.getElementById('wfu_fbperm_'+type+'_'+id+'_dl');var edit=document.getElementById('wfu_fbperm_'+type+'_'+id+'_edit');var del=document.getElementById('wfu_fbperm_'+type+'_'+id+'_del');if(type=='role'){if(id=='0'){dl.checked=(view.checked&&dl.checked);edit.checked=(view.checked&&edit.checked);del.checked=(view.checked&&del.checked);dl.disabled=!view.checked;edit.disabled=!view.checked;del.disabled=!view.checked;var roles_tr=document.querySelectorAll("tr.wfu_fbperm_role_tr");for(var i=0;i<roles_tr.length;i++){var rolename=roles_tr[i].id.substr(16,roles_tr[i].id.length-20);wfu_update_browserpermission_option("role",rolename,!1)}
|
353 |
+
if(immediate){var props=(view.checked?'v':'')+(dl.checked?'d':'')+(edit.checked?'e':'')+(del.checked?'l':'');roles.value=roles.value.replace(/^0\[\w*\]/,'0['+props+']')}}
|
354 |
+
else if(id!='administrator'){var row=document.getElementById('wfu_fbperm_role_'+id+'_row');var def=document.getElementById('wfu_fbperm_role_'+id+'_def');var view_def=document.getElementById('wfu_fbperm_role_0_view');var dl_def=document.getElementById('wfu_fbperm_role_0_dl');var edit_def=document.getElementById('wfu_fbperm_role_0_edit');var del_def=document.getElementById('wfu_fbperm_role_0_del');view.checked=(def.checked?view_def.checked:view.checked);row.style.fontWeight=(def.checked?'':'bold');dl.checked=(def.checked?dl_def.checked:(view.checked&&dl.checked));edit.checked=(def.checked?edit_def.checked:(view.checked&&edit.checked));del.checked=(def.checked?del_def.checked:(view.checked&&del.checked));view.disabled=def.checked;dl.disabled=(def.checked||!view.checked);edit.disabled=(def.checked||!view.checked);del.disabled=(def.checked||!view.checked);if(immediate){var props=(def.checked?'':'D'+(view.checked?'v':'')+(dl.checked?'d':'')+(edit.checked?'e':'')+(del.checked?'l':''));roles.value=roles.value.replace(new RegExp(","+id+"\\[\\w*\\]"),','+id+'['+props+']')}}
|
355 |
+
var users_tr=document.querySelectorAll("tr.wfu_fbperm_user_tr");for(var i=0;i<users_tr.length;i++){var username=users_tr[i].id.substr(16,users_tr[i].id.length-20);wfu_update_browserpermission_option("user",username,!1)}}
|
356 |
+
else if(type=='user'){var role=document.getElementById('wfu_fbperm_user_'+id+'_role');if(id=='0'){view.checked=(role.checked?!1:view.checked);dl.checked=(role.checked?!1:(view.checked&&dl.checked));edit.checked=(role.checked?!1:(view.checked&&edit.checked));del.checked=(role.checked?!1:(view.checked&&del.checked));view.disabled=role.checked;dl.disabled=(role.checked||!view.checked);edit.disabled=(role.checked||!view.checked);del.disabled=(role.checked||!view.checked);view.indeterminate=role.checked;dl.indeterminate=role.checked;edit.indeterminate=role.checked;del.indeterminate=role.checked;var users_tr=document.querySelectorAll("tr.wfu_fbperm_user_tr");for(var i=0;i<users_tr.length;i++){var username=users_tr[i].id.substr(16,users_tr[i].id.length-20);wfu_update_browserpermission_option("user",username,!1)}
|
357 |
+
if(immediate){var props=(role.checked?'':'R'+(view.checked?'v':'')+(dl.checked?'d':'')+(edit.checked?'e':'')+(del.checked?'l':''));users.value=users.value.replace(/^0\[\w*\],?/,'');users.value='0['+props+']'+(users.value==''?'':','+users.value)}}
|
358 |
+
else{var user_roles=document.getElementById('wfu_fbperm_user_'+id+'_roles').value.split(",");if(user_roles.length==1&&user_roles[0]=="")user_roles=Array();if(user_roles.indexOf('administrator')<0){var row=document.getElementById('wfu_fbperm_user_'+id+'_row');var def=document.getElementById('wfu_fbperm_user_'+id+'_def');var role_def=document.getElementById('wfu_fbperm_user_0_role');var view_def=document.getElementById('wfu_fbperm_user_0_view');var dl_def=document.getElementById('wfu_fbperm_user_0_dl');var edit_def=document.getElementById('wfu_fbperm_user_0_edit');var del_def=document.getElementById('wfu_fbperm_user_0_del');if(user_roles.length>0){var $view_from_roles=!1;var $dl_from_roles=!1;var $edit_from_roles=!1;var $del_from_roles=!1;for(var i=0;i<user_roles.length;i++){$view_from_roles=($view_from_roles||document.getElementById('wfu_fbperm_role_'+user_roles[i]+'_view').checked);$dl_from_roles=($view_from_roles&&($dl_from_roles||document.getElementById('wfu_fbperm_role_'+user_roles[i]+'_dl').checked));$edit_from_roles=($view_from_roles&&($edit_from_roles||document.getElementById('wfu_fbperm_role_'+user_roles[i]+'_edit').checked));$del_from_roles=($view_from_roles&&($del_from_roles||document.getElementById('wfu_fbperm_role_'+user_roles[i]+'_del').checked))}}
|
359 |
+
else{var $view_from_roles=document.getElementById('wfu_fbperm_role_0_view');var $dl_from_roles=document.getElementById('wfu_fbperm_role_0_dl');var $edit_from_roles=document.getElementById('wfu_fbperm_role_0_edit');var $del_from_roles=document.getElementById('wfu_fbperm_role_0_del')}
|
360 |
+
row.style.fontWeight=(def.checked?'':'bold');role.checked=(def.checked?role_def.checked:role.checked);view.checked=(def.checked?(role_def.checked?$view_from_roles:view_def.checked):(role.checked?$view_from_roles:view.checked));dl.checked=(def.checked?(role_def.checked?$dl_from_roles:dl_def.checked):(role.checked?$dl_from_roles:view.checked&&dl.checked));edit.checked=(def.checked?(role_def.checked?$edit_from_roles:edit_def.checked):(role.checked?$edit_from_roles:view.checked&&edit.checked));del.checked=(def.checked?(role_def.checked?$del_from_roles:del_def.checked):(role.checked?$del_from_roles:view.checked&&del.checked));role.disabled=def.checked;view.disabled=(def.checked||role.checked);dl.disabled=(def.checked||role.checked||!view.checked);edit.disabled=(def.checked||role.checked||!view.checked);del.disabled=(def.checked||role.checked||!view.checked);if(immediate){var props=(def.checked?'':'D'+(role.checked?'':'R'+(view.checked?'v':'')+(dl.checked?'d':'')+(edit.checked?'e':'')+(del.checked?'l':'')));users.value=users.value.replace(new RegExp(','+id+'\\[\\w*\\]|'+id+'\\[\\w*\\],|'+id+'\\[\\w*\\]'),'');users.value+=(users.value==''?'':',')+id+'['+props+']'}}}}}
|
361 |
+
function wfu_goto_historylog_page(token,go_to){var sel=document.getElementById("wfu_historylog_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);params[0]=new Array(2);params[0][0]='action';params[0][1]='wfu_ajax_action_get_historylog_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])}
|
362 |
+
document.getElementById("wfu_historylog_overlay").style.display="block";xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");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=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=(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)}
|
363 |
+
function wfu_include_file(filepath_enc,ii,nonce){var xhr=wfu_GetHttpRequestObject();if(xhr==null)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]=nonce;var parameters='';for(var i=0;i<params.length;i++){parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1])}
|
364 |
+
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,!0);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="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";document.getElementById("wfu_file_link_"+ii).style.display="inline";document.getElementById("wfu_file_can_be_included_actions_"+ii).style.display="none";document.getElementById("wfu_file_is_included_actions_"+ii).style.display="block"}
|
365 |
+
else{document.getElementById("wfu_include_file_"+ii+"_a").innerHTML=document.getElementById("wfu_include_file_"+ii+"_inpfail").value}}}};xhr.send(parameters)}
|
366 |
+
function wfu_adminbrowser_select_all_visible_changed(){var status=document.getElementById("wfu_select_all_visible").checked;var selectors=document.querySelectorAll(".wfu_selectors");for(var i=0;i<selectors.length;i++)selectors[i].checked=status}
|
367 |
+
function wfu_adminbrowser_selector_changed(obj){var selectors_count=document.querySelectorAll(".wfu_selectors").length;var selected_count=document.querySelectorAll(".wfu_selectors:checked").length;var all_visible=document.getElementById("wfu_select_all_visible");all_visible.style.webkitAppearance="";all_visible.style.webkitAppearance="checkbox";all_visible.checked=(selected_count>0);all_visible.indeterminate=(selected_count>0&&selected_count<selectors_count)}
|
368 |
+
function wfu_apply_adminbrowser_bulkaction(){var actionselector=document.getElementById("wfu_adminbrowser_bulkactions");if(actionselector.selectedIndex<1)return;var action=actionselector.options[actionselector.selectedIndex].value;var selected=document.querySelectorAll(".wfu_selectors:checked");if(selected.length==0)return;var codes=[];var codes_included=0,codes_not_included=0;for(var i=0;i<selected.length;i++){var file_code=selected[i].className.replace(/.*?wfu_selcode_/,"");if(file_code!=""){var included=(selected[i].className.indexOf("wfu_included")>-1);if(included)codes_included++;else codes_not_included++;if((action=="delete"&&!included)||(action=="include"&&included))
|
369 |
+
selected[i].checked=!1;else codes.push(file_code)}}
|
370 |
+
if(action=="delete"&&codes_not_included>0)
|
371 |
+
alert("Notice! Files that were not uploaded using the plugin cannot be deleted and have been deselected.");else if(action=="include"&&codes_included>0)
|
372 |
+
alert("Notice! Files already included in the plugin have been deselected.");if(codes.length==0)return;var url=document.getElementById("wfu_adminbrowser_action_url").value;var referer=document.getElementById("wfu_adminbrowser_referer").value;if(action=="delete"||action=="include"){var form=document.createElement("FORM");form.method="POST";form.action=url;form.style.display="none";var field1=document.createElement("INPUT");field1.type="hidden";field1.name="action";field1.value=action+"_file";form.appendChild(field1);var field2=document.createElement("INPUT");field2.type="hidden";field2.name="file";field2.value="list:"+codes.join();form.appendChild(field2);var field3=document.createElement("INPUT");field3.type="hidden";field3.name="referer";field3.value=referer;form.appendChild(field3);document.body.appendChild(form);form.submit()}}
|
js/wordpress_file_upload_functions.js
CHANGED
@@ -1,194 +1,310 @@
|
|
1 |
-
GlobalData={};UploadStates={};Code_Initializators=[];GlobalData.filestatematch={};GlobalData.filestatematch.success=[0,1,2,2];GlobalData.filestatematch.warning=[1,1,2,2];GlobalData.filestatematch.error1=[3,3,2,3];GlobalData.filestatematch.error2=[2,2,2,3];GlobalData.UploadInProgressString="";GlobalData.FreeChangeHandler
|
2 |
-
function
|
3 |
-
|
4 |
-
function wfu_Code_Object(sid){this.sid=sid;this.items=[];this._calc_prioritized_list=function(section){var item,list=[],idlist=[],nolist=[],priority;for(var i=0;i<this.items.length;i++){item=this.items[i];if(item[section]){priority=-1;if(item.priority)priority=item.priority;if(item[section].priority)priority=item[section].priority;if(priority>=0){list.push(priority);idlist.push(i)}
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
function
|
11 |
-
|
12 |
-
function
|
13 |
-
function
|
14 |
-
function
|
15 |
-
|
16 |
-
function
|
17 |
-
|
18 |
-
"
|
19 |
-
function
|
20 |
-
|
21 |
-
|
22 |
-
function
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
function
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
function wfu_selectbutton_clicked(sid){var message_container=document.getElementById("wordpress_file_upload_message_"+sid);if(message_container)message_container.style.display="none";wfu_reset_message(sid);document.getElementById("upfile_"+sid).value="";var ftext=document.getElementById("fileName_"+sid);if(ftext){ftext.value="";ftext.className="file_input_textbox"}}
|
32 |
-
function wfu_update_uploadbutton_status(sid){var uploadbutton=document.getElementById("upload_"+sid);if(uploadbutton){var farr=wfu_get_filelist(sid);var status=farr.length>0;status=wfu_Code_Objects[sid].apply_filters("uploadbutton_status",status);uploadbutton.disabled=!status}}
|
33 |
-
function wfu_update_filename_text(sid){var ftext=document.getElementById("fileName_"+sid);if(ftext){var farr=wfu_get_filelist(sid);var txt=
|
34 |
-
|
35 |
-
sid)
|
36 |
-
else sel.
|
37 |
-
|
|
|
|
|
38 |
function wfu_selectsubdiredit_exit(sid){var editbox=document.getElementById("selectsubdiredit_"+sid);if(editbox.value==""){editbox.value=GlobalData.consts.wfu_subdir_typedir;editbox.className="file_item_clean_empty subfolder_autoplus_empty"}}
|
39 |
-
function wfu_selectsubdiredit_change(sid){if(GlobalData.FreeChangeHandler)return;var sel=document.getElementById("selectsubdir_"+sid);var editbox=document.getElementById("selectsubdiredit_"+sid);if(editbox.style.display=="none")return;if(editbox.className=="file_item_clean_empty subfolder_autoplus_empty"){sel.selectedIndex=0;document.getElementById(
|
40 |
-
sel.options[i].value.replace(/^\s+/,"").toLowerCase();if(editbox.value.length>=3)if(opt.substr(0,editbox.value.length)==editbox.value.toLowerCase())sel.options[i].style.display=
|
41 |
-
|
42 |
-
|
43 |
-
function
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
function
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
""
|
62 |
-
|
63 |
-
function
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
if(
|
71 |
-
|
72 |
-
|
73 |
-
if(
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
if(
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
"";
|
93 |
-
|
94 |
-
|
95 |
-
Params.general.
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
function
|
125 |
-
xhr.
|
126 |
-
|
127 |
-
|
128 |
-
function
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
function
|
139 |
-
function
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
"
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
sid]
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GlobalData={};UploadStates={};Code_Initializators=[];GlobalData.filestatematch={};GlobalData.filestatematch.success=[0,1,2,2];GlobalData.filestatematch.warning=[1,1,2,2];GlobalData.filestatematch.error1=[3,3,2,3];GlobalData.filestatematch.error2=[2,2,2,3];GlobalData.UploadInProgressString="";GlobalData.FreeChangeHandler=!1;wfu_Check_Browser_Capabilities();function wfu_Initialize_Consts(consts){if(typeof GlobalData.consts!="undefined")return;GlobalData.consts=new Object();var consts_arr=consts.split(";");var const_arr;for(var i=0;i<consts_arr.length;i++){const_txt=consts_arr[i].split(":");GlobalData.consts[wfu_plugin_decode_string(const_txt[0])]=wfu_plugin_decode_string(const_txt[1])}}
|
2 |
+
function wfu_Load_Code_Connectors(sid){if(typeof wfu_Code_Objects=="undefined")wfu_Code_Objects={};wfu_Code_Objects[sid]=new wfu_Code_Object(sid);for(var i=0;i<Code_Initializators.length;i++)
|
3 |
+
wfu_Code_Objects[sid].additem(Code_Initializators[i](sid));}
|
4 |
+
function wfu_Code_Object(sid){this.sid=sid;this.items=[];this._calc_prioritized_list=function(section){var item,list=[],idlist=[],nolist=[],priority;for(var i=0;i<this.items.length;i++){item=this.items[i];if(item[section]){priority=-1;if(item.priority)priority=item.priority;if(item[section].priority)priority=item[section].priority;if(priority>=0){list.push(priority);idlist.push(i)}
|
5 |
+
else nolist.push(i)}}
|
6 |
+
for(var i=1;i<list.length;i++)
|
7 |
+
for(var j=i;j<list.length;j++)
|
8 |
+
if(list[j]<list[i-1]){var temp=list[j];list[j]=list[i-1];list[i-1]=temp;var temp=idlist[j];idlist[j]=idlist[i-1];idlist[i-1]=temp}
|
9 |
+
return idlist.concat(nolist)};this.additem=function(item){this.items.push(item)};this.apply_filters=function(section,val){if(typeof val=="undefined")return null;var idlist=this._calc_prioritized_list(section);if(idlist.length==0)return val;for(var i=0;i<idlist.length;i++){var item=this.items[idlist[i]];var func=null;if(typeof item[section]=="function")func=item[section];else if(typeof item[section].func=="function")func=item[section].func;if(func!=null){val=func.apply(this,Array.prototype.slice.call(arguments,1));arguments[1]=val}}
|
10 |
+
return val};this.do_action=function(section){var idlist=this._calc_prioritized_list(section);if(idlist.length==0)return;for(var i=0;i<idlist.length;i++){var item=this.items[idlist[i]];var func=null;if(typeof item[section]=="function")func=item[section];else if(typeof item[section].func=="function")func=item[section].func;if(func!=null)
|
11 |
+
func.apply(this,Array.prototype.slice.call(arguments,1))}}}
|
12 |
+
function wfu_plugin_load_action(sid){wfu_install_unload_hook();var editbox=document.getElementById("selectsubdiredit_"+sid);if(editbox&&editbox.style.display!="none"){wfu_attach_element_handlers(editbox,new Function("wfu_selectsubdiredit_change("+sid+");"))}}
|
13 |
+
function wfu_install_unload_hook(){window.onbeforeunload=wfu_unload_hook}
|
14 |
+
function wfu_unload_hook(){if(GlobalData.UploadInProgressString!="")
|
15 |
+
if(GlobalData.UploadInProgressString.trim()!=""){return GlobalData.consts.wfu_pageexit_prompt}}
|
16 |
+
function wfu_Check_Browser_Capabilities(){if(typeof wfu_BrowserCaps!="undefined")return;wfu_BrowserCaps=new Object();var xmlhttp=wfu_GetHttpRequestObject();wfu_BrowserCaps.supportsAJAX=(xmlhttp!=null);wfu_BrowserCaps.supportsUploadProgress=!!(xmlhttp&&('upload' in xmlhttp)&&('onprogress' in xmlhttp.upload));var fd=null;try{var fd=new FormData()}
|
17 |
+
catch(e){}
|
18 |
+
wfu_BrowserCaps.supportsHTML5=(fd!=null);var e=document.createElement("iframe");wfu_BrowserCaps.supportsIFRAME=(e!=null);wfu_BrowserCaps.supportsDRAGDROP=(window.FileReader?!0:!1);wfu_BrowserCaps.supportsAnimation=wfu_check_animation();wfu_BrowserCaps.isSafari=(Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor')>0)}
|
19 |
+
function wfu_check_animation(){var animation=!1,animationstring='animation',keyframeprefix='',domPrefixes='Webkit Moz O ms Khtml'.split(' '),pfx='';var elm=document.createElement('DIV');if(elm.style.animationName){animation=!0}
|
20 |
+
if(animation===!1){for(var i=0;i<domPrefixes.length;i++){if(elm.style[domPrefixes[i]+'AnimationName']!==undefined){pfx=domPrefixes[i];animationstring=pfx+'Animation';keyframeprefix='-'+pfx.toLowerCase()+'-';animation=!0;break}}}
|
21 |
+
return animation}
|
22 |
+
function wfu_join_strings(delimeter){var args=[].slice.call(arguments);var str="";var delim="";for(var i=1;i<args.length;i++){if(str==""||args[i]=="")delim="";else delim=delimeter;str+=delim+args[i]}
|
23 |
+
return str}
|
24 |
+
function wfu_plugin_decode_string(str){var i=0;var newstr="";var num,val;while(i<str.length){num=parseInt(str.substr(i,2),16);if(num<128)val=num;else if(num<224)val=((num&31)<<6)+(parseInt(str.substr((i+=2),2),16)&63);else val=((num&15)<<12)+((parseInt(str.substr((i+=2),2),16)&63)<<6)+(parseInt(str.substr((i+=2),2),16)&63);newstr+=String.fromCharCode(val);i+=2}
|
25 |
+
return newstr}
|
26 |
+
function wfu_plugin_encode_string(str){var i=0;var newstr="";var hex="";for(i=0;i<str.length;i++){num=str.charCodeAt(i);if(num>=2048)num=(((num&16773120)|917504)<<4)+(((num&4032)|8192)<<2)+((num&63)|128);else if(num>=128)num=(((num&65472)|12288)<<2)+((num&63)|128);hex=num.toString(16);if(hex.length==1||hex.length==3||hex.length==5)hex="0"+hex;newstr+=hex}
|
27 |
+
return newstr}
|
28 |
+
function wfu_randomString(len){var chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";var string_length=len;var randomstring='';for(var i=0;i<string_length;i++){var rnum=Math.floor(Math.random()*chars.length);randomstring+=chars.substring(rnum,rnum+1)}
|
29 |
+
return randomstring}
|
30 |
+
function wfu_addEventHandler(obj,evt,handler){if(obj.addEventListener){obj.addEventListener(evt,handler,!1)}
|
31 |
+
else if(obj.attachEvent){obj.attachEvent('on'+evt,handler)}
|
32 |
+
else{obj['on'+evt]=handler}}
|
33 |
+
function wfu_attach_element_handlers(item,handler){var elem_events=['DOMAttrModified','textInput','input','change','keypress','paste','focus','propertychange'];for(var i=0;i<elem_events.length;i++)
|
34 |
+
wfu_addEventHandler(item,elem_events[i],handler);}
|
35 |
+
function wfu_GetHttpRequestObject(){var xhr=null;try{xhr=new XMLHttpRequest()}
|
36 |
+
catch(e){try{xhr=new ActiveXObject("Msxml2.XMLHTTP")}
|
37 |
+
catch(e2){try{xhr=new ActiveXObject("Microsoft.XMLHTTP")}
|
38 |
+
catch(e){}}}
|
39 |
+
if(xhr==null&&window.createRequest){try{xmlhttp=window.createRequest()}
|
40 |
+
catch(e){}}
|
41 |
+
return xhr}
|
42 |
+
function wfu_filedetails_showhide(sid,fileid,show){var item1=document.getElementById('wfu_messageblock_arrow_'+sid+'_'+fileid);var item2=document.getElementById('wfu_messageblock_arrow_'+sid+'_up_'+fileid);var item3=document.getElementById('wfu_messageblock_arrow_'+sid+'_down_'+fileid);var item4=document.getElementById('wfu_messageblock_subheader_'+sid+'_'+fileid);var item5=document.getElementById('wfu_messageblock_header_'+sid+'_state_'+fileid);if(show){item2.style.display="";item3.style.display="none";item4.style.display="";item5.value=""}
|
43 |
+
else{item2.style.display="none";item3.style.display="";item4.style.display="none";item5.value="none"}}
|
44 |
+
function wfu_get_file_ids(sid){var message_table=document.getElementById('wfu_messageblock_'+sid);var next_block=document.getElementById('wfu_messageblock_subheader_'+sid).nextSibling;var prefix='wfu_messageblock_'+sid+'_';var file_ids=[];while(next_block!=null){if(next_block.nodeType===1&&next_block.id.substr(0,prefix.length)==prefix)
|
45 |
+
file_ids.push(next_block.id.substr(next_block.id.lastIndexOf("_")+1));next_block=next_block.nextSibling}
|
46 |
+
return file_ids}
|
47 |
+
function wfu_get_filelist(sid,include_filearray){include_filearray=typeof include_filearray!=='undefined'?include_filearray:!0;var inputfile=document.getElementById("upfile_"+sid);var farr=inputfile.files;if(!farr){if(inputfile.value)farr=[{name:inputfile.value}];else farr=[]}
|
48 |
+
if(include_filearray&&typeof inputfile.filearray!=="undefined")farr=inputfile.filearray;return farr}
|
49 |
+
function wfu_add_files(sid,files){var inputfile=document.getElementById("upfile_"+sid);if(typeof inputfile.filearray=="undefined"){inputfile.filearray=Array();inputfile.filearrayprops=Array()}
|
50 |
+
document.getElementById("uploadform_"+sid).reset();inputfile.filearray.length=inputfile.filearrayprops.length=0;for(var i=0;i<files.length;i++){inputfile.filearray.push(files[i].file);inputfile.filearrayprops.push(files[i].props)}}
|
51 |
+
function wfu_filedetails_toggle(sid,fileid){var item1=document.getElementById('wfu_messageblock_arrow_'+sid+'_'+fileid);var item2=document.getElementById('wfu_messageblock_arrow_'+sid+'_up_'+fileid);wfu_filedetails_showhide(sid,fileid,item2.style.display=="none")}
|
52 |
+
function wfu_headerdetails_showhide(sid,show){var item1=document.getElementById('wfu_messageblock_arrow_'+sid);var item2=document.getElementById('wfu_messageblock_arrow_'+sid+'_up');var item3=document.getElementById('wfu_messageblock_arrow_'+sid+'_down');var item4=document.getElementById('wfu_messageblock_subheader_'+sid);var item5=document.getElementById('wfu_messageblock_subheader_'+sid+'_message');var item6=document.getElementById('wfu_messageblock_subheader_'+sid+'_adminmessage');var item7=document.getElementById('wfu_messageblock_header_'+sid+'_state');var file_ids=wfu_get_file_ids(sid);if(show){item2.style.display="";item3.style.display="none";if(item5.style.display!="none"||item6.style.display!="none")item4.style.display="";item7.value="";for(var i=0;i<file_ids.length;i++){document.getElementById('wfu_messageblock_'+sid+'_'+file_ids[i]).style.display="";document.getElementById('wfu_messageblock_subheader_'+sid+'_'+file_ids[i]).style.display=document.getElementById('wfu_messageblock_header_'+sid+'_state_'+file_ids[i]).value}}
|
53 |
+
else{item2.style.display="none";item3.style.display="";item4.style.display="none";item7.value="none";for(var i=0;i<file_ids.length;i++){document.getElementById('wfu_messageblock_'+sid+'_'+file_ids[i]).style.display="none";document.getElementById('wfu_messageblock_subheader_'+sid+'_'+file_ids[i]).style.display="none"}}}
|
54 |
+
function wfu_headerdetails_toggle(sid){var item1=document.getElementById('wfu_messageblock_arrow_'+sid);var item2=document.getElementById('wfu_messageblock_arrow_'+sid+'_up');wfu_headerdetails_showhide(sid,item2.style.display=="none")}
|
55 |
+
function wfu_attach_cancel_event(sid,session_token,unique_upload_id,JSONobj){var textbox=document.getElementById('fileName_'+sid);if(!textbox)return;textbox.onkeyup=function(e){if(e.keyCode!=27||!GlobalData[sid]||GlobalData[sid].xhrs.length==0)return;var answer=confirm(GlobalData.consts.cancel_upload_prompt);if(answer==!0){var farr=wfu_get_filelist(sid);var firstxhr=[];var filename=[];for(var i=0;i<farr.length;i++){firstxhr.push(null);filename.push(farr[i].name)}
|
56 |
+
for(var i=0;i<GlobalData[sid].xhrs.length;i++){var file_ind=GlobalData[sid].xhrs[i].file_id-1;if(file_ind>=0&&firstxhr[file_ind]==null)
|
57 |
+
firstxhr[file_ind]=GlobalData[sid].xhrs[i]}
|
58 |
+
if(JSONobj.debugmode=='true')console.log("upload cancelled!");for(var i=0;i<firstxhr.length;i++){if(firstxhr[i]==null){firstxhr[i]=wfu_GetHttpRequestObject();if(firstxhr[i]!=null)
|
59 |
+
wfu_initialize_fileupload_xhr(firstxhr[i],sid,session_token,unique_upload_id,JSONobj,i,filename[i])}
|
60 |
+
if(firstxhr[i]!=-1){var evt={target:{responseText:"force_cancel_code",shortcode_id:sid}};wfu_uploadComplete.call(firstxhr[i],evt)}}
|
61 |
+
textbox.onkeyup=null}}}
|
62 |
+
function wfu_dettach_cancel_event(sid){var textbox=document.getElementById('fileName_'+sid);if(textbox)textbox.onkeyup=null}
|
63 |
+
function wfu_selectbutton_changed(sid,usefilearray){if(!wfu_BrowserCaps.supportsAJAX||!wfu_BrowserCaps.supportsHTML5)usefilearray=0;var inputfile=document.getElementById("upfile_"+sid);var farr=wfu_get_filelist(sid,!1);if(usefilearray==1){if(typeof inputfile.filearray=="undefined"){inputfile.filearray=Array()}
|
64 |
+
for(var i=0;i<farr.length;i++){inputfile.filearray.push(farr[i])}}
|
65 |
+
else{if(typeof inputfile.filearray!="undefined"){delete inputfile.filearray}}
|
66 |
+
wfu_update_filename_text(sid)}
|
67 |
function wfu_selectbutton_clicked(sid){var message_container=document.getElementById("wordpress_file_upload_message_"+sid);if(message_container)message_container.style.display="none";wfu_reset_message(sid);document.getElementById("upfile_"+sid).value="";var ftext=document.getElementById("fileName_"+sid);if(ftext){ftext.value="";ftext.className="file_input_textbox"}}
|
68 |
+
function wfu_update_uploadbutton_status(sid){var uploadbutton=document.getElementById("upload_"+sid);var allownofile=document.getElementById("wordpress_file_upload_"+sid+"_nofile").value;if(uploadbutton){var farr=wfu_get_filelist(sid);var status=(farr.length>0||allownofile=="1");status=wfu_Code_Objects[sid].apply_filters("uploadbutton_status",status);uploadbutton.disabled=!status}}
|
69 |
+
function wfu_update_filename_text(sid){var ftext=document.getElementById("fileName_"+sid);if(ftext){var farr=wfu_get_filelist(sid);var txt='';for(var i=0;i<farr.length;i++){if(txt!='')txt+=', ';txt+=farr[i].name.replace(/c:\\fakepath\\/i,"")}
|
70 |
+
ftext.value=txt}}
|
71 |
+
function wfu_selectsubdir_check(sid){var sel=document.getElementById("selectsubdir_"+sid);if(!sel)return!0;var editbox=document.getElementById("selectsubdiredit_"+sid);var editable=(editbox.style.display!="none");if(editable&&sel.selectedIndex>0){editbox.value=sel.value.replace(/^\s+/,"");editbox.className="file_item_clean_match subfolder_autoplus_match";wfu_selectsubdiredit_change(sid)}
|
72 |
+
if(editable)document.getElementById('hiddeninput_'+sid).value=editbox.value;else document.getElementById('hiddeninput_'+sid).value=sel.selectedIndex;if((!editable&&sel.selectedIndex==0)||(editable&&(editbox.value==''||editbox.className=="file_item_clean_empty subfolder_autoplus_empty"))){if(editable){sel.className='subfolder_autoplus_dropdown_prompt';editbox.value="";GlobalData.FreeChangeHandler=!0;editbox.className="file_item_clean_prompt subfolder_autoplus_prompt";GlobalData.FreeChangeHandler=!1}
|
73 |
+
else sel.className='file_item_clean_prompt subfolder_dropdown_prompt';return!1}
|
74 |
+
else{if(editable)sel.className='subfolder_autoplus_dropdown';else sel.className='file_item_clean subfolder_dropdown';if(editable&&editbox.className=="file_item_clean_prompt subfolder_autoplus_prompt")editbox.className="file_item_clean subfolder_autoplus";sel.options[0].style.display="none";return!0}}
|
75 |
+
function wfu_selectsubdiredit_enter(sid){var sel=document.getElementById("selectsubdir_"+sid);var editbox=document.getElementById("selectsubdiredit_"+sid);if(editbox.className=="file_item_clean_empty subfolder_autoplus_empty")editbox.value="";sel.className='subfolder_autoplus_dropdown';editbox.className="file_item_clean subfolder_autoplus"}
|
76 |
function wfu_selectsubdiredit_exit(sid){var editbox=document.getElementById("selectsubdiredit_"+sid);if(editbox.value==""){editbox.value=GlobalData.consts.wfu_subdir_typedir;editbox.className="file_item_clean_empty subfolder_autoplus_empty"}}
|
77 |
+
function wfu_selectsubdiredit_change(sid){if(GlobalData.FreeChangeHandler)return;var sel=document.getElementById("selectsubdir_"+sid);var editbox=document.getElementById("selectsubdiredit_"+sid);if(editbox.style.display=="none")return;if(editbox.className=="file_item_clean_empty subfolder_autoplus_empty"){sel.selectedIndex=0;document.getElementById('hiddeninput_'+sid).value='';return}
|
78 |
+
document.getElementById('hiddeninput_'+sid).value=editbox.value;var found=!1,opt;for(var i=1;i<sel.options.length;i++){opt=sel.options[i].value.replace(/^\s+/,"").toLowerCase();if(editbox.value.length>=3){if(opt.substr(0,editbox.value.length)==editbox.value.toLowerCase())sel.options[i].style.display='block';else sel.options[i].style.display='none'}
|
79 |
+
else sel.options[i].style.display='block';if(sel.options[i].value.replace(/^\s+/,"")==editbox.value){sel.selectedIndex=i;editbox.className="file_item_clean_match subfolder_autoplus_match";found=!0}}
|
80 |
+
if(!found){sel.selectedIndex=0;editbox.className="file_item_clean subfolder_autoplus"}}
|
81 |
+
function wfu_selectsubdir_disable_onoff(sid,status){var sel=document.getElementById("selectsubdir_"+sid);if(!sel)return!0;var editbox=document.getElementById("selectsubdiredit_"+sid);var editable=(editbox.style.display!="none");sel.disabled=status;if(editable)editbox.disabled=status}
|
82 |
+
function wfu_userdata_focused(obj){var wrapper=document.getElementById(obj.id.replace('_field_','_fieldwrapper_'));if(wrapper.className=='file_userdata_fieldwrapper_required_empty'){wrapper.className='file_userdata_fieldwrapper_required';var msg_hint=document.getElementById(obj.id.replace('_field_','_hint_'));msg_hint.style.display="none"}}
|
83 |
+
function wfu_Redirect(link){window.location=link}
|
84 |
+
function wfu_loadStart(evt){}
|
85 |
+
function wfu_update_upload_metrics(sid){var totalsize=0;var totalloaded=0;var totaldelta=0;var metrics=Array();var farr=wfu_get_filelist(sid);for(var i=0;i<farr.length;i++)metrics[i]={size:farr[i].size,aborted:!1,loaded:0,delta:0};for(var i=0;i<GlobalData[sid].xhrs.length;i++){var file_id=GlobalData[sid].xhrs[i].file_id;if(file_id>0&&GlobalData[sid].xhrs[i].aborted)metrics[file_id-1].aborted=!0}
|
86 |
+
for(var i=0;i<GlobalData[sid].xhrs.length;i++){var file_id=GlobalData[sid].xhrs[i].file_id;if(file_id>0&&!metrics[file_id-1].aborted){metrics[file_id-1].size=Math.max(GlobalData[sid].xhrs[i].totalsize,metrics[file_id-1].size);metrics[file_id-1].loaded+=GlobalData[sid].xhrs[i].sizeloaded;metrics[file_id-1].delta+=Math.max(GlobalData[sid].xhrs[i].deltaloaded,0)}}
|
87 |
+
for(var i=0;i<farr.length;i++){var Gm=GlobalData[sid].metrics[i];if(!metrics[i].aborted&&metrics[i].size>0){Gm.size=metrics[i].size;if(GlobalData.consts.wfu_uploadprogress_mode=="incremental")
|
88 |
+
Gm.progress_pos=Math.min(Gm.progress_pos+(1-Gm.progress_pos)*metrics[i].delta/(Gm.size-Gm.loaded),1.0);else Gm.progress_pos=metrics[i].loaded/metrics[i].size;Gm.loaded=metrics[i].loaded;totalsize+=Gm.size;totalloaded+=Gm.loaded;totaldelta+=metrics[i].delta}
|
89 |
+
else{Gm.size=0;Gm.progress_pos=0.0;Gm.loaded=0}}
|
90 |
+
var Gm=GlobalData[sid].metricstotal;Gm.size=totalsize;if(GlobalData.consts.wfu_uploadprogress_mode=="incremental")
|
91 |
+
Gm.progress_pos=Math.min(Gm.progress_pos+(1-Gm.progress_pos)*totaldelta/(Gm.size-Gm.loaded),1.0);else Gm.progress_pos=totalloaded/totalsize;Gm.loaded=totalloaded}
|
92 |
+
function wfu_uploadProgress(evt,sid,xhrid,debugmode){if(debugmode&&typeof this.xhr=="undefined"){console.log("total="+evt.total+", loaded="+evt.loaded);console.log(evt)}
|
93 |
+
var this_xhr=GlobalData[sid].xhrs[xhrid];if(this_xhr.file_id==0)return;var percentComplete=0;var delta=0;var simplebar=document.getElementById('progressbar_'+sid+'_animation');if(evt.lengthComputable){this_xhr.deltaloaded=evt.loaded-this_xhr.sizeloaded;this_xhr.sizeloaded=evt.loaded;if(this_xhr.size<evt.total&&evt.total>0){delta=evt.total-this_xhr.size;this_xhr.deltasize+=delta;this_xhr.size+=delta;for(var i=0;i<GlobalData[sid].xhrs.length;i++)
|
94 |
+
if(GlobalData[sid].xhrs[i].file_id==this_xhr.file_id){GlobalData[sid].xhrs[i].totalsize+=delta}}
|
95 |
+
wfu_update_upload_metrics(sid);this_xhr.deltaloaded=0;if(simplebar){percentComplete=Math.round(GlobalData[sid].metricstotal.progress_pos*100);simplebar.style.width=percentComplete.toString()+'%'}}
|
96 |
+
else{if(simplebar)simplebar.style.width='0%'}}
|
97 |
+
function wfu_notify_WPFilebase(params_index,session_token){var xhr=wfu_GetHttpRequestObject();if(xhr==null){var i=document.createElement("iframe");i.style.display="none";i.src=GlobalData.consts.ajax_url+"?action=wfu_ajax_action_notify_wpfilebase¶ms_index="+params_index+"&session_token="+session_token;document.body.appendChild(i);return}
|
98 |
+
var url=GlobalData.consts.ajax_url;params=new Array(3);params[0]=new Array(2);params[0][0]='action';params[0][1]='wfu_ajax_action_notify_wpfilebase';params[1]=new Array(2);params[1][0]='params_index';params[1][1]=params_index;params[2]=new Array(2);params[2][0]='session_token';params[2][1]=session_token;var parameters='';for(var i=0;i<params.length;i++){parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1])}
|
99 |
+
xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){}
|
100 |
+
xhr.send(parameters)}
|
101 |
+
function wfu_send_email_notification(sid,unique_id,params_index,session_token,notify_only_filename_list,notify_target_path_list,notify_attachment_list,debugmode,is_admin){var xhr=wfu_GetHttpRequestObject();if(xhr==null){return}
|
102 |
+
var url=GlobalData.consts.ajax_url;var userdata_count=wfu_get_userdata_count(sid);params=new Array(7+userdata_count);params[0]=new Array(2);params[0][0]='action';params[0][1]='wfu_ajax_action_send_email_notification';params[1]=new Array(2);params[1][0]='params_index';params[1][1]=params_index;params[2]=new Array(2);params[2][0]='session_token';params[2][1]=session_token;params[3]=new Array(2);params[3][0]='only_filename_list';params[3][1]=notify_only_filename_list;params[4]=new Array(2);params[4][0]='target_path_list';params[4][1]=notify_target_path_list;params[5]=new Array(2);params[5][0]='attachment_list';params[5][1]=notify_attachment_list;params[6]=new Array(2);params[6][0]='uniqueuploadid_'+sid;params[6][1]=unique_id;for(var i=0;i<userdata_count;i++){params[7+i]=new Array(2);params[7+i][0]='userdata_'+i;params[7+i][1]=wfu_plugin_encode_string(document.getElementById('hiddeninput_'+sid+'_userdata_'+i).value)}
|
103 |
+
var parameters='';for(var i=0;i<params.length;i++){parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1])}
|
104 |
+
wfu_initialize_fileupload_xhr(xhr,sid,session_token,unique_id,{params_index:params_index,debugmode:debugmode,is_admin:is_admin,fail_colors:GlobalData.consts.fail_colors,error_header:""},-1,"");xhr.error_adminmessage_unknown="";xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.addEventListener("load",wfu_uploadComplete,!1);xhr.addEventListener("error",wfu_uploadFailed,!1);xhr.addEventListener("abort",wfu_uploadCanceled,!1);xhr.send(parameters)}
|
105 |
+
function wfu_format_debug_data(data,title){output='<label class="file_messageblock_subheader_debugmessage_label">';output+='Debug Data'+title;output+='</label>';output+='<div class="file_messageblock_subheader_debugmessage_container">';output+=data;output+='</div>';return output}
|
106 |
+
function wfu_uploadComplete(evt){var d=new Date();var sid=this.shortcode_id;var i=this.file_id;var last=!1;var js_script_enc="";var upload_params="";var safe_params="";var file_status="unknown";var uploaded_file_props="";var debug_data="";var success_txt="wfu_fileupload_success:";this.loading=!1;this.end_time=d.getTime();var txt=evt.target.responseText;var result_data=txt;var error_code='error';if(txt!=-1){if(txt.indexOf('force_errorabort_code')>-1){error_code='errorabort';txt=txt.replace('force_errorabort_code','')}
|
107 |
+
if(txt.indexOf('force_cancel_code')>-1){error_code='errorcancel';txt=txt.replace('force_cancel_code','')}}
|
108 |
+
if(txt!=-1){var pos=txt.indexOf(success_txt);if(pos>-1){if(this.debugmode=="true")debug_data=txt.substr(0,pos);result_data=txt.substr(pos+success_txt.length);pos=result_data.indexOf(":");js_script_enc=result_data.substr(0,pos);result_data=result_data.substr(pos+1);pos=result_data.indexOf(":");safe_params=result_data.substr(0,pos);upload_params=result_data.substr(pos+1)}
|
109 |
+
if(debug_data!=""){var title="";if(this.requesttype=="fileupload")title=' - File: '+this.file_id;else if(this.requesttype=="email")title=' - Email Notification';debug_data=wfu_format_debug_data(debug_data,title)}
|
110 |
+
if(safe_params!=""){var safe_parts=safe_params.split(";");if(parseInt(safe_parts[2])==1){var filedata=safe_parts[3].split(",");file_status=wfu_plugin_decode_string(filedata[0]);uploaded_file_props=filedata[4]}}}
|
111 |
+
if(upload_params==""||safe_params==""){var error_colors=this.fail_colors.split(",");var Params=wfu_Initialize_Params();Params.general.shortcode_id=sid;Params.general.unique_id=this.unique_id;Params.general.state=7;Params.general.files_count=(this.requesttype=="fileupload")?1:0;Params.general.upload_finish_time=this.finish_time;if(error_code!="errorcancel"){Params.general.fail_message=GlobalData.consts.message_unknown;Params.general.fail_admin_message=wfu_join_strings("<br />",this.error_adminmessage_unknown,this.requesttype+":"+result_data)}
|
112 |
+
else{Params.general.fail_message=GlobalData.consts.file_cancelled;Params.general.fail_admin_message=""}
|
113 |
+
if(Params.general.files_count>0){Params[0]={};Params[0].color=error_colors[0];Params[0].bgcolor=error_colors[1];Params[0].borcolor=error_colors[2];Params[0].message_type=error_code;file_status=error_code;Params[0].header=this.error_message_header;Params[0].message=GlobalData.consts.message_timelimit;Params[0].admin_messages=this.is_admin=="true"?GlobalData.consts.message_admin_timelimit:""}
|
114 |
+
else Params.general.admin_messages.other=this.is_admin=="true"?GlobalData.consts.message_admin_timelimit:"";if(Params.general.upload_finish_time>0){if(d.getTime()<Params.general.upload_finish_time){if(Params.general.files_count>0){Params[0].message=Params.general.fail_message;Params[0].admin_messages=this.is_admin=="true"?Params.general.fail_admin_message:""}
|
115 |
+
else Params.general.admin_messages.other=this.is_admin=="true"?Params.general.fail_admin_message:""}}}
|
116 |
+
if(upload_params==""||safe_params==""){last=wfu_ProcessUploadComplete(sid,this.file_id,Params,this.unique_id,this.params_index,this.session_token,"",[this.debugmode,debug_data,this.is_admin],this.requesttype,"")}
|
117 |
+
else{last=wfu_ProcessUploadComplete(sid,this.file_id,upload_params,this.unique_id,this.params_index,this.session_token,safe_params,[this.debugmode,debug_data,this.is_admin],this.requesttype,js_script_enc)}
|
118 |
+
if(last){wfu_dettach_cancel_event(sid);wfu_unlock_upload(sid);wfu_hide_simple_progressbar(sid);wfu_clear(sid)}
|
119 |
+
if(evt.target.return_status)
|
120 |
+
return file_status}
|
121 |
+
function wfu_ProcessUploadComplete(sid,file_id,upload_params,unique_id,params_index,session_token,safe_output,debug_data,request_type,js_script_enc){if(!sid||sid<0)return;if(upload_params==null||upload_params=="")return;if(unique_id=="")return;if(unique_id!="no-ajax"&&!GlobalData[sid])return;var do_redirect=!1;if(typeof upload_params==="string"){upload_params=wfu_plugin_decode_string(upload_params.replace(/^\s+|\s+$/g,""));var Params=null;try{Params=JSON.parse(upload_params)}
|
122 |
+
catch(e){}
|
123 |
+
if(Params==null){var safe_parts=safe_output.split(";");Params=wfu_Initialize_Params();Params.general.shortcode_id=sid;Params.general.unique_id=unique_id;Params.general.state=safe_parts[0];if(Params.general.state==4)Params.general.state++;var default_colors=safe_parts[1].split(",");var filedata="";var error_jsonparse_filemessage=GlobalData.consts.jsonparse_filemessage;var error_jsonparse_message=GlobalData.consts.jsonparse_message;var error_jsonparse_adminmessage=GlobalData.consts.jsonparse_adminmessage;Params.general.files_count=parseInt(safe_parts[2]);for(var i=0;i<Params.general.files_count;i++){Params[i]={};Params[i].color=default_colors[0];Params[i].bgcolor=default_colors[1];Params[i].borcolor=default_colors[2];filedata=safe_parts[i+3].split(",");Params[i].message_type=wfu_plugin_decode_string(filedata[0]);Params[i].header=wfu_plugin_decode_string(filedata[1]);if(Params[i].message_type=="success"){Params[i].header+=error_jsonparse_filemessage;Params[i].message_type="warning"}
|
124 |
+
Params[i].message=wfu_join_strings("<br />",error_jsonparse_message,wfu_plugin_decode_string(filedata[2]));Params[i].admin_messages=wfu_join_strings("<br />",error_jsonparse_adminmessage,wfu_plugin_decode_string(filedata[3]))}}}
|
125 |
+
else if(typeof upload_params==="object")var Params=upload_params;else return;i=0;while(Params[i]){if(Params[i].message_type){if(Params[i].message_type.substr(0,5)=='error')Params[i].message_type=Params[i].message_type.substr(0,5)}
|
126 |
+
i++}
|
127 |
+
var message_table=document.getElementById('wfu_messageblock_'+sid);var UploadStates_Ok=!0;if(!UploadStates[sid]&&message_table){var upload_states=document.getElementById('wfu_messageblock_header_'+sid+'_states').value;upload_states=wfu_plugin_decode_string(upload_states.replace(/^\s+|\s+$/g,""));UploadStates[sid]=null;try{UploadStates[sid]=JSON.parse(upload_states)}
|
128 |
+
catch(e){}
|
129 |
+
if(UploadStates[sid]==null){UploadStates_Ok=!1}}
|
130 |
+
if(!GlobalData[sid])GlobalData[sid]=Object();var G=GlobalData[sid];if(unique_id=="no-ajax"){G.last=!1;G.unique_id="";G.files_count=Params.general.files_count;if(Params.general.state==0)Params.general.files_count=0;G.files_processed=Params.general.files_count;if(UploadStates_Ok)G.upload_state=Params.general.state;else G.upload_state=10;G.nofileupload=(Params.general.state>12);G.message=Params.general.message;G.update_wpfilebase=Params.general.update_wpfilebase;G.redirect_link=Params.general.redirect_link;G.notify_only_filename_list="";G.notify_target_path_list="";G.notify_attachment_list="";G.admin_messages={};G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase;G.admin_messages.notify=Params.general.admin_messages.notify;G.admin_messages.redirect=Params.general.admin_messages.redirect;G.admin_messages.debug=debug_data[1];G.admin_messages.other=Params.general.admin_messages.other;G.errors={};G.errors.wpfilebase=Params.general.errors.wpfilebase;G.errors.notify=Params.general.errors.notify;G.errors.redirect=Params.general.errors.redirect;G.current_size=0;G.total_size=0}
|
131 |
+
else{if(G.unique_id==""||G.unique_id!=unique_id||G.unique_id!=Params.general.unique_id)return;if(G.last)return;if(Params.general.files_count==0&&Params[0]){if(Params[0].message_type=="error"){Params.general.files_count=1}}
|
132 |
+
var file_status="";for(var i=0;i<Params.general.files_count;i++){if(Params[i].message_type=="error"&&G.files_processed==0)file_status="error1";else if(Params[i].message_type=="error"&&G.files_processed>0)file_status="error2";else file_status=Params[i].message_type;G.upload_state=GlobalData.filestatematch[file_status][G.upload_state]}
|
133 |
+
if(!UploadStates_Ok)G.upload_state=10;G.files_processed+=Params.general.files_count;G.message=wfu_join_strings("<br />",G.message,Params.general.message);if(G.update_wpfilebase=="")G.update_wpfilebase=Params.general.update_wpfilebase;if(!request_type||(request_type&&request_type!="email"))G.redirect_link=Params.general.redirect_link;G.notify_only_filename_list=wfu_join_strings(", ",G.notify_only_filename_list,Params.general.notify_only_filename_list);G.notify_target_path_list=wfu_join_strings(", ",G.notify_target_path_list,Params.general.notify_target_path_list);G.notify_attachment_list=wfu_join_strings(",",G.notify_attachment_list,Params.general.notify_attachment_list);G.admin_messages.debug=wfu_join_strings("<br />",G.admin_messages.debug,debug_data[1]);G.admin_messages.other=wfu_join_strings("<br />",G.admin_messages.other,Params.general.admin_messages.other);if(G.admin_messages.wpfilebase=="")G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase;if(G.admin_messages.notify=="")G.admin_messages.notify=Params.general.admin_messages.notify;if(G.admin_messages.redirect=="")G.admin_messages.redirect=Params.general.admin_messages.redirect;if(G.errors.wpfilebase=="")G.errors.wpfilebase=Params.general.errors.wpfilebase;if(G.errors.notify=="")G.errors.notify=Params.general.errors.notify;if(G.errors.redirect=="")G.errors.redirect=Params.general.errors.redirect}
|
134 |
+
if(G.files_processed==G.files_count){G.last=!0;if(G.update_wpfilebase!=""){G.admin_messages.wpfilebase="";wfu_notify_WPFilebase(params_index,session_token)}
|
135 |
+
if(G.notify_only_filename_list!=""){G.admin_messages.notify="";if(G.nofileupload)G.notify_only_filename_list="";wfu_send_email_notification(sid,unique_id,params_index,session_token,G.notify_only_filename_list,G.notify_target_path_list,G.notify_attachment_list,debug_data[0],debug_data[2]);G.last=!1;G.notify_only_filename_list=""}
|
136 |
+
if(G.last){if(unique_id!="no-ajax"&&!G.nofileupload)wfu_notify_server_upload_ended(sid,unique_id,params_index,session_token);GlobalData.UploadInProgressString=GlobalData.UploadInProgressString.replace(new RegExp("\\["+unique_id+"\\]","g"),"")}
|
137 |
+
if(G.errors.redirect!="")G.redirect_link="";if(G.redirect_link!=""&&G.last&&GlobalData.UploadInProgressString.trim()==""){G.upload_state=11;do_redirect=!0}}
|
138 |
+
var nonadmin_message=G.message;var admin_message=wfu_join_strings("<br />",G.admin_messages.other,G.admin_messages.wpfilebase,G.admin_messages.notify,G.admin_messages.redirect,G.admin_messages.debug);if(!UploadStates_Ok){var error_jsonparse_headermessage=GlobalData.consts.jsonparse_headermessage;var error_jsonparse_headeradminmessage=GlobalData.consts.jsonparse_headeradminmessage;nonadmin_message=wfu_join_strings("<br />",error_jsonparse_headermessage,nonadmin_message);admin_message=wfu_join_strings("<br />",error_jsonparse_headeradminmessage,admin_message)}
|
139 |
+
if(G.last){if(G.nofileupload){if(unique_id!="no-ajax"){if(G.upload_state==0)G.upload_state=14;else if(G.upload_state<4)G.upload_state=15}
|
140 |
+
if(G.upload_state==15&&Params[0]){nonadmin_message=Params[0].message;admin_message=Params[0].admin_messages}}
|
141 |
+
else{if(G.files_count==0&&G.upload_state!=12)G.upload_state=8;else if(G.upload_state<4)G.upload_state+=4;var admin_messages_exist=(G.admin_messages.wpfilebase!=""||G.admin_messages.notify!=""||G.admin_messages.redirect!=""||G.admin_messages.other!="");if(G.upload_state==4&&admin_message!="")G.upload_state ++;else if(G.upload_state==5&&admin_message==""&&nonadmin_message=="")G.upload_state --}}
|
142 |
+
if(message_table){var subheader_state=document.getElementById('wfu_messageblock_header_'+sid+'_state');var single_file_shown=(G.files_count==1&&nonadmin_message==""&&admin_message==""&&G.last&&!do_redirect&&!G.nofileupload);if(single_file_shown){document.getElementById('wfu_messageblock_header_'+sid).style.display="none"}
|
143 |
+
else{document.getElementById('wfu_messageblock_header_'+sid).style.display="";var header_container=document.getElementById('wfu_messageblock_header_'+sid+'_container');if(UploadStates_Ok){var suffix="";if(G.files_count==1&&(G.upload_state==5||G.upload_state==7))suffix="_singlefile";header_container.innerHTML=UploadStates[sid]["State"+(G.upload_state==0&&G.nofileupload?"13":G.upload_state)+suffix]}
|
144 |
+
else{header_container.innerHTML="";var safe_container=document.getElementById('wfu_messageblock_header_'+sid+'_safecontainer');header_container.innerHTML=safe_container.innerHTML.replace(/_safe/g,"")}
|
145 |
+
var subheader_show=!1;if(nonadmin_message!=""){document.getElementById('wfu_messageblock_subheader_'+sid+'_message').style.display="";document.getElementById('wfu_messageblock_subheader_'+sid+'_messagelabel').innerHTML=nonadmin_message;subheader_show=!0}
|
146 |
+
else document.getElementById('wfu_messageblock_subheader_'+sid+'_message').style.display="none";if(admin_message!=""){document.getElementById('wfu_messageblock_subheader_'+sid+'_adminmessage').style.display="";document.getElementById('wfu_messageblock_subheader_'+sid+'_adminmessagelabel').innerHTML=admin_message;subheader_show=!0}
|
147 |
+
else document.getElementById('wfu_messageblock_subheader_'+sid+'_adminmessage').style.display="none";if(subheader_show)
|
148 |
+
document.getElementById('wfu_messageblock_subheader_'+sid).style.display=subheader_state.value;else document.getElementById('wfu_messageblock_subheader_'+sid).style.display="none";if(subheader_show||(G.files_processed>0&&!G.nofileupload)){header_container.colSpan=2;document.getElementById('wfu_messageblock_arrow_'+sid).style.display=""}
|
149 |
+
else{document.getElementById('wfu_messageblock_arrow_'+sid).style.display="none";header_container.colSpan=3}}
|
150 |
+
if(!G.nofileupload){var next_block=document.getElementById('wfu_messageblock_subheader_'+sid);var next_block_id=0;var file_block=null;var file_template_container=document.getElementById('wfu_messageblock_'+sid+'_filetemplate');var file_contents="";var door=document.getElementById('wfu_messageblock_'+sid+'_door');var ii=0;var headerspan=1;var subheaderspan=2;var file_template=wfu_plugin_decode_string(file_template_container.value.replace(/^\s+|\s+$/g,""));for(var i=0;i<Params.general.files_count;i++){ii=i+file_id;file_contents=file_template.replace(/\[file_id\]/g,ii);file_contents=file_contents.replace(/\[filenumber_display\]/g,"");file_contents=file_contents.replace(/\[fileheader_color\]/g,Params[i].color);file_contents=file_contents.replace(/\[fileheader_bgcolor\]/g,Params[i].bgcolor);file_contents=file_contents.replace(/\[fileheader_borcolor\]/g,Params[i].borcolor);file_contents=file_contents.replace(/\[fileheader_message\]/g,Params[i].header);file_contents=file_contents.replace(/\[filesubheadermessage_display\]/g,"style=\"display:none;\"");file_contents=file_contents.replace(/\[filesubheader_message\]/g,Params[i].message);file_contents=file_contents.replace(/\[filesubheaderadminmessage_display\]/g,"style=\"display:none;\"");file_contents=file_contents.replace(/\[filesubheader_adminmessage\]/g,Params[i].admin_messages);file_contents="<table><tbody>"+file_contents+"</tbody></table>";door.innerHTML=file_contents;headerspan=1;subheaderspan=2;subheader_show=!1;file_block=document.getElementById('wfu_messageblock_'+sid+'_'+ii);if(G.files_count==1){document.getElementById('wfu_messageblock_'+sid+'_filenumber_'+ii).style.display="none";document.getElementById('wfu_messageblock_subheader_'+sid+'_fileempty_'+ii).style.display="none";if(single_file_shown)file_block.style.display="";else file_block.style.display=subheader_state.value;headerspan ++;subheaderspan ++}
|
151 |
+
else file_block.style.display=subheader_state.value;if(Params[i].message!=""){document.getElementById('wfu_messageblock_subheader_'+sid+'_message_'+ii).style.display="";subheader_show=!0}
|
152 |
+
if(Params[i].admin_messages!=""){document.getElementById('wfu_messageblock_subheader_'+sid+'_adminmessage_'+ii).style.display="";subheader_show=!0}
|
153 |
+
if(!subheader_show){document.getElementById('wfu_messageblock_arrow_'+sid+'_'+ii).style.display="none";headerspan ++}
|
154 |
+
document.getElementById('wfu_messageblock_header_'+sid+'_container_'+ii).colSpan=headerspan;document.getElementById('wfu_messageblock_subheader_'+sid+'_container_'+ii).colSpan=subheaderspan;while(next_block_id<ii){next_block=next_block.nextSibling;if(next_block==null)break;if(next_block.nodeType===1)next_block_id=next_block.id.substr(next_block.id.lastIndexOf("_")+1)}
|
155 |
+
message_table.tBodies[0].insertBefore(file_block,next_block);next_block=file_block.nextSibling;file_block=document.getElementById('wfu_messageblock_subheader_'+sid+'_'+ii);message_table.tBodies[0].insertBefore(file_block,next_block);next_block=file_block;next_block_id=ii}
|
156 |
+
if(single_file_shown)document.getElementById('wfu_messageblock_'+sid+'_1').style.display=""}
|
157 |
+
message_table.style.display="";document.getElementById('wordpress_file_upload_message_'+sid).style.display=""}
|
158 |
+
if(js_script_enc)eval(wfu_plugin_decode_string(js_script_enc));if(do_redirect)wfu_Redirect(G.redirect_link);return G.last}
|
159 |
+
function wfu_uploadFailed(evt,debugmode){if(debugmode){console.log("failure report following");console.log(evt)}
|
160 |
+
var xhr=evt.target;var new_evt={target:{responseText:"",shortcode_id:xhr.shortcode_id}};wfu_uploadComplete.call(xhr,new_evt)}
|
161 |
+
function wfu_uploadCanceled(evt){}
|
162 |
+
function wfu_notify_server_upload_ended(sid,unique_id,params_index,session_token){var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var url=GlobalData.consts.ajax_url;params=new Array(6);params[0]=new Array(2);params[0][0]='action';params[0][1]='wfu_ajax_action';params[1]=new Array(2);params[1][0]='wfu_uploader_nonce';params[1][1]=document.getElementById("wfu_uploader_nonce_"+sid).value;params[2]=new Array(2);params[2][0]='uniqueuploadid_'+sid;params[2][1]=unique_id;params[3]=new Array(2);params[3][0]='params_index';params[3][1]=params_index;params[4]=new Array(2);params[4][0]='session_token';params[4][1]=session_token;params[5]=new Array(2);params[5][0]='upload_finished';params[5][1]=1;var parameters='';for(var i=0;i<params.length;i++){parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1])}
|
163 |
+
xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){wfu_Code_Objects[sid].do_action("after_upload",xhr.responseText)}}};xhr.send(parameters)}
|
164 |
+
function wfu_Initialize_Params(){var params={};params.version="full";params.general={};params.general.shortcode_id=0;params.general.unique_id="";params.general.state=0;params.general.files_count=0;params.general.update_wpfilebase="";params.general.redirect_link="";params.general.upload_finish_time=0;params.general.message="";params.general.message_type="";params.general.admin_messages={};params.general.admin_messages.wpfilebase="";params.general.admin_messages.notify="";params.general.admin_messages.redirect="";params.general.admin_messages.other="";params.general.errors={};params.general.errors.wpfilebase="";params.general.errors.notify="";params.general.errors.redirect="";params.general.color="";params.general.bgcolor="";params.general.borcolor="";params.general.notify_only_filename_list="";params.general.notify_target_path_list="";params.general.notify_attachment_list="";params.general.fail_message="";params.general.fail_admin_message="";return params}
|
165 |
+
function wfu_redirect_to_classic(sid,session_token,flag,adminerrorcode){var allownofile=(document.getElementById("wordpress_file_upload_"+sid+"_nofile").value=="1");var numfiles=wfu_filesselected(sid);if(numfiles==0&&!allownofile)return;if(numfiles>0&&!wfu_selectsubdir_check(sid))return;if(!wfu_check_required_userdata(sid,!0))return;if(!wfu_Code_Objects[sid].apply_filters("pre_start_check",!0))return;wfu_redirect_to_classic_cont(sid,session_token,flag,adminerrorcode)}
|
166 |
+
function wfu_redirect_to_classic_cont(sid,session_token,flag,adminerrorcode){var process_function=function(responseText){var txt_value="";var success_txt="wfu_askserver_success:";var error_txt="wfu_askserver_error:";var pos_success=responseText.indexOf(success_txt);var pos_error=responseText.indexOf(error_txt);if(pos_success>-1){txt_value=responseText.substr(pos_success+success_txt.length);var allownofile=(document.getElementById("wordpress_file_upload_"+sid+"_nofile").value=="1");var numfiles=wfu_filesselected(sid);var nofileupload=(numfiles==0&&allownofile);wfu_Code_Objects[sid].do_action("askserver_success",txt_value,"no-ajax");var Params=wfu_Initialize_Params();Params.general.shortcode_id=sid;Params.general.unique_id="";Params.general.files_count=numfiles;if(nofileupload)Params.general.state=13;wfu_ProcessUploadComplete(sid,0,Params,"no-ajax","",session_token,"",["false","","false"]);document.getElementById('uniqueuploadid_'+sid).value=unique_id;document.getElementById('nofileupload_'+sid).value=(nofileupload?"1":"0");var suffix="";var redirected_txt='';if(flag==1)redirected_txt='_redirected';document.getElementById('upfile_'+sid).name='uploadedfile_'+sid+redirected_txt+suffix;document.getElementById('uploadedfile_'+sid+'_name').name='uploadedfile_'+sid+redirected_txt+'_name';document.getElementById('uploadedfile_'+sid+'_size').name='uploadedfile_'+sid+redirected_txt+'_size';if(adminerrorcode>0)document.getElementById('adminerrorcodes_'+sid).value=adminerrorcode;else document.getElementById('adminerrorcodes_'+sid).value="";document.getElementById('upfile_'+sid).disabled=!1;document.getElementById('uploadform_'+sid).submit()}
|
167 |
+
else if(pos_error>-1){txt_value=responseText.substr(pos_error+error_txt.length);wfu_unlock_upload(sid);wfu_Code_Objects[sid].do_action("askserver_error",txt_value)}}
|
168 |
+
var unique_id=wfu_randomString(10);wfu_lock_upload(sid);wfu_Code_Objects[sid].do_action("pre_start");var pass_params="";var params_obj=wfu_Code_Objects[sid].apply_filters("askserver_pass_params",{});for(var prop in params_obj)
|
169 |
+
if(params_obj.hasOwnProperty(prop))
|
170 |
+
pass_params+="&"+prop+"="+params_obj[prop];var d=new Date();var url=GlobalData.consts.ajax_url+"?action=wfu_ajax_action_ask_server&wfu_uploader_nonce="+document.getElementById("wfu_uploader_nonce_"+sid).value+"&sid="+sid+"&unique_id="+unique_id+"&start_time="+d.getTime()+"&session_token="+session_token+pass_params;var xmlhttp=wfu_GetHttpRequestObject();if(xmlhttp==null){var i=document.createElement("iframe");if(i){i.style.display="none";i.src=url;document.body.appendChild(i);i.onload=function(){process_function(i.contentDocument.body.innerHTML)}
|
171 |
+
return}
|
172 |
+
else{wfu_Code_Objects[sid].do_action("not_supported");return}}
|
173 |
+
xmlhttp.open("GET",url,!0);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){process_function(xmlhttp.responseText)}
|
174 |
+
else{alert(GlobalData.consts.remoteserver_noresult);wfu_Code_Objects[sid].do_action("askserver_noresult")}}}
|
175 |
+
xmlhttp.send(null)}
|
176 |
+
Code_Initializators[Code_Initializators.length]=function(sid){var CBUV_Code_Objects={};CBUV_Code_Objects.pre_start_ask_server=function(attr,has_filters){if(attr)return attr;var sid=this.sid;return(has_filters=="true")}
|
177 |
+
CBUV_Code_Objects.askserver_pass_params=function(params){var sid=this.sid;var farr=wfu_get_filelist(sid);var filenames="";var filesizes="";for(var i=0;i<farr.length;i++){if(i>0){filenames+=";";filesizes+=";"}
|
178 |
+
filenames+=wfu_plugin_encode_string(farr[i].name);filesizes+=farr[i].size}
|
179 |
+
params.filenames=filenames;params.filesizes=filesizes;return params}
|
180 |
+
CBUV_Code_Objects.askserver_success=function(response,mode){var sid=this.sid;var upload_status="success";var txt_match=response.match(/CBUVJS\[(.*?)\]/);var txt_header=(txt_match?(typeof txt_match[1]!="undefined"?txt_match[1]:""):"");if(txt_header!="")eval(txt_header)}
|
181 |
+
CBUV_Code_Objects.askserver_error=function(response,mode){var sid=this.sid;var upload_status="error";var txt_match=response.match(/CBUVJS\[(.*?)\]/);var txt_header=(txt_match?(typeof txt_match[1]!="undefined"?txt_match[1]:""):"");if(txt_header!="")eval(txt_header);txt_match=response.match(/CBUV\[(.*?)\]/);txt_header=(txt_match?(typeof txt_match[1]!="undefined"?txt_match[1]:""):"");if(txt_header!=""){var Params=wfu_Initialize_Params();Params.general.shortcode_id=sid;Params.general.message=txt_header;Params.general.state=12;wfu_ProcessUploadComplete(sid,0,Params,"no-ajax","","","",["false","","false"]);wfu_clear(sid)}}
|
182 |
+
CBUV_Code_Objects.after_upload=function(response){var sid=this.sid;var txt_match=response.match(/CBUVJS\[(.*?)\]/);var txt_header=(txt_match?(typeof txt_match[1]!="undefined"?txt_match[1]:""):"");if(txt_header!="")eval(txt_header)}
|
183 |
+
return CBUV_Code_Objects}
|
184 |
+
function wfu_filesselected(sid){var ftext=document.getElementById("fileName_"+sid);var farr=wfu_get_filelist(sid);var allownofile=(document.getElementById("wordpress_file_upload_"+sid+"_nofile").value=="1");if(farr.length==0&&!allownofile){if(ftext){ftext.value=GlobalData.consts.nofilemessage;ftext.className="file_input_textbox_nofile"}}
|
185 |
+
return farr.length}
|
186 |
+
function wfu_check_required_userdata(sid,prompt){var userdata_count=wfu_get_userdata_count(sid);var req_empty=!1;for(var i=0;i<userdata_count;i++){var msg_hid=document.getElementById('hiddeninput_'+sid+'_userdata_'+i);var wrapper=document.getElementById('userdata_'+sid+'_fieldwrapper_'+i);var field=document.getElementById('userdata_'+sid+'_field_'+i);var msg_cont=document.getElementById('userdata_'+sid+'_'+i);var msg_hint=document.getElementById('userdata_'+sid+'_hint_'+i);msg_hid.value=window['userdata_'+sid+'_codes_'+i].value(field);var props={hintposition:"none"};var props_raw=document.getElementById('userdata_'+sid+'_props_'+i).value.split("|");for(var j=0;j<props_raw.length;j++)
|
187 |
+
if(props_raw[j].substr(0,2)=="p:")props.hintposition=props_raw[j].substr(2);var res="";if(wrapper.className.substr(0,35)=="file_userdata_fieldwrapper_required")res=window['userdata_'+sid+'_codes_'+i].empty(msg_hid);if(res===""&&window['userdata_'+sid+'_codes_'+i].validate)res=window['userdata_'+sid+'_codes_'+i].validate(msg_hid);if(res!==""){if(prompt){if(props.hintposition=="none")msg_hint.className="file_userdata_hint_none";else{wrapper.className="file_userdata_fieldwrapper_required_empty";var cont_rect=msg_cont.getBoundingClientRect();var msg_rect=wrapper.getBoundingClientRect();if(props.hintposition=="inline"){msg_hint.className="file_userdata_hint_inline";msg_hint.style.left=parseInt(msg_rect.left-cont_rect.left)+'px';msg_hint.style.top=parseInt(msg_rect.top-cont_rect.top)+'px';msg_hint.style.right=parseInt(cont_rect.right-msg_rect.right)+'px';msg_hint.style.bottom=parseInt(cont_rect.bottom-msg_rect.bottom)+'px'}
|
188 |
+
else if(props.hintposition=="top"){msg_hint.className="file_userdata_hint_top";msg_hint.style.left=parseInt(msg_rect.left-cont_rect.left)+'px';msg_hint.style.bottom=parseInt(cont_rect.bottom-msg_rect.top)+'px'}
|
189 |
+
else if(props.hintposition=="right"){msg_hint.className="file_userdata_hint_right";msg_hint.style.left=parseInt(msg_rect.right-cont_rect.left)+'px';msg_hint.style.top=parseInt(msg_rect.top-cont_rect.top)+'px'}
|
190 |
+
else if(props.hintposition=="bottom"){msg_hint.className="file_userdata_hint_bottom";msg_hint.style.left=parseInt(msg_rect.left-cont_rect.left)+'px';msg_hint.style.top=parseInt(msg_rect.bottom-cont_rect.top)+'px'}
|
191 |
+
else if(props.hintposition=="left"){msg_hint.className="file_userdata_hint_left";msg_hint.style.right=parseInt(cont_rect.right-msg_rect.left)+'px';msg_hint.style.top=parseInt(msg_rect.top-cont_rect.top)+'px'}
|
192 |
+
msg_hint.innerHTML=res;msg_hint.style.display="block"}}
|
193 |
+
req_empty=!0}}
|
194 |
+
return!req_empty}
|
195 |
+
function wfu_HTML5UploadFile(sid,JSONtext,session_token){if(!wfu_BrowserCaps.supportsAJAX){wfu_redirect_to_classic(sid,session_token,1,1);return}
|
196 |
+
if(!wfu_BrowserCaps.supportsHTML5){wfu_redirect_to_classic(sid,session_token,1,2);return}
|
197 |
+
JSONtext=wfu_plugin_decode_string(JSONtext.replace(/^\s+|\s+$/g,""));var JSONobj=null;try{JSONobj=JSON.parse(JSONtext)}
|
198 |
+
catch(e){}
|
199 |
+
if(JSONobj==null){wfu_redirect_to_classic(sid,session_token,1,3);return}
|
200 |
+
var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var allownofile=(document.getElementById("wordpress_file_upload_"+sid+"_nofile").value=="1");var numfiles=wfu_filesselected(sid);if(numfiles==0&&!allownofile)return;if(numfiles==0)wfu_selectbutton_clicked(sid);var uploadbutton=document.getElementById('upload_'+sid);var single_file_operation=(!uploadbutton);if(numfiles>0&&!wfu_selectsubdir_check(sid)){if(single_file_operation)wfu_clear_files(sid);return}
|
201 |
+
var numpasses=numfiles;numpasses+=numpasses;if(!wfu_check_required_userdata(sid,!0)){if(single_file_operation)wfu_clear_files(sid);return}
|
202 |
+
if(!wfu_Code_Objects[sid].apply_filters("pre_start_check",!0))return;var unique_upload_id=wfu_randomString(10);wfu_lock_upload(sid);wfu_Code_Objects[sid].do_action("pre_start");if(!wfu_Code_Objects[sid].apply_filters("pre_start_ask_server",!1,JSONobj.has_filters))
|
203 |
+
wfu_HTML5UploadFile_cont(sid,JSONobj,session_token,unique_upload_id);else{var url=GlobalData.consts.ajax_url;params=new Array(5);params[0]=new Array(2);params[0][0]='action';params[0][1]='wfu_ajax_action_ask_server';params[1]=new Array(2);params[1][0]='session_token';params[1][1]=session_token;params[2]=new Array(2);params[2][0]='sid';params[2][1]=sid;params[3]=new Array(2);params[3][0]='unique_id';params[3][1]=unique_upload_id;params[4]=new Array(2);params[4][0]='wfu_uploader_nonce';params[4][1]=document.getElementById("wfu_uploader_nonce_"+sid).value;var params_obj=wfu_Code_Objects[sid].apply_filters("askserver_pass_params",{});for(var prop in params_obj)
|
204 |
+
if(params_obj.hasOwnProperty(prop))
|
205 |
+
params.push([prop,params_obj[prop]]);var parameters='';for(var i=0;i<params.length;i++){parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1])}
|
206 |
+
xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){var txt=xhr.responseText;var txt_value="";var success_txt="wfu_askserver_success:";var error_txt="wfu_askserver_error:";var pos_success=txt.indexOf(success_txt);var pos_error=txt.indexOf(error_txt);var pos=-1;if(pos_success>-1){txt_value=txt.substr(pos_success+success_txt.length);wfu_Code_Objects[sid].do_action("askserver_success",txt_value,"ajax");wfu_HTML5UploadFile_cont(sid,JSONobj,session_token,unique_upload_id)}
|
207 |
+
else if(pos_error>-1){txt_value=txt.substr(pos_error+error_txt.length);wfu_unlock_upload(sid);wfu_Code_Objects[sid].do_action("askserver_error",txt_value)}}
|
208 |
+
else{alert(GlobalData.consts.remoteserver_noresult);wfu_unlock_upload(sid);wfu_Code_Objects[sid].do_action("askserver_noresult")}}};xhr.send(parameters)}}
|
209 |
+
function wfu_HTML5UploadFile_cont(sid,JSONobj,session_token,unique_upload_id){function sendfile(ind,file,only_check,force_close_connection){ret_status=!0;var xhr=wfu_GetHttpRequestObject();var xhr_close_connection=wfu_GetHttpRequestObject();if(xhr==null||xhr_close_connection==null)return;var fd=null;var fd_close_connection=null;try{var fd=new FormData();var fd_close_connection=new FormData()}
|
210 |
+
catch(e){}
|
211 |
+
if(fd==null||fd_close_connection==null)return;fd.append("action","wfu_ajax_action");fd.append("wfu_uploader_nonce",document.getElementById("wfu_uploader_nonce_"+sid).value);if(!only_check)fd.append("uploadedfile_"+sid+suffice,file);fd.append("uploadedfile_"+sid+"_index",ind);fd.append("uploadedfile_"+sid+"_name",wfu_plugin_encode_string(farr[ind].name));fd.append("uploadedfile_"+sid+"_size",farr[ind].size);fd.append("uniqueuploadid_"+sid,unique_upload_id);fd.append("params_index",JSONobj.params_index);fd.append("subdir_sel_index",subdir_sel_index);fd.append("nofileupload_"+sid,(nofileupload?"1":"0"));if(only_check)fd.append("only_check","1");else fd.append("only_check","0");fd.append("session_token",session_token);var other_params=wfu_Code_Objects[sid].apply_filters("upload_pass_params",{},"ajax");for(var prop in other_params)
|
212 |
+
if(other_params.hasOwnProperty(prop))
|
213 |
+
fd.append(prop,other_params[prop]);var userdata_count=wfu_get_userdata_count(sid);for(var ii=0;ii<userdata_count;ii++)
|
214 |
+
fd.append("hiddeninput_"+sid+"_userdata_"+ii,document.getElementById('hiddeninput_'+sid+'_userdata_'+ii).value);wfu_initialize_fileupload_xhr(xhr,sid,session_token,unique_upload_id,JSONobj,ind,farr[ind].name);xhr.loading=!0;if(!only_check){xhr.size=file.size;xhr.totalsize=farr[ind].size}
|
215 |
+
if(force_close_connection){fd_close_connection.append("action","wfu_ajax_action");fd_close_connection.append("wfu_uploader_nonce",document.getElementById("wfu_uploader_nonce_"+sid).value);fd_close_connection.append("params_index",JSONobj.params_index);fd_close_connection.append("session_token",session_token);fd_close_connection.append("force_connection_close","1");xhr_close_connection.open("POST",GlobalData.consts.ajax_url,!1);try{xhr_close_connection.send(fd_close_connection)}
|
216 |
+
catch(err){}
|
217 |
+
ret_status=(xhr_close_connection.responseText.indexOf("success")>-1)}
|
218 |
+
if(ret_status){if(!only_check){xhr.upload.xhr=xhr;xhr.upload.dummy=1;xhr.upload.addEventListener("loadstart",wfu_loadStart,!1);xhr.upload.addEventListener("progress",new Function("evt","wfu_uploadProgress(evt, "+sid+", "+xhr.xhrid+", "+JSONobj.debugmode+");"),!1);xhr.addEventListener("load",wfu_uploadComplete,!1);xhr.addEventListener("error",new Function("evt","wfu_uploadFailed(evt, "+JSONobj.debugmode+");"),!1);xhr.addEventListener("abort",wfu_uploadCanceled,!1);xhr.open("POST",GlobalData.consts.ajax_url,!0);xhr.send(fd)}
|
219 |
+
else{xhr.addEventListener("load",function(evt){evt={target:{responseText:evt.target.responseText,shortcode_id:sid,return_status:!0}};var file_status=wfu_uploadComplete.call(xhr,evt);xhr.file_id=0;ret_status=(file_status=="success"||file_status=="warning");if(ret_status&&!nofileupload){sendfile(ind,file,!1,!1)}
|
220 |
+
else if(ret_status&&nofileupload){}},!1);xhr.addEventListener("error",function(evt){return},!1);xhr.open("POST",GlobalData.consts.ajax_url,!0);xhr.send(fd)}}
|
221 |
+
else{var evt={target:{responseText:"",shortcode_id:sid}};wfu_uploadComplete.call(xhr,evt)}
|
222 |
+
inc ++;return ret_status}
|
223 |
+
var subdir_sel_index=-1;var sel=document.getElementById("selectsubdir_"+sid);if(sel){var editbox=document.getElementById("selectsubdiredit_"+sid);var editable=(editbox.style.display!="none");if(editable)subdir_sel_index=editbox.value;else subdir_sel_index=sel.selectedIndex}
|
224 |
+
var farr=wfu_get_filelist(sid);var nofileupload=!1;var allownofile=(document.getElementById("wordpress_file_upload_"+sid+"_nofile").value=="1");if(farr.length==0&&allownofile){nofileupload=!0;farr=[{name:"dummy.txt",size:0}]}
|
225 |
+
var suffice="";GlobalData.UploadInProgressString+="["+unique_upload_id+"]";GlobalData[sid]={};GlobalData[sid].unique_id=unique_upload_id;GlobalData[sid].last=!1;GlobalData[sid].files_count=1;GlobalData[sid].files_processed=0;GlobalData[sid].upload_state=0;GlobalData[sid].nofileupload=nofileupload;GlobalData[sid].message="";GlobalData[sid].update_wpfilebase="";GlobalData[sid].redirect_link="";GlobalData[sid].notify_only_filename_list="";GlobalData[sid].notify_target_path_list="";GlobalData[sid].notify_attachment_list="";GlobalData[sid].admin_messages={};GlobalData[sid].admin_messages.wpfilebase="";GlobalData[sid].admin_messages.notify="";GlobalData[sid].admin_messages.redirect="";GlobalData[sid].admin_messages.debug="";GlobalData[sid].admin_messages.other="";GlobalData[sid].errors={};GlobalData[sid].errors.wpfilebase="";GlobalData[sid].errors.notify="";GlobalData[sid].errors.redirect="";GlobalData[sid].xhrs=Array();GlobalData[sid].metricstotal={size:farr[0].size,loaded:0,progress_pos:0.0};GlobalData[sid].metrics=[{size:farr[0].size,loaded:0,progress_pos:0.0}];if(!nofileupload)wfu_show_simple_progressbar(JSONobj.shortcode_id,"progressive");wfu_attach_cancel_event(sid,session_token,unique_upload_id,JSONobj);var Params=wfu_Initialize_Params();Params.general.shortcode_id=sid;Params.general.unique_id=unique_upload_id;wfu_ProcessUploadComplete(sid,0,Params,unique_upload_id,JSONobj.params_index,session_token,"",["false","","false"]);var inc=0;var ret_status=!0;var i=0;var fprops=[];sendfile(i,farr[i],!0,!1)}
|
226 |
+
function wfu_initialize_fileupload_xhr(xhr,sid,session_token,unique_upload_id,JSONobj,file_ind,filename){var xhrid=(file_ind>=0?GlobalData[sid].xhrs.push(xhr)-1:-1);var d=new Date();xhr.xhrid=xhrid;xhr.shortcode_id=sid;xhr.requesttype=(file_ind>=0?"fileupload":"email");xhr.file_id=file_ind+1;xhr.size=0;xhr.totalsize=0;xhr.loading=!1;xhr.deltasize=0;xhr.deltaloaded=0;xhr.sizeloaded=0;xhr.aborted=!1;xhr.unique_id=unique_upload_id;xhr.params_index=JSONobj.params_index;xhr.session_token=session_token;xhr.debugmode=JSONobj.debugmode;xhr.is_admin=JSONobj.is_admin;xhr.start_time=d.getTime();xhr.end_time=xhr.start_time;xhr.finish_time=xhr.start_time+parseInt(GlobalData.consts.max_time_limit)*1000;xhr.fail_colors=JSONobj.fail_colors;xhr.error_message_header=JSONobj.error_header.replace(/%username%/g,"no data");xhr.error_message_header=xhr.error_message_header.replace(/%useremail%/g,"no data");xhr.error_message_header=xhr.error_message_header.replace(/%filename%/g,filename);xhr.error_message_header=xhr.error_message_header.replace(/%filepath%/g,filename);xhr.error_message_failed=GlobalData.consts.message_failed;xhr.error_message_cancelled=GlobalData.consts.message_cancelled;xhr.error_adminmessage_unknown=GlobalData.consts.adminmessage_unknown.replace(/%username%/g,"no data");xhr.error_adminmessage_unknown=xhr.error_adminmessage_unknown.replace(/%useremail%/g,"no data");xhr.error_adminmessage_unknown=xhr.error_adminmessage_unknown.replace(/%filename%/g,filename);xhr.error_adminmessage_unknown=xhr.error_adminmessage_unknown.replace(/%filepath%/g,filename)}
|
227 |
+
function wfu_get_userdata_count(sid){var fields_count=0;while(document.getElementById('userdata_'+sid+'_'+fields_count))fields_count ++;return fields_count}
|
228 |
+
function wfu_lock_upload(sid){var textbox=document.getElementById('fileName_'+sid);document.getElementById('input_'+sid).disabled=!0;document.getElementById('upfile_'+sid).disabled=!0;wfu_selectsubdir_disable_onoff(sid,!0);var upload=document.getElementById('upload_'+sid);if(upload)upload.disabled=!0;var userdata_count=wfu_get_userdata_count(sid);for(var i=0;i<userdata_count;i++)
|
229 |
+
window['userdata_'+sid+'_codes_'+i].lock(document.getElementById('userdata_'+sid+'_field_'+i));wfu_Code_Objects[sid].do_action("lock_upload")}
|
230 |
+
function wfu_unlock_upload(sid){var textbox=document.getElementById('fileName_'+sid);document.getElementById('input_'+sid).disabled=!1;document.getElementById('upfile_'+sid).disabled=!1;wfu_selectsubdir_disable_onoff(sid,!1);var upload=document.getElementById('upload_'+sid);if(upload)upload.disabled=!1;var userdata_count=wfu_get_userdata_count(sid);for(var i=0;i<userdata_count;i++)
|
231 |
+
window['userdata_'+sid+'_codes_'+i].unlock(document.getElementById('userdata_'+sid+'_field_'+i));wfu_Code_Objects[sid].do_action("unlock_upload")}
|
232 |
+
function wfu_clear_files(sid){document.getElementById("uploadform_"+sid).reset();var inputfile=document.getElementById("upfile_"+sid);if(typeof inputfile.filearray!="undefined"){inputfile.filearray.length=0;inputfile.filearrayprops.length=0}
|
233 |
+
var textbox=document.getElementById('fileName_'+sid);if(textbox){textbox.value='';textbox.className='file_input_textbox'}}
|
234 |
+
function wfu_clear(sid){wfu_clear_files(sid);var subdir=document.getElementById('selectsubdir_'+sid);if(subdir){var editbox=document.getElementById("selectsubdiredit_"+sid);var editable=(editbox.style.display!="none");if(!editable){subdir.options[0].style.display="block";subdir.selectedIndex=parseInt(document.getElementById('selectsubdirdefault_'+sid).value);if(subdir.selectedIndex<0)subdir.selectedIndex=0}
|
235 |
+
else{subdir.selectedIndex=-1;editbox.value=''}}
|
236 |
+
var userdata_count=wfu_get_userdata_count(sid);for(var i=0;i<userdata_count;i++)
|
237 |
+
window['userdata_'+sid+'_codes_'+i].reset(document.getElementById('userdata_'+sid+'_field_'+i),document.getElementById('hiddeninput_'+sid+'_userdata_'+i));wfu_Code_Objects[sid].do_action("clear_upload")}
|
238 |
+
function wfu_reset_message(sid){var message_table=document.getElementById('wfu_messageblock_'+sid);if(message_table){document.getElementById('wfu_messageblock_header_'+sid).style.display="";var header_container=document.getElementById('wfu_messageblock_header_'+sid+'_container');if(UploadStates[sid])header_container.innerHTML=UploadStates[sid].State0;document.getElementById('wfu_messageblock_header_'+sid+'_state').value="none";document.getElementById('wfu_messageblock_arrow_'+sid).style.display="none";header_container.colSpan=3;document.getElementById('wfu_messageblock_subheader_'+sid+'_messagelabel').innerHTML="";document.getElementById('wfu_messageblock_subheader_'+sid+'_adminmessagelabel').innerHTML="";document.getElementById('wfu_messageblock_subheader_'+sid).style.display="none";document.getElementById('wfu_messageblock_subheader_'+sid+'_message').style.display="none";document.getElementById('wfu_messageblock_subheader_'+sid+'_adminmessage').style.display="none";var file_array=wfu_get_file_ids(sid);for(var i=1;i<=file_array.length;i++){message_table.tBodies[0].removeChild(document.getElementById('wfu_messageblock_'+sid+'_'+i));message_table.tBodies[0].removeChild(document.getElementById('wfu_messageblock_subheader_'+sid+'_'+i))}}}
|
239 |
+
function wfu_show_simple_progressbar(sid,effect){var bar=document.getElementById('progressbar_'+sid+'_animation');var barsafe=document.getElementById('progressbar_'+sid+'_imagesafe');if(bar){if(effect=="progressive"){bar.style.width="0%";bar.className="file_progress_progressive";barsafe.style.display="none";bar.style.display="block"}
|
240 |
+
else if(wfu_BrowserCaps.supportsAnimation){bar.style.width="25%";bar.className="file_progress_shuffle";barsafe.style.display="none";bar.style.display="block"}
|
241 |
+
else{bar.style.width="0%";bar.className="file_progress_noanimation";bar.style.display="none";barsafe.style.display="block"}
|
242 |
+
document.getElementById('wordpress_file_upload_progressbar_'+sid).style.display="block"}}
|
243 |
+
function wfu_hide_simple_progressbar(sid){var bar=document.getElementById('progressbar_'+sid+'_animation');var barsafe=document.getElementById('progressbar_'+sid+'_imagesafe');if(bar){document.getElementById('wordpress_file_upload_progressbar_'+sid).style.display="none";bar.style.width="0%";bar.className="file_progress_noanimation";barsafe.style.display="none";bar.style.display="block"}}
|
244 |
+
function wfu_invoke_shortcode_editor(sid,postid,posthash,tag){var buttons=document.getElementsByTagName('BUTTON');var same=0;var obj=null;for(var i=0;i<buttons.length;i++){if(buttons[i].parentNode)
|
245 |
+
if(buttons[i].parentNode.id==tag+"_editor_"+sid){obj=buttons[i];same ++}}
|
246 |
+
if(same==0)return;if(same>1){alert(GlobalData.consts.same_pluginid);return}
|
247 |
+
var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;obj.parentNode.style.display="none";document.getElementById(tag+'_overlay_'+sid).style.display="block";var url=GlobalData.consts.ajax_url;params=new Array(6);params[0]=new Array(2);params[0][0]='action';params[0][1]='wfu_ajax_action_edit_shortcode';params[1]=new Array(2);params[1][0]='upload_id';params[1][1]=sid;params[2]=new Array(2);params[2][0]='post_id';params[2][1]=postid;params[3]=new Array(2);params[3][0]='post_hash';params[3][1]=posthash;params[4]=new Array(2);params[4][0]='shortcode_tag';params[4][1]=tag;params[5]=new Array(2);params[5][0]='widget_id';params[5][1]=(document.getElementById(tag+'_'+sid+'_widgetid')?document.getElementById(tag+'_'+sid+'_widgetid').value:'');var parameters='';for(var i=0;i<params.length;i++){parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1])}
|
248 |
+
xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){document.getElementById(tag+'_overlay_'+sid).style.display="none";obj.parentNode.removeAttribute("style");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);pos=response.indexOf(":");var txt_header=response.substr(0,pos);txt_value=response.substr(pos+1,response.length-pos-1);if(txt_header=='success'){var editor_window=window.open(wfu_plugin_decode_string(txt_value),'_blank');if(editor_window)editor_window.plugin_window=window;else alert(GlobalData.consts.enable_popups)}
|
249 |
+
else if(txt_header=='check_page_obsolete')
|
250 |
+
alert(txt_value)}}};xhr.send(parameters)}
|
251 |
+
wfu_initialize_webcam=function(sid,mode,audiocapture,videowidth,videoheight,videoaspectratio,videoframerate,camerafacing,maxrecordtime){if(typeof wfu_parse_video_width=="undefined")
|
252 |
+
wfu_parse_video_width=function(videowidth){var vw=parseInt(videowidth);if(vw>0){this.empty=!1;this.video.width=vw}}
|
253 |
+
if(typeof wfu_parse_video_height=="undefined")
|
254 |
+
wfu_parse_video_height=function(videoheight){var vh=parseInt(videoheight);if(vh>0){this.empty=!1;this.video.height=vh}}
|
255 |
+
if(typeof wfu_parse_video_aspectratio=="undefined")
|
256 |
+
wfu_parse_video_aspectratio=function(videoaspectratio){var ar=parseFloat(videoaspectratio);if(ar>0){this.empty=!1;this.video.aspectRatio=ar}}
|
257 |
+
if(typeof wfu_parse_video_framerate=="undefined")
|
258 |
+
wfu_parse_video_framerate=function(videoframerate){var fr=parseFloat(videoframerate);if(fr>0){this.empty=!1;this.video.frameRate=fr}}
|
259 |
+
if(typeof wfu_parse_video_facingmode=="undefined")
|
260 |
+
wfu_parse_video_facingmode=function(camerafacing){var cf=(camerafacing=="front"?"user":(camerafacing=="back"?"environment":""));if(cf!=""){this.empty=!1;this.video.facingMode=cf}}
|
261 |
+
var video_settings={empty:!0,video:{}};wfu_parse_video_width.call(video_settings,videowidth);wfu_parse_video_height.call(video_settings,videoheight);wfu_parse_video_aspectratio.call(video_settings,videoaspectratio);wfu_parse_video_framerate.call(video_settings,videoframerate);wfu_parse_video_facingmode.call(video_settings,camerafacing);var WebcamProps={mode:mode,audio:(audiocapture=="true"),video:(video_settings.empty?!0:video_settings.video),maxrecordtime:maxrecordtime};window["wfu_webcam_props_"+sid]=WebcamProps;wfu_reinitialize_webcam(sid)}
|
262 |
+
wfu_reinitialize_webcam=function(sid){window["wfu_webcam_props_"+sid].active=!0;window["wfu_webcam_props_"+sid].width=0;window["wfu_webcam_props_"+sid].width=0;window["wfu_webcam_props_"+sid].timeStart=0.0;window["wfu_webcam_props_"+sid].duration=0.0;window["wfu_webcam_props_"+sid].counting=!1;window["wfu_webcam_props_"+sid].stream=null;window["wfu_webcam_props_"+sid].media=null;window["wfu_webcam_props_"+sid].blobs=null;window["wfu_webcam_props_"+sid].playing=!1;var WebcamProps=window["wfu_webcam_props_"+sid];var video=document.getElementById("webcam_"+sid+"_box");var webcamoff=document.getElementById("webcam_"+sid+"_webcamoff");webcamoff.style.display="none";video.style.display="block";var constraints={audio:WebcamProps.audio,video:WebcamProps.video};if(typeof Promise=="undefined"){Promise=function(mainCallback){this.mainCallback=mainCallback;this.then=function(successCallback){this.successCallback=successCallback;return this};this.catch=function(errorCallback){mainCallback(this.successCallback,errorCallback)}}
|
263 |
+
PromiseRejected=function(error){this.then=function(successCallback){return this}
|
264 |
+
this.catch=function(errorCallback){errorCallback(error)}}
|
265 |
+
Promise.reject=function(error){return new PromiseRejected(error)}}
|
266 |
+
var promisifiedOldGUM=function(constraints,successCallback,errorCallback){var getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;if(!getUserMedia||typeof MediaRecorder=="undefined"){return Promise.reject(new Error('getUserMedia is not implemented in this browser'))}
|
267 |
+
return new Promise(function(successCallback,errorCallback){getUserMedia.call(navigator,constraints,successCallback,errorCallback)})}
|
268 |
+
if(navigator.mediaDevices===undefined)navigator.mediaDevices={};if(navigator.mediaDevices.getUserMedia===undefined)
|
269 |
+
navigator.mediaDevices.getUserMedia=promisifiedOldGUM;navigator.mediaDevices.getUserMedia(constraints).then(function(stream){window["wfu_webcam_props_"+sid].stream=stream;video.autoplay=!0;video.ontimeupdate=null;video.onerror=null;video.onloadeddata=function(e){wfu_webcam_init_callback(sid)};video.src=window.URL.createObjectURL(stream);wfu_initialize_webcam_nav(sid,WebcamProps.mode)}).catch(function(e){console.log('Video not supported!',e);document.getElementById("webcam_"+sid+"_inner").className="wfu_file_webcam_inner wfu_webcam_notsupported"})}
|
270 |
+
wfu_webcam_init_callback=function(sid){var container=document.getElementById("webcam_"+sid+"_inner");var video=document.getElementById("webcam_"+sid+"_box");window["wfu_webcam_props_"+sid].width=video.videoWidth;window["wfu_webcam_props_"+sid].height=video.videoHeight;var imgdata='<svg xmlns="http://www.w3.org/2000/svg" width="'+video.videoWidth+'" height="'+video.videoHeight+'"></svg>';var imgblob=new Blob([imgdata],{type:'image/svg+xml;charset=utf-8'});var img=document.getElementById("webcam_"+sid+"_webcamoff_img");img.src=window.URL.createObjectURL(imgblob);img.style.width=container.clientWidth+"px";img.style.height=container.clientHeight+"px"}
|
271 |
+
wfu_initialize_webcam_nav=function(sid,mode){if(typeof SVGInjector=="undefined"){!function(t,e){"use strict";function r(t){t=t.split(" ");for(var e={},r=t.length,n=[];r--;)e.hasOwnProperty(t[r])||(e[t[r]]=1,n.unshift(t[r]));return n.join(" ")}var n="file:"===t.location.protocol,i=e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),o=Array.prototype.forEach||function(t,e){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;var r,n=this.length>>>0;for(r=0;n>r;++r)r in this&&t.call(e,this[r],r,this)},a={},l=0,s=[],u=[],c={},f=function(t){return t.cloneNode(!0)},p=function(t,e){u[t]=u[t]||[],u[t].push(e)},d=function(t){for(var e=0,r=u[t].length;r>e;e++)!function(e){setTimeout(function(){u[t][e](f(a[t]))},0)}(e)},v=function(e,r){if(void 0!==a[e])a[e]instanceof SVGSVGElement?r(f(a[e])):p(e,r);else{if(!t.XMLHttpRequest)return r("Browser does not support XMLHttpRequest"),!1;a[e]={},p(e,r);var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(404===i.status||null===i.responseXML)return r("Unable to load SVG file: "+e),n&&r("Note: SVG injection ajax calls do not work locally without adjusting security setting in your browser. Or consider using a local webserver."),r(),!1;if(!(200===i.status||n&&0===i.status))return r("There was a problem injecting the SVG: "+i.status+" "+i.statusText),!1;if(i.responseXML instanceof Document)a[e]=i.responseXML.documentElement;else if(DOMParser&&DOMParser instanceof Function){var t;try{var o=new DOMParser;t=o.parseFromString(i.responseText,"text/xml")}catch(l){t=void 0}if(!t||t.getElementsByTagName("parsererror").length)return r("Unable to parse SVG file: "+e),!1;a[e]=t.documentElement}d(e)}},i.open("GET",e),i.overrideMimeType&&i.overrideMimeType("text/xml"),i.send()}},h=function(e,n,a,u){var f=e.getAttribute("data-src")||e.getAttribute("src");if(!/\.svg/i.test(f))return void u("Attempted to inject a file with a non-svg extension: "+f);if(!i){var p=e.getAttribute("data-fallback")||e.getAttribute("data-png");return void(p?(e.setAttribute("src",p),u(null)):a?(e.setAttribute("src",a+"/"+f.split("/").pop().replace(".svg",".png")),u(null)):u("This browser does not support SVG and no PNG fallback was defined."))}-1===s.indexOf(e)&&(s.push(e),e.setAttribute("src",""),v(f,function(i){if("undefined"==typeof i||"string"==typeof i)return u(i),!1;var a=e.getAttribute("id");a&&i.setAttribute("id",a);var p=e.getAttribute("title");p&&i.setAttribute("title",p);var d=[].concat(i.getAttribute("class")||[],"injected-svg",e.getAttribute("class")||[]).join(" ");i.setAttribute("class",r(d));var v=e.getAttribute("style");v&&i.setAttribute("style",v);var h=[].filter.call(e.attributes,function(t){return/^data-\w[\w\-]*$/.test(t.name)});o.call(h,function(t){t.name&&t.value&&i.setAttribute(t.name,t.value)});var g,m,b,y,A,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach(function(t){g=t,b=w[t],m=i.querySelectorAll("defs "+g+"[id]");for(var e=0,r=m.length;r>e;e++){y=m[e].id,A=y+"-"+l;var n;o.call(b,function(t){n=i.querySelectorAll("["+t+'*="'+y+'"]');for(var e=0,r=n.length;r>e;e++)n[e].setAttribute(t,"url(#"+A+")")}),m[e].id=A}}),i.removeAttribute("xmlns:a");for(var x,S,k=i.querySelectorAll("script"),j=[],G=0,T=k.length;T>G;G++)S=k[G].getAttribute("type"),S&&"application/ecmascript"!==S&&"application/javascript"!==S||(x=k[G].innerText||k[G].textContent,j.push(x),i.removeChild(k[G]));if(j.length>0&&("always"===n||"once"===n&&!c[f])){for(var M=0,V=j.length;V>M;M++)new Function(j[M])(t);c[f]=!0}var E=i.querySelectorAll("style");o.call(E,function(t){t.textContent+=""}),e.parentNode.replaceChild(i,e),delete s[s.indexOf(e)],e=null,l++,u(i)}))},g=function(t,e,r){e=e||{};var n=e.evalScripts||"always",i=e.pngFallback||!1,a=e.each;if(void 0!==t.length){var l=0;o.call(t,function(e){h(e,n,i,function(e){a&&"function"==typeof a&&a(e),r&&t.length===++l&&r(l)})})}else t?h(t,n,i,function(e){a&&"function"==typeof a&&a(e),r&&r(1),t=null}):r&&r(0)};"object"==typeof module&&"object"==typeof module.exports?module.exports=exports=g:"function"==typeof define&&define.amd?define(function(){return g}):"object"==typeof t&&(t.SVGInjector=g)}(window,document)}
|
272 |
+
if(document.getElementById("webcam_"+sid+"_btns_converted").value!="1"){SVGInjector(document.getElementById("webcam_"+sid+"_btns"));document.getElementById("webcam_"+sid+"_btns_converted").value="1"}
|
273 |
+
if(mode=="capture video")wfu_webcam_set_nav_status(sid,"idle_only_video");else if(mode=="take photos")wfu_webcam_set_nav_status(sid,"idle_only_pictures");else if(mode=="both")wfu_webcam_set_nav_status(sid,"idle_video_and_pictures");else wfu_webcam_set_nav_status(sid,"idle_only_video")}
|
274 |
+
wfu_webcam_set_nav_status=function(sid,status){var onoff=document.getElementById("webcam_"+sid+"_btn_onoff");var nav=document.getElementById("webcam_"+sid+"_nav");var vid=document.getElementById("webcam_"+sid+"_btn_video");var rec=document.getElementById("webcam_"+sid+"_btn_record");var play=document.getElementById("webcam_"+sid+"_btn_play");var stop=document.getElementById("webcam_"+sid+"_btn_stop");var pause=document.getElementById("webcam_"+sid+"_btn_pause");var pos=document.getElementById("webcam_"+sid+"_btn_pos");var back=document.getElementById("webcam_"+sid+"_btn_back");var fwd=document.getElementById("webcam_"+sid+"_btn_fwd");var tim=document.getElementById("webcam_"+sid+"_btn_time");var pic=document.getElementById("webcam_"+sid+"_btn_picture");var screenshot=document.getElementById("webcam_"+sid+"_screenshot");onoff.style.display="block";if(status=="hidden"){nav.style.display="none"}
|
275 |
+
else if(status=="recording"){nav.removeAttribute("style");nav.className="wfu_file_webcam_nav wfu_recording";vid.style.display="none";rec.style.display="block";rec.style.visibility="visible";rec.setAttribute("class","wfu_file_webcam_btn wfu_file_webcam_btn_record wfu_recording");stop.style.display="block";stop.style.visibility="visible";play.style.display="block";play.style.visibility="hidden";pause.style.display="block";pause.style.visibility="hidden";pos.style.display="block";pos.style.visibility="hidden";back.style.display="block";back.style.visibility="hidden";fwd.style.display="block";fwd.style.visibility="hidden";tim.style.display="block";tim.style.visibility="visible";pic.style.display="none";screenshot.style.display="none"}
|
276 |
+
else if(status=="after_recording"){nav.removeAttribute("style");nav.className="wfu_file_webcam_nav wfu_stream_ready";vid.style.display="block";vid.setAttribute("class","wfu_file_webcam_btn wfu_file_webcam_btn_video");rec.style.display="none";stop.style.display="block";stop.style.visibility="hidden";play.style.display="block";play.style.visibility="hidden";pause.style.display="block";pause.style.visibility="hidden";pos.style.display="block";pos.style.visibility="hidden";back.style.display="block";back.style.visibility="hidden";fwd.style.display="block";fwd.style.visibility="hidden";tim.style.display="block";tim.style.visibility="hidden";pic.style.display="none";screenshot.style.display="block"}
|
277 |
+
else if(status=="ready_playback"){nav.removeAttribute("style");nav.className="wfu_file_webcam_nav wfu_stream_ready";vid.style.display="block";vid.setAttribute("class","wfu_file_webcam_btn wfu_file_webcam_btn_video");rec.style.display="none";stop.style.display="block";stop.style.visibility="hidden";play.style.display="block";play.style.visibility="visible";play.setAttribute("class","wfu_file_webcam_btn wfu_file_webcam_btn_play");pause.style.display="block";pause.style.visibility="visible";pause.setAttribute("class","wfu_file_webcam_btn_disabled wfu_file_webcam_btn_pause_disabled");pos.style.display="block";pos.style.visibility="visible";back.style.display="block";back.style.visibility="visible";fwd.style.display="block";fwd.style.visibility="visible";tim.style.display="block";tim.style.visibility="visible";pic.style.display="none";screenshot.style.display="none"}
|
278 |
+
else if(status=="after_screenshot"){nav.removeAttribute("style");nav.className="wfu_file_webcam_nav wfu_stream_ready";vid.style.display="block";vid.setAttribute("class","wfu_file_webcam_btn wfu_file_webcam_btn_video");rec.style.display="none";stop.style.display="block";stop.style.visibility="hidden";play.style.display="block";play.style.visibility="hidden";pause.style.display="block";pause.style.visibility="hidden";pos.style.display="block";pos.style.visibility="hidden";back.style.display="block";back.style.visibility="hidden";fwd.style.display="block";fwd.style.visibility="hidden";tim.style.display="block";tim.style.visibility="hidden";pic.style.display="none";screenshot.style.display="block"}
|
279 |
+
else if(status=="playing"){nav.removeAttribute("style");nav.className="wfu_file_webcam_nav wfu_stream_ready";vid.style.display="block";vid.setAttribute("class","wfu_file_webcam_btn_disabled wfu_file_webcam_btn_video_disabled");rec.style.display="none";stop.style.display="block";stop.style.visibility="hidden";play.style.display="block";play.style.visibility="visible";play.setAttribute("class","wfu_file_webcam_btn_disabled wfu_file_webcam_btn_play_disabled");pause.style.display="block";pause.style.visibility="visible";pause.setAttribute("class","wfu_file_webcam_btn wfu_file_webcam_btn_pause");pos.style.display="block";pos.style.visibility="visible";back.style.display="block";back.style.visibility="visible";fwd.style.display="block";fwd.style.visibility="visible";tim.style.display="block";tim.style.visibility="visible";pic.style.display="none";screenshot.style.display="none"}
|
280 |
+
else{nav.removeAttribute("style");nav.className="wfu_file_webcam_nav wfu_rec_ready";vid.style.display="none";rec.style.display="none";stop.style.display="none";play.style.display="none";pause.style.display="none";pos.style.display="none";back.style.display="none";fwd.style.display="none";tim.style.display="none";pic.style.display="none";screenshot.style.display="none";if(status=="idle_only_video"||status=="idle_video_and_pictures"){rec.style.display="block";rec.setAttribute("class","wfu_file_webcam_btn wfu_file_webcam_btn_record")}
|
281 |
+
if(status=="idle_only_pictures"||status=="idle_video_and_pictures"){pic.style.display="block"}}}
|
282 |
+
wfu_webcam_counter_status=function(sid,action){if(action=="start"){var d=new Date();window["wfu_webcam_props_"+sid].duration=0.0;window["wfu_webcam_props_"+sid].timeStart=d.getTime()/1000;window["wfu_webcam_props_"+sid].counting=!0;wfu_webcam_update_counter(sid)}
|
283 |
+
else{var d=new Date();window["wfu_webcam_props_"+sid].duration=d.getTime()/1000-window["wfu_webcam_props_"+sid].timeStart;window["wfu_webcam_props_"+sid].counting=!1}}
|
284 |
+
wfu_webcam_update_counter=function(sid){if(window["wfu_webcam_props_"+sid].counting){var d=new Date();var dif=d.getTime()/1000-window["wfu_webcam_props_"+sid].timeStart;wfu_webcam_update_timer(sid,dif);setTimeout(function(){wfu_webcam_update_counter(sid)},100)}}
|
285 |
+
wfu_webcam_update_timer=function(sid,time){var hours=Math.floor(time/3600);time-=hours*3600;var minutes=Math.floor(time/60);time-=minutes*60;var secs=Math.floor(time);var msecs=(time-Math.floor(time))*1000;document.getElementById("webcam_"+sid+"_btn_time_label").innerHTML=(hours>0?hours+":":"")+(minutes<10?"0":"")+minutes+":"+(secs<10?"0":"")+secs}
|
286 |
+
wfu_webcam_onoff=function(sid){if(window["wfu_webcam_props_"+sid].active){var container=document.getElementById("webcam_"+sid+"_inner");var video=document.getElementById("webcam_"+sid+"_box");var webcamoff=document.getElementById("webcam_"+sid+"_webcamoff");var img=document.getElementById("webcam_"+sid+"_webcamoff_img");img.style.width=container.clientWidth+"px";img.style.height=container.clientHeight+"px";video.pause();video.src="";video.load();if(window["wfu_webcam_props_"+sid].stream&&window["wfu_webcam_props_"+sid].stream.stop)
|
287 |
+
window["wfu_webcam_props_"+sid].stream.stop();window["wfu_webcam_props_"+sid].stream=null;window["wfu_webcam_props_"+sid].media=null;window["wfu_webcam_props_"+sid].blobs=null;wfu_webcam_set_nav_status(sid,"hidden");video.style.display="none";document.getElementById("webcam_"+sid+"_screenshot").src="";webcamoff.style.display="block";window["wfu_webcam_props_"+sid].active=!1}
|
288 |
+
else{wfu_reinitialize_webcam(sid)}
|
289 |
+
wfu_selectbutton_clicked(sid)}
|
290 |
+
wfu_webcam_golive=function(sid){if(window["wfu_webcam_props_"+sid].playing)return;wfu_reinitialize_webcam(sid);wfu_add_files(sid,[],!1);wfu_selectbutton_clicked(sid);wfu_update_uploadbutton_status(sid)}
|
291 |
+
wfu_webcam_start_rec=function(sid){if(window["wfu_webcam_props_"+sid].media&&window["wfu_webcam_props_"+sid].media.state&&window["wfu_webcam_props_"+sid].media.state=="recording")return;try{window["wfu_webcam_props_"+sid].media=new MediaRecorder(window["wfu_webcam_props_"+sid].stream)}
|
292 |
+
catch(err){alert(document.getElementById("webcam_"+sid+"_video_notsupported").value);return}
|
293 |
+
window["wfu_webcam_props_"+sid].blobs=[];window["wfu_webcam_props_"+sid].media.ondataavailable=function(e){var d=new Date();var dif=d.getTime()/1000-window["wfu_webcam_props_"+sid].timeStart;if(window["wfu_webcam_props_"+sid].maxrecordtime==-1||(window["wfu_webcam_props_"+sid].maxrecordtime>0&&dif<=window["wfu_webcam_props_"+sid].maxrecordtime)){if(e.data&&e.data.size>0){window["wfu_webcam_props_"+sid].blobs.push(e.data)}}
|
294 |
+
else{wfu_webcam_stop_rec(sid)}}
|
295 |
+
wfu_webcam_set_nav_status(sid,"recording");wfu_webcam_counter_status(sid,"start");window["wfu_webcam_props_"+sid].media.onstop=function(e){wfu_webcam_counter_status(sid,"stop");wfu_webcam_set_nav_status(sid,"after_recording");wfu_webcam_onstop(e,sid)}
|
296 |
+
window["wfu_webcam_props_"+sid].media.start(10)}
|
297 |
+
wfu_webcam_stop_rec=function(sid){window["wfu_webcam_props_"+sid].media.stop()}
|
298 |
+
wfu_webcam_onstop=function(e,sid){if(window["wfu_webcam_props_"+sid].blobs.length==0){alert(document.getElementById("webcam_"+sid+"_video_nothingrecorded").value);wfu_webcam_golive(sid)}
|
299 |
+
else{var video=document.getElementById("webcam_"+sid+"_box");var canvas=document.getElementById("webcam_"+sid+"_canvas");var screenshot=document.getElementById("webcam_"+sid+"_screenshot");if(window["wfu_webcam_props_"+sid].stream){canvas.width=video.clientWidth;canvas.height=video.clientHeight;var ctx=canvas.getContext('2d');ctx.drawImage(video,0,0,video.clientWidth,video.clientHeight);screenshot.src=canvas.toDataURL('image/webp')}
|
300 |
+
var superBuffer=new Blob(window["wfu_webcam_props_"+sid].blobs,{type:'video/mp4'});video.autoplay=!1;video.ontimeupdate=function(e){wfu_webcam_update_pos(sid)};video.onended=function(e){wfu_webcam_ended(sid)};video.onloadeddata=function(e){if(video.readyState>=2){wfu_webcam_set_nav_status(sid,"ready_playback")}}
|
301 |
+
video.onerror=function(e){video.onloadeddata=null;video.src=window.URL.createObjectURL(window["wfu_webcam_props_"+sid].stream)}
|
302 |
+
video.src=window.URL.createObjectURL(superBuffer);superBuffer.name="video.mp4";wfu_add_files(sid,[{file:superBuffer,props:{}}],!1);wfu_update_uploadbutton_status(sid)}}
|
303 |
+
wfu_webcam_play=function(sid){if(window["wfu_webcam_props_"+sid].playing)return;var video=document.getElementById("webcam_"+sid+"_box");wfu_webcam_set_nav_status(sid,"playing");window["wfu_webcam_props_"+sid].playing=!0;video.play()}
|
304 |
+
wfu_webcam_ended=function(sid){var video=document.getElementById("webcam_"+sid+"_box");video.src=video.src;wfu_webcam_set_nav_status(sid,"ready_playback");window["wfu_webcam_props_"+sid].playing=!1}
|
305 |
+
wfu_webcam_pause=function(sid){var video=document.getElementById("webcam_"+sid+"_box");video.pause();wfu_webcam_set_nav_status(sid,"ready_playback");window["wfu_webcam_props_"+sid].playing=!1}
|
306 |
+
wfu_webcam_back=function(sid){var video=document.getElementById("webcam_"+sid+"_box");video.src=video.src;video.currentTime=0}
|
307 |
+
wfu_webcam_fwd=function(sid){var video=document.getElementById("webcam_"+sid+"_box");video.currentTime=(isFinite(video.duration)?video.duration:window["wfu_webcam_props_"+sid].duration*2)}
|
308 |
+
wfu_webcam_take_picture=function(sid){var video=document.getElementById("webcam_"+sid+"_box");var canvas=document.getElementById("webcam_"+sid+"_canvas");var screenshot=document.getElementById("webcam_"+sid+"_screenshot");if(window["wfu_webcam_props_"+sid].stream){canvas.width=video.clientWidth;canvas.height=video.clientHeight;var ctx=canvas.getContext('2d');ctx.drawImage(video,0,0,video.clientWidth,video.clientHeight);screenshot.src=canvas.toDataURL('image/webp');wfu_webcam_set_nav_status(sid,"after_screenshot");if(!window.wfu_toBlob_function_initialized){!function(t){"use strict";var e=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,o=t.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),n=o&&t.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),r=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,a=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,i=(o||r)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(t){var e,i,l,u,b,c,d,B,f;if(e=t.match(a),!e)throw new Error("invalid data URI");for(i=e[2]?e[1]:"text/plain"+(e[3]||";charset=US-ASCII"),l=!!e[4],u=t.slice(e[0].length),b=l?atob(u):decodeURIComponent(u),c=new ArrayBuffer(b.length),d=new Uint8Array(c),B=0;B<b.length;B+=1)d[B]=b.charCodeAt(B);return o?new Blob([n?d:c],{type:i}):(f=new r,f.append(c),f.getBlob(i))};t.HTMLCanvasElement&&!e.toBlob&&(e.mozGetAsFile?e.toBlob=function(t,o,n){t(n&&e.toDataURL&&i?i(this.toDataURL(o,n)):this.mozGetAsFile("blob",o))}:e.toDataURL&&i&&(e.toBlob=function(t,e,o){t(i(this.toDataURL(e,o)))})),"function"==typeof define&&define.amd?define(function(){return i}):"object"==typeof module&&module.exports?module.exports=i:t.dataURLtoBlob=i}(window);window.wfu_toBlob_function_initialized=!0}
|
309 |
+
if(canvas.toBlob){canvas.toBlob(function(blob){blob.name="image.png";wfu_add_files(sid,[{file:blob,props:{}}],!1);wfu_update_uploadbutton_status(sid)},'image/png')}}}
|
310 |
+
wfu_webcam_update_pos=function(sid){var video=document.getElementById("webcam_"+sid+"_box");var pointer=document.getElementById("webcam_"+sid+"_btn_pointer");var duration=(isFinite(video.duration)?video.duration:window["wfu_webcam_props_"+sid].duration);var pos=Math.round(video.currentTime/duration*100);pointer.style.left=pos+"%";wfu_webcam_update_timer(sid,video.currentTime)}
|
languages/wp-file-upload-de_DE.mo
CHANGED
Binary file
|
languages/wp-file-upload-de_DE.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: de_DE\n"
|
@@ -1001,66 +1001,78 @@ msgid "please wait while redirecting..."
|
|
1001 |
msgstr "Bitte warten Sie, Sie werden umgeleitet ..."
|
1002 |
|
1003 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1004 |
msgid "Open visual shortcode editor in new window"
|
1005 |
msgstr "Offenen des visuellen Shortcode-Editor in neuem Fenster"
|
1006 |
|
1007 |
-
#: lib/wfu_constants.php:
|
1008 |
msgid "loading visual editor"
|
1009 |
msgstr "visueller Editor laden"
|
1010 |
|
1011 |
-
#: lib/wfu_constants.php:
|
1012 |
msgid "Clear file list?"
|
1013 |
msgstr "Klar Dateiliste?"
|
1014 |
|
1015 |
-
#: lib/wfu_constants.php:
|
1016 |
msgid "DROP HERE"
|
1017 |
msgstr "HIER ABLEGEN"
|
1018 |
|
1019 |
-
#: lib/wfu_constants.php:
|
1020 |
msgid "record video"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
-
#: lib/wfu_constants.php:
|
1024 |
msgid "take a picture"
|
1025 |
msgstr ""
|
1026 |
|
1027 |
-
#: lib/wfu_constants.php:
|
1028 |
msgid "turn webcam on/off"
|
1029 |
msgstr ""
|
1030 |
|
1031 |
-
#: lib/wfu_constants.php:
|
1032 |
msgid "go live again"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: lib/wfu_constants.php:
|
1036 |
msgid "end recording"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
-
#: lib/wfu_constants.php:
|
1040 |
msgid "play"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: lib/wfu_constants.php:
|
1044 |
msgid "pause"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: lib/wfu_constants.php:
|
1048 |
msgid "go to the beginning"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
-
#: lib/wfu_constants.php:
|
1052 |
msgid "go to the end"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
-
#: lib/wfu_constants.php:
|
1056 |
msgid "Wordpress File Upload Form"
|
1057 |
msgstr "Wordpress Datei Upload Formular"
|
1058 |
|
1059 |
-
#: lib/wfu_constants.php:
|
1060 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1061 |
msgstr "Wordpress Datei Upload Plugin Uploader für Seitenleisten"
|
1062 |
|
1063 |
-
#: lib/wfu_constants.php:
|
1064 |
msgid "Upload Files"
|
1065 |
msgstr "Dateien hochladen"
|
1066 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:22+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:22+0200\n"
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: de_DE\n"
|
1001 |
msgstr "Bitte warten Sie, Sie werden umgeleitet ..."
|
1002 |
|
1003 |
#: lib/wfu_constants.php:209
|
1004 |
+
msgid "Submitting data"
|
1005 |
+
msgstr ""
|
1006 |
+
|
1007 |
+
#: lib/wfu_constants.php:210
|
1008 |
+
msgid "Data submitted successfully!"
|
1009 |
+
msgstr ""
|
1010 |
+
|
1011 |
+
#: lib/wfu_constants.php:211
|
1012 |
+
msgid "Data were not submitted!"
|
1013 |
+
msgstr ""
|
1014 |
+
|
1015 |
+
#: lib/wfu_constants.php:212
|
1016 |
msgid "Open visual shortcode editor in new window"
|
1017 |
msgstr "Offenen des visuellen Shortcode-Editor in neuem Fenster"
|
1018 |
|
1019 |
+
#: lib/wfu_constants.php:213
|
1020 |
msgid "loading visual editor"
|
1021 |
msgstr "visueller Editor laden"
|
1022 |
|
1023 |
+
#: lib/wfu_constants.php:214
|
1024 |
msgid "Clear file list?"
|
1025 |
msgstr "Klar Dateiliste?"
|
1026 |
|
1027 |
+
#: lib/wfu_constants.php:215
|
1028 |
msgid "DROP HERE"
|
1029 |
msgstr "HIER ABLEGEN"
|
1030 |
|
1031 |
+
#: lib/wfu_constants.php:217
|
1032 |
msgid "record video"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
+
#: lib/wfu_constants.php:218
|
1036 |
msgid "take a picture"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
+
#: lib/wfu_constants.php:219
|
1040 |
msgid "turn webcam on/off"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
+
#: lib/wfu_constants.php:220
|
1044 |
msgid "go live again"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: lib/wfu_constants.php:221
|
1048 |
msgid "end recording"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: lib/wfu_constants.php:222
|
1052 |
msgid "play"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: lib/wfu_constants.php:223
|
1056 |
msgid "pause"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
+
#: lib/wfu_constants.php:224
|
1060 |
msgid "go to the beginning"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: lib/wfu_constants.php:225
|
1064 |
msgid "go to the end"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: lib/wfu_constants.php:227
|
1068 |
msgid "Wordpress File Upload Form"
|
1069 |
msgstr "Wordpress Datei Upload Formular"
|
1070 |
|
1071 |
+
#: lib/wfu_constants.php:228
|
1072 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1073 |
msgstr "Wordpress Datei Upload Plugin Uploader für Seitenleisten"
|
1074 |
|
1075 |
+
#: lib/wfu_constants.php:229
|
1076 |
msgid "Upload Files"
|
1077 |
msgstr "Dateien hochladen"
|
1078 |
|
languages/wp-file-upload-el_GR.mo
CHANGED
Binary file
|
languages/wp-file-upload-el_GR.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: el\n"
|
@@ -1024,66 +1024,78 @@ msgid "please wait while redirecting..."
|
|
1024 |
msgstr "παρακαλούμε περιμένετε ενώ γίνεται αναδρομολόγηση..."
|
1025 |
|
1026 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1027 |
msgid "Open visual shortcode editor in new window"
|
1028 |
msgstr "Ανοίξτε τη γραφική επεξεργασία του shortcode σε νέο παράθυρο"
|
1029 |
|
1030 |
-
#: lib/wfu_constants.php:
|
1031 |
msgid "loading visual editor"
|
1032 |
msgstr "φόρτωση του γραφικού επεξεργαστή"
|
1033 |
|
1034 |
-
#: lib/wfu_constants.php:
|
1035 |
msgid "Clear file list?"
|
1036 |
msgstr "Να γίνει καθαρισμός της λίστας αρχείων;"
|
1037 |
|
1038 |
-
#: lib/wfu_constants.php:
|
1039 |
msgid "DROP HERE"
|
1040 |
msgstr "ΑΦΗΣΤΕ ΕΔΩ"
|
1041 |
|
1042 |
-
#: lib/wfu_constants.php:
|
1043 |
msgid "record video"
|
1044 |
msgstr "εγγραφή video"
|
1045 |
|
1046 |
-
#: lib/wfu_constants.php:
|
1047 |
msgid "take a picture"
|
1048 |
msgstr "φωτογραφία"
|
1049 |
|
1050 |
-
#: lib/wfu_constants.php:
|
1051 |
msgid "turn webcam on/off"
|
1052 |
msgstr "ενεργοποίηση/απενεργοποίηση κάμερας"
|
1053 |
|
1054 |
-
#: lib/wfu_constants.php:
|
1055 |
msgid "go live again"
|
1056 |
msgstr "επιστροφή σε ζωντανή λήψη"
|
1057 |
|
1058 |
-
#: lib/wfu_constants.php:
|
1059 |
msgid "end recording"
|
1060 |
msgstr "τέλος εγγραφής"
|
1061 |
|
1062 |
-
#: lib/wfu_constants.php:
|
1063 |
msgid "play"
|
1064 |
msgstr "αναπαραγωγή"
|
1065 |
|
1066 |
-
#: lib/wfu_constants.php:
|
1067 |
msgid "pause"
|
1068 |
msgstr "παύση"
|
1069 |
|
1070 |
-
#: lib/wfu_constants.php:
|
1071 |
msgid "go to the beginning"
|
1072 |
msgstr "μετάβαση στην αρχή"
|
1073 |
|
1074 |
-
#: lib/wfu_constants.php:
|
1075 |
msgid "go to the end"
|
1076 |
msgstr "μετάβαση στο τέλος"
|
1077 |
|
1078 |
-
#: lib/wfu_constants.php:
|
1079 |
msgid "Wordpress File Upload Form"
|
1080 |
msgstr "Φόρμα του Wordpress File Upload"
|
1081 |
|
1082 |
-
#: lib/wfu_constants.php:
|
1083 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1084 |
msgstr "Αποστολή αρχείων με το Wordpress File Upload plugin για sidebars"
|
1085 |
|
1086 |
-
#: lib/wfu_constants.php:
|
1087 |
msgid "Upload Files"
|
1088 |
msgstr "Αποστολή αρχείων"
|
1089 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:22+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:24+0200\n"
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: el\n"
|
1024 |
msgstr "παρακαλούμε περιμένετε ενώ γίνεται αναδρομολόγηση..."
|
1025 |
|
1026 |
#: lib/wfu_constants.php:209
|
1027 |
+
msgid "Submitting data"
|
1028 |
+
msgstr "Τα δεδομένα αποστέλλονται"
|
1029 |
+
|
1030 |
+
#: lib/wfu_constants.php:210
|
1031 |
+
msgid "Data submitted successfully!"
|
1032 |
+
msgstr "Τα δεδομένα αποστάλθηκαν με επιτυχία!"
|
1033 |
+
|
1034 |
+
#: lib/wfu_constants.php:211
|
1035 |
+
msgid "Data were not submitted!"
|
1036 |
+
msgstr "Τα δεδομένα δεν αποστάλθηκαν!"
|
1037 |
+
|
1038 |
+
#: lib/wfu_constants.php:212
|
1039 |
msgid "Open visual shortcode editor in new window"
|
1040 |
msgstr "Ανοίξτε τη γραφική επεξεργασία του shortcode σε νέο παράθυρο"
|
1041 |
|
1042 |
+
#: lib/wfu_constants.php:213
|
1043 |
msgid "loading visual editor"
|
1044 |
msgstr "φόρτωση του γραφικού επεξεργαστή"
|
1045 |
|
1046 |
+
#: lib/wfu_constants.php:214
|
1047 |
msgid "Clear file list?"
|
1048 |
msgstr "Να γίνει καθαρισμός της λίστας αρχείων;"
|
1049 |
|
1050 |
+
#: lib/wfu_constants.php:215
|
1051 |
msgid "DROP HERE"
|
1052 |
msgstr "ΑΦΗΣΤΕ ΕΔΩ"
|
1053 |
|
1054 |
+
#: lib/wfu_constants.php:217
|
1055 |
msgid "record video"
|
1056 |
msgstr "εγγραφή video"
|
1057 |
|
1058 |
+
#: lib/wfu_constants.php:218
|
1059 |
msgid "take a picture"
|
1060 |
msgstr "φωτογραφία"
|
1061 |
|
1062 |
+
#: lib/wfu_constants.php:219
|
1063 |
msgid "turn webcam on/off"
|
1064 |
msgstr "ενεργοποίηση/απενεργοποίηση κάμερας"
|
1065 |
|
1066 |
+
#: lib/wfu_constants.php:220
|
1067 |
msgid "go live again"
|
1068 |
msgstr "επιστροφή σε ζωντανή λήψη"
|
1069 |
|
1070 |
+
#: lib/wfu_constants.php:221
|
1071 |
msgid "end recording"
|
1072 |
msgstr "τέλος εγγραφής"
|
1073 |
|
1074 |
+
#: lib/wfu_constants.php:222
|
1075 |
msgid "play"
|
1076 |
msgstr "αναπαραγωγή"
|
1077 |
|
1078 |
+
#: lib/wfu_constants.php:223
|
1079 |
msgid "pause"
|
1080 |
msgstr "παύση"
|
1081 |
|
1082 |
+
#: lib/wfu_constants.php:224
|
1083 |
msgid "go to the beginning"
|
1084 |
msgstr "μετάβαση στην αρχή"
|
1085 |
|
1086 |
+
#: lib/wfu_constants.php:225
|
1087 |
msgid "go to the end"
|
1088 |
msgstr "μετάβαση στο τέλος"
|
1089 |
|
1090 |
+
#: lib/wfu_constants.php:227
|
1091 |
msgid "Wordpress File Upload Form"
|
1092 |
msgstr "Φόρμα του Wordpress File Upload"
|
1093 |
|
1094 |
+
#: lib/wfu_constants.php:228
|
1095 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1096 |
msgstr "Αποστολή αρχείων με το Wordpress File Upload plugin για sidebars"
|
1097 |
|
1098 |
+
#: lib/wfu_constants.php:229
|
1099 |
msgid "Upload Files"
|
1100 |
msgstr "Αποστολή αρχείων"
|
1101 |
|
languages/wp-file-upload-en_US.mo
CHANGED
Binary file
|
languages/wp-file-upload-en_US.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: en\n"
|
@@ -887,65 +887,77 @@ msgid "please wait while redirecting..."
|
|
887 |
msgstr ""
|
888 |
|
889 |
#: lib/wfu_constants.php:209
|
890 |
-
msgid "
|
891 |
msgstr ""
|
892 |
|
893 |
#: lib/wfu_constants.php:210
|
894 |
-
msgid "
|
895 |
msgstr ""
|
896 |
|
897 |
#: lib/wfu_constants.php:211
|
898 |
-
msgid "
|
899 |
msgstr ""
|
900 |
|
901 |
#: lib/wfu_constants.php:212
|
902 |
-
msgid "
|
|
|
|
|
|
|
|
|
903 |
msgstr ""
|
904 |
|
905 |
#: lib/wfu_constants.php:214
|
906 |
-
msgid "
|
907 |
msgstr ""
|
908 |
|
909 |
#: lib/wfu_constants.php:215
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
910 |
msgid "take a picture"
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: lib/wfu_constants.php:
|
914 |
msgid "turn webcam on/off"
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: lib/wfu_constants.php:
|
918 |
msgid "go live again"
|
919 |
msgstr ""
|
920 |
|
921 |
-
#: lib/wfu_constants.php:
|
922 |
msgid "end recording"
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: lib/wfu_constants.php:
|
926 |
msgid "play"
|
927 |
msgstr ""
|
928 |
|
929 |
-
#: lib/wfu_constants.php:
|
930 |
msgid "pause"
|
931 |
msgstr ""
|
932 |
|
933 |
-
#: lib/wfu_constants.php:
|
934 |
msgid "go to the beginning"
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: lib/wfu_constants.php:
|
938 |
msgid "go to the end"
|
939 |
msgstr ""
|
940 |
|
941 |
-
#: lib/wfu_constants.php:
|
942 |
msgid "Wordpress File Upload Form"
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: lib/wfu_constants.php:
|
946 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: lib/wfu_constants.php:
|
950 |
msgid "Upload Files"
|
951 |
msgstr ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:24+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:24+0200\n"
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: en\n"
|
887 |
msgstr ""
|
888 |
|
889 |
#: lib/wfu_constants.php:209
|
890 |
+
msgid "Submitting data"
|
891 |
msgstr ""
|
892 |
|
893 |
#: lib/wfu_constants.php:210
|
894 |
+
msgid "Data submitted successfully!"
|
895 |
msgstr ""
|
896 |
|
897 |
#: lib/wfu_constants.php:211
|
898 |
+
msgid "Data were not submitted!"
|
899 |
msgstr ""
|
900 |
|
901 |
#: lib/wfu_constants.php:212
|
902 |
+
msgid "Open visual shortcode editor in new window"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#: lib/wfu_constants.php:213
|
906 |
+
msgid "loading visual editor"
|
907 |
msgstr ""
|
908 |
|
909 |
#: lib/wfu_constants.php:214
|
910 |
+
msgid "Clear file list?"
|
911 |
msgstr ""
|
912 |
|
913 |
#: lib/wfu_constants.php:215
|
914 |
+
msgid "DROP HERE"
|
915 |
+
msgstr ""
|
916 |
+
|
917 |
+
#: lib/wfu_constants.php:217
|
918 |
+
msgid "record video"
|
919 |
+
msgstr ""
|
920 |
+
|
921 |
+
#: lib/wfu_constants.php:218
|
922 |
msgid "take a picture"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: lib/wfu_constants.php:219
|
926 |
msgid "turn webcam on/off"
|
927 |
msgstr ""
|
928 |
|
929 |
+
#: lib/wfu_constants.php:220
|
930 |
msgid "go live again"
|
931 |
msgstr ""
|
932 |
|
933 |
+
#: lib/wfu_constants.php:221
|
934 |
msgid "end recording"
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: lib/wfu_constants.php:222
|
938 |
msgid "play"
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: lib/wfu_constants.php:223
|
942 |
msgid "pause"
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: lib/wfu_constants.php:224
|
946 |
msgid "go to the beginning"
|
947 |
msgstr ""
|
948 |
|
949 |
+
#: lib/wfu_constants.php:225
|
950 |
msgid "go to the end"
|
951 |
msgstr ""
|
952 |
|
953 |
+
#: lib/wfu_constants.php:227
|
954 |
msgid "Wordpress File Upload Form"
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: lib/wfu_constants.php:228
|
958 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
959 |
msgstr ""
|
960 |
|
961 |
+
#: lib/wfu_constants.php:229
|
962 |
msgid "Upload Files"
|
963 |
msgstr ""
|
languages/wp-file-upload-es_ES.mo
CHANGED
Binary file
|
languages/wp-file-upload-es_ES.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: es\n"
|
@@ -1013,65 +1013,77 @@ msgid "please wait while redirecting..."
|
|
1013 |
msgstr "por favor espere mientras se redirecciona..."
|
1014 |
|
1015 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1016 |
msgid "Open visual shortcode editor in new window"
|
1017 |
msgstr "Abrir el editor visual de shortcode en una nueva ventana"
|
1018 |
|
1019 |
-
#: lib/wfu_constants.php:
|
1020 |
msgid "loading visual editor"
|
1021 |
msgstr "cargando editor visual"
|
1022 |
|
1023 |
-
#: lib/wfu_constants.php:
|
1024 |
msgid "Clear file list?"
|
1025 |
msgstr "Limpiar lista de archivos?"
|
1026 |
|
1027 |
-
#: lib/wfu_constants.php:
|
1028 |
msgid "DROP HERE"
|
1029 |
msgstr "SOLTAR AQUÍ"
|
1030 |
|
1031 |
-
#: lib/wfu_constants.php:
|
1032 |
msgid "record video"
|
1033 |
msgstr "grabar video"
|
1034 |
|
1035 |
-
#: lib/wfu_constants.php:
|
1036 |
msgid "take a picture"
|
1037 |
msgstr "tomar fotografía"
|
1038 |
|
1039 |
-
#: lib/wfu_constants.php:
|
1040 |
msgid "turn webcam on/off"
|
1041 |
msgstr "encender/apagar webcam"
|
1042 |
|
1043 |
-
#: lib/wfu_constants.php:
|
1044 |
msgid "go live again"
|
1045 |
msgstr "salir en vivo otra vez"
|
1046 |
|
1047 |
-
#: lib/wfu_constants.php:
|
1048 |
msgid "end recording"
|
1049 |
msgstr "finalizar grabación"
|
1050 |
|
1051 |
-
#: lib/wfu_constants.php:
|
1052 |
msgid "play"
|
1053 |
msgstr "reproducir"
|
1054 |
|
1055 |
-
#: lib/wfu_constants.php:
|
1056 |
msgid "pause"
|
1057 |
msgstr "pausa"
|
1058 |
|
1059 |
-
#: lib/wfu_constants.php:
|
1060 |
msgid "go to the beginning"
|
1061 |
msgstr "ir al principio"
|
1062 |
|
1063 |
-
#: lib/wfu_constants.php:
|
1064 |
msgid "go to the end"
|
1065 |
msgstr "ir al final"
|
1066 |
|
1067 |
-
#: lib/wfu_constants.php:
|
1068 |
msgid "Wordpress File Upload Form"
|
1069 |
msgstr "Formulario Wordpress File Upload"
|
1070 |
|
1071 |
-
#: lib/wfu_constants.php:
|
1072 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1073 |
msgstr "Cargador de complemento Wordpress File Uploader para sidebars"
|
1074 |
|
1075 |
-
#: lib/wfu_constants.php:
|
1076 |
msgid "Upload Files"
|
1077 |
msgstr "Cargar Archivos"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:24+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:24+0200\n"
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: es\n"
|
1013 |
msgstr "por favor espere mientras se redirecciona..."
|
1014 |
|
1015 |
#: lib/wfu_constants.php:209
|
1016 |
+
msgid "Submitting data"
|
1017 |
+
msgstr ""
|
1018 |
+
|
1019 |
+
#: lib/wfu_constants.php:210
|
1020 |
+
msgid "Data submitted successfully!"
|
1021 |
+
msgstr ""
|
1022 |
+
|
1023 |
+
#: lib/wfu_constants.php:211
|
1024 |
+
msgid "Data were not submitted!"
|
1025 |
+
msgstr ""
|
1026 |
+
|
1027 |
+
#: lib/wfu_constants.php:212
|
1028 |
msgid "Open visual shortcode editor in new window"
|
1029 |
msgstr "Abrir el editor visual de shortcode en una nueva ventana"
|
1030 |
|
1031 |
+
#: lib/wfu_constants.php:213
|
1032 |
msgid "loading visual editor"
|
1033 |
msgstr "cargando editor visual"
|
1034 |
|
1035 |
+
#: lib/wfu_constants.php:214
|
1036 |
msgid "Clear file list?"
|
1037 |
msgstr "Limpiar lista de archivos?"
|
1038 |
|
1039 |
+
#: lib/wfu_constants.php:215
|
1040 |
msgid "DROP HERE"
|
1041 |
msgstr "SOLTAR AQUÍ"
|
1042 |
|
1043 |
+
#: lib/wfu_constants.php:217
|
1044 |
msgid "record video"
|
1045 |
msgstr "grabar video"
|
1046 |
|
1047 |
+
#: lib/wfu_constants.php:218
|
1048 |
msgid "take a picture"
|
1049 |
msgstr "tomar fotografía"
|
1050 |
|
1051 |
+
#: lib/wfu_constants.php:219
|
1052 |
msgid "turn webcam on/off"
|
1053 |
msgstr "encender/apagar webcam"
|
1054 |
|
1055 |
+
#: lib/wfu_constants.php:220
|
1056 |
msgid "go live again"
|
1057 |
msgstr "salir en vivo otra vez"
|
1058 |
|
1059 |
+
#: lib/wfu_constants.php:221
|
1060 |
msgid "end recording"
|
1061 |
msgstr "finalizar grabación"
|
1062 |
|
1063 |
+
#: lib/wfu_constants.php:222
|
1064 |
msgid "play"
|
1065 |
msgstr "reproducir"
|
1066 |
|
1067 |
+
#: lib/wfu_constants.php:223
|
1068 |
msgid "pause"
|
1069 |
msgstr "pausa"
|
1070 |
|
1071 |
+
#: lib/wfu_constants.php:224
|
1072 |
msgid "go to the beginning"
|
1073 |
msgstr "ir al principio"
|
1074 |
|
1075 |
+
#: lib/wfu_constants.php:225
|
1076 |
msgid "go to the end"
|
1077 |
msgstr "ir al final"
|
1078 |
|
1079 |
+
#: lib/wfu_constants.php:227
|
1080 |
msgid "Wordpress File Upload Form"
|
1081 |
msgstr "Formulario Wordpress File Upload"
|
1082 |
|
1083 |
+
#: lib/wfu_constants.php:228
|
1084 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1085 |
msgstr "Cargador de complemento Wordpress File Uploader para sidebars"
|
1086 |
|
1087 |
+
#: lib/wfu_constants.php:229
|
1088 |
msgid "Upload Files"
|
1089 |
msgstr "Cargar Archivos"
|
languages/wp-file-upload-fr_FR.mo
CHANGED
Binary file
|
languages/wp-file-upload-fr_FR.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: Eric D. Valachs <ericduval@laposte.net>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: fr_FR\n"
|
@@ -994,66 +994,78 @@ msgid "please wait while redirecting..."
|
|
994 |
msgstr "Merci de patienter pendant la redirection..."
|
995 |
|
996 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
997 |
msgid "Open visual shortcode editor in new window"
|
998 |
msgstr "Ouvrez l'éditeur de shortcode visuel dans une nouvelle fenêtre"
|
999 |
|
1000 |
-
#: lib/wfu_constants.php:
|
1001 |
msgid "loading visual editor"
|
1002 |
msgstr "Chargement de l'éditeur visuel"
|
1003 |
|
1004 |
-
#: lib/wfu_constants.php:
|
1005 |
msgid "Clear file list?"
|
1006 |
msgstr "Effacer la liste des fichiers ?"
|
1007 |
|
1008 |
-
#: lib/wfu_constants.php:
|
1009 |
msgid "DROP HERE"
|
1010 |
msgstr "Déposer ici"
|
1011 |
|
1012 |
-
#: lib/wfu_constants.php:
|
1013 |
msgid "record video"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: lib/wfu_constants.php:
|
1017 |
msgid "take a picture"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: lib/wfu_constants.php:
|
1021 |
msgid "turn webcam on/off"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
-
#: lib/wfu_constants.php:
|
1025 |
msgid "go live again"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: lib/wfu_constants.php:
|
1029 |
msgid "end recording"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
-
#: lib/wfu_constants.php:
|
1033 |
msgid "play"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
-
#: lib/wfu_constants.php:
|
1037 |
msgid "pause"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
-
#: lib/wfu_constants.php:
|
1041 |
msgid "go to the beginning"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: lib/wfu_constants.php:
|
1045 |
msgid "go to the end"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: lib/wfu_constants.php:
|
1049 |
msgid "Wordpress File Upload Form"
|
1050 |
msgstr "Wordpress File Upload Formulaire"
|
1051 |
|
1052 |
-
#: lib/wfu_constants.php:
|
1053 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1054 |
msgstr "Wordpress File Upload extension d'upload pour sidebar."
|
1055 |
|
1056 |
-
#: lib/wfu_constants.php:
|
1057 |
msgid "Upload Files"
|
1058 |
msgstr "Envoyer des fichiers"
|
1059 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:24+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:24+0200\n"
|
7 |
"Last-Translator: Eric D. Valachs <ericduval@laposte.net>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: fr_FR\n"
|
994 |
msgstr "Merci de patienter pendant la redirection..."
|
995 |
|
996 |
#: lib/wfu_constants.php:209
|
997 |
+
msgid "Submitting data"
|
998 |
+
msgstr ""
|
999 |
+
|
1000 |
+
#: lib/wfu_constants.php:210
|
1001 |
+
msgid "Data submitted successfully!"
|
1002 |
+
msgstr ""
|
1003 |
+
|
1004 |
+
#: lib/wfu_constants.php:211
|
1005 |
+
msgid "Data were not submitted!"
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: lib/wfu_constants.php:212
|
1009 |
msgid "Open visual shortcode editor in new window"
|
1010 |
msgstr "Ouvrez l'éditeur de shortcode visuel dans une nouvelle fenêtre"
|
1011 |
|
1012 |
+
#: lib/wfu_constants.php:213
|
1013 |
msgid "loading visual editor"
|
1014 |
msgstr "Chargement de l'éditeur visuel"
|
1015 |
|
1016 |
+
#: lib/wfu_constants.php:214
|
1017 |
msgid "Clear file list?"
|
1018 |
msgstr "Effacer la liste des fichiers ?"
|
1019 |
|
1020 |
+
#: lib/wfu_constants.php:215
|
1021 |
msgid "DROP HERE"
|
1022 |
msgstr "Déposer ici"
|
1023 |
|
1024 |
+
#: lib/wfu_constants.php:217
|
1025 |
msgid "record video"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: lib/wfu_constants.php:218
|
1029 |
msgid "take a picture"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: lib/wfu_constants.php:219
|
1033 |
msgid "turn webcam on/off"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: lib/wfu_constants.php:220
|
1037 |
msgid "go live again"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: lib/wfu_constants.php:221
|
1041 |
msgid "end recording"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: lib/wfu_constants.php:222
|
1045 |
msgid "play"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: lib/wfu_constants.php:223
|
1049 |
msgid "pause"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: lib/wfu_constants.php:224
|
1053 |
msgid "go to the beginning"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: lib/wfu_constants.php:225
|
1057 |
msgid "go to the end"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: lib/wfu_constants.php:227
|
1061 |
msgid "Wordpress File Upload Form"
|
1062 |
msgstr "Wordpress File Upload Formulaire"
|
1063 |
|
1064 |
+
#: lib/wfu_constants.php:228
|
1065 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1066 |
msgstr "Wordpress File Upload extension d'upload pour sidebar."
|
1067 |
|
1068 |
+
#: lib/wfu_constants.php:229
|
1069 |
msgid "Upload Files"
|
1070 |
msgstr "Envoyer des fichiers"
|
1071 |
|
languages/wp-file-upload-it_IT.mo
CHANGED
Binary file
|
languages/wp-file-upload-it_IT.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: it\n"
|
@@ -1021,65 +1021,77 @@ msgid "please wait while redirecting..."
|
|
1021 |
msgstr "Un attimo ancora, grazie..."
|
1022 |
|
1023 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1024 |
msgid "Open visual shortcode editor in new window"
|
1025 |
msgstr "Apri l'editor visuale per i codici brevi in una nuova finestra"
|
1026 |
|
1027 |
-
#: lib/wfu_constants.php:
|
1028 |
msgid "loading visual editor"
|
1029 |
msgstr "Caricamento dell'editor visuale"
|
1030 |
|
1031 |
-
#: lib/wfu_constants.php:
|
1032 |
msgid "Clear file list?"
|
1033 |
msgstr "Pulire la lista dei file?"
|
1034 |
|
1035 |
-
#: lib/wfu_constants.php:
|
1036 |
msgid "DROP HERE"
|
1037 |
msgstr "TRASCINA QUI"
|
1038 |
|
1039 |
-
#: lib/wfu_constants.php:
|
1040 |
msgid "record video"
|
1041 |
msgstr "registra video"
|
1042 |
|
1043 |
-
#: lib/wfu_constants.php:
|
1044 |
msgid "take a picture"
|
1045 |
msgstr "scatta una foto"
|
1046 |
|
1047 |
-
#: lib/wfu_constants.php:
|
1048 |
msgid "turn webcam on/off"
|
1049 |
msgstr "accendi o spegni la webcam"
|
1050 |
|
1051 |
-
#: lib/wfu_constants.php:
|
1052 |
msgid "go live again"
|
1053 |
msgstr "torna in diretta"
|
1054 |
|
1055 |
-
#: lib/wfu_constants.php:
|
1056 |
msgid "end recording"
|
1057 |
msgstr "termina registrazione"
|
1058 |
|
1059 |
-
#: lib/wfu_constants.php:
|
1060 |
msgid "play"
|
1061 |
msgstr "riproduci"
|
1062 |
|
1063 |
-
#: lib/wfu_constants.php:
|
1064 |
msgid "pause"
|
1065 |
msgstr "pausa"
|
1066 |
|
1067 |
-
#: lib/wfu_constants.php:
|
1068 |
msgid "go to the beginning"
|
1069 |
msgstr "vai all'inizio"
|
1070 |
|
1071 |
-
#: lib/wfu_constants.php:
|
1072 |
msgid "go to the end"
|
1073 |
msgstr "vai alla fine"
|
1074 |
|
1075 |
-
#: lib/wfu_constants.php:
|
1076 |
msgid "Wordpress File Upload Form"
|
1077 |
msgstr "Wordpress File Upload Form"
|
1078 |
|
1079 |
-
#: lib/wfu_constants.php:
|
1080 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1081 |
msgstr "Wordpress File Upload plugin per barre laterali"
|
1082 |
|
1083 |
-
#: lib/wfu_constants.php:
|
1084 |
msgid "Upload Files"
|
1085 |
msgstr "Carica Files"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:25+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:25+0200\n"
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: it\n"
|
1021 |
msgstr "Un attimo ancora, grazie..."
|
1022 |
|
1023 |
#: lib/wfu_constants.php:209
|
1024 |
+
msgid "Submitting data"
|
1025 |
+
msgstr ""
|
1026 |
+
|
1027 |
+
#: lib/wfu_constants.php:210
|
1028 |
+
msgid "Data submitted successfully!"
|
1029 |
+
msgstr ""
|
1030 |
+
|
1031 |
+
#: lib/wfu_constants.php:211
|
1032 |
+
msgid "Data were not submitted!"
|
1033 |
+
msgstr ""
|
1034 |
+
|
1035 |
+
#: lib/wfu_constants.php:212
|
1036 |
msgid "Open visual shortcode editor in new window"
|
1037 |
msgstr "Apri l'editor visuale per i codici brevi in una nuova finestra"
|
1038 |
|
1039 |
+
#: lib/wfu_constants.php:213
|
1040 |
msgid "loading visual editor"
|
1041 |
msgstr "Caricamento dell'editor visuale"
|
1042 |
|
1043 |
+
#: lib/wfu_constants.php:214
|
1044 |
msgid "Clear file list?"
|
1045 |
msgstr "Pulire la lista dei file?"
|
1046 |
|
1047 |
+
#: lib/wfu_constants.php:215
|
1048 |
msgid "DROP HERE"
|
1049 |
msgstr "TRASCINA QUI"
|
1050 |
|
1051 |
+
#: lib/wfu_constants.php:217
|
1052 |
msgid "record video"
|
1053 |
msgstr "registra video"
|
1054 |
|
1055 |
+
#: lib/wfu_constants.php:218
|
1056 |
msgid "take a picture"
|
1057 |
msgstr "scatta una foto"
|
1058 |
|
1059 |
+
#: lib/wfu_constants.php:219
|
1060 |
msgid "turn webcam on/off"
|
1061 |
msgstr "accendi o spegni la webcam"
|
1062 |
|
1063 |
+
#: lib/wfu_constants.php:220
|
1064 |
msgid "go live again"
|
1065 |
msgstr "torna in diretta"
|
1066 |
|
1067 |
+
#: lib/wfu_constants.php:221
|
1068 |
msgid "end recording"
|
1069 |
msgstr "termina registrazione"
|
1070 |
|
1071 |
+
#: lib/wfu_constants.php:222
|
1072 |
msgid "play"
|
1073 |
msgstr "riproduci"
|
1074 |
|
1075 |
+
#: lib/wfu_constants.php:223
|
1076 |
msgid "pause"
|
1077 |
msgstr "pausa"
|
1078 |
|
1079 |
+
#: lib/wfu_constants.php:224
|
1080 |
msgid "go to the beginning"
|
1081 |
msgstr "vai all'inizio"
|
1082 |
|
1083 |
+
#: lib/wfu_constants.php:225
|
1084 |
msgid "go to the end"
|
1085 |
msgstr "vai alla fine"
|
1086 |
|
1087 |
+
#: lib/wfu_constants.php:227
|
1088 |
msgid "Wordpress File Upload Form"
|
1089 |
msgstr "Wordpress File Upload Form"
|
1090 |
|
1091 |
+
#: lib/wfu_constants.php:228
|
1092 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1093 |
msgstr "Wordpress File Upload plugin per barre laterali"
|
1094 |
|
1095 |
+
#: lib/wfu_constants.php:229
|
1096 |
msgid "Upload Files"
|
1097 |
msgstr "Carica Files"
|
languages/wp-file-upload-nl_NL.mo
CHANGED
Binary file
|
languages/wp-file-upload-nl_NL.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: nl_NL\n"
|
@@ -989,65 +989,77 @@ msgid "please wait while redirecting..."
|
|
989 |
msgstr "wacht a.u.b. terwijl je wordt doorverwezen..."
|
990 |
|
991 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
992 |
msgid "Open visual shortcode editor in new window"
|
993 |
msgstr "Open de visuele shortcode editor in een nieuw venster"
|
994 |
|
995 |
-
#: lib/wfu_constants.php:
|
996 |
msgid "loading visual editor"
|
997 |
msgstr "laden visuele editor"
|
998 |
|
999 |
-
#: lib/wfu_constants.php:
|
1000 |
msgid "Clear file list?"
|
1001 |
msgstr "Bestandenlijst wissen?"
|
1002 |
|
1003 |
-
#: lib/wfu_constants.php:
|
1004 |
msgid "DROP HERE"
|
1005 |
msgstr "PLAATS HIER"
|
1006 |
|
1007 |
-
#: lib/wfu_constants.php:
|
1008 |
msgid "record video"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
-
#: lib/wfu_constants.php:
|
1012 |
msgid "take a picture"
|
1013 |
msgstr ""
|
1014 |
|
1015 |
-
#: lib/wfu_constants.php:
|
1016 |
msgid "turn webcam on/off"
|
1017 |
msgstr ""
|
1018 |
|
1019 |
-
#: lib/wfu_constants.php:
|
1020 |
msgid "go live again"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
-
#: lib/wfu_constants.php:
|
1024 |
msgid "end recording"
|
1025 |
msgstr ""
|
1026 |
|
1027 |
-
#: lib/wfu_constants.php:
|
1028 |
msgid "play"
|
1029 |
msgstr ""
|
1030 |
|
1031 |
-
#: lib/wfu_constants.php:
|
1032 |
msgid "pause"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: lib/wfu_constants.php:
|
1036 |
msgid "go to the beginning"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
-
#: lib/wfu_constants.php:
|
1040 |
msgid "go to the end"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: lib/wfu_constants.php:
|
1044 |
msgid "Wordpress File Upload Form"
|
1045 |
msgstr "Wordpress File Upload Formulier"
|
1046 |
|
1047 |
-
#: lib/wfu_constants.php:
|
1048 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1049 |
msgstr "Wordpress File Upload plugin uploader voor zijbalken"
|
1050 |
|
1051 |
-
#: lib/wfu_constants.php:
|
1052 |
msgid "Upload Files"
|
1053 |
msgstr "Upload Bestanden"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:25+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:25+0200\n"
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: nl_NL\n"
|
989 |
msgstr "wacht a.u.b. terwijl je wordt doorverwezen..."
|
990 |
|
991 |
#: lib/wfu_constants.php:209
|
992 |
+
msgid "Submitting data"
|
993 |
+
msgstr ""
|
994 |
+
|
995 |
+
#: lib/wfu_constants.php:210
|
996 |
+
msgid "Data submitted successfully!"
|
997 |
+
msgstr ""
|
998 |
+
|
999 |
+
#: lib/wfu_constants.php:211
|
1000 |
+
msgid "Data were not submitted!"
|
1001 |
+
msgstr ""
|
1002 |
+
|
1003 |
+
#: lib/wfu_constants.php:212
|
1004 |
msgid "Open visual shortcode editor in new window"
|
1005 |
msgstr "Open de visuele shortcode editor in een nieuw venster"
|
1006 |
|
1007 |
+
#: lib/wfu_constants.php:213
|
1008 |
msgid "loading visual editor"
|
1009 |
msgstr "laden visuele editor"
|
1010 |
|
1011 |
+
#: lib/wfu_constants.php:214
|
1012 |
msgid "Clear file list?"
|
1013 |
msgstr "Bestandenlijst wissen?"
|
1014 |
|
1015 |
+
#: lib/wfu_constants.php:215
|
1016 |
msgid "DROP HERE"
|
1017 |
msgstr "PLAATS HIER"
|
1018 |
|
1019 |
+
#: lib/wfu_constants.php:217
|
1020 |
msgid "record video"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
+
#: lib/wfu_constants.php:218
|
1024 |
msgid "take a picture"
|
1025 |
msgstr ""
|
1026 |
|
1027 |
+
#: lib/wfu_constants.php:219
|
1028 |
msgid "turn webcam on/off"
|
1029 |
msgstr ""
|
1030 |
|
1031 |
+
#: lib/wfu_constants.php:220
|
1032 |
msgid "go live again"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
+
#: lib/wfu_constants.php:221
|
1036 |
msgid "end recording"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
+
#: lib/wfu_constants.php:222
|
1040 |
msgid "play"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
+
#: lib/wfu_constants.php:223
|
1044 |
msgid "pause"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: lib/wfu_constants.php:224
|
1048 |
msgid "go to the beginning"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: lib/wfu_constants.php:225
|
1052 |
msgid "go to the end"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: lib/wfu_constants.php:227
|
1056 |
msgid "Wordpress File Upload Form"
|
1057 |
msgstr "Wordpress File Upload Formulier"
|
1058 |
|
1059 |
+
#: lib/wfu_constants.php:228
|
1060 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1061 |
msgstr "Wordpress File Upload plugin uploader voor zijbalken"
|
1062 |
|
1063 |
+
#: lib/wfu_constants.php:229
|
1064 |
msgid "Upload Files"
|
1065 |
msgstr "Upload Bestanden"
|
languages/wp-file-upload-pl_PL.mo
CHANGED
Binary file
|
languages/wp-file-upload-pl_PL.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: pl_PL\n"
|
@@ -966,66 +966,78 @@ msgid "please wait while redirecting..."
|
|
966 |
msgstr "Proszę czekać, za chwilę zostaniesz przekierowany..."
|
967 |
|
968 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
969 |
msgid "Open visual shortcode editor in new window"
|
970 |
msgstr "Otwórz edytor w nowym oknie"
|
971 |
|
972 |
-
#: lib/wfu_constants.php:
|
973 |
msgid "loading visual editor"
|
974 |
msgstr "Ładowanie wizualnego edytora"
|
975 |
|
976 |
-
#: lib/wfu_constants.php:
|
977 |
msgid "Clear file list?"
|
978 |
msgstr ""
|
979 |
|
980 |
-
#: lib/wfu_constants.php:
|
981 |
msgid "DROP HERE"
|
982 |
msgstr ""
|
983 |
|
984 |
-
#: lib/wfu_constants.php:
|
985 |
msgid "record video"
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: lib/wfu_constants.php:
|
989 |
msgid "take a picture"
|
990 |
msgstr ""
|
991 |
|
992 |
-
#: lib/wfu_constants.php:
|
993 |
msgid "turn webcam on/off"
|
994 |
msgstr ""
|
995 |
|
996 |
-
#: lib/wfu_constants.php:
|
997 |
msgid "go live again"
|
998 |
msgstr ""
|
999 |
|
1000 |
-
#: lib/wfu_constants.php:
|
1001 |
msgid "end recording"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
-
#: lib/wfu_constants.php:
|
1005 |
msgid "play"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
-
#: lib/wfu_constants.php:
|
1009 |
msgid "pause"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: lib/wfu_constants.php:
|
1013 |
msgid "go to the beginning"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: lib/wfu_constants.php:
|
1017 |
msgid "go to the end"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: lib/wfu_constants.php:
|
1021 |
msgid "Wordpress File Upload Form"
|
1022 |
msgstr "Formularz przesyłania plików WPFU"
|
1023 |
|
1024 |
-
#: lib/wfu_constants.php:
|
1025 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: lib/wfu_constants.php:
|
1029 |
msgid "Upload Files"
|
1030 |
msgstr ""
|
1031 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:25+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:25+0200\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: pl_PL\n"
|
966 |
msgstr "Proszę czekać, za chwilę zostaniesz przekierowany..."
|
967 |
|
968 |
#: lib/wfu_constants.php:209
|
969 |
+
msgid "Submitting data"
|
970 |
+
msgstr ""
|
971 |
+
|
972 |
+
#: lib/wfu_constants.php:210
|
973 |
+
msgid "Data submitted successfully!"
|
974 |
+
msgstr ""
|
975 |
+
|
976 |
+
#: lib/wfu_constants.php:211
|
977 |
+
msgid "Data were not submitted!"
|
978 |
+
msgstr ""
|
979 |
+
|
980 |
+
#: lib/wfu_constants.php:212
|
981 |
msgid "Open visual shortcode editor in new window"
|
982 |
msgstr "Otwórz edytor w nowym oknie"
|
983 |
|
984 |
+
#: lib/wfu_constants.php:213
|
985 |
msgid "loading visual editor"
|
986 |
msgstr "Ładowanie wizualnego edytora"
|
987 |
|
988 |
+
#: lib/wfu_constants.php:214
|
989 |
msgid "Clear file list?"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: lib/wfu_constants.php:215
|
993 |
msgid "DROP HERE"
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: lib/wfu_constants.php:217
|
997 |
msgid "record video"
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: lib/wfu_constants.php:218
|
1001 |
msgid "take a picture"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: lib/wfu_constants.php:219
|
1005 |
msgid "turn webcam on/off"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: lib/wfu_constants.php:220
|
1009 |
msgid "go live again"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
+
#: lib/wfu_constants.php:221
|
1013 |
msgid "end recording"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: lib/wfu_constants.php:222
|
1017 |
msgid "play"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
+
#: lib/wfu_constants.php:223
|
1021 |
msgid "pause"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: lib/wfu_constants.php:224
|
1025 |
msgid "go to the beginning"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: lib/wfu_constants.php:225
|
1029 |
msgid "go to the end"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: lib/wfu_constants.php:227
|
1033 |
msgid "Wordpress File Upload Form"
|
1034 |
msgstr "Formularz przesyłania plików WPFU"
|
1035 |
|
1036 |
+
#: lib/wfu_constants.php:228
|
1037 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: lib/wfu_constants.php:229
|
1041 |
msgid "Upload Files"
|
1042 |
msgstr ""
|
1043 |
|
languages/wp-file-upload-sr_RS.mo
CHANGED
Binary file
|
languages/wp-file-upload-sr_RS.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: sr\n"
|
@@ -984,66 +984,78 @@ msgid "please wait while redirecting..."
|
|
984 |
msgstr "Molimo sačekajte preusmeravanje..."
|
985 |
|
986 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
987 |
msgid "Open visual shortcode editor in new window"
|
988 |
msgstr "Otvori vizuelni shortcode uređivač u novom prozoru"
|
989 |
|
990 |
-
#: lib/wfu_constants.php:
|
991 |
msgid "loading visual editor"
|
992 |
msgstr "učitavanje vizuelnog uređivača"
|
993 |
|
994 |
-
#: lib/wfu_constants.php:
|
995 |
msgid "Clear file list?"
|
996 |
msgstr "Obriši listu datoteke?"
|
997 |
|
998 |
-
#: lib/wfu_constants.php:
|
999 |
msgid "DROP HERE"
|
1000 |
msgstr "POZICIONIRAJ OVDE"
|
1001 |
|
1002 |
-
#: lib/wfu_constants.php:
|
1003 |
msgid "record video"
|
1004 |
msgstr ""
|
1005 |
|
1006 |
-
#: lib/wfu_constants.php:
|
1007 |
msgid "take a picture"
|
1008 |
msgstr ""
|
1009 |
|
1010 |
-
#: lib/wfu_constants.php:
|
1011 |
msgid "turn webcam on/off"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
-
#: lib/wfu_constants.php:
|
1015 |
msgid "go live again"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
-
#: lib/wfu_constants.php:
|
1019 |
msgid "end recording"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
-
#: lib/wfu_constants.php:
|
1023 |
msgid "play"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
-
#: lib/wfu_constants.php:
|
1027 |
msgid "pause"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
-
#: lib/wfu_constants.php:
|
1031 |
msgid "go to the beginning"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
-
#: lib/wfu_constants.php:
|
1035 |
msgid "go to the end"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
-
#: lib/wfu_constants.php:
|
1039 |
msgid "Wordpress File Upload Form"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
-
#: lib/wfu_constants.php:
|
1043 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
-
#: lib/wfu_constants.php:
|
1047 |
msgid "Upload Files"
|
1048 |
msgstr ""
|
1049 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:25+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:25+0200\n"
|
7 |
"Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: sr\n"
|
984 |
msgstr "Molimo sačekajte preusmeravanje..."
|
985 |
|
986 |
#: lib/wfu_constants.php:209
|
987 |
+
msgid "Submitting data"
|
988 |
+
msgstr ""
|
989 |
+
|
990 |
+
#: lib/wfu_constants.php:210
|
991 |
+
msgid "Data submitted successfully!"
|
992 |
+
msgstr ""
|
993 |
+
|
994 |
+
#: lib/wfu_constants.php:211
|
995 |
+
msgid "Data were not submitted!"
|
996 |
+
msgstr ""
|
997 |
+
|
998 |
+
#: lib/wfu_constants.php:212
|
999 |
msgid "Open visual shortcode editor in new window"
|
1000 |
msgstr "Otvori vizuelni shortcode uređivač u novom prozoru"
|
1001 |
|
1002 |
+
#: lib/wfu_constants.php:213
|
1003 |
msgid "loading visual editor"
|
1004 |
msgstr "učitavanje vizuelnog uređivača"
|
1005 |
|
1006 |
+
#: lib/wfu_constants.php:214
|
1007 |
msgid "Clear file list?"
|
1008 |
msgstr "Obriši listu datoteke?"
|
1009 |
|
1010 |
+
#: lib/wfu_constants.php:215
|
1011 |
msgid "DROP HERE"
|
1012 |
msgstr "POZICIONIRAJ OVDE"
|
1013 |
|
1014 |
+
#: lib/wfu_constants.php:217
|
1015 |
msgid "record video"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
+
#: lib/wfu_constants.php:218
|
1019 |
msgid "take a picture"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
+
#: lib/wfu_constants.php:219
|
1023 |
msgid "turn webcam on/off"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
+
#: lib/wfu_constants.php:220
|
1027 |
msgid "go live again"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
+
#: lib/wfu_constants.php:221
|
1031 |
msgid "end recording"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
+
#: lib/wfu_constants.php:222
|
1035 |
msgid "play"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
+
#: lib/wfu_constants.php:223
|
1039 |
msgid "pause"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
+
#: lib/wfu_constants.php:224
|
1043 |
msgid "go to the beginning"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
+
#: lib/wfu_constants.php:225
|
1047 |
msgid "go to the end"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
+
#: lib/wfu_constants.php:227
|
1051 |
msgid "Wordpress File Upload Form"
|
1052 |
msgstr ""
|
1053 |
|
1054 |
+
#: lib/wfu_constants.php:228
|
1055 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
+
#: lib/wfu_constants.php:229
|
1059 |
msgid "Upload Files"
|
1060 |
msgstr ""
|
1061 |
|
languages/wp-file-upload-sv_SE.mo
CHANGED
Binary file
|
languages/wp-file-upload-sv_SE.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: sv\n"
|
@@ -1011,65 +1011,77 @@ msgid "please wait while redirecting..."
|
|
1011 |
msgstr "Vänta medan omdirigerar..."
|
1012 |
|
1013 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1014 |
msgid "Open visual shortcode editor in new window"
|
1015 |
msgstr "Öppna visual kortkod editor i nytt fönster"
|
1016 |
|
1017 |
-
#: lib/wfu_constants.php:
|
1018 |
msgid "loading visual editor"
|
1019 |
msgstr "lastning visuell redigerare"
|
1020 |
|
1021 |
-
#: lib/wfu_constants.php:
|
1022 |
msgid "Clear file list?"
|
1023 |
msgstr "Rensa fil-lista?"
|
1024 |
|
1025 |
-
#: lib/wfu_constants.php:
|
1026 |
msgid "DROP HERE"
|
1027 |
msgstr "Släpp filen här"
|
1028 |
|
1029 |
-
#: lib/wfu_constants.php:
|
1030 |
msgid "record video"
|
1031 |
msgstr "spela in video"
|
1032 |
|
1033 |
-
#: lib/wfu_constants.php:
|
1034 |
msgid "take a picture"
|
1035 |
msgstr "ta en bild"
|
1036 |
|
1037 |
-
#: lib/wfu_constants.php:
|
1038 |
msgid "turn webcam on/off"
|
1039 |
msgstr "vända webcam på/av"
|
1040 |
|
1041 |
-
#: lib/wfu_constants.php:
|
1042 |
msgid "go live again"
|
1043 |
msgstr "gå live igen"
|
1044 |
|
1045 |
-
#: lib/wfu_constants.php:
|
1046 |
msgid "end recording"
|
1047 |
msgstr "avsluta inspelning"
|
1048 |
|
1049 |
-
#: lib/wfu_constants.php:
|
1050 |
msgid "play"
|
1051 |
msgstr "Spela"
|
1052 |
|
1053 |
-
#: lib/wfu_constants.php:
|
1054 |
msgid "pause"
|
1055 |
msgstr "Paus"
|
1056 |
|
1057 |
-
#: lib/wfu_constants.php:
|
1058 |
msgid "go to the beginning"
|
1059 |
msgstr "Gå till början"
|
1060 |
|
1061 |
-
#: lib/wfu_constants.php:
|
1062 |
msgid "go to the end"
|
1063 |
msgstr "Gå till slutet"
|
1064 |
|
1065 |
-
#: lib/wfu_constants.php:
|
1066 |
msgid "Wordpress File Upload Form"
|
1067 |
msgstr "WordPress filöverföringsformuläret"
|
1068 |
|
1069 |
-
#: lib/wfu_constants.php:
|
1070 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1071 |
msgstr "WordPress-fil ladda upp plugin uploader för sidofält"
|
1072 |
|
1073 |
-
#: lib/wfu_constants.php:
|
1074 |
msgid "Upload Files"
|
1075 |
msgstr "Ladda upp filer"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:25+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:25+0200\n"
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: sv\n"
|
1011 |
msgstr "Vänta medan omdirigerar..."
|
1012 |
|
1013 |
#: lib/wfu_constants.php:209
|
1014 |
+
msgid "Submitting data"
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
+
#: lib/wfu_constants.php:210
|
1018 |
+
msgid "Data submitted successfully!"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: lib/wfu_constants.php:211
|
1022 |
+
msgid "Data were not submitted!"
|
1023 |
+
msgstr ""
|
1024 |
+
|
1025 |
+
#: lib/wfu_constants.php:212
|
1026 |
msgid "Open visual shortcode editor in new window"
|
1027 |
msgstr "Öppna visual kortkod editor i nytt fönster"
|
1028 |
|
1029 |
+
#: lib/wfu_constants.php:213
|
1030 |
msgid "loading visual editor"
|
1031 |
msgstr "lastning visuell redigerare"
|
1032 |
|
1033 |
+
#: lib/wfu_constants.php:214
|
1034 |
msgid "Clear file list?"
|
1035 |
msgstr "Rensa fil-lista?"
|
1036 |
|
1037 |
+
#: lib/wfu_constants.php:215
|
1038 |
msgid "DROP HERE"
|
1039 |
msgstr "Släpp filen här"
|
1040 |
|
1041 |
+
#: lib/wfu_constants.php:217
|
1042 |
msgid "record video"
|
1043 |
msgstr "spela in video"
|
1044 |
|
1045 |
+
#: lib/wfu_constants.php:218
|
1046 |
msgid "take a picture"
|
1047 |
msgstr "ta en bild"
|
1048 |
|
1049 |
+
#: lib/wfu_constants.php:219
|
1050 |
msgid "turn webcam on/off"
|
1051 |
msgstr "vända webcam på/av"
|
1052 |
|
1053 |
+
#: lib/wfu_constants.php:220
|
1054 |
msgid "go live again"
|
1055 |
msgstr "gå live igen"
|
1056 |
|
1057 |
+
#: lib/wfu_constants.php:221
|
1058 |
msgid "end recording"
|
1059 |
msgstr "avsluta inspelning"
|
1060 |
|
1061 |
+
#: lib/wfu_constants.php:222
|
1062 |
msgid "play"
|
1063 |
msgstr "Spela"
|
1064 |
|
1065 |
+
#: lib/wfu_constants.php:223
|
1066 |
msgid "pause"
|
1067 |
msgstr "Paus"
|
1068 |
|
1069 |
+
#: lib/wfu_constants.php:224
|
1070 |
msgid "go to the beginning"
|
1071 |
msgstr "Gå till början"
|
1072 |
|
1073 |
+
#: lib/wfu_constants.php:225
|
1074 |
msgid "go to the end"
|
1075 |
msgstr "Gå till slutet"
|
1076 |
|
1077 |
+
#: lib/wfu_constants.php:227
|
1078 |
msgid "Wordpress File Upload Form"
|
1079 |
msgstr "WordPress filöverföringsformuläret"
|
1080 |
|
1081 |
+
#: lib/wfu_constants.php:228
|
1082 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
1083 |
msgstr "WordPress-fil ladda upp plugin uploader för sidofält"
|
1084 |
|
1085 |
+
#: lib/wfu_constants.php:229
|
1086 |
msgid "Upload Files"
|
1087 |
msgstr "Ladda upp filer"
|
languages/wp-file-upload-zh_CN.mo
CHANGED
Binary file
|
languages/wp-file-upload-zh_CN.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: zh_CN\n"
|
@@ -904,65 +904,77 @@ msgid "please wait while redirecting..."
|
|
904 |
msgstr "请等候,正在重新定位 ..."
|
905 |
|
906 |
#: lib/wfu_constants.php:209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
907 |
msgid "Open visual shortcode editor in new window"
|
908 |
msgstr "在新窗口打开视频 shortcode 编辑器"
|
909 |
|
910 |
-
#: lib/wfu_constants.php:
|
911 |
msgid "loading visual editor"
|
912 |
msgstr "加载视频编辑器"
|
913 |
|
914 |
-
#: lib/wfu_constants.php:
|
915 |
msgid "Clear file list?"
|
916 |
msgstr "清除文件列表?"
|
917 |
|
918 |
-
#: lib/wfu_constants.php:
|
919 |
msgid "DROP HERE"
|
920 |
msgstr "放在这里"
|
921 |
|
922 |
-
#: lib/wfu_constants.php:
|
923 |
msgid "record video"
|
924 |
msgstr ""
|
925 |
|
926 |
-
#: lib/wfu_constants.php:
|
927 |
msgid "take a picture"
|
928 |
msgstr ""
|
929 |
|
930 |
-
#: lib/wfu_constants.php:
|
931 |
msgid "turn webcam on/off"
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: lib/wfu_constants.php:
|
935 |
msgid "go live again"
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: lib/wfu_constants.php:
|
939 |
msgid "end recording"
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: lib/wfu_constants.php:
|
943 |
msgid "play"
|
944 |
msgstr ""
|
945 |
|
946 |
-
#: lib/wfu_constants.php:
|
947 |
msgid "pause"
|
948 |
msgstr ""
|
949 |
|
950 |
-
#: lib/wfu_constants.php:
|
951 |
msgid "go to the beginning"
|
952 |
msgstr ""
|
953 |
|
954 |
-
#: lib/wfu_constants.php:
|
955 |
msgid "go to the end"
|
956 |
msgstr ""
|
957 |
|
958 |
-
#: lib/wfu_constants.php:
|
959 |
msgid "Wordpress File Upload Form"
|
960 |
msgstr "Wordpress 文件上传格式"
|
961 |
|
962 |
-
#: lib/wfu_constants.php:
|
963 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
964 |
msgstr "针对sidebars 的 Wordpress 文件上传插件工具"
|
965 |
|
966 |
-
#: lib/wfu_constants.php:
|
967 |
msgid "Upload Files"
|
968 |
msgstr "上传文件"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:25+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:25+0200\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: zh_CN\n"
|
904 |
msgstr "请等候,正在重新定位 ..."
|
905 |
|
906 |
#: lib/wfu_constants.php:209
|
907 |
+
msgid "Submitting data"
|
908 |
+
msgstr ""
|
909 |
+
|
910 |
+
#: lib/wfu_constants.php:210
|
911 |
+
msgid "Data submitted successfully!"
|
912 |
+
msgstr ""
|
913 |
+
|
914 |
+
#: lib/wfu_constants.php:211
|
915 |
+
msgid "Data were not submitted!"
|
916 |
+
msgstr ""
|
917 |
+
|
918 |
+
#: lib/wfu_constants.php:212
|
919 |
msgid "Open visual shortcode editor in new window"
|
920 |
msgstr "在新窗口打开视频 shortcode 编辑器"
|
921 |
|
922 |
+
#: lib/wfu_constants.php:213
|
923 |
msgid "loading visual editor"
|
924 |
msgstr "加载视频编辑器"
|
925 |
|
926 |
+
#: lib/wfu_constants.php:214
|
927 |
msgid "Clear file list?"
|
928 |
msgstr "清除文件列表?"
|
929 |
|
930 |
+
#: lib/wfu_constants.php:215
|
931 |
msgid "DROP HERE"
|
932 |
msgstr "放在这里"
|
933 |
|
934 |
+
#: lib/wfu_constants.php:217
|
935 |
msgid "record video"
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: lib/wfu_constants.php:218
|
939 |
msgid "take a picture"
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: lib/wfu_constants.php:219
|
943 |
msgid "turn webcam on/off"
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: lib/wfu_constants.php:220
|
947 |
msgid "go live again"
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: lib/wfu_constants.php:221
|
951 |
msgid "end recording"
|
952 |
msgstr ""
|
953 |
|
954 |
+
#: lib/wfu_constants.php:222
|
955 |
msgid "play"
|
956 |
msgstr ""
|
957 |
|
958 |
+
#: lib/wfu_constants.php:223
|
959 |
msgid "pause"
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: lib/wfu_constants.php:224
|
963 |
msgid "go to the beginning"
|
964 |
msgstr ""
|
965 |
|
966 |
+
#: lib/wfu_constants.php:225
|
967 |
msgid "go to the end"
|
968 |
msgstr ""
|
969 |
|
970 |
+
#: lib/wfu_constants.php:227
|
971 |
msgid "Wordpress File Upload Form"
|
972 |
msgstr "Wordpress 文件上传格式"
|
973 |
|
974 |
+
#: lib/wfu_constants.php:228
|
975 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
976 |
msgstr "针对sidebars 的 Wordpress 文件上传插件工具"
|
977 |
|
978 |
+
#: lib/wfu_constants.php:229
|
979 |
msgid "Upload Files"
|
980 |
msgstr "上传文件"
|
languages/wp-file-upload.pot
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: en\n"
|
@@ -887,65 +887,77 @@ msgid "please wait while redirecting..."
|
|
887 |
msgstr ""
|
888 |
|
889 |
#: lib/wfu_constants.php:209
|
890 |
-
msgid "
|
891 |
msgstr ""
|
892 |
|
893 |
#: lib/wfu_constants.php:210
|
894 |
-
msgid "
|
895 |
msgstr ""
|
896 |
|
897 |
#: lib/wfu_constants.php:211
|
898 |
-
msgid "
|
899 |
msgstr ""
|
900 |
|
901 |
#: lib/wfu_constants.php:212
|
902 |
-
msgid "
|
|
|
|
|
|
|
|
|
903 |
msgstr ""
|
904 |
|
905 |
#: lib/wfu_constants.php:214
|
906 |
-
msgid "
|
907 |
msgstr ""
|
908 |
|
909 |
#: lib/wfu_constants.php:215
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
910 |
msgid "take a picture"
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: lib/wfu_constants.php:
|
914 |
msgid "turn webcam on/off"
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: lib/wfu_constants.php:
|
918 |
msgid "go live again"
|
919 |
msgstr ""
|
920 |
|
921 |
-
#: lib/wfu_constants.php:
|
922 |
msgid "end recording"
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: lib/wfu_constants.php:
|
926 |
msgid "play"
|
927 |
msgstr ""
|
928 |
|
929 |
-
#: lib/wfu_constants.php:
|
930 |
msgid "pause"
|
931 |
msgstr ""
|
932 |
|
933 |
-
#: lib/wfu_constants.php:
|
934 |
msgid "go to the beginning"
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: lib/wfu_constants.php:
|
938 |
msgid "go to the end"
|
939 |
msgstr ""
|
940 |
|
941 |
-
#: lib/wfu_constants.php:
|
942 |
msgid "Wordpress File Upload Form"
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: lib/wfu_constants.php:
|
946 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: lib/wfu_constants.php:
|
950 |
msgid "Upload Files"
|
951 |
msgstr ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-04-23 23:22+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-04-23 23:22+0200\n"
|
7 |
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
"Language-Team: Iptanus Team <info@iptanus.com>\n"
|
9 |
"Language: en\n"
|
887 |
msgstr ""
|
888 |
|
889 |
#: lib/wfu_constants.php:209
|
890 |
+
msgid "Submitting data"
|
891 |
msgstr ""
|
892 |
|
893 |
#: lib/wfu_constants.php:210
|
894 |
+
msgid "Data submitted successfully!"
|
895 |
msgstr ""
|
896 |
|
897 |
#: lib/wfu_constants.php:211
|
898 |
+
msgid "Data were not submitted!"
|
899 |
msgstr ""
|
900 |
|
901 |
#: lib/wfu_constants.php:212
|
902 |
+
msgid "Open visual shortcode editor in new window"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#: lib/wfu_constants.php:213
|
906 |
+
msgid "loading visual editor"
|
907 |
msgstr ""
|
908 |
|
909 |
#: lib/wfu_constants.php:214
|
910 |
+
msgid "Clear file list?"
|
911 |
msgstr ""
|
912 |
|
913 |
#: lib/wfu_constants.php:215
|
914 |
+
msgid "DROP HERE"
|
915 |
+
msgstr ""
|
916 |
+
|
917 |
+
#: lib/wfu_constants.php:217
|
918 |
+
msgid "record video"
|
919 |
+
msgstr ""
|
920 |
+
|
921 |
+
#: lib/wfu_constants.php:218
|
922 |
msgid "take a picture"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: lib/wfu_constants.php:219
|
926 |
msgid "turn webcam on/off"
|
927 |
msgstr ""
|
928 |
|
929 |
+
#: lib/wfu_constants.php:220
|
930 |
msgid "go live again"
|
931 |
msgstr ""
|
932 |
|
933 |
+
#: lib/wfu_constants.php:221
|
934 |
msgid "end recording"
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: lib/wfu_constants.php:222
|
938 |
msgid "play"
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: lib/wfu_constants.php:223
|
942 |
msgid "pause"
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: lib/wfu_constants.php:224
|
946 |
msgid "go to the beginning"
|
947 |
msgstr ""
|
948 |
|
949 |
+
#: lib/wfu_constants.php:225
|
950 |
msgid "go to the end"
|
951 |
msgstr ""
|
952 |
|
953 |
+
#: lib/wfu_constants.php:227
|
954 |
msgid "Wordpress File Upload Form"
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: lib/wfu_constants.php:228
|
958 |
msgid "Wordpress File Upload plugin uploader for sidebars"
|
959 |
msgstr ""
|
960 |
|
961 |
+
#: lib/wfu_constants.php:229
|
962 |
msgid "Upload Files"
|
963 |
msgstr ""
|
lib/wfu_admin.php
CHANGED
@@ -376,6 +376,7 @@ function wfu_manage_mainmenu($message = '') {
|
|
376 |
}
|
377 |
|
378 |
function wfu_generate_dashboard_menu($dlp, $active) {
|
|
|
379 |
$siteurl = site_url();
|
380 |
|
381 |
$echo_str = $dlp.'<h2 class="nav-tab-wrapper" style="margin-bottom:40px;">';
|
@@ -558,10 +559,10 @@ function wfu_manage_instances_of_shortcode($tag, $title, $slug, $inc) {
|
|
558 |
// $echo_str .= "\n\t\t\t\t\t\t".'<label>ID</label>';
|
559 |
// $echo_str .= "\n\t\t\t\t\t".'</th>';
|
560 |
$echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" style="text-align:center;">';
|
561 |
-
$echo_str .= "\n\t\t\t\t\t\t".'<label>
|
562 |
$echo_str .= "\n\t\t\t\t\t".'</th>';
|
563 |
$echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="30%" style="text-align:center;">';
|
564 |
-
$echo_str .= "\n\t\t\t\t\t\t".'<label>Title</label>';
|
565 |
$echo_str .= "\n\t\t\t\t\t".'</th>';
|
566 |
$echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="45%" style="text-align:center;">';
|
567 |
$echo_str .= "\n\t\t\t\t\t\t".'<label>Shortcode</label>';
|
@@ -701,6 +702,7 @@ function wfu_delete_shortcode($data) {
|
|
701 |
}
|
702 |
|
703 |
function wfu_media_editor_properties() {
|
|
|
704 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
705 |
if ( $plugin_options["mediacustom"] != "1" ) return;
|
706 |
|
376 |
}
|
377 |
|
378 |
function wfu_generate_dashboard_menu($dlp, $active) {
|
379 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
380 |
$siteurl = site_url();
|
381 |
|
382 |
$echo_str = $dlp.'<h2 class="nav-tab-wrapper" style="margin-bottom:40px;">';
|
559 |
// $echo_str .= "\n\t\t\t\t\t\t".'<label>ID</label>';
|
560 |
// $echo_str .= "\n\t\t\t\t\t".'</th>';
|
561 |
$echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="10%" style="text-align:center;">';
|
562 |
+
$echo_str .= "\n\t\t\t\t\t\t".'<label>Contained In</label>';
|
563 |
$echo_str .= "\n\t\t\t\t\t".'</th>';
|
564 |
$echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="30%" style="text-align:center;">';
|
565 |
+
$echo_str .= "\n\t\t\t\t\t\t".'<label>Page/Post Title</label>';
|
566 |
$echo_str .= "\n\t\t\t\t\t".'</th>';
|
567 |
$echo_str .= "\n\t\t\t\t\t".'<th scope="col" width="45%" style="text-align:center;">';
|
568 |
$echo_str .= "\n\t\t\t\t\t\t".'<label>Shortcode</label>';
|
702 |
}
|
703 |
|
704 |
function wfu_media_editor_properties() {
|
705 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
706 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
707 |
if ( $plugin_options["mediacustom"] != "1" ) return;
|
708 |
|
lib/wfu_admin_log.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
function wfu_view_log($page = 1, $only_table_rows = false) {
|
|
|
4 |
global $wpdb;
|
5 |
$siteurl = site_url();
|
6 |
$table_name1 = $wpdb->prefix . "wfu_log";
|
@@ -71,7 +72,7 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
|
|
71 |
if ( $prevfilepath != '' )
|
72 |
$remarks = "\n\t\t\t\t\t\t".'<label>Previous filepath: '.$prevfilepath.'</label>';
|
73 |
}
|
74 |
-
elseif ( $filerec->action == 'upload' || $filerec->action == 'modify' ) {
|
75 |
foreach ( $userdatarecs as $userdata ) {
|
76 |
if ( $userdata->uploadid == $filerec->uploadid ) {
|
77 |
$userdata_datefrom = strtotime($userdata->date_from);
|
@@ -108,7 +109,8 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
|
|
108 |
$echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:center;">'.$filerec->action.'</td>';
|
109 |
if ( !$otheraction ) {
|
110 |
$echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:left;">';
|
111 |
-
if (
|
|
|
112 |
else {
|
113 |
$lid = 0;
|
114 |
if ( $filerec->action == 'upload' || $filerec->action == 'include' ) $lid = $filerec->idlog;
|
1 |
<?php
|
2 |
|
3 |
function wfu_view_log($page = 1, $only_table_rows = false) {
|
4 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
5 |
global $wpdb;
|
6 |
$siteurl = site_url();
|
7 |
$table_name1 = $wpdb->prefix . "wfu_log";
|
72 |
if ( $prevfilepath != '' )
|
73 |
$remarks = "\n\t\t\t\t\t\t".'<label>Previous filepath: '.$prevfilepath.'</label>';
|
74 |
}
|
75 |
+
elseif ( $filerec->action == 'upload' || $filerec->action == 'modify' || $filerec->action == 'datasubmit' ) {
|
76 |
foreach ( $userdatarecs as $userdata ) {
|
77 |
if ( $userdata->uploadid == $filerec->uploadid ) {
|
78 |
$userdata_datefrom = strtotime($userdata->date_from);
|
109 |
$echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:center;">'.$filerec->action.'</td>';
|
110 |
if ( !$otheraction ) {
|
111 |
$echo_str .= "\n\t\t\t\t\t".'<td style="padding: 5px 5px 5px 10px; text-align:left;">';
|
112 |
+
if ( $filerec->action == 'datasubmit' ) $echo_str .= "\n\t\t\t\t\t\t".'<span>N/A</span>';
|
113 |
+
elseif ( in_array($filerec->linkedto, $deletedfiles) || in_array($filerec->idlog, $deletedfiles) ) $echo_str .= "\n\t\t\t\t\t\t".'<span>'.$filerec->filepath.'</span>';
|
114 |
else {
|
115 |
$lid = 0;
|
116 |
if ( $filerec->action == 'upload' || $filerec->action == 'include' ) $lid = $filerec->idlog;
|
lib/wfu_admin_maintenance.php
CHANGED
@@ -85,6 +85,7 @@ function wfu_clean_log_prompt() {
|
|
85 |
}
|
86 |
|
87 |
function wfu_clean_log() {
|
|
|
88 |
global $wpdb;
|
89 |
|
90 |
if ( !current_user_can( 'manage_options' ) ) return -1;
|
85 |
}
|
86 |
|
87 |
function wfu_clean_log() {
|
88 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
89 |
global $wpdb;
|
90 |
|
91 |
if ( !current_user_can( 'manage_options' ) ) return -1;
|
lib/wfu_ajaxactions.php
CHANGED
@@ -1,23 +1,29 @@
|
|
1 |
<?php
|
2 |
|
3 |
function wfu_ajax_action_send_email_notification() {
|
|
|
|
|
4 |
$user = wp_get_current_user();
|
5 |
if ( 0 == $user->ID ) $is_admin = false;
|
6 |
else $is_admin = current_user_can('manage_options');
|
7 |
|
8 |
-
$
|
|
|
|
|
|
|
9 |
//check referer using server sessions to avoid CSRF attacks
|
10 |
$sid = $arr['shortcode_id'];
|
11 |
-
if ( $_SESSION["wfu_token_".$sid] != $
|
12 |
if ( $user->user_login != $arr['user_login'] ) die();
|
13 |
|
14 |
$params_str = get_option('wfu_params_'.$arr['unique_id']);
|
15 |
$params = wfu_decode_array_from_string($params_str);
|
|
|
16 |
|
17 |
/* initialize return array */
|
18 |
$params_output_array["version"] = "full";
|
19 |
$params_output_array["general"]['shortcode_id'] = $params["uploadid"];
|
20 |
-
$params_output_array["general"]['unique_id'] =
|
21 |
$params_output_array["general"]['state'] = 0;
|
22 |
$params_output_array["general"]['files_count'] = 0;
|
23 |
$params_output_array["general"]['update_wpfilebase'] = "";
|
@@ -40,12 +46,33 @@ function wfu_ajax_action_send_email_notification() {
|
|
40 |
$params_output_array["general"]['notify_attachment_list'] = "";
|
41 |
$params_output_array["general"]['fail_message'] = WFU_ERROR_UNKNOWN;
|
42 |
|
43 |
-
//
|
|
|
|
|
|
|
44 |
$userdata_fields = $params["userdata_fields"];
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
$send_error = wfu_send_notification_email($user, $
|
49 |
|
50 |
/* suppress any errors if user is not admin */
|
51 |
if ( !$is_admin ) $send_error = "";
|
@@ -58,11 +85,18 @@ function wfu_ajax_action_send_email_notification() {
|
|
58 |
/* construct safe output */
|
59 |
$sout = "0;".WFU_VAR("WFU_DEFAULTMESSAGECOLORS").";0";
|
60 |
|
61 |
-
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
function wfu_ajax_action_ask_server() {
|
65 |
if ( !isset($_REQUEST['session_token']) || !isset($_REQUEST['sid']) || !isset($_REQUEST['unique_id']) ) die();
|
|
|
|
|
|
|
66 |
$session_token = sanitize_text_field( $_REQUEST["session_token"] );
|
67 |
$sid = sanitize_text_field( $_REQUEST["sid"] );
|
68 |
$unique_id = wfu_sanitize_code($_REQUEST['unique_id']);
|
@@ -121,6 +155,10 @@ function wfu_ajax_action_ask_server() {
|
|
121 |
|
122 |
function wfu_ajax_action_callback() {
|
123 |
if ( !isset($_REQUEST['session_token']) ) die();
|
|
|
|
|
|
|
|
|
124 |
$session_token = sanitize_text_field( $_REQUEST["session_token"] );
|
125 |
if ( $session_token == "" ) die();
|
126 |
check_ajax_referer( 'wfu-uploader-nonce', 'wfu_uploader_nonce' );
|
@@ -136,32 +174,36 @@ function wfu_ajax_action_callback() {
|
|
136 |
$sid = $arr['shortcode_id'];
|
137 |
//check referrer using server sessions to avoid CSRF attacks
|
138 |
if ( $_SESSION["wfu_token_".$sid] != $session_token ) {
|
139 |
-
|
140 |
-
print_r(wfu_sanitize($_SESSION));
|
141 |
-
|
142 |
-
print_r(wfu_sanitize($_POST));
|
143 |
-
|
|
|
|
|
144 |
}
|
145 |
|
146 |
if ( $user->user_login != $arr['user_login'] ) {
|
147 |
-
|
148 |
-
print_r(wfu_sanitize($user));
|
149 |
-
|
150 |
-
print_r(wfu_sanitize($_POST));
|
151 |
-
|
152 |
-
print_r(wfu_sanitize($arr));
|
153 |
-
|
|
|
|
|
154 |
}
|
155 |
|
156 |
//if force_connection_close is set, then the first pass to this callback script is for closing the previous connection
|
157 |
if ( isset($_POST["force_connection_close"]) && $_POST["force_connection_close"] === "1" ) {
|
158 |
header("Connection: Close");
|
159 |
-
die(
|
160 |
}
|
161 |
|
162 |
//get the unique id of the upload
|
163 |
$unique_id = ( isset($_POST['uniqueuploadid_'.$sid]) ? sanitize_text_field($_POST['uniqueuploadid_'.$sid]) : "" );
|
164 |
-
if ( strlen($unique_id) != 10 ) die('force_errorabort_code');
|
165 |
|
166 |
//if before upload actions have been executed and they have rejected the
|
167 |
//upload, but for some reason (hack attempt) the upload continued, then
|
@@ -204,13 +246,17 @@ function wfu_ajax_action_callback() {
|
|
204 |
$js_script = wfu_plugin_encode_string($wfu_process_file_array["general"]['js_script']);
|
205 |
unset($wfu_process_file_array["general"]['js_script']);
|
206 |
|
207 |
-
|
|
|
|
|
208 |
}
|
209 |
|
210 |
function wfu_ajax_action_save_shortcode() {
|
211 |
if ( !current_user_can( 'manage_options' ) ) die();
|
212 |
if ( !isset($_POST['shortcode']) || !isset($_POST['shortcode_original']) || !isset($_POST['post_id']) || !isset($_POST['post_hash']) || !isset($_POST['shortcode_position']) || !isset($_POST['shortcode_tag']) || !isset($_POST['widget_id']) ) die();
|
213 |
|
|
|
|
|
214 |
//sanitize parameters
|
215 |
$shortcode = wfu_sanitize_code($_POST['shortcode']);
|
216 |
$shortcode_original = wfu_sanitize_code($_POST['shortcode_original']);
|
@@ -228,39 +274,51 @@ function wfu_ajax_action_save_shortcode() {
|
|
228 |
$data['post_hash'] = $post_hash;
|
229 |
$data['shortcode'] = wfu_plugin_decode_string($shortcode_original);
|
230 |
$data['position'] = $shortcode_position;
|
231 |
-
if ( $post_id != "" && !wfu_check_edit_shortcode($data) )
|
232 |
else {
|
233 |
if ( $widget_id == "" ) {
|
234 |
$new_shortcode = "[".$shortcode_tag." ".wfu_plugin_decode_string($shortcode)."]";
|
235 |
if ( wfu_replace_shortcode($data, $new_shortcode) ) {
|
236 |
$post = get_post($post_id);
|
237 |
$hash = hash('md5', $post->post_content);
|
238 |
-
|
239 |
}
|
240 |
-
else
|
241 |
}
|
242 |
else {
|
243 |
$widget_obj = wfu_get_widget_obj_from_id($widget_id);
|
244 |
-
if ( $widget_obj === false )
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
250 |
}
|
251 |
}
|
252 |
}
|
|
|
|
|
|
|
253 |
}
|
254 |
|
255 |
function wfu_ajax_action_check_page_contents() {
|
256 |
if ( !current_user_can( 'manage_options' ) ) die();
|
257 |
if ( !isset($_POST['post_id']) || !isset($_POST['post_hash']) ) die();
|
258 |
if ( $_POST['post_id'] == "" ) die();
|
|
|
|
|
259 |
|
260 |
-
$data['post_id'] = $_POST['post_id'];
|
261 |
-
$data['post_hash'] = $_POST['post_hash'];
|
262 |
-
if ( wfu_check_edit_shortcode($data) )
|
263 |
-
else
|
|
|
|
|
|
|
264 |
}
|
265 |
|
266 |
function wfu_ajax_action_edit_shortcode() {
|
@@ -270,6 +328,8 @@ function wfu_ajax_action_edit_shortcode() {
|
|
270 |
if ( !current_user_can( 'manage_options' ) ) die();
|
271 |
if ( !isset($_POST['upload_id']) || !isset($_POST['post_id']) || !isset($_POST['post_hash']) || !isset($_POST['shortcode_tag']) || !isset($_POST['widget_id']) ) die();
|
272 |
|
|
|
|
|
273 |
//sanitize parameters
|
274 |
$upload_id = sanitize_text_field($_POST['upload_id']);
|
275 |
$widget_id = sanitize_text_field($_POST['widget_id']);
|
@@ -325,19 +385,31 @@ function wfu_ajax_action_edit_shortcode() {
|
|
325 |
$data_enc = wfu_safe_store_shortcode_data(wfu_encode_array_to_string($data));
|
326 |
}
|
327 |
$url = site_url().'/wp-admin/options-general.php?page=wordpress_file_upload&tag='.$shortcode_tag.'&action=edit_shortcode&data='.$data_enc;
|
328 |
-
|
329 |
}
|
330 |
-
else
|
|
|
|
|
|
|
331 |
}
|
332 |
|
333 |
function wfu_ajax_action_read_subfolders() {
|
334 |
if ( !isset($_POST['folder1']) || !isset($_POST['folder2']) ) die();
|
335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
$path = wfu_upload_plugin_full_path($temp_params);
|
337 |
|
338 |
-
if ( !is_dir($path) ) die(
|
339 |
|
340 |
-
$path2 =
|
341 |
$dirlist = "";
|
342 |
if ( $handle = opendir($path) ) {
|
343 |
$blacklist = array('.', '..');
|
@@ -369,14 +441,17 @@ function wfu_ajax_action_read_subfolders() {
|
|
369 |
$dirlist = str_replace('[['.$path2.']]', $dirlist2, $dirlist);
|
370 |
}
|
371 |
|
372 |
-
die("wfu_read_subfolders:success:".wfu_plugin_encode_string($dirlist));
|
373 |
}
|
374 |
|
375 |
function wfu_ajax_action_download_file_invoker() {
|
|
|
|
|
|
|
376 |
$file_code = (isset($_POST['file']) ? $_POST['file'] : (isset($_GET['file']) ? $_GET['file'] : ''));
|
377 |
$nonce = (isset($_POST['nonce']) ? $_POST['nonce'] : (isset($_GET['nonce']) ? $_GET['nonce'] : ''));
|
378 |
if ( $file_code == '' || $nonce == '' ) die();
|
379 |
-
|
380 |
//security check to avoid CSRF attacks
|
381 |
if ( !wp_verify_nonce($nonce, 'wfu_download_file_invoker') ) die();
|
382 |
|
@@ -400,7 +475,7 @@ function wfu_ajax_action_download_file_invoker() {
|
|
400 |
$filepath = wfu_path_rel2abs(wfu_flatten_path($filepath));
|
401 |
//reject download of blacklisted file types for security reasons
|
402 |
if ( wfu_file_extension_blacklisted($filepath) ) {
|
403 |
-
die('wfu_ajax_action_download_file_invoker:not_allowed:'.( isset($_POST['browser']) ? WFU_BROWSER_DOWNLOADFILE_NOTALLOWED : 'You are not allowed to download this file!' ));
|
404 |
}
|
405 |
//for front-end browser apply wfu_browser_check_file_action filter to allow or restrict the download
|
406 |
if ( isset($_POST['browser']) ) {
|
@@ -417,7 +492,7 @@ function wfu_ajax_action_download_file_invoker() {
|
|
417 |
);
|
418 |
$changable_data = apply_filters("wfu_browser_check_file_action", $changable_data, $additional_data);
|
419 |
if ( $changable_data["error_message"] != "" )
|
420 |
-
die('wfu_ajax_action_download_file_invoker:not_allowed:'.$changable_data["error_message"]);
|
421 |
}
|
422 |
//for back-end browser check if user is allowed to perform this action on this file
|
423 |
if ( !wfu_current_user_owes_file($filepath) ) die();
|
@@ -446,13 +521,17 @@ function wfu_ajax_action_download_file_invoker() {
|
|
446 |
//by the time it is consumed by the download script, so it cannot be used again
|
447 |
$response = '<iframe src="'.WFU_DOWNLOADER_URL.'?file='.$file_code.'&ticket='.$download_id.'" style="display: none;"></iframe>';
|
448 |
|
449 |
-
die('wfu_ajax_action_download_file_invoker:wfu_download_id;'.$download_id.':'.$response);
|
450 |
}
|
451 |
|
452 |
function wfu_ajax_action_download_file_monitor() {
|
|
|
|
|
|
|
453 |
$file_code = (isset($_POST['file']) ? $_POST['file'] : (isset($_GET['file']) ? $_GET['file'] : ''));
|
454 |
$id = (isset($_POST['id']) ? $_POST['id'] : (isset($_GET['id']) ? $_GET['id'] : ''));
|
455 |
if ( $file_code == '' || $id == '' ) die();
|
|
|
456 |
|
457 |
//ensure that this is not a CSRF attack by checking validity of a security ticket
|
458 |
if ( !isset($_SESSION['wfu_download_monitor_ticket_'.$id]) || time() > $_SESSION['wfu_download_monitor_ticket_'.$id] ) die();
|
@@ -479,12 +558,12 @@ function wfu_ajax_action_download_file_monitor() {
|
|
479 |
if ( $filepath === false ) die();
|
480 |
$filepath = wfu_path_rel2abs(wfu_flatten_path($filepath));
|
481 |
wfu_log_action('download', $filepath, $user->ID, '', 0, 0, '', null);
|
482 |
-
die('wfu_ajax_action_download_file_monitor:'.$_SESSION['wfu_download_status_'.$id].':');
|
483 |
}
|
484 |
else {
|
485 |
//regenerate monitor ticket
|
486 |
$_SESSION['wfu_download_monitor_ticket_'.$id] = time() + 30;
|
487 |
-
die('wfu_ajax_action_download_file_monitor:repeat:'.$id);
|
488 |
}
|
489 |
}
|
490 |
|
@@ -494,13 +573,18 @@ function wfu_ajax_action_get_historylog_page() {
|
|
494 |
if ( !current_user_can( 'manage_options' ) ) die();
|
495 |
if ( WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS") <= 0 ) die();
|
496 |
|
|
|
|
|
497 |
$page = wfu_sanitize_int($_POST['page']);
|
498 |
$rows = wfu_view_log($page, true);
|
499 |
|
500 |
-
die('wfu_historylog_page_success:'.wfu_plugin_encode_string($rows));
|
501 |
}
|
502 |
|
503 |
function wfu_ajax_action_include_file() {
|
|
|
|
|
|
|
504 |
$file_code = (isset($_POST['file']) ? $_POST['file'] : (isset($_GET['file']) ? $_GET['file'] : ''));
|
505 |
$nonce = (isset($_POST['nonce']) ? $_POST['nonce'] : (isset($_GET['nonce']) ? $_GET['nonce'] : ''));
|
506 |
if ( $file_code == '' || $nonce == '' ) die();
|
@@ -512,7 +596,6 @@ function wfu_ajax_action_include_file() {
|
|
512 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
513 |
if ( $plugin_options['includeotherfiles'] != "1" ) die();
|
514 |
|
515 |
-
$file_code = wfu_sanitize_code($file_code);
|
516 |
$dec_file = wfu_get_filepath_from_safe($file_code);
|
517 |
if ( $dec_file === false ) die();
|
518 |
|
@@ -520,14 +603,20 @@ function wfu_ajax_action_include_file() {
|
|
520 |
$dec_file = wfu_path_rel2abs(wfu_flatten_path($dec_file));
|
521 |
$fileid = wfu_log_action('include', $dec_file, $user->ID, '', '', get_current_blog_id(), '', null);
|
522 |
|
523 |
-
if ( $fileid !== false ) die("wfu_include_file:success:".$fileid);
|
524 |
-
else die(
|
525 |
}
|
526 |
|
527 |
function wfu_ajax_action_notify_wpfilebase() {
|
|
|
|
|
|
|
528 |
$params_index = (isset($_POST['params_index']) ? $_POST['params_index'] : (isset($_GET['params_index']) ? $_GET['params_index'] : ''));
|
529 |
$session_token = (isset($_POST['session_token']) ? $_POST['session_token'] : (isset($_GET['session_token']) ? $_GET['session_token'] : ''));
|
530 |
if ( $params_index == '' || $session_token == '' ) die();
|
|
|
|
|
|
|
531 |
|
532 |
$arr = wfu_get_params_fields_from_index($params_index);
|
533 |
//check referer using server sessions to avoid CSRF attacks
|
1 |
<?php
|
2 |
|
3 |
function wfu_ajax_action_send_email_notification() {
|
4 |
+
$_POST = stripslashes_deep($_POST);
|
5 |
+
|
6 |
$user = wp_get_current_user();
|
7 |
if ( 0 == $user->ID ) $is_admin = false;
|
8 |
else $is_admin = current_user_can('manage_options');
|
9 |
|
10 |
+
$params_index = sanitize_text_field($_POST['params_index']);
|
11 |
+
$session_token = sanitize_text_field($_POST['session_token']);
|
12 |
+
|
13 |
+
$arr = wfu_get_params_fields_from_index($params_index);
|
14 |
//check referer using server sessions to avoid CSRF attacks
|
15 |
$sid = $arr['shortcode_id'];
|
16 |
+
if ( $_SESSION["wfu_token_".$sid] != $session_token ) die();
|
17 |
if ( $user->user_login != $arr['user_login'] ) die();
|
18 |
|
19 |
$params_str = get_option('wfu_params_'.$arr['unique_id']);
|
20 |
$params = wfu_decode_array_from_string($params_str);
|
21 |
+
$uniqueid = ( isset($_POST['uniqueuploadid_'.$sid]) ? sanitize_text_field($_POST['uniqueuploadid_'.$sid]) : "" );
|
22 |
|
23 |
/* initialize return array */
|
24 |
$params_output_array["version"] = "full";
|
25 |
$params_output_array["general"]['shortcode_id'] = $params["uploadid"];
|
26 |
+
$params_output_array["general"]['unique_id'] = $uniqueid;
|
27 |
$params_output_array["general"]['state'] = 0;
|
28 |
$params_output_array["general"]['files_count'] = 0;
|
29 |
$params_output_array["general"]['update_wpfilebase'] = "";
|
46 |
$params_output_array["general"]['notify_attachment_list'] = "";
|
47 |
$params_output_array["general"]['fail_message'] = WFU_ERROR_UNKNOWN;
|
48 |
|
49 |
+
// Retrieve user data from the database based on uploadid so that any
|
50 |
+
// changes that may have happened to the user data can be included. If for
|
51 |
+
// any reason database records do not exist, then initialize user data from
|
52 |
+
// the values of the upload form.
|
53 |
$userdata_fields = $params["userdata_fields"];
|
54 |
+
$userdata_saved = null;
|
55 |
+
if ( $uniqueid != "" ) $userdata_saved = wfu_get_userdata_from_uploadid($uniqueid);
|
56 |
+
foreach ( $userdata_fields as $userdata_key => $userdata_field ) {
|
57 |
+
$found = false;
|
58 |
+
if ( $userdata_saved != null && is_array($userdata_saved) ) {
|
59 |
+
foreach ( $userdata_saved as $userdata_saved_rec ) {
|
60 |
+
if ( $userdata_saved_rec->propkey == $userdata_key ) {
|
61 |
+
$userdata_fields[$userdata_key]["value"] = $userdata_saved_rec->propvalue;
|
62 |
+
$found = true;
|
63 |
+
break;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
if ( !$found )
|
68 |
+
$userdata_fields[$userdata_key]["value"] = ( isset($_POST['userdata_'.$userdata_key]) ? strip_tags(wfu_plugin_decode_string($_POST['userdata_'.$userdata_key])) : "" );
|
69 |
+
}
|
70 |
+
|
71 |
+
$only_filename_list = wfu_sanitize_urls($_POST['only_filename_list'], ", ");
|
72 |
+
$target_path_list = wfu_sanitize_urls($_POST['target_path_list'], ", ");
|
73 |
+
$attachment_list = wfu_sanitize_urls($_POST['attachment_list'], ",");
|
74 |
|
75 |
+
$send_error = wfu_send_notification_email($user, $only_filename_list, $target_path_list, $attachment_list, $userdata_fields, $params);
|
76 |
|
77 |
/* suppress any errors if user is not admin */
|
78 |
if ( !$is_admin ) $send_error = "";
|
85 |
/* construct safe output */
|
86 |
$sout = "0;".WFU_VAR("WFU_DEFAULTMESSAGECOLORS").";0";
|
87 |
|
88 |
+
$echo_str = "wfu_fileupload_success::".$sout.":".wfu_encode_array_to_string($params_output_array);
|
89 |
+
// allow an internal hook to process the final output
|
90 |
+
$echo_str = apply_filters('_wfu_ajax_action_send_email_notification', $echo_str);
|
91 |
+
|
92 |
+
die($echo_str);
|
93 |
}
|
94 |
|
95 |
function wfu_ajax_action_ask_server() {
|
96 |
if ( !isset($_REQUEST['session_token']) || !isset($_REQUEST['sid']) || !isset($_REQUEST['unique_id']) ) die();
|
97 |
+
|
98 |
+
$_REQUEST = stripslashes_deep($_REQUEST);
|
99 |
+
|
100 |
$session_token = sanitize_text_field( $_REQUEST["session_token"] );
|
101 |
$sid = sanitize_text_field( $_REQUEST["sid"] );
|
102 |
$unique_id = wfu_sanitize_code($_REQUEST['unique_id']);
|
155 |
|
156 |
function wfu_ajax_action_callback() {
|
157 |
if ( !isset($_REQUEST['session_token']) ) die();
|
158 |
+
|
159 |
+
$_REQUEST = stripslashes_deep($_REQUEST);
|
160 |
+
$_POST = stripslashes_deep($_POST);
|
161 |
+
|
162 |
$session_token = sanitize_text_field( $_REQUEST["session_token"] );
|
163 |
if ( $session_token == "" ) die();
|
164 |
check_ajax_referer( 'wfu-uploader-nonce', 'wfu_uploader_nonce' );
|
174 |
$sid = $arr['shortcode_id'];
|
175 |
//check referrer using server sessions to avoid CSRF attacks
|
176 |
if ( $_SESSION["wfu_token_".$sid] != $session_token ) {
|
177 |
+
$echo_str = "Session failed!<br/><br/>Session Data:<br/>";
|
178 |
+
$echo_str .= print_r(wfu_sanitize($_SESSION), true);
|
179 |
+
$echo_str .= "<br/><br/>Post Data:<br/>";
|
180 |
+
$echo_str .= print_r(wfu_sanitize($_POST), true);
|
181 |
+
$echo_str .= 'force_errorabort_code';
|
182 |
+
$echo_str = apply_filters('_wfu_upload_session_failed', $echo_str);
|
183 |
+
die($echo_str);
|
184 |
}
|
185 |
|
186 |
if ( $user->user_login != $arr['user_login'] ) {
|
187 |
+
$echo_str = "User failed!<br/><br/>User Data:<br/>";
|
188 |
+
$echo_str .= print_r(wfu_sanitize($user), true);
|
189 |
+
$echo_str .= "<br/><br/>Post Data:<br/>";
|
190 |
+
$echo_str .= print_r(wfu_sanitize($_POST), true);
|
191 |
+
$echo_str .= "<br/><br/>Params Data:<br/>";
|
192 |
+
$echo_str .= print_r(wfu_sanitize($arr), true);
|
193 |
+
$echo_str .= 'force_errorabort_code';
|
194 |
+
$echo_str = apply_filters('_wfu_upload_user_failed', $echo_str);
|
195 |
+
die($echo_str);
|
196 |
}
|
197 |
|
198 |
//if force_connection_close is set, then the first pass to this callback script is for closing the previous connection
|
199 |
if ( isset($_POST["force_connection_close"]) && $_POST["force_connection_close"] === "1" ) {
|
200 |
header("Connection: Close");
|
201 |
+
die(apply_filters('_wfu_upload_force_connection_close', 'success'));
|
202 |
}
|
203 |
|
204 |
//get the unique id of the upload
|
205 |
$unique_id = ( isset($_POST['uniqueuploadid_'.$sid]) ? sanitize_text_field($_POST['uniqueuploadid_'.$sid]) : "" );
|
206 |
+
if ( strlen($unique_id) != 10 ) die(apply_filters('_wfu_upload_uniqueid_failed', 'force_errorabort_code'));
|
207 |
|
208 |
//if before upload actions have been executed and they have rejected the
|
209 |
//upload, but for some reason (hack attempt) the upload continued, then
|
246 |
$js_script = wfu_plugin_encode_string($wfu_process_file_array["general"]['js_script']);
|
247 |
unset($wfu_process_file_array["general"]['js_script']);
|
248 |
|
249 |
+
$echo_str = "wfu_fileupload_success:".$js_script.":".$safe_output.":".wfu_encode_array_to_string($wfu_process_file_array);
|
250 |
+
$echo_str = apply_filters('_wfu_upload_callback_success', $echo_str);
|
251 |
+
die($echo_str);
|
252 |
}
|
253 |
|
254 |
function wfu_ajax_action_save_shortcode() {
|
255 |
if ( !current_user_can( 'manage_options' ) ) die();
|
256 |
if ( !isset($_POST['shortcode']) || !isset($_POST['shortcode_original']) || !isset($_POST['post_id']) || !isset($_POST['post_hash']) || !isset($_POST['shortcode_position']) || !isset($_POST['shortcode_tag']) || !isset($_POST['widget_id']) ) die();
|
257 |
|
258 |
+
$_POST = stripslashes_deep($_POST);
|
259 |
+
|
260 |
//sanitize parameters
|
261 |
$shortcode = wfu_sanitize_code($_POST['shortcode']);
|
262 |
$shortcode_original = wfu_sanitize_code($_POST['shortcode_original']);
|
274 |
$data['post_hash'] = $post_hash;
|
275 |
$data['shortcode'] = wfu_plugin_decode_string($shortcode_original);
|
276 |
$data['position'] = $shortcode_position;
|
277 |
+
if ( $post_id != "" && !wfu_check_edit_shortcode($data) ) $echo_str = "wfu_save_shortcode:fail:post_modified";
|
278 |
else {
|
279 |
if ( $widget_id == "" ) {
|
280 |
$new_shortcode = "[".$shortcode_tag." ".wfu_plugin_decode_string($shortcode)."]";
|
281 |
if ( wfu_replace_shortcode($data, $new_shortcode) ) {
|
282 |
$post = get_post($post_id);
|
283 |
$hash = hash('md5', $post->post_content);
|
284 |
+
$echo_str = "wfu_save_shortcode:success:".$hash;
|
285 |
}
|
286 |
+
else $echo_str = "wfu_save_shortcode:fail:post_update_failed";
|
287 |
}
|
288 |
else {
|
289 |
$widget_obj = wfu_get_widget_obj_from_id($widget_id);
|
290 |
+
if ( $widget_obj === false ) $echo_str = "wfu_save_shortcode:fail:post_update_failed";
|
291 |
+
else {
|
292 |
+
$widget_sidebar = is_active_widget(false, $widget_id, "wordpress_file_upload_widget");
|
293 |
+
if ( !$widget_sidebar ) $echo_str = "wfu_save_shortcode:fail:post_update_failed";
|
294 |
+
else {
|
295 |
+
$widget_obj->update_external(wfu_plugin_decode_string($shortcode));
|
296 |
+
$hash = $data['post_hash'];
|
297 |
+
$echo_str = "wfu_save_shortcode:success:".$hash;
|
298 |
+
}
|
299 |
+
}
|
300 |
}
|
301 |
}
|
302 |
}
|
303 |
+
|
304 |
+
$echo_str = apply_filters('_wfu_ajax_action_save_shortcode', $echo_str);
|
305 |
+
die($echo_str);
|
306 |
}
|
307 |
|
308 |
function wfu_ajax_action_check_page_contents() {
|
309 |
if ( !current_user_can( 'manage_options' ) ) die();
|
310 |
if ( !isset($_POST['post_id']) || !isset($_POST['post_hash']) ) die();
|
311 |
if ( $_POST['post_id'] == "" ) die();
|
312 |
+
|
313 |
+
$_POST = stripslashes_deep($_POST);
|
314 |
|
315 |
+
$data['post_id'] = wfu_sanitize_int($_POST['post_id']);
|
316 |
+
$data['post_hash'] = wfu_sanitize_code($_POST['post_hash']);
|
317 |
+
if ( wfu_check_edit_shortcode($data) ) $echo_str = "wfu_check_page_contents:current:";
|
318 |
+
else $echo_str = "wfu_check_page_contents:obsolete:";
|
319 |
+
|
320 |
+
$echo_str = apply_filters('_wfu_ajax_action_check_page_contents', $echo_str);
|
321 |
+
die($echo_str);
|
322 |
}
|
323 |
|
324 |
function wfu_ajax_action_edit_shortcode() {
|
328 |
if ( !current_user_can( 'manage_options' ) ) die();
|
329 |
if ( !isset($_POST['upload_id']) || !isset($_POST['post_id']) || !isset($_POST['post_hash']) || !isset($_POST['shortcode_tag']) || !isset($_POST['widget_id']) ) die();
|
330 |
|
331 |
+
$_POST = stripslashes_deep($_POST);
|
332 |
+
|
333 |
//sanitize parameters
|
334 |
$upload_id = sanitize_text_field($_POST['upload_id']);
|
335 |
$widget_id = sanitize_text_field($_POST['widget_id']);
|
385 |
$data_enc = wfu_safe_store_shortcode_data(wfu_encode_array_to_string($data));
|
386 |
}
|
387 |
$url = site_url().'/wp-admin/options-general.php?page=wordpress_file_upload&tag='.$shortcode_tag.'&action=edit_shortcode&data='.$data_enc;
|
388 |
+
$echo_str = "wfu_edit_shortcode:success:".wfu_plugin_encode_string($url);
|
389 |
}
|
390 |
+
else $echo_str = "wfu_edit_shortcode:check_page_obsolete:".WFU_ERROR_PAGE_OBSOLETE;
|
391 |
+
|
392 |
+
$echo_str = apply_filters('_wfu_ajax_action_edit_shortcode', $echo_str);
|
393 |
+
die($echo_str);
|
394 |
}
|
395 |
|
396 |
function wfu_ajax_action_read_subfolders() {
|
397 |
if ( !isset($_POST['folder1']) || !isset($_POST['folder2']) ) die();
|
398 |
+
|
399 |
+
$_POST = stripslashes_deep($_POST);
|
400 |
+
|
401 |
+
$folder1 = wfu_sanitize_code($_POST['folder1']);
|
402 |
+
$folder1 = wfu_sanitize_url(wfu_plugin_decode_string($folder1));
|
403 |
+
$folder2 = wfu_sanitize_code($_POST['folder2']);
|
404 |
+
$folder2 = wfu_sanitize_url(wfu_plugin_decode_string($folder2));
|
405 |
+
if ( $folder1 != $_POST['folder1'] || $folder2 != $_POST['folder2'] ) die();
|
406 |
+
|
407 |
+
$temp_params = array( 'uploadpath' => $folder1, 'accessmethod' => 'normal', 'ftpinfo' => '', 'useftpdomain' => 'false' );
|
408 |
$path = wfu_upload_plugin_full_path($temp_params);
|
409 |
|
410 |
+
if ( !is_dir($path) ) die(apply_filters('_wfu_ajax_action_read_subfolders', 'wfu_read_subfolders:error:Parent folder is not valid! Cannot retrieve subfolder list.'));
|
411 |
|
412 |
+
$path2 = $folder2;
|
413 |
$dirlist = "";
|
414 |
if ( $handle = opendir($path) ) {
|
415 |
$blacklist = array('.', '..');
|
441 |
$dirlist = str_replace('[['.$path2.']]', $dirlist2, $dirlist);
|
442 |
}
|
443 |
|
444 |
+
die(apply_filters('_wfu_ajax_action_read_subfolders', "wfu_read_subfolders:success:".wfu_plugin_encode_string($dirlist)));
|
445 |
}
|
446 |
|
447 |
function wfu_ajax_action_download_file_invoker() {
|
448 |
+
$_POST = stripslashes_deep($_POST);
|
449 |
+
$_GET = stripslashes_deep($_GET);
|
450 |
+
|
451 |
$file_code = (isset($_POST['file']) ? $_POST['file'] : (isset($_GET['file']) ? $_GET['file'] : ''));
|
452 |
$nonce = (isset($_POST['nonce']) ? $_POST['nonce'] : (isset($_GET['nonce']) ? $_GET['nonce'] : ''));
|
453 |
if ( $file_code == '' || $nonce == '' ) die();
|
454 |
+
|
455 |
//security check to avoid CSRF attacks
|
456 |
if ( !wp_verify_nonce($nonce, 'wfu_download_file_invoker') ) die();
|
457 |
|
475 |
$filepath = wfu_path_rel2abs(wfu_flatten_path($filepath));
|
476 |
//reject download of blacklisted file types for security reasons
|
477 |
if ( wfu_file_extension_blacklisted($filepath) ) {
|
478 |
+
die(apply_filters('_wfu_ajax_action_download_file_invoker', 'wfu_ajax_action_download_file_invoker:not_allowed:'.( isset($_POST['browser']) ? WFU_BROWSER_DOWNLOADFILE_NOTALLOWED : 'You are not allowed to download this file!' )));
|
479 |
}
|
480 |
//for front-end browser apply wfu_browser_check_file_action filter to allow or restrict the download
|
481 |
if ( isset($_POST['browser']) ) {
|
492 |
);
|
493 |
$changable_data = apply_filters("wfu_browser_check_file_action", $changable_data, $additional_data);
|
494 |
if ( $changable_data["error_message"] != "" )
|
495 |
+
die(apply_filters('_wfu_ajax_action_download_file_invoker', 'wfu_ajax_action_download_file_invoker:not_allowed:'.$changable_data["error_message"]));
|
496 |
}
|
497 |
//for back-end browser check if user is allowed to perform this action on this file
|
498 |
if ( !wfu_current_user_owes_file($filepath) ) die();
|
521 |
//by the time it is consumed by the download script, so it cannot be used again
|
522 |
$response = '<iframe src="'.WFU_DOWNLOADER_URL.'?file='.$file_code.'&ticket='.$download_id.'" style="display: none;"></iframe>';
|
523 |
|
524 |
+
die(apply_filters('_wfu_ajax_action_download_file_invoker', 'wfu_ajax_action_download_file_invoker:wfu_download_id;'.$download_id.':'.$response));
|
525 |
}
|
526 |
|
527 |
function wfu_ajax_action_download_file_monitor() {
|
528 |
+
$_POST = stripslashes_deep($_POST);
|
529 |
+
$_GET = stripslashes_deep($_GET);
|
530 |
+
|
531 |
$file_code = (isset($_POST['file']) ? $_POST['file'] : (isset($_GET['file']) ? $_GET['file'] : ''));
|
532 |
$id = (isset($_POST['id']) ? $_POST['id'] : (isset($_GET['id']) ? $_GET['id'] : ''));
|
533 |
if ( $file_code == '' || $id == '' ) die();
|
534 |
+
$id = wfu_sanitize_code($id);
|
535 |
|
536 |
//ensure that this is not a CSRF attack by checking validity of a security ticket
|
537 |
if ( !isset($_SESSION['wfu_download_monitor_ticket_'.$id]) || time() > $_SESSION['wfu_download_monitor_ticket_'.$id] ) die();
|
558 |
if ( $filepath === false ) die();
|
559 |
$filepath = wfu_path_rel2abs(wfu_flatten_path($filepath));
|
560 |
wfu_log_action('download', $filepath, $user->ID, '', 0, 0, '', null);
|
561 |
+
die(apply_filters('_wfu_ajax_action_download_file_monitor', 'wfu_ajax_action_download_file_monitor:'.$_SESSION['wfu_download_status_'.$id].':'));
|
562 |
}
|
563 |
else {
|
564 |
//regenerate monitor ticket
|
565 |
$_SESSION['wfu_download_monitor_ticket_'.$id] = time() + 30;
|
566 |
+
die(apply_filters('_wfu_ajax_action_download_file_monitor', 'wfu_ajax_action_download_file_monitor:repeat:'.$id));
|
567 |
}
|
568 |
}
|
569 |
|
573 |
if ( !current_user_can( 'manage_options' ) ) die();
|
574 |
if ( WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS") <= 0 ) die();
|
575 |
|
576 |
+
$_POST = stripslashes_deep($_POST);
|
577 |
+
|
578 |
$page = wfu_sanitize_int($_POST['page']);
|
579 |
$rows = wfu_view_log($page, true);
|
580 |
|
581 |
+
die(apply_filters('_wfu_ajax_action_get_historylog_page', 'wfu_historylog_page_success:'.wfu_plugin_encode_string($rows)));
|
582 |
}
|
583 |
|
584 |
function wfu_ajax_action_include_file() {
|
585 |
+
$_POST = stripslashes_deep($_POST);
|
586 |
+
$_GET = stripslashes_deep($_GET);
|
587 |
+
|
588 |
$file_code = (isset($_POST['file']) ? $_POST['file'] : (isset($_GET['file']) ? $_GET['file'] : ''));
|
589 |
$nonce = (isset($_POST['nonce']) ? $_POST['nonce'] : (isset($_GET['nonce']) ? $_GET['nonce'] : ''));
|
590 |
if ( $file_code == '' || $nonce == '' ) die();
|
596 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
597 |
if ( $plugin_options['includeotherfiles'] != "1" ) die();
|
598 |
|
|
|
599 |
$dec_file = wfu_get_filepath_from_safe($file_code);
|
600 |
if ( $dec_file === false ) die();
|
601 |
|
603 |
$dec_file = wfu_path_rel2abs(wfu_flatten_path($dec_file));
|
604 |
$fileid = wfu_log_action('include', $dec_file, $user->ID, '', '', get_current_blog_id(), '', null);
|
605 |
|
606 |
+
if ( $fileid !== false ) die(apply_filters('_wfu_ajax_action_include_file', "wfu_include_file:success:".$fileid));
|
607 |
+
else die(apply_filters('_wfu_ajax_action_include_file', 'wfu_include_file:fail:'));
|
608 |
}
|
609 |
|
610 |
function wfu_ajax_action_notify_wpfilebase() {
|
611 |
+
$_POST = stripslashes_deep($_POST);
|
612 |
+
$_GET = stripslashes_deep($_GET);
|
613 |
+
|
614 |
$params_index = (isset($_POST['params_index']) ? $_POST['params_index'] : (isset($_GET['params_index']) ? $_GET['params_index'] : ''));
|
615 |
$session_token = (isset($_POST['session_token']) ? $_POST['session_token'] : (isset($_GET['session_token']) ? $_GET['session_token'] : ''));
|
616 |
if ( $params_index == '' || $session_token == '' ) die();
|
617 |
+
|
618 |
+
$params_index = sanitize_text_field($params_index);
|
619 |
+
$session_token = sanitize_text_field($session_token);
|
620 |
|
621 |
$arr = wfu_get_params_fields_from_index($params_index);
|
622 |
//check referer using server sessions to avoid CSRF attacks
|
lib/wfu_attributes.php
CHANGED
@@ -777,6 +777,20 @@ function wfu_attribute_definitions() {
|
|
777 |
"variables" => null,
|
778 |
"help" => "This defines how the plugin's elements will fit inside the page/post. If it is set to fixed, then the plugin's element positions will remain fixed no matter the width of the container page/post. If it is set to responsive, then the plugin's elements will wrap to fit the width of the container page/post."
|
779 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
780 |
array(
|
781 |
"name" => "Upload Roles",
|
782 |
"attribute" => "uploadrole",
|
777 |
"variables" => null,
|
778 |
"help" => "This defines how the plugin's elements will fit inside the page/post. If it is set to fixed, then the plugin's element positions will remain fixed no matter the width of the container page/post. If it is set to responsive, then the plugin's elements will wrap to fit the width of the container page/post."
|
779 |
),
|
780 |
+
array(
|
781 |
+
"name" => "Allow No File",
|
782 |
+
"attribute" => "allownofile",
|
783 |
+
"type" => "onoff",
|
784 |
+
"listitems" => null,
|
785 |
+
"value" => WFU_VAR("WFU_ALLOWNOFILE"),
|
786 |
+
"mode" => "free",
|
787 |
+
"category" => "general",
|
788 |
+
"subcategory" => "Basic Functionalities",
|
789 |
+
"parent" => "",
|
790 |
+
"dependencies" => null,
|
791 |
+
"variables" => null,
|
792 |
+
"help" => "when it is activated a user can submit the upload form even if a file is not selected."
|
793 |
+
),
|
794 |
array(
|
795 |
"name" => "Upload Roles",
|
796 |
"attribute" => "uploadrole",
|
lib/wfu_blocks.php
CHANGED
@@ -174,6 +174,9 @@ function wfu_prepare_uploadform_block($params, $additional_params, $occurrence_i
|
|
174 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="wfu_uploader_nonce_'.$sid.'" name="wfu_uploader_nonce" value="'.wp_create_nonce("wfu-uploader-nonce").'" />';
|
175 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="hiddeninput_'.$sid.'" name="hiddeninput_'.$sid.'" value="" />';
|
176 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="uniqueuploadid_'.$sid.'" name="uniqueuploadid_'.$sid.'" value="" />';
|
|
|
|
|
|
|
177 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="adminerrorcodes_'.$sid.'" name="adminerrorcodes_'.$sid.'" value="" />';
|
178 |
foreach ($params["userdata_fields"] as $userdata_key => $userdata_field)
|
179 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="hiddeninput_'.$sid.'_userdata_'.$userdata_key.'" name="hiddeninput_'.$sid.'_userdata_'.$userdata_key.'" value="" />';
|
@@ -189,6 +192,7 @@ function wfu_prepare_submit_block($params, $additional_params, $occurrence_index
|
|
189 |
$heights = $additional_params['heights'];
|
190 |
$clickaction = $additional_params['clickaction'];
|
191 |
$upload = 'upload_'.$sid;
|
|
|
192 |
$default = $params["uploadbutton"];
|
193 |
|
194 |
$submit_item["title"] = 'wordpress_file_upload_submit_'.$sid;
|
@@ -204,7 +208,7 @@ function wfu_prepare_submit_block($params, $additional_params, $occurrence_index
|
|
204 |
if ( $heights["uploadbutton"] != "" ) $styles .= 'height: '.$heights["uploadbutton"].'; ';
|
205 |
if ( $styles != "" ) $styles = ' style="'.$styles.'"';
|
206 |
if ( $params["testmode"] == "true" ) $submit_item["line1"] = '<input align="center" type="button" id="'.$upload.'" name="'.$upload.'" value="'.$default.'" class="file_input_submit" onclick="alert(\''.WFU_NOTIFY_TESTMODE.'\');"'.$styles.' />';
|
207 |
-
else $submit_item["line1"] = '<input align="center" type="button" id="'.$upload.'" name="'.$upload.'" value="'.$default.'" class="file_input_submit" onclick="'.$clickaction.'"'.$styles.' disabled="disabled" />';
|
208 |
$submit_item["line2"] = '<input type="hidden" id="'.$upload.'_default" value="'.$default.'" />';
|
209 |
|
210 |
return $submit_item;
|
174 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="wfu_uploader_nonce_'.$sid.'" name="wfu_uploader_nonce" value="'.wp_create_nonce("wfu-uploader-nonce").'" />';
|
175 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="hiddeninput_'.$sid.'" name="hiddeninput_'.$sid.'" value="" />';
|
176 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="uniqueuploadid_'.$sid.'" name="uniqueuploadid_'.$sid.'" value="" />';
|
177 |
+
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="nofileupload_'.$sid.'" name="nofileupload_'.$sid.'" value="0" />';
|
178 |
+
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="uploadedfile_'.$sid.'_name" name="uploadedfile_'.$sid.'_name" value="'.wfu_plugin_encode_string("dummy.txt").'" />';
|
179 |
+
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="uploadedfile_'.$sid.'_size" name="uploadedfile_'.$sid.'_size" value="0" />';
|
180 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="adminerrorcodes_'.$sid.'" name="adminerrorcodes_'.$sid.'" value="" />';
|
181 |
foreach ($params["userdata_fields"] as $userdata_key => $userdata_field)
|
182 |
$uploadform_item["line".$i++] = "\t".'<input type="hidden" id="hiddeninput_'.$sid.'_userdata_'.$userdata_key.'" name="hiddeninput_'.$sid.'_userdata_'.$userdata_key.'" value="" />';
|
192 |
$heights = $additional_params['heights'];
|
193 |
$clickaction = $additional_params['clickaction'];
|
194 |
$upload = 'upload_'.$sid;
|
195 |
+
$allownofile = $params["allownofile"];
|
196 |
$default = $params["uploadbutton"];
|
197 |
|
198 |
$submit_item["title"] = 'wordpress_file_upload_submit_'.$sid;
|
208 |
if ( $heights["uploadbutton"] != "" ) $styles .= 'height: '.$heights["uploadbutton"].'; ';
|
209 |
if ( $styles != "" ) $styles = ' style="'.$styles.'"';
|
210 |
if ( $params["testmode"] == "true" ) $submit_item["line1"] = '<input align="center" type="button" id="'.$upload.'" name="'.$upload.'" value="'.$default.'" class="file_input_submit" onclick="alert(\''.WFU_NOTIFY_TESTMODE.'\');"'.$styles.' />';
|
211 |
+
else $submit_item["line1"] = '<input align="center" type="button" id="'.$upload.'" name="'.$upload.'" value="'.$default.'" class="file_input_submit" onclick="'.$clickaction.'"'.$styles.( $allownofile == "true" ? '' : ' disabled="disabled"' ).' />';
|
212 |
$submit_item["line2"] = '<input type="hidden" id="'.$upload.'_default" value="'.$default.'" />';
|
213 |
|
214 |
return $submit_item;
|
lib/wfu_constants.php
CHANGED
@@ -197,6 +197,9 @@ DEFINE("WFU_UPLOAD_STATE9", __("Test upload message", "wp-file-upload"));
|
|
197 |
DEFINE("WFU_UPLOAD_STATE10", __("JSON parse warning!", "wp-file-upload"));
|
198 |
DEFINE("WFU_UPLOAD_STATE11", __("please wait while redirecting...", "wp-file-upload"));
|
199 |
DEFINE("WFU_UPLOAD_STATE12", __("Upload failed!", "wp-file-upload"));
|
|
|
|
|
|
|
200 |
DEFINE("WFU_PAGE_PLUGINEDITOR_BUTTONTITLE", __("Open visual shortcode editor in new window", "wp-file-upload"));
|
201 |
DEFINE("WFU_PAGE_PLUGINEDITOR_LOADING", __("loading visual editor", "wp-file-upload"));
|
202 |
DEFINE("WFU_CONFIRM_CLEARFILES", __("Clear file list?", "wp-file-upload"));
|
@@ -224,6 +227,7 @@ $GLOBALS["WFU_GLOBALS"] = array(
|
|
224 |
"WFU_UPLOADROLE" => array( "Default Upload Role", "string", "all,guests", "The default upload role of the uploader shortcode. It can be a comma-separated list of role slugs, including keywords 'all' and 'guests'." ),
|
225 |
"WFU_UPLOADPATH" => array( "Default Upload Path", "string", "uploads", "The default upload path of the uploader shortcode. It must be a folder relative to wp-content dir." ),
|
226 |
"WFU_FITMODE" => array( "Default Fit Mode", "string", "fixed", "The default fit mode of the uploader shortcode. It can be 'fixed' or 'responsive'." ),
|
|
|
227 |
"WFU_CREATEPATH" => array( "Default Create Path State", "string", "false", "The default create path state (create or not the upload path if it does not exist) of the uploader shortcode. It can be 'true' or 'false'." ),
|
228 |
"WFU_FORCEFILENAME" => array( "Default Force Filename State", "string", "false", "The default force filename state (force plugin to leave filename unchanged) of the uploader shortcode. It can be 'true' or 'false'." ),
|
229 |
"WFU_UPLOADPATTERNS" => array( "Default Upload Extensions", "string", "*.*", "The default allowed file extensions of the uploader shortcode. It can be a comma-separated list of wildcard extensions." ),
|
@@ -273,6 +277,7 @@ $GLOBALS["WFU_GLOBALS"] = array(
|
|
273 |
);
|
274 |
//other plugin values
|
275 |
$GLOBALS["WFU_GLOBALS"] += array(
|
|
|
276 |
"WFU_UPLOADPROGRESS_MODE" => array( "Upload Progress Mode", "string", "incremental", "Defines how the upload progress is calculated. It can be 'incremental' or 'absolute'. Default value is 'incremental'." ),
|
277 |
"WFU_DOS_ATTACKS_CHECK" => array( "Check for Denial-Of-Service Attacks", "string", "true", "If it is true then then plugin will check if the number of files uploaded within a specific amount of time exceeds the limit, thus protecting from DOS attacks. It can be 'true' or 'false'." ),
|
278 |
"WFU_DOS_ATTACKS_FILE_LIMIT" => array( "Denial-Of-Service File Limit", "integer", 10000, "Defines the maximum number of files that are allowed to be uploaded within a specific amount of time. It can be any positive integer." ),
|
@@ -310,7 +315,10 @@ $GLOBALS["WFU_GLOBALS"] += array(
|
|
310 |
"WFU_HEADERMESSAGECOLORS_STATE9" => array( "State 9 Message Colors", "string", "#666666,#EEEEEE,#333333", "The color triplet (text, background and border colors) of message of upload state 9 (test state) of the uploader shortcode." ),
|
311 |
"WFU_HEADERMESSAGECOLORS_STATE10" => array( "State 10 Message Colors", "string", "#F88017,#FEF2E7,#633309", "The color triplet (text, background and border colors) of message of upload state 10 (JSON parse error) of the uploader shortcode." ),
|
312 |
"WFU_HEADERMESSAGECOLORS_STATE11" => array( "State 11 Message Colors", "string", "#666666,#EEEEEE,#333333", "The color triplet (text, background and border colors) of message of upload state 11 (redirecting) of the uploader shortcode." ),
|
313 |
-
"WFU_HEADERMESSAGECOLORS_STATE12" => array( "State 12 Message Colors", "string", "#660000,#FFEEEE,#666600", "The color triplet (text, background and border colors) of message of upload state 12 (upload failed) of the uploader shortcode." )
|
|
|
|
|
|
|
314 |
);
|
315 |
//insert saved values to array
|
316 |
$envars = get_option("wfu_environment_variables", array());
|
197 |
DEFINE("WFU_UPLOAD_STATE10", __("JSON parse warning!", "wp-file-upload"));
|
198 |
DEFINE("WFU_UPLOAD_STATE11", __("please wait while redirecting...", "wp-file-upload"));
|
199 |
DEFINE("WFU_UPLOAD_STATE12", __("Upload failed!", "wp-file-upload"));
|
200 |
+
DEFINE("WFU_UPLOAD_STATE13", __("Submitting data", "wp-file-upload"));
|
201 |
+
DEFINE("WFU_UPLOAD_STATE14", __("Data submitted successfully!", "wp-file-upload"));
|
202 |
+
DEFINE("WFU_UPLOAD_STATE15", __("Data were not submitted!", "wp-file-upload"));
|
203 |
DEFINE("WFU_PAGE_PLUGINEDITOR_BUTTONTITLE", __("Open visual shortcode editor in new window", "wp-file-upload"));
|
204 |
DEFINE("WFU_PAGE_PLUGINEDITOR_LOADING", __("loading visual editor", "wp-file-upload"));
|
205 |
DEFINE("WFU_CONFIRM_CLEARFILES", __("Clear file list?", "wp-file-upload"));
|
227 |
"WFU_UPLOADROLE" => array( "Default Upload Role", "string", "all,guests", "The default upload role of the uploader shortcode. It can be a comma-separated list of role slugs, including keywords 'all' and 'guests'." ),
|
228 |
"WFU_UPLOADPATH" => array( "Default Upload Path", "string", "uploads", "The default upload path of the uploader shortcode. It must be a folder relative to wp-content dir." ),
|
229 |
"WFU_FITMODE" => array( "Default Fit Mode", "string", "fixed", "The default fit mode of the uploader shortcode. It can be 'fixed' or 'responsive'." ),
|
230 |
+
"WFU_ALLOWNOFILE" => array( "Default Allow No File Mode", "string", "false", "The default mode for allowing no file uploads. If it is set to 'true' then an upload form can be submitted even if a file has not been selected. It can be 'true' or 'false'." ),
|
231 |
"WFU_CREATEPATH" => array( "Default Create Path State", "string", "false", "The default create path state (create or not the upload path if it does not exist) of the uploader shortcode. It can be 'true' or 'false'." ),
|
232 |
"WFU_FORCEFILENAME" => array( "Default Force Filename State", "string", "false", "The default force filename state (force plugin to leave filename unchanged) of the uploader shortcode. It can be 'true' or 'false'." ),
|
233 |
"WFU_UPLOADPATTERNS" => array( "Default Upload Extensions", "string", "*.*", "The default allowed file extensions of the uploader shortcode. It can be a comma-separated list of wildcard extensions." ),
|
277 |
);
|
278 |
//other plugin values
|
279 |
$GLOBALS["WFU_GLOBALS"] += array(
|
280 |
+
"WFU_DEBUG" => array( "Plugin Debug Mode", "string", "OFF", "If DEBUG mode is activated then advanced hook of plugin's function can be performed. This option may make the plugin slower, so use it very carefully. It can be 'OFF' or 'ON'." ),
|
281 |
"WFU_UPLOADPROGRESS_MODE" => array( "Upload Progress Mode", "string", "incremental", "Defines how the upload progress is calculated. It can be 'incremental' or 'absolute'. Default value is 'incremental'." ),
|
282 |
"WFU_DOS_ATTACKS_CHECK" => array( "Check for Denial-Of-Service Attacks", "string", "true", "If it is true then then plugin will check if the number of files uploaded within a specific amount of time exceeds the limit, thus protecting from DOS attacks. It can be 'true' or 'false'." ),
|
283 |
"WFU_DOS_ATTACKS_FILE_LIMIT" => array( "Denial-Of-Service File Limit", "integer", 10000, "Defines the maximum number of files that are allowed to be uploaded within a specific amount of time. It can be any positive integer." ),
|
315 |
"WFU_HEADERMESSAGECOLORS_STATE9" => array( "State 9 Message Colors", "string", "#666666,#EEEEEE,#333333", "The color triplet (text, background and border colors) of message of upload state 9 (test state) of the uploader shortcode." ),
|
316 |
"WFU_HEADERMESSAGECOLORS_STATE10" => array( "State 10 Message Colors", "string", "#F88017,#FEF2E7,#633309", "The color triplet (text, background and border colors) of message of upload state 10 (JSON parse error) of the uploader shortcode." ),
|
317 |
"WFU_HEADERMESSAGECOLORS_STATE11" => array( "State 11 Message Colors", "string", "#666666,#EEEEEE,#333333", "The color triplet (text, background and border colors) of message of upload state 11 (redirecting) of the uploader shortcode." ),
|
318 |
+
"WFU_HEADERMESSAGECOLORS_STATE12" => array( "State 12 Message Colors", "string", "#660000,#FFEEEE,#666600", "The color triplet (text, background and border colors) of message of upload state 12 (upload failed) of the uploader shortcode." ),
|
319 |
+
"WFU_HEADERMESSAGECOLORS_STATE13" => array( "State 13 Message Colors", "string", "#666666,#EEEEEE,#333333", "The color triplet (text, background and border colors) of message of upload state 12 (upload failed) of the uploader shortcode." ),
|
320 |
+
"WFU_HEADERMESSAGECOLORS_STATE14" => array( "State 14 Message Colors", "string", "#006600,#EEFFEE,#006666", "The color triplet (text, background and border colors) of message of upload state 12 (upload failed) of the uploader shortcode." ),
|
321 |
+
"WFU_HEADERMESSAGECOLORS_STATE15" => array( "State 15 Message Colors", "string", "#660000,#FFEEEE,#666600", "The color triplet (text, background and border colors) of message of upload state 12 (upload failed) of the uploader shortcode." )
|
322 |
);
|
323 |
//insert saved values to array
|
324 |
$envars = get_option("wfu_environment_variables", array());
|
lib/wfu_functions.php
CHANGED
@@ -1,5 +1,57 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
//********************* String Functions ***************************************************************************************************
|
4 |
|
5 |
function wfu_upload_plugin_clean($label) {
|
@@ -32,6 +84,7 @@ function wfu_upload_plugin_wildcard_to_preg($pattern, $strict = false) {
|
|
32 |
}
|
33 |
|
34 |
function wfu_upload_plugin_wildcard_to_mysqlregexp($pattern) {
|
|
|
35 |
if ( substr($pattern, 0, 6) == "regex:" ) return str_replace("\\", "\\\\", substr($pattern, 6));
|
36 |
else return str_replace("\\", "\\\\", '^'.str_replace(array('\*', '\?', '\[', '\]'), array('.*', '.', '[', ']'), preg_quote($pattern)).'$');
|
37 |
}
|
@@ -110,6 +163,16 @@ function wfu_sanitize_tag($code) {
|
|
110 |
return preg_replace("/[^A-Za-z0-9_]/", "", $code);
|
111 |
}
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
function wfu_slash( $value ) {
|
114 |
if ( is_array( $value ) ) {
|
115 |
foreach ( $value as $k => $v ) {
|
@@ -344,6 +407,7 @@ function wfu_echo_array($arr) {
|
|
344 |
//********************* Plugin Options Functions *******************************************************************************************
|
345 |
|
346 |
function wfu_get_server_environment() {
|
|
|
347 |
$php_env = '';
|
348 |
if ( PHP_INT_SIZE == 4 ) $php_env = '32bit';
|
349 |
elseif ( PHP_INT_SIZE == 8 ) $php_env = '64bit';
|
@@ -358,6 +422,7 @@ function wfu_get_server_environment() {
|
|
358 |
}
|
359 |
|
360 |
function wfu_ajaxurl() {
|
|
|
361 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
362 |
return ( $plugin_options['admindomain'] == 'siteurl' || $plugin_options['admindomain'] == '' ? site_url("wp-admin/admin-ajax.php") : ( $plugin_options['admindomain'] == 'adminurl' ? admin_url("admin-ajax.php") : home_url("wp-admin/admin-ajax.php") ) );
|
363 |
}
|
@@ -428,6 +493,7 @@ function wfu_get_plugin_version() {
|
|
428 |
}
|
429 |
|
430 |
function wfu_get_latest_version() {
|
|
|
431 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
432 |
$postfields = array();
|
433 |
$postfields['action'] = 'wfuca_check_latest_version_free';
|
@@ -573,13 +639,16 @@ function wfu_delTree($dir) {
|
|
573 |
|
574 |
function wfu_getTree($dir) {
|
575 |
$tree = array();
|
576 |
-
$files =
|
|
|
|
|
577 |
foreach ($files as $file) {
|
578 |
if ( is_dir("$dir/$file") ) array_push($tree, $file);
|
579 |
}
|
580 |
return $tree;
|
581 |
}
|
582 |
function wfu_parse_folderlist($subfoldertree) {
|
|
|
583 |
$ret['path'] = array();
|
584 |
$ret['label'] = array();
|
585 |
$ret['level'] = array();
|
@@ -853,25 +922,27 @@ function wfu_log_action($action, $filepath, $userid, $uploadid, $pageid, $blogid
|
|
853 |
$table_name2 = $wpdb->prefix . "wfu_userdata";
|
854 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
855 |
|
856 |
-
if ( !file_exists($filepath) && substr($action, 0, 5) != 'other' ) return;
|
857 |
$parts = pathinfo($filepath);
|
858 |
$relativepath = wfu_path_abs2rel($filepath);
|
859 |
// if ( substr($relativepath, 0, 1) != '/' ) $relativepath = '/'.$relativepath;
|
860 |
|
861 |
$retid = 0;
|
862 |
-
if ( $action == 'upload' || $action == 'include' ) {
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
|
|
|
|
875 |
// attempt to create new log record
|
876 |
$now_date = date('Y-m-d H:i:s');
|
877 |
if ( $wpdb->insert($table_name1,
|
@@ -880,9 +951,9 @@ function wfu_log_action($action, $filepath, $userid, $uploadid, $pageid, $blogid
|
|
880 |
'uploaduserid' => $userid,
|
881 |
'uploadtime' => time(),
|
882 |
'sessionid' => session_id(),
|
883 |
-
'filepath' => $relativepath,
|
884 |
-
'filehash' => $filehash,
|
885 |
-
'filesize' => $filesize,
|
886 |
'uploadid' => $uploadid,
|
887 |
'pageid' => $pageid,
|
888 |
'blogid' => $blogid,
|
@@ -1209,7 +1280,7 @@ function wfu_get_file_rec($filepath, $include_userdata) {
|
|
1209 |
if ( $filerec != null && $include_userdata ) {
|
1210 |
$filerec->userdata = null;
|
1211 |
if ( $filerec->uploadid != '' ) {
|
1212 |
-
$filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0');
|
1213 |
}
|
1214 |
}
|
1215 |
return $filerec;
|
@@ -1224,6 +1295,15 @@ function wfu_get_file_rec_from_id($idlog) {
|
|
1224 |
return $filerec;
|
1225 |
}
|
1226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1227 |
//reassign file hashes for all valid files in the database
|
1228 |
function wfu_reassign_hashes() {
|
1229 |
global $wpdb;
|
@@ -1249,11 +1329,12 @@ function wfu_reassign_hashes() {
|
|
1249 |
|
1250 |
//update database to reflect the current status of files
|
1251 |
function wfu_sync_database() {
|
|
|
1252 |
global $wpdb;
|
1253 |
$table_name1 = $wpdb->prefix . "wfu_log";
|
1254 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
1255 |
|
1256 |
-
$filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' WHERE action <> \'other\' AND date_to = 0');
|
1257 |
$obsolete_count = 0;
|
1258 |
foreach( $filerecs as $filerec ) {
|
1259 |
$obsolete = true;
|
@@ -1292,9 +1373,9 @@ function wfu_get_recs_of_user($userid) {
|
|
1292 |
|
1293 |
//if $userid starts with 'guest' then retrieval of records is done using sessionid and uploaduserid is zero (for guests)
|
1294 |
if ( substr($userid, 0, 5) == 'guest' )
|
1295 |
-
$filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' WHERE action <> \'other\' AND uploaduserid = 0 AND sessionid = \''.substr($userid, 5).'\' AND date_to = 0');
|
1296 |
else
|
1297 |
-
$filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' WHERE action <> \'other\' AND uploaduserid = '.$userid.' AND date_to = 0');
|
1298 |
$out = array();
|
1299 |
foreach( $filerecs as $filerec ) {
|
1300 |
$obsolete = true;
|
@@ -1323,7 +1404,7 @@ function wfu_get_recs_of_user($userid) {
|
|
1323 |
else {
|
1324 |
$filerec->userdata = null;
|
1325 |
if ( $filerec->uploadid != '' )
|
1326 |
-
$filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0');
|
1327 |
array_push($out, $filerec);
|
1328 |
}
|
1329 |
}
|
@@ -1332,6 +1413,7 @@ function wfu_get_recs_of_user($userid) {
|
|
1332 |
}
|
1333 |
|
1334 |
function wfu_get_filtered_recs($filter) {
|
|
|
1335 |
global $wpdb;
|
1336 |
$table_name1 = $wpdb->prefix . "wfu_log";
|
1337 |
$table_name2 = $wpdb->prefix . "wfu_userdata";
|
@@ -1339,7 +1421,7 @@ function wfu_get_filtered_recs($filter) {
|
|
1339 |
|
1340 |
$queries = array();
|
1341 |
// add default filters
|
1342 |
-
array_push($queries, 'action <> \'other\'');
|
1343 |
array_push($queries, 'date_to = 0');
|
1344 |
// construct user filter
|
1345 |
if ( isset($filter['user']) ) {
|
@@ -1433,7 +1515,7 @@ function wfu_get_filtered_recs($filter) {
|
|
1433 |
else {
|
1434 |
$filerec->userdata = null;
|
1435 |
if ( $filerec->uploadid != '' )
|
1436 |
-
$filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0');
|
1437 |
array_push($out, $filerec);
|
1438 |
}
|
1439 |
}
|
@@ -1463,6 +1545,7 @@ function wfu_update_option($option, $value) {
|
|
1463 |
}
|
1464 |
|
1465 |
function wfu_export_uploaded_files($params) {
|
|
|
1466 |
global $wpdb;
|
1467 |
$table_name1 = $wpdb->prefix . "wfu_log";
|
1468 |
$table_name2 = $wpdb->prefix . "wfu_userdata";
|
@@ -1475,28 +1558,31 @@ function wfu_export_uploaded_files($params) {
|
|
1475 |
$contents = $header;
|
1476 |
$filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' WHERE action <> \'other\' AND date_to = 0');
|
1477 |
foreach( $filerecs as $filerec ) {
|
1478 |
-
$obsolete =
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
if ( $
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
|
|
|
|
|
|
1489 |
}
|
1490 |
}
|
1491 |
//export file data if file is not obsolete
|
1492 |
if ( !$obsolete ) {
|
1493 |
$username = wfu_get_username_by_id($filerec->uploaduserid);
|
1494 |
-
$filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0');
|
1495 |
-
$line = wfu_basename($filerec->filepath);
|
1496 |
-
$line .= $sep.wfu_basedir($filerec->filepath);
|
1497 |
$line .= $sep.$username;
|
1498 |
$line .= $sep.( $filerec->uploadtime == null ? "" : date("Y-m-d H:i:s", $filerec->uploadtime) );
|
1499 |
-
$line .= $sep
|
1500 |
$line .= $sep.( $filerec->pageid == null ? "" : $filerec->pageid );
|
1501 |
$line .= $sep.( $filerec->blogid == null ? "" : $filerec->blogid );
|
1502 |
$line .= $sep.( $filerec->sid == null ? "" : $filerec->sid );
|
@@ -1680,6 +1766,7 @@ function wfu_placements_remove_item($placements, $item) {
|
|
1680 |
//********************* Plugin Design Functions ********************************************************************************************
|
1681 |
|
1682 |
function wfu_add_div() {
|
|
|
1683 |
$items_count = func_num_args();
|
1684 |
if ( $items_count == 0 ) return "";
|
1685 |
$items_raw = func_get_args();
|
@@ -1729,6 +1816,7 @@ function wfu_add_div() {
|
|
1729 |
}
|
1730 |
|
1731 |
function wfu_add_loading_overlay($dlp, $code) {
|
|
|
1732 |
$echo_str = $dlp.'<div id="wfu_'.$code.'_overlay" style="margin:0; padding: 0; width:100%; height:100%; position:absolute; left:0; top:0; border:none; background:none; display:none;">';
|
1733 |
$echo_str .= $dlp."\t".'<div style="margin:0; padding: 0; width:100%; height:100%; position:absolute; left:0; top:0; border:none; background-color:rgba(255,255,255,0.8); z-index:1;""></div>';
|
1734 |
$echo_str .= $dlp."\t".'<table style="margin:0; padding: 0; table-layout:fixed; width:100%; height:100%; position:absolute; left:0; top:0; border:none; background:none; z-index:2;"><tbody><tr><td align="center" style="border:none;">';
|
@@ -1740,6 +1828,7 @@ function wfu_add_loading_overlay($dlp, $code) {
|
|
1740 |
}
|
1741 |
|
1742 |
function wfu_add_pagination_header($dlp, $code, $curpage, $pages, $nonce = false) {
|
|
|
1743 |
if ($nonce === false) $nonce = wp_create_nonce( 'wfu-'.$code.'-page' );
|
1744 |
$echo_str = $dlp.'<div style="float:right;">';
|
1745 |
$echo_str .= $dlp."\t".'<label id="wfu_'.$code.'_first_disabled" style="margin:0 4px; font-weight:bold; opacity:0.5; cursor:default; display:'.( $curpage == 1 ? 'inline' : 'none' ).';"><<</label>';
|
@@ -1762,6 +1851,7 @@ function wfu_add_pagination_header($dlp, $code, $curpage, $pages, $nonce = false
|
|
1762 |
}
|
1763 |
|
1764 |
function wfu_add_bulkactions_header($dlp, $code, $actions) {
|
|
|
1765 |
$echo_str = $dlp.'<div style="float:left;">';
|
1766 |
$echo_str .= $dlp."\t".'<select id="wfu_'.$code.'_bulkactions">';
|
1767 |
$echo_str .= $dlp."\t\t".'<option value="" selected="selected">'.( substr($code, 0, 8) == "browser_" ? WFU_BROWSER_BULKACTION_TITLE : "Bulk Actions").'</option>';
|
@@ -1778,6 +1868,7 @@ function wfu_add_bulkactions_header($dlp, $code, $actions) {
|
|
1778 |
//********************* Email Functions ****************************************************************************************************
|
1779 |
|
1780 |
function wfu_send_notification_email($user, $only_filename_list, $target_path_list, $attachment_list, $userdata_fields, $params) {
|
|
|
1781 |
global $blog_id;
|
1782 |
|
1783 |
//apply wfu_before_email_notification filter
|
@@ -1844,6 +1935,7 @@ function wfu_send_notification_email($user, $only_filename_list, $target_path_li
|
|
1844 |
}
|
1845 |
|
1846 |
function wfu_notify_admin($subject, $message) {
|
|
|
1847 |
$admin_email = get_option("admin_email");
|
1848 |
if ( $admin_email === false ) return;
|
1849 |
wp_mail($admin_email, $subject, $message);
|
@@ -1853,6 +1945,7 @@ function wfu_notify_admin($subject, $message) {
|
|
1853 |
|
1854 |
// function wfu_process_media_insert contribution from Aaron Olin with some corrections regarding the upload path
|
1855 |
function wfu_process_media_insert($file_path, $userdata_fields, $page_id){
|
|
|
1856 |
$wp_upload_dir = wp_upload_dir();
|
1857 |
$filetype = wp_check_filetype( wfu_basename( $file_path ), null );
|
1858 |
|
@@ -1994,6 +2087,7 @@ function wfu_get_browser_params_from_safe($code) {
|
|
1994 |
//********************* POST/GET Requests Functions ****************************************************************************************************
|
1995 |
|
1996 |
function wfu_decode_socket_response($response) {
|
|
|
1997 |
$ret = "";
|
1998 |
if (0 === strpos($response, 'HTTP/1.1 200 OK')) {
|
1999 |
$parts = preg_split("#\n\s*\n#Uis", $response);
|
@@ -2017,6 +2111,7 @@ function wfu_decode_socket_response($response) {
|
|
2017 |
}
|
2018 |
|
2019 |
function wfu_post_request($url, $params, $verifypeer = false, $internal_request = false, $timeout = 0) {
|
|
|
2020 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
2021 |
if ( isset($plugin_options['postmethod']) && $plugin_options['postmethod'] == 'curl' ) {
|
2022 |
// POST request using CURL
|
1 |
<?php
|
2 |
|
3 |
+
//********************* Debug Functions ***************************************************************************************************
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Hook on plugin's functions
|
7 |
+
*
|
8 |
+
* This is a very powerful function that enables almost all plugin functions to
|
9 |
+
* be redeclared. In order to make a function redeclarable we just put the
|
10 |
+
* following code at the top of its function block:
|
11 |
+
* switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X'
|
12 |
+
* : break; case 'R': return $out; break; case 'D': die($out); break; }
|
13 |
+
* Then the function can be hooked through the filter wfu_debug-{__FUNCTION__}.
|
14 |
+
* The hook function takes the same parameters as the original function, plus
|
15 |
+
* one, which comes first and determines the behaviour of the hook function.
|
16 |
+
* The hook function must return an array having two items, 'output' and
|
17 |
+
* 'result'. Item 'output' is the return value of the hook function (if
|
18 |
+
* required). Item 'result' denotes how the hook function will be handled. If
|
19 |
+
* 'result' is 'X' then the result of the hook function will be ignored. If
|
20 |
+
* 'result' is 'R' then the original function will terminate returning the
|
21 |
+
* output of the hook function. So it is like having been entirely substituted
|
22 |
+
* by the hook function. If 'result' is 'D' then the original function will die
|
23 |
+
* returning the output of the hook function. This applies to ajax handlers.
|
24 |
+
* It is noted that together with the hook, a global variable with name
|
25 |
+
* wfu_debug-{__FUNCTION__} must also be declared otherwise the hook will not
|
26 |
+
* work. This has been added to improve performance.
|
27 |
+
*
|
28 |
+
* @param string $function the function name of the original function
|
29 |
+
* @param array $args an array of parameters of the original function
|
30 |
+
* @param string $out it stores the output of the hook function
|
31 |
+
|
32 |
+
* @return string returns how the hook function will be handled ('X': hook
|
33 |
+
* output must be ignored, 'R': the original function must return the
|
34 |
+
* hook's output, 'D': the original function must die returning the
|
35 |
+
* hook's output)
|
36 |
+
*/
|
37 |
+
function WFU_FUNCTION_HOOK($function, $args, &$out) {
|
38 |
+
// exit if plugin's debug mode is off or the hook has not been declared in
|
39 |
+
// global variables
|
40 |
+
if ( WFU_VAR("WFU_DEBUG") != "ON" || !isset($GLOBALS["wfu_debug-".$function]) ) return 'X';
|
41 |
+
// exit if function name is empty or invalid
|
42 |
+
if ( $function == "" || preg_replace("/[^0-9a-zA-Z_]/", "", $function) != $function ) return 'X';
|
43 |
+
// run the hook
|
44 |
+
array_splice($args, 0, 0, array( array( "output" => "", "result" => "X" ) ));
|
45 |
+
$res = apply_filters_ref_array("wfu_debug-".$function, $args);
|
46 |
+
// exit if $res is invalid
|
47 |
+
if ( !is_array($res) || !isset($res["output"]) || !isset($res["result"]) ) return 'X';
|
48 |
+
$out = $res["output"];
|
49 |
+
// if result is 'X' then the caller must ignore the hook
|
50 |
+
// if result is 'R' then the caller must return the hook's output
|
51 |
+
// if result is 'D' then the caller must die returning the hook's output
|
52 |
+
return $res["result"];
|
53 |
+
}
|
54 |
+
|
55 |
//********************* String Functions ***************************************************************************************************
|
56 |
|
57 |
function wfu_upload_plugin_clean($label) {
|
84 |
}
|
85 |
|
86 |
function wfu_upload_plugin_wildcard_to_mysqlregexp($pattern) {
|
87 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
88 |
if ( substr($pattern, 0, 6) == "regex:" ) return str_replace("\\", "\\\\", substr($pattern, 6));
|
89 |
else return str_replace("\\", "\\\\", '^'.str_replace(array('\*', '\?', '\[', '\]'), array('.*', '.', '[', ']'), preg_quote($pattern)).'$');
|
90 |
}
|
163 |
return preg_replace("/[^A-Za-z0-9_]/", "", $code);
|
164 |
}
|
165 |
|
166 |
+
function wfu_sanitize_url($url) {
|
167 |
+
return filter_var(strip_tags($url), FILTER_SANITIZE_URL);
|
168 |
+
}
|
169 |
+
|
170 |
+
function wfu_sanitize_urls($urls, $separator) {
|
171 |
+
$urls_arr = explode($separator, $urls);
|
172 |
+
foreach( $urls_arr as &$url ) $url = wfu_sanitize_url($url);
|
173 |
+
return implode($separator, $urls_arr);
|
174 |
+
}
|
175 |
+
|
176 |
function wfu_slash( $value ) {
|
177 |
if ( is_array( $value ) ) {
|
178 |
foreach ( $value as $k => $v ) {
|
407 |
//********************* Plugin Options Functions *******************************************************************************************
|
408 |
|
409 |
function wfu_get_server_environment() {
|
410 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
411 |
$php_env = '';
|
412 |
if ( PHP_INT_SIZE == 4 ) $php_env = '32bit';
|
413 |
elseif ( PHP_INT_SIZE == 8 ) $php_env = '64bit';
|
422 |
}
|
423 |
|
424 |
function wfu_ajaxurl() {
|
425 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
426 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
427 |
return ( $plugin_options['admindomain'] == 'siteurl' || $plugin_options['admindomain'] == '' ? site_url("wp-admin/admin-ajax.php") : ( $plugin_options['admindomain'] == 'adminurl' ? admin_url("admin-ajax.php") : home_url("wp-admin/admin-ajax.php") ) );
|
428 |
}
|
493 |
}
|
494 |
|
495 |
function wfu_get_latest_version() {
|
496 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
497 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
498 |
$postfields = array();
|
499 |
$postfields['action'] = 'wfuca_check_latest_version_free';
|
639 |
|
640 |
function wfu_getTree($dir) {
|
641 |
$tree = array();
|
642 |
+
$files = @scandir($dir);
|
643 |
+
if ( !is_array($files) ) $files = array();
|
644 |
+
$files = array_diff($files, array('.','..'));
|
645 |
foreach ($files as $file) {
|
646 |
if ( is_dir("$dir/$file") ) array_push($tree, $file);
|
647 |
}
|
648 |
return $tree;
|
649 |
}
|
650 |
function wfu_parse_folderlist($subfoldertree) {
|
651 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
652 |
$ret['path'] = array();
|
653 |
$ret['label'] = array();
|
654 |
$ret['level'] = array();
|
922 |
$table_name2 = $wpdb->prefix . "wfu_userdata";
|
923 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
924 |
|
925 |
+
if ( !file_exists($filepath) && $action != 'datasubmit' && substr($action, 0, 5) != 'other' ) return;
|
926 |
$parts = pathinfo($filepath);
|
927 |
$relativepath = wfu_path_abs2rel($filepath);
|
928 |
// if ( substr($relativepath, 0, 1) != '/' ) $relativepath = '/'.$relativepath;
|
929 |
|
930 |
$retid = 0;
|
931 |
+
if ( $action == 'upload' || $action == 'include' || $action == 'datasubmit' ) {
|
932 |
+
if ( $action == 'upload' || $action == 'include' ) {
|
933 |
+
// calculate and store file hash if this setting is enabled from Settings
|
934 |
+
$filehash = '';
|
935 |
+
if ( $plugin_options['hashfiles'] == '1' ) $filehash = md5_file($filepath);
|
936 |
+
// calculate file size
|
937 |
+
$filesize = filesize($filepath);
|
938 |
+
// first make obsolete records having the same file path because the old file has been replaced
|
939 |
+
$wpdb->update($table_name1,
|
940 |
+
array( 'date_to' => date('Y-m-d H:i:s') ),
|
941 |
+
array( 'filepath' => $relativepath ),
|
942 |
+
array( '%s'),
|
943 |
+
array( '%s')
|
944 |
+
);
|
945 |
+
}
|
946 |
// attempt to create new log record
|
947 |
$now_date = date('Y-m-d H:i:s');
|
948 |
if ( $wpdb->insert($table_name1,
|
951 |
'uploaduserid' => $userid,
|
952 |
'uploadtime' => time(),
|
953 |
'sessionid' => session_id(),
|
954 |
+
'filepath' => ( $action == 'datasubmit' ? '' : $relativepath ),
|
955 |
+
'filehash' => ( $action == 'datasubmit' ? '' : $filehash ),
|
956 |
+
'filesize' => ( $action == 'datasubmit' ? 0 : $filesize ),
|
957 |
'uploadid' => $uploadid,
|
958 |
'pageid' => $pageid,
|
959 |
'blogid' => $blogid,
|
1280 |
if ( $filerec != null && $include_userdata ) {
|
1281 |
$filerec->userdata = null;
|
1282 |
if ( $filerec->uploadid != '' ) {
|
1283 |
+
$filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0 ORDER BY propkey');
|
1284 |
}
|
1285 |
}
|
1286 |
return $filerec;
|
1295 |
return $filerec;
|
1296 |
}
|
1297 |
|
1298 |
+
//get userdata from uploadid
|
1299 |
+
function wfu_get_userdata_from_uploadid($uploadid) {
|
1300 |
+
global $wpdb;
|
1301 |
+
$table_name2 = $wpdb->prefix . "wfu_userdata";
|
1302 |
+
$userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$uploadid.'\' AND date_to = 0 ORDER BY propkey');
|
1303 |
+
|
1304 |
+
return $userdata;
|
1305 |
+
}
|
1306 |
+
|
1307 |
//reassign file hashes for all valid files in the database
|
1308 |
function wfu_reassign_hashes() {
|
1309 |
global $wpdb;
|
1329 |
|
1330 |
//update database to reflect the current status of files
|
1331 |
function wfu_sync_database() {
|
1332 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1333 |
global $wpdb;
|
1334 |
$table_name1 = $wpdb->prefix . "wfu_log";
|
1335 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
1336 |
|
1337 |
+
$filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' WHERE action <> \'other\' AND action <> \'datasubmit\' AND date_to = 0');
|
1338 |
$obsolete_count = 0;
|
1339 |
foreach( $filerecs as $filerec ) {
|
1340 |
$obsolete = true;
|
1373 |
|
1374 |
//if $userid starts with 'guest' then retrieval of records is done using sessionid and uploaduserid is zero (for guests)
|
1375 |
if ( substr($userid, 0, 5) == 'guest' )
|
1376 |
+
$filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' WHERE action <> \'other\' AND action <> \'datasubmit\' AND uploaduserid = 0 AND sessionid = \''.substr($userid, 5).'\' AND date_to = 0');
|
1377 |
else
|
1378 |
+
$filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' WHERE action <> \'other\' AND action <> \'datasubmit\' AND uploaduserid = '.$userid.' AND date_to = 0');
|
1379 |
$out = array();
|
1380 |
foreach( $filerecs as $filerec ) {
|
1381 |
$obsolete = true;
|
1404 |
else {
|
1405 |
$filerec->userdata = null;
|
1406 |
if ( $filerec->uploadid != '' )
|
1407 |
+
$filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0 ORDER BY propkey');
|
1408 |
array_push($out, $filerec);
|
1409 |
}
|
1410 |
}
|
1413 |
}
|
1414 |
|
1415 |
function wfu_get_filtered_recs($filter) {
|
1416 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1417 |
global $wpdb;
|
1418 |
$table_name1 = $wpdb->prefix . "wfu_log";
|
1419 |
$table_name2 = $wpdb->prefix . "wfu_userdata";
|
1421 |
|
1422 |
$queries = array();
|
1423 |
// add default filters
|
1424 |
+
array_push($queries, 'action <> \'other\' AND action <> \'datasubmit\'');
|
1425 |
array_push($queries, 'date_to = 0');
|
1426 |
// construct user filter
|
1427 |
if ( isset($filter['user']) ) {
|
1515 |
else {
|
1516 |
$filerec->userdata = null;
|
1517 |
if ( $filerec->uploadid != '' )
|
1518 |
+
$filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0 ORDER BY propkey');
|
1519 |
array_push($out, $filerec);
|
1520 |
}
|
1521 |
}
|
1545 |
}
|
1546 |
|
1547 |
function wfu_export_uploaded_files($params) {
|
1548 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1549 |
global $wpdb;
|
1550 |
$table_name1 = $wpdb->prefix . "wfu_log";
|
1551 |
$table_name2 = $wpdb->prefix . "wfu_userdata";
|
1558 |
$contents = $header;
|
1559 |
$filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' WHERE action <> \'other\' AND date_to = 0');
|
1560 |
foreach( $filerecs as $filerec ) {
|
1561 |
+
if ( $filerec->action == 'datasubmit' ) $obsolete = false;
|
1562 |
+
else {
|
1563 |
+
$obsolete = true;
|
1564 |
+
//calculate full file path
|
1565 |
+
$filepath = wfu_path_rel2abs($filerec->filepath);
|
1566 |
+
if ( file_exists($filepath) ) {
|
1567 |
+
if ( $plugin_options['hashfiles'] == '1' ) {
|
1568 |
+
$filehash = md5_file($filepath);
|
1569 |
+
if ( $filehash == $filerec->filehash ) $obsolete = false;
|
1570 |
+
}
|
1571 |
+
else {
|
1572 |
+
$filesize = filesize($filepath);
|
1573 |
+
if ( $filesize == $filerec->filesize ) $obsolete = false;
|
1574 |
+
}
|
1575 |
}
|
1576 |
}
|
1577 |
//export file data if file is not obsolete
|
1578 |
if ( !$obsolete ) {
|
1579 |
$username = wfu_get_username_by_id($filerec->uploaduserid);
|
1580 |
+
$filerec->userdata = $wpdb->get_results('SELECT * FROM '.$table_name2.' WHERE uploadid = \''.$filerec->uploadid.'\' AND date_to = 0 ORDER BY propkey');
|
1581 |
+
$line = ( $filerec->action == 'datasubmit' ? 'datasubmit' : wfu_basename($filerec->filepath) );
|
1582 |
+
$line .= $sep.( $filerec->action == 'datasubmit' ? '' : wfu_basedir($filerec->filepath) );
|
1583 |
$line .= $sep.$username;
|
1584 |
$line .= $sep.( $filerec->uploadtime == null ? "" : date("Y-m-d H:i:s", $filerec->uploadtime) );
|
1585 |
+
$line .= $sep.( $filerec->action == 'datasubmit' ? '0' : $filerec->filesize );
|
1586 |
$line .= $sep.( $filerec->pageid == null ? "" : $filerec->pageid );
|
1587 |
$line .= $sep.( $filerec->blogid == null ? "" : $filerec->blogid );
|
1588 |
$line .= $sep.( $filerec->sid == null ? "" : $filerec->sid );
|
1766 |
//********************* Plugin Design Functions ********************************************************************************************
|
1767 |
|
1768 |
function wfu_add_div() {
|
1769 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1770 |
$items_count = func_num_args();
|
1771 |
if ( $items_count == 0 ) return "";
|
1772 |
$items_raw = func_get_args();
|
1816 |
}
|
1817 |
|
1818 |
function wfu_add_loading_overlay($dlp, $code) {
|
1819 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1820 |
$echo_str = $dlp.'<div id="wfu_'.$code.'_overlay" style="margin:0; padding: 0; width:100%; height:100%; position:absolute; left:0; top:0; border:none; background:none; display:none;">';
|
1821 |
$echo_str .= $dlp."\t".'<div style="margin:0; padding: 0; width:100%; height:100%; position:absolute; left:0; top:0; border:none; background-color:rgba(255,255,255,0.8); z-index:1;""></div>';
|
1822 |
$echo_str .= $dlp."\t".'<table style="margin:0; padding: 0; table-layout:fixed; width:100%; height:100%; position:absolute; left:0; top:0; border:none; background:none; z-index:2;"><tbody><tr><td align="center" style="border:none;">';
|
1828 |
}
|
1829 |
|
1830 |
function wfu_add_pagination_header($dlp, $code, $curpage, $pages, $nonce = false) {
|
1831 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1832 |
if ($nonce === false) $nonce = wp_create_nonce( 'wfu-'.$code.'-page' );
|
1833 |
$echo_str = $dlp.'<div style="float:right;">';
|
1834 |
$echo_str .= $dlp."\t".'<label id="wfu_'.$code.'_first_disabled" style="margin:0 4px; font-weight:bold; opacity:0.5; cursor:default; display:'.( $curpage == 1 ? 'inline' : 'none' ).';"><<</label>';
|
1851 |
}
|
1852 |
|
1853 |
function wfu_add_bulkactions_header($dlp, $code, $actions) {
|
1854 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1855 |
$echo_str = $dlp.'<div style="float:left;">';
|
1856 |
$echo_str .= $dlp."\t".'<select id="wfu_'.$code.'_bulkactions">';
|
1857 |
$echo_str .= $dlp."\t\t".'<option value="" selected="selected">'.( substr($code, 0, 8) == "browser_" ? WFU_BROWSER_BULKACTION_TITLE : "Bulk Actions").'</option>';
|
1868 |
//********************* Email Functions ****************************************************************************************************
|
1869 |
|
1870 |
function wfu_send_notification_email($user, $only_filename_list, $target_path_list, $attachment_list, $userdata_fields, $params) {
|
1871 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1872 |
global $blog_id;
|
1873 |
|
1874 |
//apply wfu_before_email_notification filter
|
1935 |
}
|
1936 |
|
1937 |
function wfu_notify_admin($subject, $message) {
|
1938 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1939 |
$admin_email = get_option("admin_email");
|
1940 |
if ( $admin_email === false ) return;
|
1941 |
wp_mail($admin_email, $subject, $message);
|
1945 |
|
1946 |
// function wfu_process_media_insert contribution from Aaron Olin with some corrections regarding the upload path
|
1947 |
function wfu_process_media_insert($file_path, $userdata_fields, $page_id){
|
1948 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
1949 |
$wp_upload_dir = wp_upload_dir();
|
1950 |
$filetype = wp_check_filetype( wfu_basename( $file_path ), null );
|
1951 |
|
2087 |
//********************* POST/GET Requests Functions ****************************************************************************************************
|
2088 |
|
2089 |
function wfu_decode_socket_response($response) {
|
2090 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
2091 |
$ret = "";
|
2092 |
if (0 === strpos($response, 'HTTP/1.1 200 OK')) {
|
2093 |
$parts = preg_split("#\n\s*\n#Uis", $response);
|
2111 |
}
|
2112 |
|
2113 |
function wfu_post_request($url, $params, $verifypeer = false, $internal_request = false, $timeout = 0) {
|
2114 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
2115 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
2116 |
if ( isset($plugin_options['postmethod']) && $plugin_options['postmethod'] == 'curl' ) {
|
2117 |
// POST request using CURL
|
lib/wfu_io.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
function wfu_mk_dir_deep($conn_id, $basepath, $path) {
|
|
|
4 |
@ftp_chdir($conn_id, $basepath);
|
5 |
$parts = explode('/', $path);
|
6 |
foreach ( $parts as $part ) {
|
@@ -13,6 +14,7 @@ function wfu_mk_dir_deep($conn_id, $basepath, $path) {
|
|
13 |
}
|
14 |
|
15 |
function wfu_create_directory($path, $method, $ftpdata) {
|
|
|
16 |
$ret_message = "";
|
17 |
if ( $method == "" || $method == "normal" ) {
|
18 |
mkdir($path, 0777, true);
|
@@ -57,6 +59,7 @@ function wfu_create_directory($path, $method, $ftpdata) {
|
|
57 |
}
|
58 |
|
59 |
function wfu_upload_file($source, $target, $method, $ftpdata, $passive, $fileperms) {
|
|
|
60 |
$ret_array = "";
|
61 |
$ret_array["uploaded"] = false;
|
62 |
$ret_array["admin_message"] = "";
|
@@ -77,6 +80,7 @@ function wfu_upload_file($source, $target, $method, $ftpdata, $passive, $fileper
|
|
77 |
$pos2 = strpos($ftpdata_flat, "@");
|
78 |
if ( $pos1 && $pos2 && $pos2 > $pos1 ) {
|
79 |
$ftp_username = substr($ftpdata, 0, $pos1);
|
|
|
80 |
$ftp_password = substr($ftpdata, $pos1 + 1, $pos2 - $pos1 - 1);
|
81 |
$ftp_host = substr($ftpdata, $pos2 + 1);
|
82 |
$ftp_port = preg_replace("/^[^:]*:?/", "", $ftp_host);
|
1 |
<?php
|
2 |
|
3 |
function wfu_mk_dir_deep($conn_id, $basepath, $path) {
|
4 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
5 |
@ftp_chdir($conn_id, $basepath);
|
6 |
$parts = explode('/', $path);
|
7 |
foreach ( $parts as $part ) {
|
14 |
}
|
15 |
|
16 |
function wfu_create_directory($path, $method, $ftpdata) {
|
17 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
18 |
$ret_message = "";
|
19 |
if ( $method == "" || $method == "normal" ) {
|
20 |
mkdir($path, 0777, true);
|
59 |
}
|
60 |
|
61 |
function wfu_upload_file($source, $target, $method, $ftpdata, $passive, $fileperms) {
|
62 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
63 |
$ret_array = "";
|
64 |
$ret_array["uploaded"] = false;
|
65 |
$ret_array["admin_message"] = "";
|
80 |
$pos2 = strpos($ftpdata_flat, "@");
|
81 |
if ( $pos1 && $pos2 && $pos2 > $pos1 ) {
|
82 |
$ftp_username = substr($ftpdata, 0, $pos1);
|
83 |
+
wfu_debug_log("username:".$ftp_username."\n");
|
84 |
$ftp_password = substr($ftpdata, $pos1 + 1, $pos2 - $pos1 - 1);
|
85 |
$ftp_host = substr($ftpdata, $pos2 + 1);
|
86 |
$ftp_port = preg_replace("/^[^:]*:?/", "", $ftp_host);
|
lib/wfu_message.php
CHANGED
@@ -32,7 +32,13 @@ function wfu_prepare_message_block_skeleton($sid, $styles, $test) {
|
|
32 |
$header_styles["State11"]['message'] = WFU_UPLOAD_STATE11;
|
33 |
$header_styles["State12"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE12"));
|
34 |
$header_styles["State12"]['message'] = WFU_UPLOAD_STATE12;
|
35 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
/* set general variables */
|
38 |
$messageblock_main = 'wfu_messageblock_'.$sid;
|
32 |
$header_styles["State11"]['message'] = WFU_UPLOAD_STATE11;
|
33 |
$header_styles["State12"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE12"));
|
34 |
$header_styles["State12"]['message'] = WFU_UPLOAD_STATE12;
|
35 |
+
$header_styles["State13"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE13"));
|
36 |
+
$header_styles["State13"]['message'] = WFU_UPLOAD_STATE13;
|
37 |
+
$header_styles["State14"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE14"));
|
38 |
+
$header_styles["State14"]['message'] = WFU_UPLOAD_STATE14;
|
39 |
+
$header_styles["State15"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE15"));
|
40 |
+
$header_styles["State15"]['message'] = WFU_UPLOAD_STATE15;
|
41 |
+
$ExposedStateIndex = array("0", "1", "2", "3", "4", "5", "5_singlefile", "6", "7", "7_singlefile", "8", "11", "12", "13", "14", "15");
|
42 |
|
43 |
/* set general variables */
|
44 |
$messageblock_main = 'wfu_messageblock_'.$sid;
|
lib/wfu_processfiles.php
CHANGED
@@ -20,6 +20,8 @@ function wfu_process_files($params, $method) {
|
|
20 |
$unique_id = sanitize_text_field($_POST['uniqueuploadid_'.$sid]);
|
21 |
// determine if this routine is only for checking the file
|
22 |
$only_check = ( isset($_POST['only_check']) ? ( $_POST['only_check'] == "1" ) : false );
|
|
|
|
|
23 |
|
24 |
$suppress_admin_messages = ( $params["adminmessages"] != "true" || !$is_admin );
|
25 |
$success_count = 0;
|
@@ -79,16 +81,17 @@ function wfu_process_files($params, $method) {
|
|
79 |
/* notify admin if this is a redirection caused because the browser of the user could not handle AJAX upload */
|
80 |
$params_output_array["general"]['admin_messages']['other'] = $params['adminerrors'];
|
81 |
|
82 |
-
if ( isset($_FILES[$uploadedfile]['error']) || $only_check ) {
|
83 |
$files_count = 1;
|
84 |
-
// in case of checking of file, then the $_FILES
|
|
|
85 |
// so we set it manually in order to allow the routine to continue
|
86 |
-
if ( $only_check ) {
|
87 |
-
$_FILES[$uploadedfile]['name'] = wfu_plugin_decode_string($_POST[$uploadedfile.'_name']);
|
88 |
$_FILES[$uploadedfile]['type'] = 'any';
|
89 |
$_FILES[$uploadedfile]['tmp_name'] = 'any';
|
90 |
$_FILES[$uploadedfile]['error'] = '';
|
91 |
-
$_FILES[$uploadedfile]['size'] = $_POST[$uploadedfile.'_size'];
|
92 |
}
|
93 |
}
|
94 |
else $files_count = 0;
|
@@ -97,6 +100,7 @@ function wfu_process_files($params, $method) {
|
|
97 |
// the index is used to store any file data in session variables, in case the file is uploaded in two or more passes
|
98 |
// (like the case were in the first pass it is only checked)
|
99 |
$single_file_index = ( isset($_POST[$uploadedfile.'_index']) ? $_POST[$uploadedfile.'_index'] : -1 );
|
|
|
100 |
|
101 |
/* append userdata fields to upload path */
|
102 |
$search = array ( );
|
@@ -168,8 +172,9 @@ function wfu_process_files($params, $method) {
|
|
168 |
$file_unique_id = wfu_create_random_string(20);
|
169 |
|
170 |
/* Get uploaded file size in Mbytes */
|
171 |
-
// correct file size in case of checking of file
|
172 |
-
|
|
|
173 |
$upload_file_size = $fileprops['size'];
|
174 |
if ( $upload_file_size == 0 ) $upload_file_size ++;
|
175 |
}
|
@@ -195,7 +200,7 @@ function wfu_process_files($params, $method) {
|
|
195 |
$real_file_index = $single_file_index;
|
196 |
if ( $single_file_index == -1 ) $real_file_index = $i;
|
197 |
// get correct file size
|
198 |
-
if ( $only_check ) $filesize = $fileprops['size'];
|
199 |
else $filesize = filesize($fileprops['tmp_name']);
|
200 |
$_SESSION["filedata_".$unique_id][$real_file_index] = array(
|
201 |
"file_unique_id" => $file_unique_id,
|
@@ -203,24 +208,30 @@ function wfu_process_files($params, $method) {
|
|
203 |
"filesize" => $filesize,
|
204 |
);
|
205 |
// prepare parameters for wfu_before_file_check filter
|
206 |
-
|
|
|
|
|
207 |
$changable_data['user_data'] = $userdata_fields;
|
208 |
$changable_data['error_message'] = $filter_error_message;
|
209 |
$changable_data['admin_message'] = $filter_admin_message;
|
210 |
$additional_data['shortcode_id'] = $sid;
|
211 |
-
$additional_data['
|
212 |
-
$additional_data['
|
|
|
213 |
$additional_data['user_id'] = $user->ID;
|
214 |
$additional_data['page_id'] = $params["pageid"];
|
215 |
-
$ret_data = apply_filters('wfu_before_file_check', $changable_data, $additional_data);
|
216 |
-
$
|
217 |
-
$
|
|
|
218 |
$userdata_fields = $ret_data['user_data'];
|
219 |
$filter_error_message = $ret_data['error_message'];
|
220 |
$filter_admin_message = $ret_data['admin_message'];
|
221 |
-
// if this is a file check, which means that a second pass of
|
222 |
-
//
|
223 |
-
|
|
|
|
|
224 |
$_SESSION[$file_map]['file_unique_id'] = $file_unique_id;
|
225 |
$_SESSION[$file_map]['filepath'] = $target_path;
|
226 |
$_SESSION[$file_map]['userdata'] = $userdata_fields;
|
@@ -261,49 +272,57 @@ function wfu_process_files($params, $method) {
|
|
261 |
$file_output['admin_messages'] = wfu_join_strings("<br />", $file_output['admin_messages'], WFU_ERROR_ADMIN_DOS_ATTACK);
|
262 |
}
|
263 |
else {
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
|
|
270 |
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
}
|
276 |
-
/* Check if upload path exist */
|
277 |
-
if ( is_dir( wfu_basedir($target_path) ) ) {
|
278 |
-
$upload_path_ok = true;
|
279 |
-
}
|
280 |
-
/* Attempt to create path if user has selected to do so */
|
281 |
-
else if ( $params["createpath"] == "true" ) {
|
282 |
-
$wfu_create_directory_ret = wfu_create_directory(wfu_basedir($target_path), $params["accessmethod"], $params["ftpinfo"]);
|
283 |
-
if ( $wfu_create_directory_ret != "" ) {
|
284 |
-
$file_output['admin_messages'] = wfu_join_strings("<br />", $file_output['admin_messages'], $wfu_create_directory_ret);
|
285 |
}
|
|
|
286 |
if ( is_dir( wfu_basedir($target_path) ) ) {
|
287 |
$upload_path_ok = true;
|
288 |
}
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
if ( wfu_file_extension_matches_pattern($allowed_pattern, strtolower($only_filename)) ) {
|
298 |
-
$allowed_file_ok = true;
|
299 |
-
break ;
|
300 |
}
|
301 |
}
|
302 |
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
}
|
308 |
|
309 |
if ( !$upload_path_ok or !$allowed_file_ok or !$size_file_ok ) {
|
@@ -348,10 +367,10 @@ function wfu_process_files($params, $method) {
|
|
348 |
// if ( $upload_path_ok and $allowed_file_ok and $size_file_ok ) {
|
349 |
if ( substr($file_output['message_type'], 0, 5) != "error" ) {
|
350 |
|
351 |
-
if ( is_uploaded_file($fileprops['tmp_name']) || $only_check ) {
|
352 |
$source_path = $fileprops['tmp_name'];
|
353 |
|
354 |
-
if ( $only_check || $ignore_server_actions ) $file_copied = true;
|
355 |
else {
|
356 |
$file_copied = false;
|
357 |
|
@@ -469,11 +488,13 @@ function wfu_process_files($params, $method) {
|
|
469 |
|
470 |
if ( $file_copied ) {
|
471 |
/* prepare email notification parameters if email notification is enabled */
|
472 |
-
if ( $params["notify"] == "true" && !$only_check ) {
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
|
|
|
|
477 |
}
|
478 |
|
479 |
/* prepare redirect link if redirection is enabled */
|
@@ -524,13 +545,13 @@ function wfu_process_files($params, $method) {
|
|
524 |
}
|
525 |
|
526 |
/* set success status of the file, to be used for medialink and post actions */
|
527 |
-
$file_finished_successfully = ( !$only_check && ( $file_output['message_type'] == "success" || $file_output['message_type'] == "warning" ) );
|
528 |
/* set non-success status of the file, to be used for medialink and post actions */
|
529 |
$file_finished_unsuccessfully = ( substr($file_output['message_type'], 0, 5) == "error" );
|
530 |
|
531 |
|
532 |
/* perform custom actions after file is completely uploaded in order to determine if file is valid ir not */
|
533 |
-
if ( $file_finished_successfully && !$ignore_server_actions ) {
|
534 |
/* Here the second pass of file extension control is performed after the file has completely
|
535 |
uploaded, using WP inherent functions that determine the real extension from analyzing the
|
536 |
data and not from the filename extension. If this check reveals an extension which is not
|
@@ -618,7 +639,7 @@ function wfu_process_files($params, $method) {
|
|
618 |
$replace = array ($user_login, ( $user_email == "" ? "no email" : $user_email ), $only_filename, $target_path);
|
619 |
$file_output['header'] = preg_replace($search, $replace, $params['errormessage']);
|
620 |
/* prepare and prepend details of failed file upload, visible only to administrator */
|
621 |
-
$file_output['admin_messages'] = wfu_join_strings("<br />", preg_replace($search, $replace, WFU_FAILMESSAGE_DETAILS), $file_output['admin_messages']);
|
622 |
}
|
623 |
|
624 |
/* suppress again any admin messages if user is not administrator or adminmessages is not activated */
|
@@ -636,18 +657,24 @@ function wfu_process_files($params, $method) {
|
|
636 |
$changable_data['ret_value'] = null;
|
637 |
$changable_data['js_script'] = '';
|
638 |
$additional_data['shortcode_id'] = $sid;
|
639 |
-
$additional_data['
|
640 |
-
$additional_data['
|
|
|
|
|
641 |
$additional_data['error_message'] = $file_output['message'];
|
642 |
$additional_data['admin_messages'] = $file_output['admin_messages'];
|
643 |
-
$ret_data = apply_filters('wfu_after_file_upload', $changable_data, $additional_data);
|
|
|
644 |
$params_output_array["general"]['js_script'] = $ret_data['js_script'];
|
645 |
// do_action('wfu_after_file_upload', $file_unique_id, $file_output['message_type'], $file_output['message'], $file_output['admin_messages']);
|
646 |
}
|
647 |
|
648 |
if ( $file_finished_successfully && !$ignore_server_actions ) {
|
649 |
-
/*
|
650 |
-
|
|
|
|
|
|
|
651 |
/* Apply wfu_after_file_upload filter after failed upload, in order to allow the user to perform any post-upload actions.
|
652 |
If additional data are required, such as user_id or userdata values or filepath, they can be retrieved by implementing
|
653 |
the previous filters wfu_before_file_check and wfu_before_file_upload, corresponding them to the unique file id.
|
@@ -657,17 +684,20 @@ function wfu_process_files($params, $method) {
|
|
657 |
$changable_data['ret_value'] = null;
|
658 |
$changable_data['js_script'] = '';
|
659 |
$additional_data['shortcode_id'] = $sid;
|
660 |
-
$additional_data['
|
661 |
-
$additional_data['
|
|
|
|
|
662 |
$additional_data['error_message'] = $file_output['message'];
|
663 |
$additional_data['admin_messages'] = $file_output['admin_messages'];
|
664 |
-
$ret_data = apply_filters('wfu_after_file_upload', $changable_data, $additional_data);
|
|
|
665 |
$params_output_array["general"]['js_script'] = $ret_data['js_script'];
|
666 |
// do_action('wfu_after_file_upload', $file_unique_id, $file_output['message_type'], $file_output['message'], $file_output['admin_messages']);
|
667 |
}
|
668 |
|
669 |
/* add file to Media or attach file to current post if any of these options is activated and the file has finished uploading successfully */
|
670 |
-
if ( ( $params["medialink"] == "true" || $params["postlink"] == "true" ) && $file_finished_successfully && !$ignore_server_actions ) {
|
671 |
$pageid = ( $params["postlink"] == "true" ? $params['pageid'] : 0 );
|
672 |
wfu_process_media_insert($target_path, $userdata_fields, $pageid);
|
673 |
}
|
@@ -676,7 +706,7 @@ function wfu_process_files($params, $method) {
|
|
676 |
use by after_upload filters */
|
677 |
$real_file_index = $single_file_index;
|
678 |
if ( $single_file_index == -1 ) $real_file_index = $i;
|
679 |
-
if ( ( $file_finished_successfully || $file_finished_unsuccessfully ) && isset($_SESSION["filedata_".$unique_id][$real_file_index]) && !$ignore_server_actions ) {
|
680 |
$_SESSION["filedata_".$unique_id][$real_file_index]["filepath"] = $target_path;
|
681 |
$_SESSION["filedata_".$unique_id][$real_file_index]["user_data"] = $userdata_fields;
|
682 |
$_SESSION["filedata_".$unique_id][$real_file_index]["upload_result"] = $file_output['message_type'];
|
@@ -686,14 +716,14 @@ function wfu_process_files($params, $method) {
|
|
686 |
}
|
687 |
|
688 |
// in case of file check set files_count to 0 in order to denote that the file was not really uploaded
|
689 |
-
if ( $only_check ) $params_output_array["general"]['files_count'] = 0;
|
690 |
|
691 |
$somefiles_Ok = ( ( $warning_count + $success_count ) > 0 );
|
692 |
$allfiles_Ok = ( $somefiles_Ok && ( $error_count == 0 ) );
|
693 |
|
694 |
/* Prepare WPFileBase Plugin update url, if this option has been selected and only if at least one file has been successfully uploaded.
|
695 |
Execution will happen only if accumulated $params_output_array["general"]['update_wpfilebase'] is not empty */
|
696 |
-
if ( $params["filebaselink"] == "true" ) {
|
697 |
if ( $somefiles_Ok ) {
|
698 |
$filebaseurl = site_url();
|
699 |
if ( substr($filebaseurl, -1, 1) == "/" ) $filebaseurl = substr($filebaseurl, 0, strlen($filebaseurl) - 1);
|
@@ -726,7 +756,7 @@ function wfu_process_files($params, $method) {
|
|
726 |
else {
|
727 |
/* if the following variable is not empty, then email notification must be sent
|
728 |
and any admin messages must be suppressed */
|
729 |
-
$params_output_array["general"]['notify_only_filename_list'] = $notify_only_filename_list;
|
730 |
$params_output_array["general"]['notify_target_path_list'] = $notify_target_path_list;
|
731 |
$params_output_array["general"]['notify_attachment_list'] = $notify_attachment_list;
|
732 |
}
|
@@ -764,10 +794,10 @@ function wfu_process_files($params, $method) {
|
|
764 |
}
|
765 |
|
766 |
/* Calculate upload state from file results */
|
767 |
-
if ( $allfiles_Ok && ( $warning_count == 0 ) ) $params_output_array["general"]['state'] = 4;
|
768 |
else if ( $allfiles_Ok ) $params_output_array["general"]['state'] = 5;
|
769 |
else if ( $somefiles_Ok ) $params_output_array["general"]['state'] = 6; //only valid in no-ajax method
|
770 |
-
else if ( !$somefiles_Ok && $error_count > 0 ) $params_output_array["general"]['state'] = 7;
|
771 |
else $params_output_array["general"]['state'] = 8;
|
772 |
|
773 |
/* construct safe output */
|
20 |
$unique_id = sanitize_text_field($_POST['uniqueuploadid_'.$sid]);
|
21 |
// determine if this routine is only for checking the file
|
22 |
$only_check = ( isset($_POST['only_check']) ? ( $_POST['only_check'] == "1" ) : false );
|
23 |
+
// determine if this is an upload without a file
|
24 |
+
$nofileupload = ( isset($_POST['nofileupload_'.$sid]) ? ( $_POST['nofileupload_'.$sid] == "1" ) : false );
|
25 |
|
26 |
$suppress_admin_messages = ( $params["adminmessages"] != "true" || !$is_admin );
|
27 |
$success_count = 0;
|
81 |
/* notify admin if this is a redirection caused because the browser of the user could not handle AJAX upload */
|
82 |
$params_output_array["general"]['admin_messages']['other'] = $params['adminerrors'];
|
83 |
|
84 |
+
if ( isset($_FILES[$uploadedfile]['error']) || $only_check || $nofileupload ) {
|
85 |
$files_count = 1;
|
86 |
+
// in case of checking of file or no file upload, then the $_FILES
|
87 |
+
// variable has not been set because no file has been uploaded,
|
88 |
// so we set it manually in order to allow the routine to continue
|
89 |
+
if ( $only_check || $nofileupload ) {
|
90 |
+
$_FILES[$uploadedfile]['name'] = wfu_sanitize_url(wfu_plugin_decode_string($_POST[$uploadedfile.'_name']));
|
91 |
$_FILES[$uploadedfile]['type'] = 'any';
|
92 |
$_FILES[$uploadedfile]['tmp_name'] = 'any';
|
93 |
$_FILES[$uploadedfile]['error'] = '';
|
94 |
+
$_FILES[$uploadedfile]['size'] = wfu_sanitize_int($_POST[$uploadedfile.'_size']);
|
95 |
}
|
96 |
}
|
97 |
else $files_count = 0;
|
100 |
// the index is used to store any file data in session variables, in case the file is uploaded in two or more passes
|
101 |
// (like the case were in the first pass it is only checked)
|
102 |
$single_file_index = ( isset($_POST[$uploadedfile.'_index']) ? $_POST[$uploadedfile.'_index'] : -1 );
|
103 |
+
$single_file_index = wfu_sanitize_int($single_file_index);
|
104 |
|
105 |
/* append userdata fields to upload path */
|
106 |
$search = array ( );
|
172 |
$file_unique_id = wfu_create_random_string(20);
|
173 |
|
174 |
/* Get uploaded file size in Mbytes */
|
175 |
+
// correct file size in case of checking of file or no file upload
|
176 |
+
// otherwise $upload_file_size will be zero and the routine will fail
|
177 |
+
if ( $only_check || $nofileupload ) {
|
178 |
$upload_file_size = $fileprops['size'];
|
179 |
if ( $upload_file_size == 0 ) $upload_file_size ++;
|
180 |
}
|
200 |
$real_file_index = $single_file_index;
|
201 |
if ( $single_file_index == -1 ) $real_file_index = $i;
|
202 |
// get correct file size
|
203 |
+
if ( $only_check || $nofileupload ) $filesize = $fileprops['size'];
|
204 |
else $filesize = filesize($fileprops['tmp_name']);
|
205 |
$_SESSION["filedata_".$unique_id][$real_file_index] = array(
|
206 |
"file_unique_id" => $file_unique_id,
|
208 |
"filesize" => $filesize,
|
209 |
);
|
210 |
// prepare parameters for wfu_before_file_check filter
|
211 |
+
// if this is a no file upload the prepare parameters for
|
212 |
+
// wfu_before_data_submit filter
|
213 |
+
if ( !$nofileupload ) $changable_data['file_path'] = $target_path;
|
214 |
$changable_data['user_data'] = $userdata_fields;
|
215 |
$changable_data['error_message'] = $filter_error_message;
|
216 |
$changable_data['admin_message'] = $filter_admin_message;
|
217 |
$additional_data['shortcode_id'] = $sid;
|
218 |
+
$additional_data['unique_id'] = $unique_id;
|
219 |
+
if ( !$nofileupload ) $additional_data['file_unique_id'] = $file_unique_id;
|
220 |
+
if ( !$nofileupload ) $additional_data['file_size'] = $filesize;
|
221 |
$additional_data['user_id'] = $user->ID;
|
222 |
$additional_data['page_id'] = $params["pageid"];
|
223 |
+
if ( !$nofileupload ) $ret_data = apply_filters('wfu_before_file_check', $changable_data, $additional_data);
|
224 |
+
else $ret_data = apply_filters('wfu_before_data_submit', $changable_data, $additional_data);
|
225 |
+
if ( !$nofileupload ) $target_path = $ret_data['file_path'];
|
226 |
+
if ( !$nofileupload ) $only_filename = wfu_basename($target_path);
|
227 |
$userdata_fields = $ret_data['user_data'];
|
228 |
$filter_error_message = $ret_data['error_message'];
|
229 |
$filter_admin_message = $ret_data['admin_message'];
|
230 |
+
// if this is a file check, which means that a second pass of
|
231 |
+
// the file will follow, then we do not want to apply the
|
232 |
+
// filters again, so we store the changable data to session
|
233 |
+
// variables for this specific file
|
234 |
+
if ( $only_check && !$nofileupload ) {
|
235 |
$_SESSION[$file_map]['file_unique_id'] = $file_unique_id;
|
236 |
$_SESSION[$file_map]['filepath'] = $target_path;
|
237 |
$_SESSION[$file_map]['userdata'] = $userdata_fields;
|
272 |
$file_output['admin_messages'] = wfu_join_strings("<br />", $file_output['admin_messages'], WFU_ERROR_ADMIN_DOS_ATTACK);
|
273 |
}
|
274 |
else {
|
275 |
+
if ( !$nofileupload ) {
|
276 |
+
/* generate safe filename by removing invalid characters if forcefilename is deactivated */
|
277 |
+
if ( $params['forcefilename'] != "true" ) {
|
278 |
+
$only_filename = wfu_upload_plugin_clean( $only_filename );
|
279 |
+
//reconstruct target_path
|
280 |
+
$target_path = wfu_basedir($target_path).$only_filename;
|
281 |
+
}
|
282 |
|
283 |
+
/* if medialink or postlink is activated then the target path becomes the current wordpress upload folder */
|
284 |
+
if ( $params["medialink"] == "true" || $params["postlink"] == "true" ) {
|
285 |
+
$mediapath = wp_upload_dir();
|
286 |
+
$target_path = $mediapath['path'].'/'.$only_filename;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
}
|
288 |
+
/* Check if upload path exists */
|
289 |
if ( is_dir( wfu_basedir($target_path) ) ) {
|
290 |
$upload_path_ok = true;
|
291 |
}
|
292 |
+
/* Attempt to create path if user has selected to do so */
|
293 |
+
else if ( $params["createpath"] == "true" ) {
|
294 |
+
$wfu_create_directory_ret = wfu_create_directory(wfu_basedir($target_path), $params["accessmethod"], $params["ftpinfo"]);
|
295 |
+
if ( $wfu_create_directory_ret != "" ) {
|
296 |
+
$file_output['admin_messages'] = wfu_join_strings("<br />", $file_output['admin_messages'], $wfu_create_directory_ret);
|
297 |
+
}
|
298 |
+
if ( is_dir( wfu_basedir($target_path) ) ) {
|
299 |
+
$upload_path_ok = true;
|
|
|
|
|
|
|
300 |
}
|
301 |
}
|
302 |
|
303 |
+
/* File name control, reject files with .php, .js (and other) extensions for security reasons.
|
304 |
+
This is the first pass of extension control, which only checks the filename.
|
305 |
+
A second pass is performed after the file has completely uploaded, using WP inherent file
|
306 |
+
extension control, which provides better security. */
|
307 |
+
if ( !wfu_file_extension_blacklisted(strtolower($only_filename)) )
|
308 |
+
foreach ($allowed_patterns as $allowed_pattern) {
|
309 |
+
if ( wfu_file_extension_matches_pattern($allowed_pattern, strtolower($only_filename)) ) {
|
310 |
+
$allowed_file_ok = true;
|
311 |
+
break ;
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
+
/* File size control */
|
316 |
+
if ( $upload_file_size_MB <= $params["maxsize"] ) {
|
317 |
+
if ( $params['php_env'] == '32bit' && $upload_file_size > 2147483647 ) $size_file_phpenv_ok = false;
|
318 |
+
else $size_file_ok = true;
|
319 |
+
}
|
320 |
+
}
|
321 |
+
/* In case of no file upload then bypass above checks */
|
322 |
+
else {
|
323 |
+
$upload_path_ok = true;
|
324 |
+
$allowed_file_ok = true;
|
325 |
+
$size_file_ok = true;
|
326 |
}
|
327 |
|
328 |
if ( !$upload_path_ok or !$allowed_file_ok or !$size_file_ok ) {
|
367 |
// if ( $upload_path_ok and $allowed_file_ok and $size_file_ok ) {
|
368 |
if ( substr($file_output['message_type'], 0, 5) != "error" ) {
|
369 |
|
370 |
+
if ( is_uploaded_file($fileprops['tmp_name']) || $only_check || $nofileupload ) {
|
371 |
$source_path = $fileprops['tmp_name'];
|
372 |
|
373 |
+
if ( $only_check || $ignore_server_actions || $nofileupload ) $file_copied = true;
|
374 |
else {
|
375 |
$file_copied = false;
|
376 |
|
488 |
|
489 |
if ( $file_copied ) {
|
490 |
/* prepare email notification parameters if email notification is enabled */
|
491 |
+
if ( $params["notify"] == "true" && (!$only_check || $nofileupload) ) {
|
492 |
+
if ( !$nofileupload ) {
|
493 |
+
$notify_only_filename_list .= ( $notify_only_filename_list == "" ? "" : ", " ).$only_filename;
|
494 |
+
$notify_target_path_list .= ( $notify_target_path_list == "" ? "" : ", " ).$target_path;
|
495 |
+
if ( $params["attachfile"] == "true" )
|
496 |
+
$notify_attachment_list .= ( $notify_attachment_list == "" ? "" : "," ).$target_path;
|
497 |
+
}
|
498 |
}
|
499 |
|
500 |
/* prepare redirect link if redirection is enabled */
|
545 |
}
|
546 |
|
547 |
/* set success status of the file, to be used for medialink and post actions */
|
548 |
+
$file_finished_successfully = ( (!$only_check || $nofileupload) && ( $file_output['message_type'] == "success" || $file_output['message_type'] == "warning" ) );
|
549 |
/* set non-success status of the file, to be used for medialink and post actions */
|
550 |
$file_finished_unsuccessfully = ( substr($file_output['message_type'], 0, 5) == "error" );
|
551 |
|
552 |
|
553 |
/* perform custom actions after file is completely uploaded in order to determine if file is valid ir not */
|
554 |
+
if ( $file_finished_successfully && !$ignore_server_actions && !$nofileupload ) {
|
555 |
/* Here the second pass of file extension control is performed after the file has completely
|
556 |
uploaded, using WP inherent functions that determine the real extension from analyzing the
|
557 |
data and not from the filename extension. If this check reveals an extension which is not
|
639 |
$replace = array ($user_login, ( $user_email == "" ? "no email" : $user_email ), $only_filename, $target_path);
|
640 |
$file_output['header'] = preg_replace($search, $replace, $params['errormessage']);
|
641 |
/* prepare and prepend details of failed file upload, visible only to administrator */
|
642 |
+
if ( !$nofileupload ) $file_output['admin_messages'] = wfu_join_strings("<br />", preg_replace($search, $replace, WFU_FAILMESSAGE_DETAILS), $file_output['admin_messages']);
|
643 |
}
|
644 |
|
645 |
/* suppress again any admin messages if user is not administrator or adminmessages is not activated */
|
657 |
$changable_data['ret_value'] = null;
|
658 |
$changable_data['js_script'] = '';
|
659 |
$additional_data['shortcode_id'] = $sid;
|
660 |
+
$additional_data['unique_id'] = $unique_id;
|
661 |
+
if ( !$nofileupload ) $additional_data['file_unique_id'] = $file_unique_id;
|
662 |
+
if ( !$nofileupload ) $additional_data['upload_result'] = $file_output['message_type'];
|
663 |
+
else $additional_data['submit_result'] = $file_output['message_type'];
|
664 |
$additional_data['error_message'] = $file_output['message'];
|
665 |
$additional_data['admin_messages'] = $file_output['admin_messages'];
|
666 |
+
if ( !$nofileupload ) $ret_data = apply_filters('wfu_after_file_upload', $changable_data, $additional_data);
|
667 |
+
else $ret_data = apply_filters('wfu_after_data_submit', $changable_data, $additional_data);
|
668 |
$params_output_array["general"]['js_script'] = $ret_data['js_script'];
|
669 |
// do_action('wfu_after_file_upload', $file_unique_id, $file_output['message_type'], $file_output['message'], $file_output['admin_messages']);
|
670 |
}
|
671 |
|
672 |
if ( $file_finished_successfully && !$ignore_server_actions ) {
|
673 |
+
/* Log file upload action if file has finished uploading
|
674 |
+
uccessfully. If this is a no file upload then log action will be
|
675 |
+
datasubmit. */
|
676 |
+
if ( !$nofileupload ) $fileid = wfu_log_action('upload', $target_path, $user->ID, $unique_id, $params['pageid'], $params['blogid'], $sid, $userdata_fields);
|
677 |
+
else $fileid = wfu_log_action('datasubmit', '', $user->ID, $unique_id, $params['pageid'], $params['blogid'], $sid, $userdata_fields);
|
678 |
/* Apply wfu_after_file_upload filter after failed upload, in order to allow the user to perform any post-upload actions.
|
679 |
If additional data are required, such as user_id or userdata values or filepath, they can be retrieved by implementing
|
680 |
the previous filters wfu_before_file_check and wfu_before_file_upload, corresponding them to the unique file id.
|
684 |
$changable_data['ret_value'] = null;
|
685 |
$changable_data['js_script'] = '';
|
686 |
$additional_data['shortcode_id'] = $sid;
|
687 |
+
$additional_data['unique_id'] = $unique_id;
|
688 |
+
if ( !$nofileupload ) $additional_data['file_unique_id'] = $file_unique_id;
|
689 |
+
if ( !$nofileupload ) $additional_data['upload_result'] = $file_output['message_type'];
|
690 |
+
else $additional_data['submit_result'] = $file_output['message_type'];
|
691 |
$additional_data['error_message'] = $file_output['message'];
|
692 |
$additional_data['admin_messages'] = $file_output['admin_messages'];
|
693 |
+
if ( !$nofileupload ) $ret_data = apply_filters('wfu_after_file_upload', $changable_data, $additional_data);
|
694 |
+
else $ret_data = apply_filters('wfu_after_data_submit', $changable_data, $additional_data);
|
695 |
$params_output_array["general"]['js_script'] = $ret_data['js_script'];
|
696 |
// do_action('wfu_after_file_upload', $file_unique_id, $file_output['message_type'], $file_output['message'], $file_output['admin_messages']);
|
697 |
}
|
698 |
|
699 |
/* add file to Media or attach file to current post if any of these options is activated and the file has finished uploading successfully */
|
700 |
+
if ( ( $params["medialink"] == "true" || $params["postlink"] == "true" ) && $file_finished_successfully && !$ignore_server_actions && !$nofileupload ) {
|
701 |
$pageid = ( $params["postlink"] == "true" ? $params['pageid'] : 0 );
|
702 |
wfu_process_media_insert($target_path, $userdata_fields, $pageid);
|
703 |
}
|
706 |
use by after_upload filters */
|
707 |
$real_file_index = $single_file_index;
|
708 |
if ( $single_file_index == -1 ) $real_file_index = $i;
|
709 |
+
if ( ( $file_finished_successfully || $file_finished_unsuccessfully ) && isset($_SESSION["filedata_".$unique_id][$real_file_index]) && !$ignore_server_actions && !$nofileupload ) {
|
710 |
$_SESSION["filedata_".$unique_id][$real_file_index]["filepath"] = $target_path;
|
711 |
$_SESSION["filedata_".$unique_id][$real_file_index]["user_data"] = $userdata_fields;
|
712 |
$_SESSION["filedata_".$unique_id][$real_file_index]["upload_result"] = $file_output['message_type'];
|
716 |
}
|
717 |
|
718 |
// in case of file check set files_count to 0 in order to denote that the file was not really uploaded
|
719 |
+
if ( $only_check && !$nofileupload ) $params_output_array["general"]['files_count'] = 0;
|
720 |
|
721 |
$somefiles_Ok = ( ( $warning_count + $success_count ) > 0 );
|
722 |
$allfiles_Ok = ( $somefiles_Ok && ( $error_count == 0 ) );
|
723 |
|
724 |
/* Prepare WPFileBase Plugin update url, if this option has been selected and only if at least one file has been successfully uploaded.
|
725 |
Execution will happen only if accumulated $params_output_array["general"]['update_wpfilebase'] is not empty */
|
726 |
+
if ( $params["filebaselink"] == "true" && !$nofileupload ) {
|
727 |
if ( $somefiles_Ok ) {
|
728 |
$filebaseurl = site_url();
|
729 |
if ( substr($filebaseurl, -1, 1) == "/" ) $filebaseurl = substr($filebaseurl, 0, strlen($filebaseurl) - 1);
|
756 |
else {
|
757 |
/* if the following variable is not empty, then email notification must be sent
|
758 |
and any admin messages must be suppressed */
|
759 |
+
$params_output_array["general"]['notify_only_filename_list'] = ( !$nofileupload ? $notify_only_filename_list : "dummy.txt" );
|
760 |
$params_output_array["general"]['notify_target_path_list'] = $notify_target_path_list;
|
761 |
$params_output_array["general"]['notify_attachment_list'] = $notify_attachment_list;
|
762 |
}
|
794 |
}
|
795 |
|
796 |
/* Calculate upload state from file results */
|
797 |
+
if ( $allfiles_Ok && ( $warning_count == 0 ) ) $params_output_array["general"]['state'] = ( !$nofileupload ? 4 : 14 );
|
798 |
else if ( $allfiles_Ok ) $params_output_array["general"]['state'] = 5;
|
799 |
else if ( $somefiles_Ok ) $params_output_array["general"]['state'] = 6; //only valid in no-ajax method
|
800 |
+
else if ( !$somefiles_Ok && $error_count > 0 ) $params_output_array["general"]['state'] = ( !$nofileupload ? 7 : 15 );
|
801 |
else $params_output_array["general"]['state'] = 8;
|
802 |
|
803 |
/* construct safe output */
|
lib/wfu_security.php
CHANGED
@@ -18,6 +18,7 @@ $wfu_extension_blacklist = array( "2clk" => 1, "386" => 1, "3dfbat" => 1, "3dm"
|
|
18 |
* @return bool whether any of the file extensions is blacklisted or not
|
19 |
*/
|
20 |
function wfu_file_extension_blacklisted($filename) {
|
|
|
21 |
global $wfu_extension_blacklist;
|
22 |
//extract and check extensions from filename
|
23 |
$parts = explode(".", $filename);
|
@@ -42,6 +43,7 @@ function wfu_file_extension_blacklisted($filename) {
|
|
42 |
* @details Details
|
43 |
*/
|
44 |
function wfu_file_extension_whitelisted($filename) {
|
|
|
45 |
$whitelist = array( "1st" => 1, "264" => 1, "3g2" => 1, "3ga" => 1, "3gp" => 1, "aac" => 1, "abw" => 1, "ai" => 1, "aiff" => 1, "amr" => 1, "ape" => 1, "arf" => 1, "asf" => 1, "asx" => 1, "avi" => 1, "aww" => 1, "bik" => 1, "bmp" => 1, "cda" => 1, "cdr" => 1, "csv" => 1, "dash" => 1, "dat" => 1, "dds" => 1, "dib" => 1, "djvu" => 1, "dng" => 1, "doc" => 1, "docx" => 1, "drw" => 1, "dt2" => 1, "dvf" => 1, "dvr" => 1, "emf" => 1, "emz" => 1, "eng" => 1, "epub" => 1, "file" => 1, "flac" => 1, "gif" => 1, "gp4" => 1, "gp5" => 1, "gpx" => 1, "h264" => 1, "ind" => 1, "indd" => 1, "jpeg" => 1, "jpg" => 1, "key" => 1, "log" => 1, "logic" => 1, "lrc" => 1, "m2t" => 1, "m2ts" => 1, "m4a" => 1, "m4b" => 1, "m4p" => 1, "m4v" => 1, "midi" => 1, "mkv" => 1, "mov" => 1, "mp3" => 1, "mp4" => 1, "mpeg" => 1, "mpg" => 1, "mpp" => 1, "mpt" => 1, "mts" => 1, "nfo" => 1, "odf" => 1, "odg" => 1, "ods" => 1, "odt" => 1, "ogg" => 1, "ogv" => 1, "ott" => 1, "oxps" => 1, "pages" => 1, "pcm" => 1, "pdf" => 1, "pic" => 1, "plist" => 1, "pmd" => 1, "png" => 1, "pot" => 1, "potx" => 1, "pps" => 1, "ppsx" => 1, "ppt" => 1, "pptx" => 1, "prn" => 1, "ps" => 1, "psd" => 1, "psdx" => 1, "pts" => 1, "pub" => 1, "pwi" => 1, "raw" => 1, "rec" => 1, "rep" => 1, "rmvb" => 1, "rtf" => 1, "sdd" => 1, "sdw" => 1, "snd" => 1, "sng" => 1, "snp" => 1, "sub" => 1, "sxw" => 1, "tbl" => 1, "tga" => 1, "tif" => 1, "tiff" => 1, "tod" => 1, "tp" => 1, "ts" => 1, "txt" => 1, "uax" => 1, "vob" => 1, "vsd" => 1, "wav" => 1, "wbmp" => 1, "wdp" => 1, "wlmp" => 1, "wma" => 1, "wmv" => 1, "wpd" => 1, "wpl" => 1, "wps" => 1, "wri" => 1, "xls" => 1, "xlsx" => 1, "xps" => 1, "zab" => 1 );
|
46 |
//extract and check extension from filename
|
47 |
$ext = wfu_fileext($filename);
|
@@ -71,6 +73,7 @@ function wfu_file_extension_whitelisted($filename) {
|
|
71 |
* @return bool whether the pattern is wide or not
|
72 |
*/
|
73 |
function wfu_is_pattern_wide($pattern) {
|
|
|
74 |
$in_brackets = false;
|
75 |
$pos = -1;
|
76 |
$asterisk_count = 0;
|
@@ -163,6 +166,7 @@ function wfu_file_extension_matches_pattern($pattern, $filename) {
|
|
163 |
* @return bool whether this is a Denial-Of-Service (DOS) attack or not.
|
164 |
*/
|
165 |
function wfu_check_DOS_attack() {
|
|
|
166 |
global $wpdb;
|
167 |
$DOS_attack = false;
|
168 |
$now = time();
|
18 |
* @return bool whether any of the file extensions is blacklisted or not
|
19 |
*/
|
20 |
function wfu_file_extension_blacklisted($filename) {
|
21 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
22 |
global $wfu_extension_blacklist;
|
23 |
//extract and check extensions from filename
|
24 |
$parts = explode(".", $filename);
|
43 |
* @details Details
|
44 |
*/
|
45 |
function wfu_file_extension_whitelisted($filename) {
|
46 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
47 |
$whitelist = array( "1st" => 1, "264" => 1, "3g2" => 1, "3ga" => 1, "3gp" => 1, "aac" => 1, "abw" => 1, "ai" => 1, "aiff" => 1, "amr" => 1, "ape" => 1, "arf" => 1, "asf" => 1, "asx" => 1, "avi" => 1, "aww" => 1, "bik" => 1, "bmp" => 1, "cda" => 1, "cdr" => 1, "csv" => 1, "dash" => 1, "dat" => 1, "dds" => 1, "dib" => 1, "djvu" => 1, "dng" => 1, "doc" => 1, "docx" => 1, "drw" => 1, "dt2" => 1, "dvf" => 1, "dvr" => 1, "emf" => 1, "emz" => 1, "eng" => 1, "epub" => 1, "file" => 1, "flac" => 1, "gif" => 1, "gp4" => 1, "gp5" => 1, "gpx" => 1, "h264" => 1, "ind" => 1, "indd" => 1, "jpeg" => 1, "jpg" => 1, "key" => 1, "log" => 1, "logic" => 1, "lrc" => 1, "m2t" => 1, "m2ts" => 1, "m4a" => 1, "m4b" => 1, "m4p" => 1, "m4v" => 1, "midi" => 1, "mkv" => 1, "mov" => 1, "mp3" => 1, "mp4" => 1, "mpeg" => 1, "mpg" => 1, "mpp" => 1, "mpt" => 1, "mts" => 1, "nfo" => 1, "odf" => 1, "odg" => 1, "ods" => 1, "odt" => 1, "ogg" => 1, "ogv" => 1, "ott" => 1, "oxps" => 1, "pages" => 1, "pcm" => 1, "pdf" => 1, "pic" => 1, "plist" => 1, "pmd" => 1, "png" => 1, "pot" => 1, "potx" => 1, "pps" => 1, "ppsx" => 1, "ppt" => 1, "pptx" => 1, "prn" => 1, "ps" => 1, "psd" => 1, "psdx" => 1, "pts" => 1, "pub" => 1, "pwi" => 1, "raw" => 1, "rec" => 1, "rep" => 1, "rmvb" => 1, "rtf" => 1, "sdd" => 1, "sdw" => 1, "snd" => 1, "sng" => 1, "snp" => 1, "sub" => 1, "sxw" => 1, "tbl" => 1, "tga" => 1, "tif" => 1, "tiff" => 1, "tod" => 1, "tp" => 1, "ts" => 1, "txt" => 1, "uax" => 1, "vob" => 1, "vsd" => 1, "wav" => 1, "wbmp" => 1, "wdp" => 1, "wlmp" => 1, "wma" => 1, "wmv" => 1, "wpd" => 1, "wpl" => 1, "wps" => 1, "wri" => 1, "xls" => 1, "xlsx" => 1, "xps" => 1, "zab" => 1 );
|
48 |
//extract and check extension from filename
|
49 |
$ext = wfu_fileext($filename);
|
73 |
* @return bool whether the pattern is wide or not
|
74 |
*/
|
75 |
function wfu_is_pattern_wide($pattern) {
|
76 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
77 |
$in_brackets = false;
|
78 |
$pos = -1;
|
79 |
$asterisk_count = 0;
|
166 |
* @return bool whether this is a Denial-Of-Service (DOS) attack or not.
|
167 |
*/
|
168 |
function wfu_check_DOS_attack() {
|
169 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
170 |
global $wpdb;
|
171 |
$DOS_attack = false;
|
172 |
$now = time();
|
readme.txt
CHANGED
@@ -3,23 +3,25 @@ Contributors: nickboss
|
|
3 |
Donate link: http://www.iptanus.com/support/wordpress-file-upload
|
4 |
Tags: ajax, captcha, filter, form, html5, notification, page, plugin, post, redirect, responsive, shortcode, sidebar, upload, widget
|
5 |
Requires at least: 2.9.2
|
6 |
-
Tested up to: 4.
|
7 |
Stable tag: "trunk"
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
Simple yet very powerful plugin to allow users to upload files to your website from any page and manage the uploaded files
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
With this plugin you or other users can upload files to your site from any page, easily and securely.
|
16 |
|
17 |
-
Simply put the shortcode [wordpress_file_upload] to the contents of any WordPress page and you will be able to upload files to any directory inside wp-contents of your WordPress site.
|
18 |
|
19 |
You can add custom fields to submit additional data together with the uploaded file.
|
20 |
|
21 |
You can use it to capture screenshots or video from your webcam and upload it to the website (for browsers that support this feature).
|
22 |
|
|
|
|
|
23 |
The plugin includes a file browser to access and manage the uploaded files from the Dashboard (only for admins currently).
|
24 |
|
25 |
Several filters and actions before and after file upload enable extension of its capabilities.
|
@@ -30,6 +32,7 @@ The characteristics of the plugin are:
|
|
30 |
* It can be added in posts, pages or sidebars (as a widget).
|
31 |
* It can capture and upload screenshots or video from the device's camera.
|
32 |
* It supports additional form fields (like checkboxes, text fields, email fields, dropdown lists etc).
|
|
|
33 |
* It produces notification messages and e-mails.
|
34 |
* It supports selection of destination folder from a list of subfolders.
|
35 |
* Upload progress can be monitored with a progress bar.
|
@@ -53,6 +56,7 @@ The plugin is translated in the following languages:
|
|
53 |
* Spanish, kindly provided by Marton
|
54 |
* Italian, kindly provided by Enrico Marcolini https://www.marcuz.it/
|
55 |
* Polish
|
|
|
56 |
* Greek
|
57 |
|
58 |
Please note that old desktop browsers or mobile browsers may not support all of the above functionalities. In order to get full functionality use the latest versions browsers, supporting HTML5, AJAX and CSS3.
|
@@ -139,6 +143,20 @@ There is an option in plugin's settings in Dashboard to relax the CSS rules, so
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
= 3.10.0 =
|
143 |
* an alternative Iptanus server is launched in Google Cloud for resolving the notorious error "file_get_contents(https://services2.iptanus.com/wp-admin/admin-ajax.php): failed to open stream: Connection timed out."
|
144 |
* added option 'Use Alternative Iptanus Server' in Settings to switch to the alternative Iptanus Server
|
@@ -650,6 +668,12 @@ Initial version.
|
|
650 |
|
651 |
== Upgrade Notice ==
|
652 |
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
= 3.9.6 =
|
654 |
Update to introduce some new features.
|
655 |
|
3 |
Donate link: http://www.iptanus.com/support/wordpress-file-upload
|
4 |
Tags: ajax, captcha, filter, form, html5, notification, page, plugin, post, redirect, responsive, shortcode, sidebar, upload, widget
|
5 |
Requires at least: 2.9.2
|
6 |
+
Tested up to: 4.7.4
|
7 |
Stable tag: "trunk"
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Simple yet very powerful plugin to allow users to upload files to your website from any page, post or sidebar and manage the uploaded files
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
With this plugin you or other users can upload files to your site from any page, post or sidebar easily and securely.
|
16 |
|
17 |
+
Simply put the shortcode [wordpress_file_upload] to the contents of any WordPress page / post or add the plugin's widget in any sidebar and you will be able to upload files to any directory inside wp-contents of your WordPress site.
|
18 |
|
19 |
You can add custom fields to submit additional data together with the uploaded file.
|
20 |
|
21 |
You can use it to capture screenshots or video from your webcam and upload it to the website (for browsers that support this feature).
|
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.
|
32 |
* It can be added in posts, pages or sidebars (as a widget).
|
33 |
* It can capture and upload screenshots or video from the device's camera.
|
34 |
* It supports additional form fields (like checkboxes, text fields, email fields, dropdown lists etc).
|
35 |
+
* It can be used as a simple contact form to submit data (a selection of file can be optional).
|
36 |
* It produces notification messages and e-mails.
|
37 |
* It supports selection of destination folder from a list of subfolders.
|
38 |
* Upload progress can be monitored with a progress bar.
|
56 |
* Spanish, kindly provided by Marton
|
57 |
* Italian, kindly provided by Enrico Marcolini https://www.marcuz.it/
|
58 |
* Polish
|
59 |
+
* Swedish, kindly provided by Leif Persson
|
60 |
* Greek
|
61 |
|
62 |
Please note that old desktop browsers or mobile browsers may not support all of the above functionalities. In order to get full functionality use the latest versions browsers, supporting HTML5, AJAX and CSS3.
|
143 |
|
144 |
== Changelog ==
|
145 |
|
146 |
+
= 3.11.0 =
|
147 |
+
* added the ability to submit the upload form without a file, just like a contact form
|
148 |
+
* added attribute allownofile in uploader shortcode; if enabled then the upload form can be submitted without selection of a file
|
149 |
+
* added wfu_before_data_submit and wfu_after_data_submit filters which are invoked when the upload form is submitted without a file
|
150 |
+
* added advanced debug options for more comprehensive and deep troubleshooting
|
151 |
+
* added internal filters for advanced hooking of ajax handlers
|
152 |
+
* fixed several security problems
|
153 |
+
* fixed bug that was generating an error when automatic subfolders were activated and the upload folder did not exist
|
154 |
+
* corrected bug where single quote, double quote and backslash characters in user fields were not saved correctly (they were escaped)
|
155 |
+
* fixed bug where any changes made to the user data (e.g. through a filter) were not included in the email message
|
156 |
+
* added unique_id variable in wfu_before_file_check and wfu_after_file_upload filters
|
157 |
+
* changed column titles in the tables of plugin instances in Main tab in Dashboard
|
158 |
+
* fixed bug where if a user field was modified from the file editor, custom columns were changing order
|
159 |
+
|
160 |
= 3.10.0 =
|
161 |
* an alternative Iptanus server is launched in Google Cloud for resolving the notorious error "file_get_contents(https://services2.iptanus.com/wp-admin/admin-ajax.php): failed to open stream: Connection timed out."
|
162 |
* added option 'Use Alternative Iptanus Server' in Settings to switch to the alternative Iptanus Server
|
668 |
|
669 |
== Upgrade Notice ==
|
670 |
|
671 |
+
= 3.11.0 =
|
672 |
+
Update to introduce some new features and fix some bugs.
|
673 |
+
|
674 |
+
= 3.10.0 =
|
675 |
+
Update to introduce some new features and fix some bugs.
|
676 |
+
|
677 |
= 3.9.6 =
|
678 |
Update to introduce some new features.
|
679 |
|
release_notes.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
1 |
-
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<span><strong>Latest release notes: </strong>This version addresses a request of many users, the ability to <span style="text-decoration:underline">submit the upload form without a file</span><span>, just like a contact (or any other type of) form. To do this, a new attribute has been added, <strong>allownofile</strong>, in the uploader shortcode. When this attribute is activated, then the file is optional and the form can be submitted (by pressing the Upload File button) even if a file has not been selected. When a form is submitted without a file, then the plugin adjusts its behaviour (e.g. progress bars are not shown, the messages change etc.). Features such as <em>captcha</em>, <em>email notifications</em>, <em>redirections</em> continue to work normally.</span><br /><br />
|
2 |
|
3 |
+
<span>To enable extensibility to the new feature two new filters have been introduced, <strong>wfu_before_data_submit</strong> and <strong>wfu_after_data_submit</strong> working only when the upload form is submitted without a file. The first one runs before the submitted data are saved and before any plugin checks, in order to allow a custom script to perform additional checks, change the data or cancel the upload. The second one runs after the submitted data are saved, in order to allow a custom script to perform post-submittal PHP actions or run custom Javascript code on the user's browser.</span><br /><br />
|
4 |
+
|
5 |
+
<span>Another new feature of this version is <span style="text-decoration:underline">extended scripting capabilities</span><span>. They are not visible to normal users, however they are very useful for performing <strong>deep troubleshooting and debugging</strong> as well as <strong>advanced customizations</strong> for tailoring the plugin to user's needs and custom requests.</span><br /><br />
|
6 |
+
|
7 |
+
<span>Furtermore, this version contains several bug fixes.</span><br /><br />
|
8 |
+
|
9 |
+
<span>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>
|
vendor/datetimepicker/jquery-ui-timepicker-addon.min.css
CHANGED
@@ -1,3 +1 @@
|
|
1 |
-
|
2 |
-
* http://trentrichardson.com/examples/timepicker
|
3 |
-
* Copyright (c) 2015 Trent Richardson; Licensed MIT */.ui-timepicker-div .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,.ui-timepicker-div.ui-timepicker-oneLine dt{display:none}.ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}.ui-timepicker-div.ui-timepicker-oneLine{padding-right:2px}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label{display:block;padding-top:2px}.ui-timepicker-div.ui-timepicker-oneLine dl{text-align:right}.ui-timepicker-div.ui-timepicker-oneLine dl dd,.ui-timepicker-div.ui-timepicker-oneLine dl dd>div{display:inline-block;margin:0}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before{content:':';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before{content:'.';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{display:none}
|
1 |
+
.ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-div .ui_tpicker_unit_hide{display:none}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}.ui-timepicker-div.ui-timepicker-oneLine{padding-right:2px}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,.ui-timepicker-div.ui-timepicker-oneLine dt{display:none}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label{display:block;padding-top:2px}.ui-timepicker-div.ui-timepicker-oneLine dl{text-align:right}.ui-timepicker-div.ui-timepicker-oneLine dl dd,.ui-timepicker-div.ui-timepicker-oneLine dl dd>div{display:inline-block;margin:0}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before{content:':';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before{content:'.';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{display:none}
|
|
|
|
vendor/datetimepicker/jquery-ui-timepicker-addon.min.js
CHANGED
@@ -1,83 +1 @@
|
|
1 |
-
/*
|
2 |
-
jQuery Timepicker Addon - v1.5.5 - 2015-05-24
|
3 |
-
http://trentrichardson.com/examples/timepicker
|
4 |
-
Copyright (c) 2015 Trent Richardson; Licensed MIT */
|
5 |
-
(function(e){"function"==typeof define&&define.amd?define(["jquery","jquery.ui"],e):e(jQuery)})(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.5.5"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",
|
6 |
-
microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,
|
7 |
-
maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",oneLine:!1,defaultValue:null,parse:"strict",afterInject:null},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,
|
8 |
-
{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",
|
9 |
-
formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=
|
10 |
-
attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],
|
11 |
-
e,t,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||this._defaults[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:
|
12 |
-
"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&$.ui.slider===void 0&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,
|
13 |
-
660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*
|
14 |
-
(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:
|
15 |
-
tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:
|
16 |
-
tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),tp_inst._defaults.altRedirectFocus===!0&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&
|
17 |
-
tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof
|
18 |
-
Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=$.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),
|
19 |
-
t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(a){return $.timepicker.log("Error parsing the date/time string: "+a+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return n?
|
20 |
-
($.extend(this,n),!0):!1},_afterInject:function(){var e=this.inst.settings;$.isFunction(e.afterInject)&&e.afterInject.call(this)},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",a="",n=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=" ui_tpicker_unit_hide",d='<div class="ui-timepicker-div'+(t.isRTL?" ui-timepicker-rtl":"")+(t.oneLine&&"select"===t.controlType?" ui-timepicker-oneLine":"")+'"><dl>'+'<dt class="ui_tpicker_time_label'+
|
21 |
-
(t.showTime?"":m)+'">'+t.timeText+"</dt>"+'<dd class="ui_tpicker_time '+(t.showTime?"":m)+'"></dd>';for(c=0,u=this.units.length;u>c;c++){if(s=this.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+a],10),l[s]=0,d+='<dt class="ui_tpicker_'+s+"_label"+(n?"":m)+'">'+t[s+"Text"]+"</dt>"+'<dd class="ui_tpicker_'+s+(n?"":m)+'"><div class="ui_tpicker_'+s+"_slider"+(n?"":m)+'"></div>',n&&t[s+"Grid"]>
|
22 |
-
0){if(d+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===s)for(var h=t[s+"Min"];r[s]>=h;h+=parseInt(t[s+"Grid"],10)){l[s]++;var p=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},t);d+='<td data-for="'+s+'">'+p+"</td>"}else for(var _=t[s+"Min"];r[s]>=_;_+=parseInt(t[s+"Grid"],10))l[s]++,d+='<td data-for="'+s+'">'+(10>_?"0":"")+_+"</td>";d+="</tr></table></div>"}d+="</dd>"}var f=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='<dt class="ui_tpicker_timezone_label'+
|
23 |
-
(f?"":m)+'">'+t.timezoneText+"</dt>",d+='<dd class="ui_tpicker_timezone'+(f?"":m)+'"></dd>',d+="</dl></div>";var g=$(d);for(t.timeOnly===!0&&(g.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+t.timeOnlyTitle+"</div>"+"</div>"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)s=i.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],i[s+"_slider"]=i.control.create(i,
|
24 |
-
g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+a]),n&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),a=parseInt(t.replace(/[^0-9]/g),10),n=t.replace(/[^apm]/gi),r=e.data("for");"hour"===r&&(-1!==n.indexOf("p")&&12>a?a+=12:-1!==n.indexOf("a")&&12===a&&(a=0)),i.control.value(i,
|
25 |
-
i[r+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),this.timezone!==void 0&&null!==this.timezone&&""!==this.timezone){var M=-1*(new Date(this.inst.selectedYear,
|
26 |
-
this.inst.selectedMonth,this.inst.selectedDay,12)).getTimezoneOffset();M===this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else this.hour!==void 0&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler(),i._afterInject()});var v=e.find(".ui-datepicker-buttonpane");if(v.length?v.before(g):e.append(g),this.$timeObj=g.find(".ui_tpicker_time"),null!==this.inst){var k=
|
27 |
-
this.timeDefined;this._onTimeChange(),this.timeDefined=k}if(this._defaults.addSliderAccess){var T=this._defaults.sliderAccessArgs,D=this._defaults.isRTL;T.isRTL=D,setTimeout(function(){if(0===g.find(".ui-slider-access").length){g.find(".ui-slider:visible").sliderAccess(T);var e=g.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&g.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),s=(""+t.css(D?"marginRight":"marginLeft")).replace("%",""),a=i-e,n=s*a/i+"%",r={width:a,marginRight:0,
|
28 |
-
marginLeft:0};r[D?"marginRight":"marginLeft"]=n,t.css(r)})}},10)}i._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,s=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&s){var a=$.datepicker._get(e,"minDateTime"),n=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||
|
29 |
-
null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||n.getTime()===s.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?
|
30 |
-
(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=
|
31 |
-
this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=
|
32 |
-
this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(e,"maxDateTime")&&void 0!==$.datepicker._get(e,"maxDateTime")&&s){var r=$.datepicker._get(e,"maxDateTime"),l=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);(null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=
|
33 |
-
i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),e.settings.timeOnly||l.getTime()===s.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?
|
34 |
-
(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,
|
35 |
-
this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,
|
36 |
-
this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==e.settings.minTime){var o=new Date("01/01/1970 "+e.settings.minTime);this.hour<o.getHours()?(this.hour=this._defaults.hourMin=o.getHours(),this.minute=this._defaults.minuteMin=o.getMinutes()):this.hour===o.getHours()&&this.minute<o.getMinutes()?this.minute=this._defaults.minuteMin=o.getMinutes():this._defaults.hourMin<o.getHours()?(this._defaults.hourMin=o.getHours(),this._defaults.minuteMin=o.getMinutes()):this._defaults.minuteMin=this._defaults.hourMin===
|
37 |
-
o.getHours()===this.hour&&this._defaults.minuteMin<o.getMinutes()?o.getMinutes():0}if(null!==e.settings.maxTime){var c=new Date("01/01/1970 "+e.settings.maxTime);this.hour>c.getHours()?(this.hour=this._defaults.hourMax=c.getHours(),this.minute=this._defaults.minuteMax=c.getMinutes()):this.hour===c.getHours()&&this.minute>c.getMinutes()?this.minute=this._defaults.minuteMax=c.getMinutes():this._defaults.hourMax>c.getHours()?(this._defaults.hourMax=c.getHours(),this._defaults.minuteMax=c.getMinutes()):
|
38 |
-
this._defaults.minuteMax=this._defaults.hourMax===c.getHours()===this.hour&&this._defaults.minuteMax>c.getMinutes()?c.getMinutes():59}if(void 0!==t&&t===!0){var u=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),m=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),d=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,
|
39 |
-
10),h=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),p=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:u,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&
|
40 |
-
(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:m,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:d,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,
|
41 |
-
this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:h,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:p,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var e=
|
42 |
-
this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,t=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,s=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,a=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,n=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,l=r.pickerTimeFormat||r.timeFormat,o=r.pickerTimeSuffix||
|
43 |
-
r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof s&&(s=!1),"object"==typeof a&&(a=!1),"object"==typeof n&&(n=!1),e!==!1&&(e=parseInt(e,10)),t!==!1&&(t=parseInt(t,10)),i!==!1&&(i=parseInt(i,10)),s!==!1&&(s=parseInt(s,10)),a!==!1&&(a=parseInt(a,10)),n!==!1&&(n=""+n);var c=r[12>e?"amNames":"pmNames"][0],u=e!==parseInt(this.hour,10)||t!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||s!==parseInt(this.millisec,10)||a!==parseInt(this.microsec,
|
44 |
-
10)||this.ampm.length>0&&12>e!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&n!==""+this.timezone;u&&(e!==!1&&(this.hour=e),t!==!1&&(this.minute=t),i!==!1&&(this.second=i),s!==!1&&(this.millisec=s),a!==!1&&(this.microsec=a),n!==!1&&(this.timezone=n),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&(l===
|
45 |
-
r.timeFormat?this.$timeObj.text(this.formattedTime+o):this.$timeObj.text($.datepicker.formatTime(l,this,r)+o)),this.timeDefined=!0,u&&this._updateDateTime()}},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){e=this.inst||e;var t=e.currentYear>0?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=
|
46 |
-
$.datepicker._daylightSavingAdjust(t),s=$.datepicker._get(e,"dateFormat"),a=$.datepicker._getFormatConfig(e),n=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(s,null===i?new Date:i,a);var r=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!1?r=this.formattedTime:(this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||n)||this._defaults.timeOnly===
|
47 |
-
!0&&this._defaults.timeOnlyShowDate===!0)&&(r+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=r,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(r);var l="",o=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,c=null!==this._defaults.altTimeSuffix?
|
48 |
-
this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(l=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate,l&&(l+=o)),l+=null!==this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+c:this.formattedTime+c,this.$altInput.val(l)}else this.$input.val(r);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&
|
49 |
-
this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(e,t,i,s,a,n,r){var l=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:l?-1*s:s,min:l?-1*n:a,max:l?-1*a:n,step:r,slide:function(t,s){e.control.value(e,
|
50 |
-
$(this),i,l?-1*s.value:s.value),e._onTimeChange()},stop:function(){e._onSelectHandler()}})},options:function(e,t,i,s,a){if(e._defaults.isRTL){if("string"==typeof s)return"min"===s||"max"===s?void 0!==a?t.slider(s,-1*a):Math.abs(t.slider(s)):t.slider(s);var n=s.min,r=s.max;return s.min=s.max=null,void 0!==n&&(s.max=-1*n),void 0!==r&&(s.min=-1*r),t.slider(s)}return"string"==typeof s&&void 0!==a?t.slider(s,a):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*
|
51 |
-
s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,a,n,r){for(var l='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+a+'" data-max="'+n+'" data-step="'+r+'">',o=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=a;n>=c;c+=r)l+='<option value="'+c+'"'+(c===s?" selected":"")+">",l+="hour"===i?$.datepicker.formatTime($.trim(o.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"===
|
52 |
-
i||"microsec"===i||c>=10?c:"0"+(""+c),l+="</option>";return l+="</select>",t.children("select").remove(),$(l).appendTo(t).change(function(){e._onTimeChange(),e._onSelectHandler(),e._afterInject()}),t},options:function(e,t,i,s,a){var n={},r=t.children("select");if("string"==typeof s){if(void 0===a)return r.data(s);n[s]=a}else n=s;return e.control.create(e,t,r.data("unit"),r.val(),n.min>=0?n.min:r.data("min"),n.max||r.data("max"),n.step||r.data("step"))},value:function(e,t,i,s){var a=t.children("select");
|
53 |
-
return void 0!==s?a.val(s):a.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){e=e||{};var t=arguments;return"string"==typeof e?"getDate"===e||"option"===e&&2===t.length&&"string"==typeof t[1]?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=
|
54 |
-
$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,s,a){var n=parseDateTimeInternal(e,t,i,s,a);if(n.timeObj){var r=n.timeObj;n.date.setHours(r.hour,r.minute,r.second,r.millisec),n.date.setMicroseconds(r.microsec)}return n.date},$.datepicker.parseTime=function(e,t,i){var s=extendRemove(extendRemove({},$.timepicker._defaults),i||{});-1!==e.replace(/\'.*?\'/g,"").indexOf("Z");var a=function(e,t,i){var s,a=function(e,t){var i=[];return e&&$.merge(i,
|
55 |
-
e),t&&$.merge(i,t),i=$.map(i,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},n=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var s=0;t.length>s;s++)-1===i[(""+t[s]).charAt(0)]&&(i[(""+t[s]).charAt(0)]=s+1);return i},r="^"+(""+e).replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t=e.length;switch(e.charAt(0).toLowerCase()){case "h":return 1===t?"(\\d?\\d)":
|
56 |
-
"(\\d{"+t+"})";case "m":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case "s":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case "l":return"(\\d?\\d?\\d)";case "c":return"(\\d?\\d?\\d)";case "z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case "t":return a(i.amNames,i.pmNames);default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",l=n(e),o="";s=t.match(RegExp(r,"i"));var c={hour:0,minute:0,second:0,millisec:0,
|
57 |
-
microsec:0};return s?(-1!==l.t&&(void 0===s[l.t]||0===s[l.t].length?(o="",c.ampm=""):(o=-1!==$.inArray(s[l.t].toUpperCase(),$.map(i.amNames,function(e){return e.toUpperCase()}))?"AM":"PM",c.ampm=i["AM"===o?"amNames":"pmNames"][0])),-1!==l.h&&(c.hour="AM"===o&&"12"===s[l.h]?0:"PM"===o&&"12"!==s[l.h]?parseInt(s[l.h],10)+12:Number(s[l.h])),-1!==l.m&&(c.minute=Number(s[l.m])),-1!==l.s&&(c.second=Number(s[l.s])),-1!==l.l&&(c.millisec=Number(s[l.l])),-1!==l.c&&(c.microsec=Number(s[l.c])),-1!==l.z&&void 0!==
|
58 |
-
s[l.z]&&(c.timezone=$.timepicker.timezoneOffsetNumber(s[l.z])),c):!1},n=function(e,t,i){try{var s=new Date("2012-01-01 "+t);if(isNaN(s.getTime())&&(s=new Date("2012-01-01T"+t),isNaN(s.getTime())&&(s=new Date("01/01/2012 "+t),isNaN(s.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),millisec:s.getMilliseconds(),microsec:s.getMicroseconds(),timezone:-1*s.getTimezoneOffset()}}catch(n$0){try{return a(e,t,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+
|
59 |
-
t+"\ntimeFormat: "+e)}}return!1};return"function"==typeof s.parse?s.parse(e,t,s):"loose"===s.parse?n(e,t,s):a(e,t,s)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t);var s=e,a=i.amNames[0],n=parseInt(t.hour,10);return n>11&&(a=i.pmNames[0]),s=s.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case "HH":return("0"+n).slice(-2);case "H":return n;case "hh":return("0"+
|
60 |
-
convert24to12(n)).slice(-2);case "h":return convert24to12(n);case "mm":return("0"+t.minute).slice(-2);case "m":return t.minute;case "ss":return("0"+t.second).slice(-2);case "s":return t.second;case "l":return("00"+t.millisec).slice(-3);case "c":return("00"+t.microsec).slice(-3);case "z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case "Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case "T":return a.charAt(0).toUpperCase();
|
61 |
-
case "TT":return a.toUpperCase();case "t":return a.charAt(0).toLowerCase();case "tt":return a.toLowerCase();default:return e.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i,s=this._getInst($(e)[0]),a=this._get(s,"timepicker");a&&s.settings.showTimepicker?(a._limitMinMaxDateTime(s,!0),i=s.inline,s.inline=s.stay_open=!0,this._base_selectDate(e,t),s.inline=i,s.stay_open=!1,this._notifyChange(s),this._updateDatepicker(s)):this._base_selectDate(e,
|
62 |
-
t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==t||"boolean"==typeof e.stay_open&&e.stay_open!==!1)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),
|
63 |
-
i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var s=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=(""+i._defaults.timeFormat).replace(/[hms]/g,"").replace(/TT/g,s?"APM":"").replace(/Tt/g,s?"AaPpMm":"").replace(/tT/g,s?"AaPpMm":"").replace(/T/g,s?"AP":"").replace(/tt/g,s?"apm":"").replace(/t/g,s?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+
|
64 |
-
(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+n,l=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||" ">l||!n||r.indexOf(l)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){var s=(t._defaults.altFormat||t._defaults.dateFormat,this._getDate(e)),a=
|
65 |
-
$.datepicker._getFormatConfig(e),n="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,l=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,o=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;n+=$.datepicker.formatTime(o,t,t._defaults)+l,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===s||(n=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,s,a)+r+n:t.formattedDate+r+n),$(i).val(e.input.val()?
|
66 |
-
n:"")}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(s){$.timepicker.log(s)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]);t.dpDiv;var i=this._get(t,
|
67 |
-
"timepicker");selectLocalTimezone(i);var s=new Date;this._setTime(t,s),this._setDate(t,s),this._base_gotoToday(e)},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(t))}},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=
|
68 |
-
!0,i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var s=i._defaults;i.hour=t?t.getHours():s.hour,i.minute=t?t.getMinutes():s.minute,i.second=t?t.getSeconds():s.second,i.millisec=t?t.getMilliseconds():s.millisec,i.microsec=t?t.getMicroseconds():s.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var s=this._getInst(e);if(s){var a=
|
69 |
-
this._get(s,"timepicker");if(a){this._setDateFromField(s);var n;t&&("string"==typeof t?(a._parseTime(t,i),n=new Date,n.setHours(a.hour,a.minute,a.second,a.millisec),n.setMicroseconds(a.microsec)):(n=new Date(t.getTime()),n.setMicroseconds(t.getMicroseconds())),"Invalid Date"==""+n&&(n=void 0),this._setTime(s,n))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e),s=t;if(i){"string"==typeof t&&(s=new Date(t),s.getTime()||
|
70 |
-
(this._base_setDateDatepicker.apply(this,arguments),s=$(e).datepicker("getDate")));var a,n=this._get(i,"timepicker");s instanceof Date?(a=new Date(s.getTime()),a.setMicroseconds(s.getMicroseconds())):a=s,n&&a&&(n.support.timezone||null!==n._defaults.timezone||(n.timezone=-1*a.getTimezoneOffset()),s=$.timepicker.timezoneAdjust(s,n.timezone),a=$.timepicker.timezoneAdjust(a,n.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,a,!0)}},$.datepicker._base_getDateDatepicker=
|
71 |
-
$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var s=this._get(i,"timepicker");if(s){void 0===i.lastVal&&this._setDateFromField(i,t);var a=this._getDate(i),n=$.trim(s.$altInput&&s._defaults.altFieldTimeOnly?s.$input.val()+" "+s.$altInput.val():s.$input.val());return a&&s._parseTime(n,!i.settings.timeOnly)&&(a.setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec),null!=s.timezone&&(s.support.timezone||null!==s._defaults.timezone||
|
72 |
-
(s.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,s.timezone))),a}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var s;try{s=this._base_parseDate(e,t,i)}catch(a){if(!(a.indexOf(":")>=0))throw a;s=this._base_parseDate(e,t.substring(0,t.length-(a.length-a.indexOf(":")-2)),i),$.timepicker.log("Error parsing the date string: "+a+"\ndate string = "+t+"\ndate format = "+e)}return s},$.datepicker._base_formatDate=
|
73 |
-
$.datepicker._formatDate,$.datepicker._formatDate=function(e){var t=this._get(e,"timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var s,a=this._getInst(e);if(!a)return null;var n=this._get(a,"timepicker");if(n){var r,l,o,c,u=null,m=null,d=null,h=n._defaults.evnts,p={};if("string"==typeof t)if("minDate"===t||"minDateTime"===t)u=i;else if("maxDate"===
|
74 |
-
t||"maxDateTime"===t)m=i;else if("onSelect"===t)d=i;else{if(h.hasOwnProperty(t)){if(i===void 0)return h[t];p[t]=i,s={}}}else if("object"==typeof t){t.minDate?u=t.minDate:t.minDateTime?u=t.minDateTime:t.maxDate?m=t.maxDate:t.maxDateTime&&(m=t.maxDateTime);for(r in h)h.hasOwnProperty(r)&&t[r]&&(p[r]=t[r])}for(r in p)p.hasOwnProperty(r)&&(h[r]=p[r],s||(s=$.extend({},t)),delete s[r]);if(s&&isEmptyObject(s))return;if(u?(u=0===u?new Date:new Date(u),n._defaults.minDate=u,n._defaults.minDateTime=u):m?(m=
|
75 |
-
0===m?new Date:new Date(m),n._defaults.maxDate=m,n._defaults.maxDateTime=m):d&&(n._defaults.onSelect=d),u||m)return c=$(e),o=c.datetimepicker("getDate"),l=this._base_optionDatepicker.call($.datepicker,e,s||t,i),c.datetimepicker("setDate",o),l}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,s||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},extendRemove=function(e,t){$.extend(e,t);for(var i in t)(null===
|
76 |
-
t[i]||void 0===t[i])&&(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/'.*?'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)?!0:!1};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i(t,"t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return e%=12,0===e&&(e=12),e+""},computeEffectiveSetting=function(e,t){return e&&e[t]?e[t]:$.timepicker._defaults[t]},splitDateTime=function(e,t){var i=computeEffectiveSetting(t,
|
77 |
-
"separator"),s=computeEffectiveSetting(t,"timeFormat"),a=s.split(i),n=a.length,r=e.split(i),l=r.length;return l>1?{dateString:r.splice(0,l-n).join(i),timeString:r.splice(0,n).join(i)}:{dateString:e,timeString:""}},parseDateTimeInternal=function(e,t,i,s,a){var n,r,l;if(r=splitDateTime(i,a),n=$.datepicker._base_parseDate(e,r.dateString,s),""===r.timeString)return{date:n};if(l=$.datepicker.parseTime(t,r.timeString,a),!l)throw"Wrong time format";return{date:n,timeObj:l}},selectLocalTimezone=function(e,
|
78 |
-
t){if(e&&e.timezone_select){var i=t||new Date;e.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840||-720>e)return e;var i=e,s=i%60,a=(i-s)/60,n=t?":":"",r=(i>=0?"+":"-")+("0"+Math.abs(a)).slice(-2)+n+("0"+Math.abs(s)).slice(-2);return"+00:00"===r?"Z":r},$.timepicker.timezoneOffsetNumber=function(e){var t=(""+e).replace(":","");return"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"===t.substr(0,1)?-1:1)*
|
79 |
-
(60*parseInt(t.substr(1,2),10)+parseInt(t.substr(3,2),10)):e},$.timepicker.timezoneAdjust=function(e,t){var i=$.timepicker.timezoneOffsetNumber(t);return isNaN(i)||e.setMinutes(e.getMinutes()+-e.getTimezoneOffset()-i),e},$.timepicker.timeRange=function(e,t,i){return $.timepicker.handleRange("timepicker",e,t,i)},$.timepicker.datetimeRange=function(e,t,i){$.timepicker.handleRange("datetimepicker",e,t,i)},$.timepicker.dateRange=function(e,t,i){$.timepicker.handleRange("datepicker",e,t,i)},$.timepicker.handleRange=
|
80 |
-
function(e,t,i,s){function a(a,n){var r=t[e]("getDate"),l=i[e]("getDate"),o=a[e]("getDate");if(null!==r){var c=new Date(r.getTime()),u=new Date(r.getTime());c.setMilliseconds(c.getMilliseconds()+s.minInterval),u.setMilliseconds(u.getMilliseconds()+s.maxInterval),s.minInterval>0&&c>l?i[e]("setDate",c):s.maxInterval>0&&l>u?i[e]("setDate",u):r>l&&n[e]("setDate",o)}}function n(t,i,a){if(t.val()){var n=t[e].call(t,"getDate");null!==n&&s.minInterval>0&&("minDate"===a&&n.setMilliseconds(n.getMilliseconds()+
|
81 |
-
s.minInterval),"maxDate"===a&&n.setMilliseconds(n.getMilliseconds()-s.minInterval)),n.getTime&&i[e].call(i,"option",a,n)}}s=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},s);var r=!1;return"timepicker"===e&&(r=!0,e="datetimepicker"),$.fn[e].call(t,$.extend({timeOnly:r,onClose:function(){a($(this),i)},onSelect:function(){n($(this),i,"minDate")}},s,s.start)),$.fn[e].call(i,$.extend({timeOnly:r,onClose:function(){a($(this),t)},onSelect:function(){n($(this),t,"maxDate")}},s,s.end)),a(t,i),
|
82 |
-
n(t,i,"minDate"),n(i,t,"maxDate"),$([t.get(0),i.get(0)])},$.timepicker.log=function(){window.console&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||
|
83 |
-
(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(e){return this.setMilliseconds(this.getMilliseconds()+Math.floor(e/1E3)),this.microseconds=e%1E3,this}),$.timepicker.version="1.5.5"}});
|
1 |
+
(function(e){"function"==typeof define&&define.amd?define(["jquery","jquery.ui"],e):e(jQuery)})(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.5.5"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",oneLine:!1,defaultValue:null,parse:"strict",afterInject:null},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||this._defaults[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&$.ui.slider===void 0&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),tp_inst._defaults.altRedirectFocus===!0&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=$.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(a){return $.timepicker.log("Error parsing the date/time string: "+a+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return n?($.extend(this,n),!0):!1},_afterInject:function(){var e=this.inst.settings;$.isFunction(e.afterInject)&&e.afterInject.call(this)},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",a="",n=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=" ui_tpicker_unit_hide",d='<div class="ui-timepicker-div'+(t.isRTL?" ui-timepicker-rtl":"")+(t.oneLine&&"select"===t.controlType?" ui-timepicker-oneLine":"")+'"><dl>'+'<dt class="ui_tpicker_time_label'+(t.showTime?"":m)+'">'+t.timeText+"</dt>"+'<dd class="ui_tpicker_time '+(t.showTime?"":m)+'"></dd>';for(c=0,u=this.units.length;u>c;c++){if(s=this.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+a],10),l[s]=0,d+='<dt class="ui_tpicker_'+s+"_label"+(n?"":m)+'">'+t[s+"Text"]+"</dt>"+'<dd class="ui_tpicker_'+s+(n?"":m)+'"><div class="ui_tpicker_'+s+"_slider"+(n?"":m)+'"></div>',n&&t[s+"Grid"]>0){if(d+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===s)for(var h=t[s+"Min"];r[s]>=h;h+=parseInt(t[s+"Grid"],10)){l[s]++;var p=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},t);d+='<td data-for="'+s+'">'+p+"</td>"}else for(var _=t[s+"Min"];r[s]>=_;_+=parseInt(t[s+"Grid"],10))l[s]++,d+='<td data-for="'+s+'">'+(10>_?"0":"")+_+"</td>";d+="</tr></table></div>"}d+="</dd>"}var f=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='<dt class="ui_tpicker_timezone_label'+(f?"":m)+'">'+t.timezoneText+"</dt>",d+='<dd class="ui_tpicker_timezone'+(f?"":m)+'"></dd>',d+="</dl></div>";var g=$(d);for(t.timeOnly===!0&&(g.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+t.timeOnlyTitle+"</div>"+"</div>"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)s=i.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],i[s+"_slider"]=i.control.create(i,g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+a]),n&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),a=parseInt(t.replace(/[^0-9]/g),10),n=t.replace(/[^apm]/gi),r=e.data("for");"hour"===r&&(-1!==n.indexOf("p")&&12>a?a+=12:-1!==n.indexOf("a")&&12===a&&(a=0)),i.control.value(i,i[r+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),this.timezone!==void 0&&null!==this.timezone&&""!==this.timezone){var M=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();M===this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else this.hour!==void 0&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler(),i._afterInject()});var v=e.find(".ui-datepicker-buttonpane");if(v.length?v.before(g):e.append(g),this.$timeObj=g.find(".ui_tpicker_time"),null!==this.inst){var k=this.timeDefined;this._onTimeChange(),this.timeDefined=k}if(this._defaults.addSliderAccess){var T=this._defaults.sliderAccessArgs,D=this._defaults.isRTL;T.isRTL=D,setTimeout(function(){if(0===g.find(".ui-slider-access").length){g.find(".ui-slider:visible").sliderAccess(T);var e=g.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&g.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),s=(""+t.css(D?"marginRight":"marginLeft")).replace("%",""),a=i-e,n=s*a/i+"%",r={width:a,marginRight:0,marginLeft:0};r[D?"marginRight":"marginLeft"]=n,t.css(r)})}},10)}i._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,s=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&s){var a=$.datepicker._get(e,"minDateTime"),n=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||n.getTime()===s.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(e,"maxDateTime")&&void 0!==$.datepicker._get(e,"maxDateTime")&&s){var r=$.datepicker._get(e,"maxDateTime"),l=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);(null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),e.settings.timeOnly||l.getTime()===s.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==e.settings.minTime){var o=new Date("01/01/1970 "+e.settings.minTime);this.hour<o.getHours()?(this.hour=this._defaults.hourMin=o.getHours(),this.minute=this._defaults.minuteMin=o.getMinutes()):this.hour===o.getHours()&&this.minute<o.getMinutes()?this.minute=this._defaults.minuteMin=o.getMinutes():this._defaults.hourMin<o.getHours()?(this._defaults.hourMin=o.getHours(),this._defaults.minuteMin=o.getMinutes()):this._defaults.minuteMin=this._defaults.hourMin===o.getHours()===this.hour&&this._defaults.minuteMin<o.getMinutes()?o.getMinutes():0}if(null!==e.settings.maxTime){var c=new Date("01/01/1970 "+e.settings.maxTime);this.hour>c.getHours()?(this.hour=this._defaults.hourMax=c.getHours(),this.minute=this._defaults.minuteMax=c.getMinutes()):this.hour===c.getHours()&&this.minute>c.getMinutes()?this.minute=this._defaults.minuteMax=c.getMinutes():this._defaults.hourMax>c.getHours()?(this._defaults.hourMax=c.getHours(),this._defaults.minuteMax=c.getMinutes()):this._defaults.minuteMax=this._defaults.hourMax===c.getHours()===this.hour&&this._defaults.minuteMax>c.getMinutes()?c.getMinutes():59}if(void 0!==t&&t===!0){var u=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),m=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),d=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),h=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),p=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:u,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:m,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:d,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:h,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:p,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var e=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,t=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,s=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,a=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,n=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,l=r.pickerTimeFormat||r.timeFormat,o=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof s&&(s=!1),"object"==typeof a&&(a=!1),"object"==typeof n&&(n=!1),e!==!1&&(e=parseInt(e,10)),t!==!1&&(t=parseInt(t,10)),i!==!1&&(i=parseInt(i,10)),s!==!1&&(s=parseInt(s,10)),a!==!1&&(a=parseInt(a,10)),n!==!1&&(n=""+n);var c=r[12>e?"amNames":"pmNames"][0],u=e!==parseInt(this.hour,10)||t!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||s!==parseInt(this.millisec,10)||a!==parseInt(this.microsec,10)||this.ampm.length>0&&12>e!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&n!==""+this.timezone;u&&(e!==!1&&(this.hour=e),t!==!1&&(this.minute=t),i!==!1&&(this.second=i),s!==!1&&(this.millisec=s),a!==!1&&(this.microsec=a),n!==!1&&(this.timezone=n),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&(l===r.timeFormat?this.$timeObj.text(this.formattedTime+o):this.$timeObj.text($.datepicker.formatTime(l,this,r)+o)),this.timeDefined=!0,u&&this._updateDateTime()}},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){e=this.inst||e;var t=e.currentYear>0?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=$.datepicker._daylightSavingAdjust(t),s=$.datepicker._get(e,"dateFormat"),a=$.datepicker._getFormatConfig(e),n=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(s,null===i?new Date:i,a);var r=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!1?r=this.formattedTime:(this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||n)||this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!0)&&(r+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=r,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(r);var l="",o=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,c=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(l=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate,l&&(l+=o)),l+=null!==this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+c:this.formattedTime+c,this.$altInput.val(l)}else this.$input.val(r);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(e,t,i,s,a,n,r){var l=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:l?-1*s:s,min:l?-1*n:a,max:l?-1*a:n,step:r,slide:function(t,s){e.control.value(e,$(this),i,l?-1*s.value:s.value),e._onTimeChange()},stop:function(){e._onSelectHandler()}})},options:function(e,t,i,s,a){if(e._defaults.isRTL){if("string"==typeof s)return"min"===s||"max"===s?void 0!==a?t.slider(s,-1*a):Math.abs(t.slider(s)):t.slider(s);var n=s.min,r=s.max;return s.min=s.max=null,void 0!==n&&(s.max=-1*n),void 0!==r&&(s.min=-1*r),t.slider(s)}return"string"==typeof s&&void 0!==a?t.slider(s,a):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,a,n,r){for(var l='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+a+'" data-max="'+n+'" data-step="'+r+'">',o=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=a;n>=c;c+=r)l+='<option value="'+c+'"'+(c===s?" selected":"")+">",l+="hour"===i?$.datepicker.formatTime($.trim(o.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"===i||"microsec"===i||c>=10?c:"0"+(""+c),l+="</option>";return l+="</select>",t.children("select").remove(),$(l).appendTo(t).change(function(){e._onTimeChange(),e._onSelectHandler(),e._afterInject()}),t},options:function(e,t,i,s,a){var n={},r=t.children("select");if("string"==typeof s){if(void 0===a)return r.data(s);n[s]=a}else n=s;return e.control.create(e,t,r.data("unit"),r.val(),n.min>=0?n.min:r.data("min"),n.max||r.data("max"),n.step||r.data("step"))},value:function(e,t,i,s){var a=t.children("select");return void 0!==s?a.val(s):a.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){e=e||{};var t=arguments;return"string"==typeof e?"getDate"===e||"option"===e&&2===t.length&&"string"==typeof t[1]?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,s,a){var n=parseDateTimeInternal(e,t,i,s,a);if(n.timeObj){var r=n.timeObj;n.date.setHours(r.hour,r.minute,r.second,r.millisec),n.date.setMicroseconds(r.microsec)}return n.date},$.datepicker.parseTime=function(e,t,i){var s=extendRemove(extendRemove({},$.timepicker._defaults),i||{});-1!==e.replace(/\'.*?\'/g,"").indexOf("Z");var a=function(e,t,i){var s,a=function(e,t){var i=[];return e&&$.merge(i,e),t&&$.merge(i,t),i=$.map(i,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},n=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var s=0;t.length>s;s++)-1===i[(""+t[s]).charAt(0)]&&(i[(""+t[s]).charAt(0)]=s+1);return i},r="^"+(""+e).replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t=e.length;switch(e.charAt(0).toLowerCase()){case"h":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"m":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"s":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return a(i.amNames,i.pmNames);default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",l=n(e),o="";s=t.match(RegExp(r,"i"));var c={hour:0,minute:0,second:0,millisec:0,microsec:0};return s?(-1!==l.t&&(void 0===s[l.t]||0===s[l.t].length?(o="",c.ampm=""):(o=-1!==$.inArray(s[l.t].toUpperCase(),$.map(i.amNames,function(e){return e.toUpperCase()}))?"AM":"PM",c.ampm=i["AM"===o?"amNames":"pmNames"][0])),-1!==l.h&&(c.hour="AM"===o&&"12"===s[l.h]?0:"PM"===o&&"12"!==s[l.h]?parseInt(s[l.h],10)+12:Number(s[l.h])),-1!==l.m&&(c.minute=Number(s[l.m])),-1!==l.s&&(c.second=Number(s[l.s])),-1!==l.l&&(c.millisec=Number(s[l.l])),-1!==l.c&&(c.microsec=Number(s[l.c])),-1!==l.z&&void 0!==s[l.z]&&(c.timezone=$.timepicker.timezoneOffsetNumber(s[l.z])),c):!1},n=function(e,t,i){try{var s=new Date("2012-01-01 "+t);if(isNaN(s.getTime())&&(s=new Date("2012-01-01T"+t),isNaN(s.getTime())&&(s=new Date("01/01/2012 "+t),isNaN(s.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),millisec:s.getMilliseconds(),microsec:s.getMicroseconds(),timezone:-1*s.getTimezoneOffset()}}catch(n){try{return a(e,t,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+t+"\ntimeFormat: "+e)}}return!1};return"function"==typeof s.parse?s.parse(e,t,s):"loose"===s.parse?n(e,t,s):a(e,t,s)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t);var s=e,a=i.amNames[0],n=parseInt(t.hour,10);return n>11&&(a=i.pmNames[0]),s=s.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case"HH":return("0"+n).slice(-2);case"H":return n;case"hh":return("0"+convert24to12(n)).slice(-2);case"h":return convert24to12(n);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case"T":return a.charAt(0).toUpperCase();case"TT":return a.toUpperCase();case"t":return a.charAt(0).toLowerCase();case"tt":return a.toLowerCase();default:return e.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i,s=this._getInst($(e)[0]),a=this._get(s,"timepicker");a&&s.settings.showTimepicker?(a._limitMinMaxDateTime(s,!0),i=s.inline,s.inline=s.stay_open=!0,this._base_selectDate(e,t),s.inline=i,s.stay_open=!1,this._notifyChange(s),this._updateDatepicker(s)):this._base_selectDate(e,t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==t||"boolean"==typeof e.stay_open&&e.stay_open!==!1)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var s=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=(""+i._defaults.timeFormat).replace(/[hms]/g,"").replace(/TT/g,s?"APM":"").replace(/Tt/g,s?"AaPpMm":"").replace(/tT/g,s?"AaPpMm":"").replace(/T/g,s?"AP":"").replace(/tt/g,s?"apm":"").replace(/t/g,s?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+n,l=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||" ">l||!n||r.indexOf(l)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){var s=(t._defaults.altFormat||t._defaults.dateFormat,this._getDate(e)),a=$.datepicker._getFormatConfig(e),n="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,l=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,o=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;n+=$.datepicker.formatTime(o,t,t._defaults)+l,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===s||(n=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,s,a)+r+n:t.formattedDate+r+n),$(i).val(e.input.val()?n:"")}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(s){$.timepicker.log(s)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]);t.dpDiv;var i=this._get(t,"timepicker");selectLocalTimezone(i);var s=new Date;this._setTime(t,s),this._setDate(t,s),this._base_gotoToday(e)},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(t))}},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var s=i._defaults;i.hour=t?t.getHours():s.hour,i.minute=t?t.getMinutes():s.minute,i.second=t?t.getSeconds():s.second,i.millisec=t?t.getMilliseconds():s.millisec,i.microsec=t?t.getMicroseconds():s.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var s=this._getInst(e);if(s){var a=this._get(s,"timepicker");if(a){this._setDateFromField(s);var n;t&&("string"==typeof t?(a._parseTime(t,i),n=new Date,n.setHours(a.hour,a.minute,a.second,a.millisec),n.setMicroseconds(a.microsec)):(n=new Date(t.getTime()),n.setMicroseconds(t.getMicroseconds())),"Invalid Date"==""+n&&(n=void 0),this._setTime(s,n))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e),s=t;if(i){"string"==typeof t&&(s=new Date(t),s.getTime()||(this._base_setDateDatepicker.apply(this,arguments),s=$(e).datepicker("getDate")));var a,n=this._get(i,"timepicker");s instanceof Date?(a=new Date(s.getTime()),a.setMicroseconds(s.getMicroseconds())):a=s,n&&a&&(n.support.timezone||null!==n._defaults.timezone||(n.timezone=-1*a.getTimezoneOffset()),s=$.timepicker.timezoneAdjust(s,n.timezone),a=$.timepicker.timezoneAdjust(a,n.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,a,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var s=this._get(i,"timepicker");if(s){void 0===i.lastVal&&this._setDateFromField(i,t);var a=this._getDate(i),n=$.trim(s.$altInput&&s._defaults.altFieldTimeOnly?s.$input.val()+" "+s.$altInput.val():s.$input.val());return a&&s._parseTime(n,!i.settings.timeOnly)&&(a.setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec),null!=s.timezone&&(s.support.timezone||null!==s._defaults.timezone||(s.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,s.timezone))),a}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var s;try{s=this._base_parseDate(e,t,i)}catch(a){if(!(a.indexOf(":")>=0))throw a;s=this._base_parseDate(e,t.substring(0,t.length-(a.length-a.indexOf(":")-2)),i),$.timepicker.log("Error parsing the date string: "+a+"\ndate string = "+t+"\ndate format = "+e)}return s},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(e){var t=this._get(e,"timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var s,a=this._getInst(e);if(!a)return null;var n=this._get(a,"timepicker");if(n){var r,l,o,c,u=null,m=null,d=null,h=n._defaults.evnts,p={};if("string"==typeof t){if("minDate"===t||"minDateTime"===t)u=i;else if("maxDate"===t||"maxDateTime"===t)m=i;else if("onSelect"===t)d=i;else if(h.hasOwnProperty(t)){if(i===void 0)return h[t];p[t]=i,s={}}}else if("object"==typeof t){t.minDate?u=t.minDate:t.minDateTime?u=t.minDateTime:t.maxDate?m=t.maxDate:t.maxDateTime&&(m=t.maxDateTime);for(r in h)h.hasOwnProperty(r)&&t[r]&&(p[r]=t[r])}for(r in p)p.hasOwnProperty(r)&&(h[r]=p[r],s||(s=$.extend({},t)),delete s[r]);if(s&&isEmptyObject(s))return;if(u?(u=0===u?new Date:new Date(u),n._defaults.minDate=u,n._defaults.minDateTime=u):m?(m=0===m?new Date:new Date(m),n._defaults.maxDate=m,n._defaults.maxDateTime=m):d&&(n._defaults.onSelect=d),u||m)return c=$(e),o=c.datetimepicker("getDate"),l=this._base_optionDatepicker.call($.datepicker,e,s||t,i),c.datetimepicker("setDate",o),l}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,s||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},extendRemove=function(e,t){$.extend(e,t);for(var i in t)(null===t[i]||void 0===t[i])&&(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/'.*?'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)?!0:!1};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i(t,"t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return e%=12,0===e&&(e=12),e+""},computeEffectiveSetting=function(e,t){return e&&e[t]?e[t]:$.timepicker._defaults[t]},splitDateTime=function(e,t){var i=computeEffectiveSetting(t,"separator"),s=computeEffectiveSetting(t,"timeFormat"),a=s.split(i),n=a.length,r=e.split(i),l=r.length;return l>1?{dateString:r.splice(0,l-n).join(i),timeString:r.splice(0,n).join(i)}:{dateString:e,timeString:""}},parseDateTimeInternal=function(e,t,i,s,a){var n,r,l;if(r=splitDateTime(i,a),n=$.datepicker._base_parseDate(e,r.dateString,s),""===r.timeString)return{date:n};if(l=$.datepicker.parseTime(t,r.timeString,a),!l)throw"Wrong time format";return{date:n,timeObj:l}},selectLocalTimezone=function(e,t){if(e&&e.timezone_select){var i=t||new Date;e.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840||-720>e)return e;var i=e,s=i%60,a=(i-s)/60,n=t?":":"",r=(i>=0?"+":"-")+("0"+Math.abs(a)).slice(-2)+n+("0"+Math.abs(s)).slice(-2);return"+00:00"===r?"Z":r},$.timepicker.timezoneOffsetNumber=function(e){var t=(""+e).replace(":","");return"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"===t.substr(0,1)?-1:1)*(60*parseInt(t.substr(1,2),10)+parseInt(t.substr(3,2),10)):e},$.timepicker.timezoneAdjust=function(e,t){var i=$.timepicker.timezoneOffsetNumber(t);return isNaN(i)||e.setMinutes(e.getMinutes()+-e.getTimezoneOffset()-i),e},$.timepicker.timeRange=function(e,t,i){return $.timepicker.handleRange("timepicker",e,t,i)},$.timepicker.datetimeRange=function(e,t,i){$.timepicker.handleRange("datetimepicker",e,t,i)},$.timepicker.dateRange=function(e,t,i){$.timepicker.handleRange("datepicker",e,t,i)},$.timepicker.handleRange=function(e,t,i,s){function a(a,n){var r=t[e]("getDate"),l=i[e]("getDate"),o=a[e]("getDate");if(null!==r){var c=new Date(r.getTime()),u=new Date(r.getTime());c.setMilliseconds(c.getMilliseconds()+s.minInterval),u.setMilliseconds(u.getMilliseconds()+s.maxInterval),s.minInterval>0&&c>l?i[e]("setDate",c):s.maxInterval>0&&l>u?i[e]("setDate",u):r>l&&n[e]("setDate",o)}}function n(t,i,a){if(t.val()){var n=t[e].call(t,"getDate");null!==n&&s.minInterval>0&&("minDate"===a&&n.setMilliseconds(n.getMilliseconds()+s.minInterval),"maxDate"===a&&n.setMilliseconds(n.getMilliseconds()-s.minInterval)),n.getTime&&i[e].call(i,"option",a,n)}}s=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},s);var r=!1;return"timepicker"===e&&(r=!0,e="datetimepicker"),$.fn[e].call(t,$.extend({timeOnly:r,onClose:function(){a($(this),i)},onSelect:function(){n($(this),i,"minDate")}},s,s.start)),$.fn[e].call(i,$.extend({timeOnly:r,onClose:function(){a($(this),t)},onSelect:function(){n($(this),t,"maxDate")}},s,s.end)),a(t,i),n(t,i,"minDate"),n(i,t,"maxDate"),$([t.get(0),i.get(0)])},$.timepicker.log=function(){window.console&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(e){return this.setMilliseconds(this.getMilliseconds()+Math.floor(e/1e3)),this.microseconds=e%1e3,this}),$.timepicker.version="1.5.5"}})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: 3.
|
8 |
Author: Nickolas Bossinas
|
9 |
Author URI: http://www.iptanus.com
|
10 |
*/
|
@@ -92,6 +92,7 @@ function register_wfu_widget() {
|
|
92 |
}
|
93 |
|
94 |
function wfu_enqueue_frontpage_scripts() {
|
|
|
95 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
96 |
$relaxcss = false;
|
97 |
if ( isset($plugin_options['relaxcss']) ) $relaxcss = ( $plugin_options['relaxcss'] == '1' );
|
@@ -160,6 +161,7 @@ function wordpress_file_upload_browser_handler($incomingfrompost) {
|
|
160 |
}
|
161 |
|
162 |
function wordpress_file_upload_function($incomingfromhandler) {
|
|
|
163 |
global $post;
|
164 |
global $blog_id;
|
165 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
@@ -289,6 +291,8 @@ function wordpress_file_upload_function($incomingfromhandler) {
|
|
289 |
if ( $plugin_style != "" ) $plugin_style = ' style="'.$plugin_style.'"';
|
290 |
$wordpress_file_upload_output .= '<div id="'.$shortcode_tag.'_block_'.$sid.'" class="file_div_clean'.( $params["fitmode"] == "responsive" ? '_responsive_container' : '' ).' wfu_container"'.$plugin_style.'>';
|
291 |
$wordpress_file_upload_output .= "\n\t".'<input type="hidden" id="'.$shortcode_tag.'_'.$sid.'_widgetid" value="'.$widgetid.'" />';
|
|
|
|
|
292 |
//add visual editor overlay if the current user is administrator
|
293 |
if ( current_user_can( 'manage_options' ) ) {
|
294 |
$wordpress_file_upload_output .= wfu_add_visual_editor_button($shortcode_tag, $sid);
|
@@ -371,6 +375,8 @@ function wordpress_file_upload_function($incomingfromhandler) {
|
|
371 |
|
372 |
// The following code is executed in case of non-ajax uploads to process the files.
|
373 |
// Consecutive checks are performed in order to verify and approve the upload of files
|
|
|
|
|
374 |
$wfu_checkpass = true;
|
375 |
|
376 |
// First we test that WP nonce passes the check
|
@@ -414,6 +420,7 @@ function wordpress_file_upload_function($incomingfromhandler) {
|
|
414 |
}
|
415 |
|
416 |
function wfu_add_visual_editor_button($shortcode_tag, $sid) {
|
|
|
417 |
global $post;
|
418 |
$echo_str = "\n\t".'<div id="'.$shortcode_tag.'_editor_'.$sid.'" class="wfu_overlay_editor">';
|
419 |
$echo_str .= "\n\t\t".'<button class="wfu_overlay_editor_button" title="'.WFU_PAGE_PLUGINEDITOR_BUTTONTITLE.'" onclick="wfu_invoke_shortcode_editor('.$sid.', '.$post->ID.', \''.hash('md5', $post->post_content).'\', \''.$shortcode_tag.'\');"><img src="'.WFU_IMAGE_OVERLAY_EDITOR.'" class="wfu_overlay_editor_img" width="20px" height="20px" /></button>';
|
@@ -433,6 +440,7 @@ function wfu_post_plugin_actions($params) {
|
|
433 |
}
|
434 |
|
435 |
function wfu_get_subfolders_paths($params) {
|
|
|
436 |
$subfolder_paths = array ( );
|
437 |
if ( $params["askforsubfolders"] == "true" && $params["testmode"] != "true" ) {
|
438 |
array_push($subfolder_paths, "");
|
4 |
/*
|
5 |
Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
|
6 |
Description: Simple interface to upload files from a page.
|
7 |
+
Version: 3.11.0
|
8 |
Author: Nickolas Bossinas
|
9 |
Author URI: http://www.iptanus.com
|
10 |
*/
|
92 |
}
|
93 |
|
94 |
function wfu_enqueue_frontpage_scripts() {
|
95 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
96 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
97 |
$relaxcss = false;
|
98 |
if ( isset($plugin_options['relaxcss']) ) $relaxcss = ( $plugin_options['relaxcss'] == '1' );
|
161 |
}
|
162 |
|
163 |
function wordpress_file_upload_function($incomingfromhandler) {
|
164 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
165 |
global $post;
|
166 |
global $blog_id;
|
167 |
$plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
|
291 |
if ( $plugin_style != "" ) $plugin_style = ' style="'.$plugin_style.'"';
|
292 |
$wordpress_file_upload_output .= '<div id="'.$shortcode_tag.'_block_'.$sid.'" class="file_div_clean'.( $params["fitmode"] == "responsive" ? '_responsive_container' : '' ).' wfu_container"'.$plugin_style.'>';
|
293 |
$wordpress_file_upload_output .= "\n\t".'<input type="hidden" id="'.$shortcode_tag.'_'.$sid.'_widgetid" value="'.$widgetid.'" />';
|
294 |
+
//add allow no file flag
|
295 |
+
$wordpress_file_upload_output .= "\n\t".'<input type="hidden" id="'.$shortcode_tag.'_'.$sid.'_nofile" value="'.( $params["allownofile"] == "true" ? "1" : "0" ).'" />';
|
296 |
//add visual editor overlay if the current user is administrator
|
297 |
if ( current_user_can( 'manage_options' ) ) {
|
298 |
$wordpress_file_upload_output .= wfu_add_visual_editor_button($shortcode_tag, $sid);
|
375 |
|
376 |
// The following code is executed in case of non-ajax uploads to process the files.
|
377 |
// Consecutive checks are performed in order to verify and approve the upload of files
|
378 |
+
$_REQUEST = stripslashes_deep($_REQUEST);
|
379 |
+
$_POST = stripslashes_deep($_POST);
|
380 |
$wfu_checkpass = true;
|
381 |
|
382 |
// First we test that WP nonce passes the check
|
420 |
}
|
421 |
|
422 |
function wfu_add_visual_editor_button($shortcode_tag, $sid) {
|
423 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
424 |
global $post;
|
425 |
$echo_str = "\n\t".'<div id="'.$shortcode_tag.'_editor_'.$sid.'" class="wfu_overlay_editor">';
|
426 |
$echo_str .= "\n\t\t".'<button class="wfu_overlay_editor_button" title="'.WFU_PAGE_PLUGINEDITOR_BUTTONTITLE.'" onclick="wfu_invoke_shortcode_editor('.$sid.', '.$post->ID.', \''.hash('md5', $post->post_content).'\', \''.$shortcode_tag.'\');"><img src="'.WFU_IMAGE_OVERLAY_EDITOR.'" class="wfu_overlay_editor_img" width="20px" height="20px" /></button>';
|
440 |
}
|
441 |
|
442 |
function wfu_get_subfolders_paths($params) {
|
443 |
+
switch(WFU_FUNCTION_HOOK(__FUNCTION__, func_get_args(), $out)) { case 'X': break; case 'R': return $out; break; case 'D': die($out); break; }
|
444 |
$subfolder_paths = array ( );
|
445 |
if ( $params["askforsubfolders"] == "true" && $params["testmode"] != "true" ) {
|
446 |
array_push($subfolder_paths, "");
|