Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.74.1

Version Description

September 2 2017 = * Fix for the update system and cloud communication. * Added possibility to check users and comments for spam with a specific date range.

Download this release

Release Info

Developer Safronik
Plugin Icon 128x128 Spam protection, AntiSpam, FireWall by CleanTalk
Version 5.74.1
Comparing to
See all releases

Code changes from version 5.74 to 5.74.1

assets/css/cleantalk-spam-check.css CHANGED
@@ -18,6 +18,31 @@
18
  background:#ffff99;
19
  }
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  div.pagination{
22
  margin: 10px;
23
  }
18
  background:#ffff99;
19
  }
20
 
21
+ div.ct_check_params_wrapper{}
22
+ .ct_check_params_elem{}
23
+ .ct_check_params_elem_sub{
24
+ margin: 15px 0 0 25px;
25
+ width: 150px;
26
+ display: inline-block;
27
+ }
28
+ .ct_check_params_elem_sub_sub{ margin: 15px 0 0 50px; }
29
+ button#ct_check_spam_button{
30
+ background: #2ea2cc;
31
+ border-color: #0074a2;
32
+ color: #fff;
33
+ -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,.5), 0 1px 0 rgba(0,0,0,.15);
34
+ box-shadow: inset 0 1px 0 rgba(120,200,230,.5), 0 1px 0 rgba(0,0,0,.15);
35
+ }
36
+ button#ct_check_spam_button:hover{ color: black; }
37
+ .ct_date{
38
+ display: inline;
39
+ width: 150px;
40
+ }
41
+ .ct_check_params_desc{
42
+ display: inline-block;
43
+ margin: 5px 10px 10px 15px;
44
+ }
45
+
46
  div.pagination{
47
  margin: 10px;
48
  }
assets/js/cleantalk-comments-checkspam.js CHANGED
@@ -25,7 +25,9 @@ var ct_ajax_nonce = ctCommentsCheck.ct_ajax_nonce,
25
  ct_comments_spam = 0,
26
  ct_comments_bad = 0,
27
  ct_unchecked = 'unset',
28
- ct_accurate_check = false;
 
 
29
 
30
  function animate_comment(to,id){
31
  if(ct_close_animate){
@@ -91,6 +93,11 @@ function ct_send_comments(){
91
  if(ct_accurate_check)
92
  data['accurate_check'] = true;
93
 
 
 
 
 
 
94
  jQuery.ajax({
95
  type: "POST",
96
  url: ajaxurl,
@@ -101,9 +108,12 @@ function ct_send_comments(){
101
 
102
  if(parseInt(msg.error)){
103
  ct_working=false;
104
- if(!confirm(msg.error_message+". Do you want to proceed?"))
105
- location.href='users.php?page=ct_check_spam&ct_worked=1';
106
- else
 
 
 
107
  ct_send_comments();
108
  }else{
109
  ct_new_check = false;
@@ -122,7 +132,10 @@ function ct_send_comments(){
122
  }else if(parseInt(msg.end) == 1){
123
  ct_working=false;
124
  jQuery('#ct_working_message').hide();
125
- location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
 
 
 
126
  }
127
  }
128
  },
@@ -155,6 +168,12 @@ function ct_show_info(){
155
  'action': 'ajax_info_comments',
156
  'security': ct_ajax_nonce
157
  };
 
 
 
 
 
 
158
  jQuery.ajax({
159
  type: "POST",
160
  url: ajaxurl,
@@ -198,6 +217,7 @@ function ct_insert_comments(delete_comments = false){
198
  });
199
  }
200
  function ct_delete_all(){
 
201
  var data = {
202
  'action': 'ajax_delete_all',
203
  'security': ct_ajax_nonce
@@ -220,10 +240,12 @@ function ct_delete_all(){
220
  jQuery('#cleantalk_ajax_error').html(textStatus);
221
  jQuery('#cleantalk_js_func').html('Check comments');
222
  setTimeout(ct_delete_all(), 3000);
223
- }
 
224
  });
225
  }
226
  function ct_delete_checked(){
 
227
  ids=Array();
228
  var cnt=0;
229
  jQuery('input[id^=cb-select-][id!=cb-select-all-1]').each(function(){
@@ -244,36 +266,87 @@ function ct_delete_checked(){
244
  data: data,
245
  success: function(msg){
246
  location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
247
- //alert(msg);
248
  },
249
  error: function(jqXHR, textStatus, errorThrown) {
250
  jQuery('#ct_error_message').show();
251
  jQuery('#cleantalk_ajax_error').html(textStatus);
252
  jQuery('#cleantalk_js_func').html('Check comments');
253
  setTimeout(ct_delete_checked(), 3000);
254
- }
 
255
  });
256
  }
257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
 
259
  jQuery(document).ready(function(){
260
 
261
- jQuery("#ct_accurate_check").click(function(){
 
 
 
 
 
 
 
 
 
262
  if(ct_accurate_check)
263
  ct_accurate_check = false;
264
  else
265
  ct_accurate_check = true;
266
  });
267
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  jQuery("#ct_check_spam_button").click(function(){
269
- // jQuery('#ct_check_spam_button').hide();
270
 
271
- jQuery('#ct_check_button_table').hide();
272
- jQuery('#ct_info_message').hide();
273
- jQuery('#ct_check_comments_table').hide();
274
- jQuery('#ct_delete_all').hide();
275
- jQuery('div.pagination').hide();
276
- jQuery('#ct_delete_checked').hide();
 
 
 
 
 
 
277
  jQuery('#ct_working_message').show();
278
  jQuery('#ct_preloader').show();
279
 
@@ -290,28 +363,31 @@ jQuery(document).ready(function(){
290
  ct_insert_comments(true);
291
  });
292
 
 
293
  jQuery("#ct_delete_all").click(function(){
294
 
295
  if (!confirm(ctCommentsCheck.ct_confirm_deletion_all))
296
  return false;
297
 
298
- jQuery('#ct_check_button_table').hide();
299
  jQuery('#ct_checking_status').hide();
300
- jQuery('#ct_tools_buttons').hide();
301
  jQuery('#ct_search_info').hide();
302
- jQuery('#ct_check_comments_table').hide();
303
- jQuery('div.pagination').hide();
304
  jQuery('#ct_deleting_message').show();
 
305
  jQuery("html, body").animate({ scrollTop: 0 }, "slow");
306
  ct_delete_all();
307
  });
308
  jQuery("#ct_delete_checked").click(function(){
309
  if (!confirm(ctCommentsCheck.ct_confirm_deletion_checked))
310
  return false;
311
-
312
  ct_delete_checked();
313
  });
314
 
 
 
 
 
315
  jQuery(".cleantalk_delete_button").click(function(){
316
  id = jQuery(this).attr("data-id");
317
  ids=Array();
@@ -333,6 +409,7 @@ jQuery(document).ready(function(){
333
  }
334
  });
335
  });
 
336
  jQuery(".cleantalk_delete_button").click(function(){
337
  id = jQuery(this).attr("data-id");
338
  animate_comment(0.3, id);
@@ -399,7 +476,7 @@ jQuery(document).ready(function(){
399
  });
400
 
401
  //Default load actions
402
- if(location.href.match(/ct_check_spam/) && !location.href.match(/ct_worked=1/)){
403
- jQuery("#ct_check_spam_button").click();
404
- }
405
  });
25
  ct_comments_spam = 0,
26
  ct_comments_bad = 0,
27
  ct_unchecked = 'unset',
28
+ ct_accurate_check = false,
29
+ ct_date_from = 0,
30
+ ct_date_till = 0;
31
 
32
  function animate_comment(to,id){
33
  if(ct_close_animate){
93
  if(ct_accurate_check)
94
  data['accurate_check'] = true;
95
 
96
+ if(ct_date_from && ct_date_till){
97
+ data['from'] = ct_date_from;
98
+ data['till'] = ct_date_till;
99
+ }
100
+
101
  jQuery.ajax({
102
  type: "POST",
103
  url: ajaxurl,
108
 
109
  if(parseInt(msg.error)){
110
  ct_working=false;
111
+ if(!confirm(msg.error_message+". Do you want to proceed?")){
112
+ var new_href = 'edit-comments.php?page=ct_check_spam&ct_worked=1';
113
+ if(ct_date_from != 0 && ct_date_till != 0)
114
+ new_href+='&from='+ct_date_from+'&till='+ct_date_till;
115
+ location.href = new_href;
116
+ }else
117
  ct_send_comments();
118
  }else{
119
  ct_new_check = false;
132
  }else if(parseInt(msg.end) == 1){
133
  ct_working=false;
134
  jQuery('#ct_working_message').hide();
135
+ var new_href = 'edit-comments.php?page=ct_check_spam&ct_worked=1';
136
+ if(ct_date_from != 0 && ct_date_till != 0)
137
+ new_href+='&from='+ct_date_from+'&till='+ct_date_till;
138
+ location.href = new_href;
139
  }
140
  }
141
  },
168
  'action': 'ajax_info_comments',
169
  'security': ct_ajax_nonce
170
  };
171
+
172
+ if(ct_date_from && ct_date_till){
173
+ data['from'] = ct_date_from;
174
+ data['till'] = ct_date_till;
175
+ }
176
+
177
  jQuery.ajax({
178
  type: "POST",
179
  url: ajaxurl,
217
  });
218
  }
219
  function ct_delete_all(){
220
+
221
  var data = {
222
  'action': 'ajax_delete_all',
223
  'security': ct_ajax_nonce
240
  jQuery('#cleantalk_ajax_error').html(textStatus);
241
  jQuery('#cleantalk_js_func').html('Check comments');
242
  setTimeout(ct_delete_all(), 3000);
243
+ },
244
+ timeout: 25000
245
  });
246
  }
247
  function ct_delete_checked(){
248
+
249
  ids=Array();
250
  var cnt=0;
251
  jQuery('input[id^=cb-select-][id!=cb-select-all-1]').each(function(){
266
  data: data,
267
  success: function(msg){
268
  location.href='edit-comments.php?page=ct_check_spam&ct_worked=1';
 
269
  },
270
  error: function(jqXHR, textStatus, errorThrown) {
271
  jQuery('#ct_error_message').show();
272
  jQuery('#cleantalk_ajax_error').html(textStatus);
273
  jQuery('#cleantalk_js_func').html('Check comments');
274
  setTimeout(ct_delete_checked(), 3000);
275
+ },
276
+ timeout: 15000
277
  });
278
  }
279
 
280
+ // Function to toggle dependences
281
+ function ct_toggle_depended(obj, secondary = false){
282
+
283
+ var depended = jQuery(obj.data('depended')),
284
+ state = obj.data('state');
285
+
286
+ if(!state && !secondary){
287
+ obj.data('state', true);
288
+ depended.removeProp('disabled');
289
+ }else{
290
+ obj.data('state', false);
291
+ depended.prop('disabled', true);
292
+ depended.removeProp('checked');
293
+ if(depended.data('depended'))
294
+ ct_toggle_depended(depended, true);
295
+ }
296
+ }
297
 
298
  jQuery(document).ready(function(){
299
 
300
+ // Setting dependences
301
+ // jQuery('#ct_accurate_check') .data({'depended': '#ct_allow_date_range', 'state': false});
302
+ jQuery('#ct_allow_date_range').data({'depended': '.ct_date', 'state': false});
303
+
304
+ // Toggle dependences
305
+ jQuery("#ct_allow_date_range, #ct_accurate_check").on('change', function(){
306
+ ct_toggle_depended(jQuery(this));
307
+ });
308
+
309
+ jQuery("#ct_accurate_check").on('change', function(){
310
  if(ct_accurate_check)
311
  ct_accurate_check = false;
312
  else
313
  ct_accurate_check = true;
314
  });
315
+
316
+ var dates = jQuery('#ct_date_range_from, #ct_date_range_till').datepicker(
317
+ {
318
+ dateFormat: 'yy-mm-dd',
319
+ maxDate:"+0D",
320
+ changeMonth:true,
321
+ changeYear:true,
322
+ showAnim: 'slideDown',
323
+ onSelect: function(selectedDate){
324
+ var option = this.id == "ct_date_range_from" ? "minDate" : "maxDate",
325
+ instance = jQuery( this ).data( "datepicker" ),
326
+ date = jQuery.datepicker.parseDate(
327
+ instance.settings.dateFormat || jQuery.datepicker._defaults.dateFormat,
328
+ selectedDate, instance.settings);
329
+ dates.not(this).datepicker("option", option, date);
330
+ }
331
+ }
332
+ );
333
+ jQuery('#ct_date_range_from, #ct_date_range_till').prop('disabled', true);
334
+ /////
335
+ // Check comments
336
  jQuery("#ct_check_spam_button").click(function(){
 
337
 
338
+ if(jQuery('#ct_allow_date_range').is(':checked')){
339
+
340
+ ct_date_from = jQuery('#ct_date_range_from').val(),
341
+ ct_date_till = jQuery('#ct_date_range_till').val();
342
+
343
+ if(!(ct_date_from != '' && ct_date_till != '')){
344
+ alert('Please, specify a date range.');
345
+ return;
346
+ }
347
+ }
348
+
349
+ jQuery('.ct_to_hide').hide();
350
  jQuery('#ct_working_message').show();
351
  jQuery('#ct_preloader').show();
352
 
363
  ct_insert_comments(true);
364
  });
365
 
366
+ // Delete all spam comments
367
  jQuery("#ct_delete_all").click(function(){
368
 
369
  if (!confirm(ctCommentsCheck.ct_confirm_deletion_all))
370
  return false;
371
 
372
+ jQuery('.ct_to_hide').hide();
373
  jQuery('#ct_checking_status').hide();
 
374
  jQuery('#ct_search_info').hide();
375
+ jQuery('#ct_preloader').show();
 
376
  jQuery('#ct_deleting_message').show();
377
+ jQuery('#ct_stop_deletion').show();
378
  jQuery("html, body").animate({ scrollTop: 0 }, "slow");
379
  ct_delete_all();
380
  });
381
  jQuery("#ct_delete_checked").click(function(){
382
  if (!confirm(ctCommentsCheck.ct_confirm_deletion_checked))
383
  return false;
 
384
  ct_delete_checked();
385
  });
386
 
387
+ jQuery("#ct_stop_deletion").click(function(){
388
+ location.href='users.php?page=ct_check_spam&ct_worked=1';
389
+ });
390
+
391
  jQuery(".cleantalk_delete_button").click(function(){
392
  id = jQuery(this).attr("data-id");
393
  ids=Array();
409
  }
410
  });
411
  });
412
+
413
  jQuery(".cleantalk_delete_button").click(function(){
414
  id = jQuery(this).attr("data-id");
415
  animate_comment(0.3, id);
476
  });
477
 
478
  //Default load actions
479
+ // if(location.href.match(/ct_check_spam/) && !location.href.match(/ct_worked=1/)){
480
+ // jQuery("#ct_check_spam_button").click();
481
+ // }
482
  });
assets/js/cleantalk-users-checkspam.js CHANGED
@@ -25,7 +25,9 @@ var ct_ajax_nonce = ctUsersCheck.ct_ajax_nonce,
25
  ct_users_spam = 0,
26
  ct_users_bad = 0,
27
  ct_unchecked = 'unset',
28
- ct_accurate_check = false;
 
 
29
 
30
  function animate_comment(to,id){
31
  if(ct_close_animate){
@@ -91,6 +93,11 @@ function ct_send_users(){
91
  if(ct_accurate_check)
92
  data['accurate_check'] = true;
93
 
 
 
 
 
 
94
  jQuery.ajax({
95
  type: "POST",
96
  url: ajaxurl,
@@ -101,9 +108,12 @@ function ct_send_users(){
101
 
102
  if(parseInt(msg.error)){
103
  ct_working=false;
104
- if(!confirm(msg.error_message+". Do you want to proceed?"))
105
- location.href='users.php?page=ct_check_users&ct_worked=1';
106
- else
 
 
 
107
  ct_send_users();
108
  }else{
109
  ct_new_check = false;
@@ -116,13 +126,16 @@ function ct_send_users(){
116
  var status_string = status_string.printf(ct_users_total, ct_users_checked, ct_users_spam, ct_users_bad);
117
  if(parseInt(ct_users_spam) > 0)
118
  status_string += ctUsersCheck.ct_status_string_warning;
119
- jQuery('#ct_checking_users_status').html(status_string);
120
  jQuery('#ct_error_message').hide();
121
  ct_send_users();
122
  }else if(parseInt(msg.end) == 1){
123
  ct_working=false;
124
  jQuery('#ct_working_message').hide();
125
- location.href='users.php?page=ct_check_users&ct_worked=1';
 
 
 
126
  }
127
  }
128
  },
@@ -132,7 +145,7 @@ function ct_send_users(){
132
  jQuery('#cleantalk_js_func').html('Check users');
133
  setTimeout(ct_send_users(), 3000);
134
  },
135
- timeout: 15000
136
  });
137
  }
138
  function ct_show_users_info(){
@@ -150,17 +163,24 @@ function ct_show_users_info(){
150
  setTimeout(ct_show_users_info, 3000);
151
 
152
  if(!ct_users_total){
 
153
  var data = {
154
  'action': 'ajax_info_users',
155
  'security': ct_ajax_nonce
156
  };
 
 
 
 
 
 
157
  jQuery.ajax({
158
  type: "POST",
159
  url: ajaxurl,
160
  data: data,
161
  success: function(msg){
162
  msg = jQuery.parseJSON(msg);
163
- jQuery('#ct_checking_users_status').html(msg.message);
164
  ct_users_total = msg.total;
165
  },
166
  error: function (jqXHR, textStatus, errorThrown){
@@ -246,7 +266,6 @@ function ct_delete_checked_users(){
246
  data: data,
247
  success: function(msg){
248
  location.href='users.php?page=ct_check_users&ct_worked=1';
249
- //alert(msg);
250
  },
251
  error: function(jqXHR, textStatus, errorThrown) {
252
  jQuery('#ct_error_message').show();
@@ -256,62 +275,84 @@ function ct_delete_checked_users(){
256
  },
257
  timeout: 15000
258
  });
259
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  }
261
 
262
  jQuery(document).ready(function(){
263
 
264
- jQuery(".cleantalk_delete_user_button").click(function(){
265
- id = jQuery(this).attr("data-id");
266
- ids=Array();
267
- ids[0]=id;
268
- var data = {
269
- 'action': 'ajax_delete_checked_users',
270
- 'security': ct_ajax_nonce,
271
- 'ids':ids
272
- };
273
- jQuery.ajax({
274
- type: "POST",
275
- url: ajaxurl,
276
- data: data,
277
- success: function(msg){
278
- ct_close_animate=false;
279
- jQuery("#comment-"+id).hide();
280
- jQuery("#comment-"+id).remove();
281
- ct_close_animate=true;
282
- },
283
- timeout: 15000
284
- });
285
- });
286
 
287
- jQuery(".cleantalk_delete_user_button").click(function(){
288
- id = jQuery(this).attr("data-id");
289
- animate_comment(0.3, id);
290
  });
291
 
292
- jQuery("#ct_accurate_check").click(function(){
293
  if(ct_accurate_check)
294
  ct_accurate_check = false;
295
  else
296
  ct_accurate_check = true;
297
  });
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  // Check users
300
- jQuery("#ct_check_users_button").click(function(){
301
- // jQuery('#ct_checking_users_status').html('');
302
- // jQuery('#ct_check_users_button').hide();
303
- jQuery('#ct_check_button_table').hide();
304
- jQuery('#ct_delete_checked_users').hide();
305
- jQuery('#ct_check_users_table').hide();
306
- jQuery('#ct_delete_all_users').hide();
307
- jQuery('#ct_get_csv_file').hide();
308
- jQuery('div.pagination').hide();
309
- jQuery('#ct_info_message').hide();
 
 
 
 
310
  jQuery('#ct_working_message').show();
311
  jQuery('#ct_preloader').show();
 
312
  ct_working=true;
313
- ct_clear_users();
314
  ct_show_users_info();
 
315
  });
316
 
317
  jQuery("#ct_insert_users").click(function(){
@@ -321,11 +362,6 @@ jQuery(document).ready(function(){
321
  jQuery("#ct_delete_users").click(function(){
322
  ct_insert_users(true);
323
  });
324
-
325
- jQuery("#ct_stop_deletion").click(function(){
326
- //window.location.reload();
327
- window.location.href='users.php?page=ct_check_users&ct_worked=1';
328
- });
329
 
330
  // Delete all spam users
331
  jQuery("#ct_delete_all_users").click(function(){
@@ -333,17 +369,11 @@ jQuery(document).ready(function(){
333
  if (!confirm(ctUsersCheck.ct_confirm_deletion_all))
334
  return false;
335
 
336
- // jQuery('#ct_check_users_button').hide();
337
- jQuery('#ct_check_button_table').hide();
338
- jQuery('#ct_check_users_table').hide();
339
- jQuery('#ct_checking_users_status').hide();
340
- jQuery('#ct_tools_buttons').hide();
341
- jQuery('#ct_info_message').hide();
342
- jQuery('#ct_ajax_info_users').hide();
343
  jQuery('#ct_search_info').hide();
344
- jQuery('div.pagination').hide();
345
- jQuery('#ct_deleting_message').show();
346
  jQuery('#ct_preloader').show();
 
347
  jQuery('#ct_stop_deletion').show();
348
  jQuery("html, body").animate({ scrollTop: 0 }, "slow");
349
  ct_delete_all_users();
@@ -351,31 +381,56 @@ jQuery(document).ready(function(){
351
  jQuery("#ct_delete_checked_users").click(function(){
352
  if (!confirm(ctUsersCheck.ct_confirm_deletion_checked))
353
  return false;
354
-
355
  ct_delete_checked_users();
356
  });
357
- jQuery(".cleantalk_user").mouseover(function(){
358
- id = jQuery(this).attr("data-id");
359
- jQuery("#cleantalk_delete_user_"+id).show();
360
  });
361
- jQuery(".cleantalk_user").mouseout(function(){
 
362
  id = jQuery(this).attr("data-id");
363
- jQuery("#cleantalk_delete_user_"+id).hide();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  });
365
 
 
 
 
 
 
366
  //Show/hide action on mouse over/out
367
  jQuery(".cleantalk_user").mouseover(function(){
368
  id = jQuery(this).attr("data-id");
369
- jQuery("#cleantalk_button_set_"+id).show();
370
  });
371
  jQuery(".cleantalk_user").mouseout(function(){
372
  id = jQuery(this).attr("data-id");
373
- jQuery("#cleantalk_button_set_"+id).hide();
374
  });
375
-
376
  //Approve button
377
  jQuery(".cleantalk_delete_from_list_button").click(function(){
378
  ct_id = jQuery(this).attr("data-id");
 
 
379
  var data = {
380
  'action': 'ajax_ct_approve_user',
381
  'security': ct_ajax_nonce,
@@ -443,7 +498,7 @@ jQuery(document).ready(function(){
443
  });
444
 
445
  //Default load actions
446
- if(location.href.match(/ct_check_users/) && !location.href.match(/ct_worked=1/)){
447
- jQuery("#ct_check_users_button").click();
448
- }
449
  });
25
  ct_users_spam = 0,
26
  ct_users_bad = 0,
27
  ct_unchecked = 'unset',
28
+ ct_accurate_check = false,
29
+ ct_date_from = 0,
30
+ ct_date_till = 0;
31
 
32
  function animate_comment(to,id){
33
  if(ct_close_animate){
93
  if(ct_accurate_check)
94
  data['accurate_check'] = true;
95
 
96
+ if(ct_date_from && ct_date_till){
97
+ data['from'] = ct_date_from;
98
+ data['till'] = ct_date_till;
99
+ }
100
+
101
  jQuery.ajax({
102
  type: "POST",
103
  url: ajaxurl,
108
 
109
  if(parseInt(msg.error)){
110
  ct_working=false;
111
+ if(!confirm(msg.error_message+". Do you want to proceed?")){
112
+ var new_href = 'users.php?page=ct_check_users&ct_worked=1';
113
+ if(ct_date_from != 0 && ct_date_till != 0)
114
+ new_href+='&from='+ct_date_from+'&till='+ct_date_till;
115
+ location.href = new_href;
116
+ }else
117
  ct_send_users();
118
  }else{
119
  ct_new_check = false;
126
  var status_string = status_string.printf(ct_users_total, ct_users_checked, ct_users_spam, ct_users_bad);
127
  if(parseInt(ct_users_spam) > 0)
128
  status_string += ctUsersCheck.ct_status_string_warning;
129
+ jQuery('#ct_checking_status').html(status_string);
130
  jQuery('#ct_error_message').hide();
131
  ct_send_users();
132
  }else if(parseInt(msg.end) == 1){
133
  ct_working=false;
134
  jQuery('#ct_working_message').hide();
135
+ var new_href = 'users.php?page=ct_check_users&ct_worked=1';
136
+ if(ct_date_from != 0 && ct_date_till != 0)
137
+ new_href+='&from='+ct_date_from+'&till='+ct_date_till;
138
+ location.href = new_href;
139
  }
140
  }
141
  },
145
  jQuery('#cleantalk_js_func').html('Check users');
146
  setTimeout(ct_send_users(), 3000);
147
  },
148
+ timeout: 25000
149
  });
150
  }
151
  function ct_show_users_info(){
163
  setTimeout(ct_show_users_info, 3000);
164
 
165
  if(!ct_users_total){
166
+
167
  var data = {
168
  'action': 'ajax_info_users',
169
  'security': ct_ajax_nonce
170
  };
171
+
172
+ if(ct_date_from && ct_date_till){
173
+ data['from'] = ct_date_from;
174
+ data['till'] = ct_date_till;
175
+ }
176
+
177
  jQuery.ajax({
178
  type: "POST",
179
  url: ajaxurl,
180
  data: data,
181
  success: function(msg){
182
  msg = jQuery.parseJSON(msg);
183
+ jQuery('#ct_checking_status').html(msg.message);
184
  ct_users_total = msg.total;
185
  },
186
  error: function (jqXHR, textStatus, errorThrown){
266
  data: data,
267
  success: function(msg){
268
  location.href='users.php?page=ct_check_users&ct_worked=1';
 
269
  },
270
  error: function(jqXHR, textStatus, errorThrown) {
271
  jQuery('#ct_error_message').show();
275
  },
276
  timeout: 15000
277
  });
278
+ }
279
+
280
+ // Function to toggle dependences
281
+ function ct_toggle_depended(obj, secondary = false){
282
+
283
+ var depended = jQuery(obj.data('depended')),
284
+ state = obj.data('state');
285
+
286
+ if(!state && !secondary){
287
+ obj.data('state', true);
288
+ depended.removeProp('disabled');
289
+ }else{
290
+ obj.data('state', false);
291
+ depended.prop('disabled', true);
292
+ depended.removeProp('checked');
293
+ if(depended.data('depended'))
294
+ ct_toggle_depended(depended, true);
295
+ }
296
  }
297
 
298
  jQuery(document).ready(function(){
299
 
300
+ // Setting dependences
301
+ // jQuery('#ct_accurate_check') .data({'depended': '#ct_allow_date_range', 'state': false});
302
+ jQuery('#ct_allow_date_range').data({'depended': '.ct_date', 'state': false});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
 
304
+ // Toggle dependences
305
+ jQuery("#ct_allow_date_range, #ct_accurate_check").on('change', function(){
306
+ ct_toggle_depended(jQuery(this));
307
  });
308
 
309
+ jQuery("#ct_accurate_check").on('change', function(){
310
  if(ct_accurate_check)
311
  ct_accurate_check = false;
312
  else
313
  ct_accurate_check = true;
314
  });
315
 
316
+ var dates = jQuery('#ct_date_range_from, #ct_date_range_till').datepicker(
317
+ {
318
+ dateFormat: 'yy-mm-dd',
319
+ maxDate:"+0D",
320
+ changeMonth:true,
321
+ changeYear:true,
322
+ showAnim: 'slideDown',
323
+ onSelect: function(selectedDate){
324
+ var option = this.id == "ct_date_range_from" ? "minDate" : "maxDate",
325
+ instance = jQuery( this ).data( "datepicker" ),
326
+ date = jQuery.datepicker.parseDate(
327
+ instance.settings.dateFormat || jQuery.datepicker._defaults.dateFormat,
328
+ selectedDate, instance.settings);
329
+ dates.not(this).datepicker("option", option, date);
330
+ }
331
+ }
332
+ );
333
+ jQuery('#ct_date_range_from, #ct_date_range_till').prop('disabled', true);
334
+ /////
335
  // Check users
336
+ jQuery("#ct_check_spam_button").click(function(){
337
+
338
+ if(jQuery('#ct_allow_date_range').is(':checked')){
339
+
340
+ ct_date_from = jQuery('#ct_date_range_from').val(),
341
+ ct_date_till = jQuery('#ct_date_range_till').val();
342
+
343
+ if(!(ct_date_from != '' && ct_date_till != '')){
344
+ alert('Please, specify a date range.');
345
+ return;
346
+ }
347
+ }
348
+
349
+ jQuery('.ct_to_hide').hide();
350
  jQuery('#ct_working_message').show();
351
  jQuery('#ct_preloader').show();
352
+
353
  ct_working=true;
 
354
  ct_show_users_info();
355
+ ct_clear_users();
356
  });
357
 
358
  jQuery("#ct_insert_users").click(function(){
362
  jQuery("#ct_delete_users").click(function(){
363
  ct_insert_users(true);
364
  });
 
 
 
 
 
365
 
366
  // Delete all spam users
367
  jQuery("#ct_delete_all_users").click(function(){
369
  if (!confirm(ctUsersCheck.ct_confirm_deletion_all))
370
  return false;
371
 
372
+ jQuery('.ct_to_hide').hide();
373
+ jQuery('#ct_checking_status').hide();
 
 
 
 
 
374
  jQuery('#ct_search_info').hide();
 
 
375
  jQuery('#ct_preloader').show();
376
+ jQuery('#ct_deleting_message').show();
377
  jQuery('#ct_stop_deletion').show();
378
  jQuery("html, body").animate({ scrollTop: 0 }, "slow");
379
  ct_delete_all_users();
381
  jQuery("#ct_delete_checked_users").click(function(){
382
  if (!confirm(ctUsersCheck.ct_confirm_deletion_checked))
383
  return false;
 
384
  ct_delete_checked_users();
385
  });
386
+
387
+ jQuery("#ct_stop_deletion").click(function(){
388
+ location.href='users.php?page=ct_check_users&ct_worked=1';
389
  });
390
+
391
+ jQuery(".cleantalk_delete_user_button").click(function(){
392
  id = jQuery(this).attr("data-id");
393
+ ids=Array();
394
+ ids[0]=id;
395
+ var data = {
396
+ 'action': 'ajax_delete_checked_users',
397
+ 'security': ct_ajax_nonce,
398
+ 'ids':ids
399
+ };
400
+ jQuery.ajax({
401
+ type: "POST",
402
+ url: ajaxurl,
403
+ data: data,
404
+ success: function(msg){
405
+ ct_close_animate=false;
406
+ jQuery("#comment-"+id).hide();
407
+ jQuery("#comment-"+id).remove();
408
+ ct_close_animate=true;
409
+ },
410
+ timeout: 15000
411
+ });
412
  });
413
 
414
+ jQuery(".cleantalk_delete_user_button").click(function(){
415
+ id = jQuery(this).attr("data-id");
416
+ animate_comment(0.3, id);
417
+ });
418
+
419
  //Show/hide action on mouse over/out
420
  jQuery(".cleantalk_user").mouseover(function(){
421
  id = jQuery(this).attr("data-id");
422
+ jQuery("#cleantalk_delete_user_"+id).show();
423
  });
424
  jQuery(".cleantalk_user").mouseout(function(){
425
  id = jQuery(this).attr("data-id");
426
+ jQuery("#cleantalk_delete_user_"+id).hide();
427
  });
428
+
429
  //Approve button
430
  jQuery(".cleantalk_delete_from_list_button").click(function(){
431
  ct_id = jQuery(this).attr("data-id");
432
+
433
+ // Approving
434
  var data = {
435
  'action': 'ajax_ct_approve_user',
436
  'security': ct_ajax_nonce,
498
  });
499
 
500
  //Default load actions
501
+ // if(location.href.match(/ct_check_users/) && !location.href.match(/ct_worked=1/)){
502
+ // jQuery("#ct_check_spam_button").click();
503
+ // }
504
  });
assets/js/jquery-ui.min.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.12.1 - 2017-08-31
2
+ * http://jqueryui.com
3
+ * Includes: core.css, datepicker.css, progressbar.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=base&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cc0000&fcError=5f3f3f&borderColorError=f1a899&bgTextureError=flat&bgColorError=fddfdf&iconColorHighlight=777620&fcHighlight=777620&borderColorHighlight=dad55e&bgTextureHighlight=flat&bgColorHighlight=fffa90&iconColorActive=ffffff&fcActive=ffffff&borderColorActive=003eff&bgTextureActive=flat&bgColorActive=007fff&iconColorHover=555555&fcHover=2b2b2b&borderColorHover=cccccc&bgTextureHover=flat&bgColorHover=ededed&iconColorDefault=777777&fcDefault=454545&borderColorDefault=c5c5c5&bgTextureDefault=flat&bgColorDefault=f6f6f6&iconColorContent=444444&fcContent=333333&borderColorContent=dddddd&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=444444&fcHeader=333333&borderColorHeader=dddddd&bgTextureHeader=flat&bgColorHeader=e9e9e9&cornerRadius=3px&fwDefault=normal&fsDefault=1em&ffDefault=Arial%2CHelvetica%2Csans-serif
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #c5c5c5}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#003eff;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666}
assets/js/jquery-ui.min.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.12.1 - 2017-08-31
2
+ * http://jqueryui.com
3
+ * Includes: widget.js, jquery-1-7.js, keycode.js, widgets/datepicker.js, widgets/progressbar.js, effect.js
4
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */
5
+
6
+ (function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,n)}function n(){t.datepicker._isDisabledDatepicker(l.inline?l.dpDiv.parent()[0]:l.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function o(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.ui=t.ui||{},t.ui.version="1.12.1";var a=0,r=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=r.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=r.call(arguments,1),l=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(l=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):l=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=a++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.extend(t.ui,{datepicker:{version:"1.12.1"}});var l;t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,a){var r,l,h,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),o(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,h/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),l===n&&(l=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,a,r,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),h&&(this._curInst===h&&this._hideDatepicker(),a=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),o(h.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==n.dateFormat&&void 0===n.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,a),this._updateAlternate(h),this._updateDatepicker(h)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(i){if(i=i.target||i,"input"!==i.nodeName.toLowerCase()&&(i=t("input",i.parentNode)[0]),!t.datepicker._isDisabledDatepicker(i)&&t.datepicker._lastInput!==i){var s,n,a,r,l,h,c;s=t.datepicker._getInst(i),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),a=n?n.apply(i,[i,s]):{},a!==!1&&(o(s.settings,a),s.lastVal=null,t.datepicker._lastInput=i,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(i.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(i),t.datepicker._pos[1]+=i.offsetHeight),r=!1,t(i).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),l=t.datepicker._checkOffset(s,l,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),s.inline||(h=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",e(t(i))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?s.dpDiv.show(h,t.datepicker._get(s,"showOptions"),c):s.dpDiv[h||"show"](h?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))}},_updateDatepicker:function(e){this.maxRows=4,l=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),o=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&n.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",a*o+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(l).match(o);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(l,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],l+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>l&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return l(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||l("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;
7
+ case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":r+=parseInt(h[1],10);break;case"w":case"W":r+=7*parseInt(h[1],10);break;case"m":case"M":a+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}h=l.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,T,I,M,P,S,N,H,A,z,O,E,W,F,L,R=new Date,Y=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),B=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),X=this._get(t,"stepMonths"),$=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-X,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+X,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:Y,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",h=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(B?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),T=" ui-corner-all",I="",$){if(I+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:I+=" ui-datepicker-group-first",T=" ui-corner-"+(B?"right":"left");break;case U[1]-1:I+=" ui-datepicker-group-last",T=" ui-corner-"+(B?"left":"right");break;default:I+=" ui-datepicker-group-middle",T=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===k?B?o:s:"")+(/all|right/.test(T)&&0===k?B?s:o:"")+this._generateMonthYearHeader(t,Z,te,J,Q,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",M=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)P=(w+c)%7,M+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[P]+"'>"+p[P]+"</span></th>";for(I+=M+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),N=(this._getFirstDayOfMonth(te,Z)-c+7)%7,H=Math.ceil((N+S)/7),A=$?this.maxRows>H?this.maxRows:H:H,this.maxRows=A,z=this._daylightSavingAdjust(new Date(te,Z,1-N)),O=0;A>O;O++){for(I+="<tr>",E=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(z)+"</td>":"",w=0;7>w;w++)W=m?m.apply(t.input?t.input[0]:null,[z]):[!0,""],F=z.getMonth()!==Z,L=F&&!v||!W[0]||J&&J>z||Q&&z>Q,E+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(z.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===z.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+W[1]+(z.getTime()===G.getTime()?" "+this._currentClass:"")+(z.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!W[2]?"":" title='"+W[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===Y.getTime()?" ui-state-highlight":"")+(z.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);I+=E+"</tr>"}Z++,Z>11&&(Z=0,te++),I+="</tbody></table>"+($?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=I}y+=x}return y+=h,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=s.getMonth())&&(!h||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}});var h="ui-effects-",c="ui-effects-style",u="ui-effects-animated",d=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,o){var a,r=o.re.exec(i),l=r&&o.parse(r),h=o.space||"rgba";return l?(a=s[h](l),s[c[h].cache]=a[c[h].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,a,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,l],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),o=c[n],a=0===this.alpha()?h("transparent"):this,r=a[o.cache]||o.to(a._rgba),l=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],h=s[o],c=u[n.type]||{};null!==h&&(null===a?l[o]=h:(c.mod&&(h-a>c.mod/2?a+=c.mod:a-h>c.mod/2&&(a-=c.mod)),l[o]=i((h-a)*e+a,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),l=Math.min(s,n,o),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-o)/h+360:n===r?60*(o-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[a]&&(this[a]=l(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[a]=d,n):h(d)},f(o,function(e,i){h.fn[e]||(h.fn[e]=function(n){var o,a=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=h(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(d),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(d.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var l=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",h=l.children?a.find("*").addBack():a;h=h.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),h=h.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(u)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(h+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(h+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(c,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(c)||"",t.removeData(c)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(h+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=h+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(u),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(l)&&l.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[h](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===h:"show"===h)?(r[h](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",l=s.complete,h=s.mode,c=[],d=function(e){var i=t(this),s=t.effects.mode(i,h)||o;i.data(u,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?h?this[h](s.duration,l):this.each(function(){l&&l.call(this)}):a===!1?this.each(d).each(i):this.queue(r,d).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,l=o?a.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)
8
+ },t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}(),t.effects});
cleantalk.php CHANGED
@@ -3,14 +3,14 @@
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms. Formerly Anti-Spam by CleanTalk.
6
- Version: 5.74
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
- $cleantalk_plugin_version = '5.74';
12
- $cleantalk_agent_version = 'wordpress-574';
13
- $cleantalk_executed = false;
14
 
15
  define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
16
 
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms. Formerly Anti-Spam by CleanTalk.
6
+ Version: 5.74.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
+ $cleantalk_plugin_version='5.74.1';
12
+ $ct_agent_version = 'wordpress-5741';
13
+ $cleantalk_executed=false;
14
 
15
  define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
16
 
inc/cleantalk-admin.php CHANGED
@@ -228,6 +228,7 @@ function ct_enqueue_scripts($hook) {
228
  if( $hook == 'comments_page_ct_check_spam' || $hook == 'edit-comments.php'){
229
 
230
  wp_enqueue_style('cleantalk_admin_css_settings_page', plugins_url().'/cleantalk-spam-protect/assets/css/cleantalk-spam-check.css', array(), $cleantalk_plugin_version, 'all');
 
231
 
232
  $ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
233
  $user_token = !empty($ct_data['user_token']) ? $ct_data['user_token'] : '';
@@ -235,6 +236,7 @@ function ct_enqueue_scripts($hook) {
235
 
236
  wp_enqueue_script('ct_comments_checkspam', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-comments-checkspam.js'), array(), $cleantalk_plugin_version);
237
  wp_enqueue_script('ct_comments_editscreen', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-comments-editscreen.js'), array(), $cleantalk_plugin_version);
 
238
 
239
  wp_localize_script( 'jquery', 'ctCommentsCheck', array(
240
  'ct_ajax_nonce' => $ajax_nonce,
@@ -264,6 +266,7 @@ function ct_enqueue_scripts($hook) {
264
  if( $hook == 'users_page_ct_check_users' || $hook == 'users.php'){
265
 
266
  wp_enqueue_style('cleantalk_admin_css_settings_page', plugins_url().'/cleantalk-spam-protect/assets/css/cleantalk-spam-check.css', array(), $cleantalk_plugin_version, 'all');
 
267
 
268
  $current_user = wp_get_current_user();
269
  $ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
@@ -271,6 +274,7 @@ function ct_enqueue_scripts($hook) {
271
 
272
  wp_enqueue_script('ct_users_checkspam', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-users-checkspam.js'), array(), $cleantalk_plugin_version);
273
  wp_enqueue_script('ct_users_editscreen', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-users-editscreen.js'), array(), $cleantalk_plugin_version);
 
274
 
275
  wp_localize_script( 'jquery', 'ctUsersCheck', array(
276
  'ct_ajax_nonce' => $ajax_nonce,
@@ -380,9 +384,9 @@ function ct_account_status_check(){
380
  * Admin action 'admin_init' - Add the admin settings and such
381
  */
382
  function ct_admin_init(){
383
-
384
  global $ct_server_timeout, $show_ct_notice_autokey, $ct_notice_autokey_label, $ct_notice_autokey_value, $show_ct_notice_renew, $ct_notice_renew_label, $show_ct_notice_trial, $ct_notice_trial_label, $show_ct_notice_online, $ct_notice_online_label, $renew_notice_showtime, $trial_notice_showtime, $ct_plugin_name, $ct_options, $ct_data, $ct_user_token_label, $cleantalk_plugin_version, $notice_check_timeout, $ct_agent_version;
385
-
386
  $ct_options = ct_get_options();
387
  $ct_data = ct_get_data();
388
 
228
  if( $hook == 'comments_page_ct_check_spam' || $hook == 'edit-comments.php'){
229
 
230
  wp_enqueue_style('cleantalk_admin_css_settings_page', plugins_url().'/cleantalk-spam-protect/assets/css/cleantalk-spam-check.css', array(), $cleantalk_plugin_version, 'all');
231
+ wp_enqueue_style('jqueryui_css', plugins_url().'/cleantalk-spam-protect/assets/js/jquery-ui.min.css', array(), '1.21.1', 'all');
232
 
233
  $ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
234
  $user_token = !empty($ct_data['user_token']) ? $ct_data['user_token'] : '';
236
 
237
  wp_enqueue_script('ct_comments_checkspam', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-comments-checkspam.js'), array(), $cleantalk_plugin_version);
238
  wp_enqueue_script('ct_comments_editscreen', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-comments-editscreen.js'), array(), $cleantalk_plugin_version);
239
+ wp_enqueue_script('jqueryui', plugins_url('/cleantalk-spam-protect/assets/js/jquery-ui.min.js'), array(), '1.12.1');
240
 
241
  wp_localize_script( 'jquery', 'ctCommentsCheck', array(
242
  'ct_ajax_nonce' => $ajax_nonce,
266
  if( $hook == 'users_page_ct_check_users' || $hook == 'users.php'){
267
 
268
  wp_enqueue_style('cleantalk_admin_css_settings_page', plugins_url().'/cleantalk-spam-protect/assets/css/cleantalk-spam-check.css', array(), $cleantalk_plugin_version, 'all');
269
+ wp_enqueue_style('jqueryui_css', plugins_url().'/cleantalk-spam-protect/assets/js/jquery-ui.min.css', array(), '1.21.1', 'all');
270
 
271
  $current_user = wp_get_current_user();
272
  $ajax_nonce = wp_create_nonce( "ct_secret_nonce" );
274
 
275
  wp_enqueue_script('ct_users_checkspam', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-users-checkspam.js'), array(), $cleantalk_plugin_version);
276
  wp_enqueue_script('ct_users_editscreen', plugins_url('/cleantalk-spam-protect/assets/js/cleantalk-users-editscreen.js'), array(), $cleantalk_plugin_version);
277
+ wp_enqueue_script('jqueryui', plugins_url('/cleantalk-spam-protect/assets/js/jquery-ui.min.js'), array(), '1.12.1');
278
 
279
  wp_localize_script( 'jquery', 'ctUsersCheck', array(
280
  'ct_ajax_nonce' => $ajax_nonce,
384
  * Admin action 'admin_init' - Add the admin settings and such
385
  */
386
  function ct_admin_init(){
387
+
388
  global $ct_server_timeout, $show_ct_notice_autokey, $ct_notice_autokey_label, $ct_notice_autokey_value, $show_ct_notice_renew, $ct_notice_renew_label, $show_ct_notice_trial, $ct_notice_trial_label, $show_ct_notice_online, $ct_notice_online_label, $renew_notice_showtime, $trial_notice_showtime, $ct_plugin_name, $ct_options, $ct_data, $ct_user_token_label, $cleantalk_plugin_version, $notice_check_timeout, $ct_agent_version;
389
+
390
  $ct_options = ct_get_options();
391
  $ct_data = ct_get_data();
392
 
inc/cleantalk-comments.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  add_action('admin_menu', 'ct_add_comments_menu');
3
  add_action( 'wp_ajax_ajax_check_comments', 'ct_ajax_check_comments' );
4
  add_action( 'wp_ajax_ajax_info_comments', 'ct_ajax_info_comments' );
@@ -8,10 +9,9 @@ add_action( 'wp_ajax_ajax_delete_all', 'ct_ajax_delete_all' );
8
  add_action( 'wp_ajax_ajax_clear_comments', 'ct_ajax_clear_comments' );
9
  add_action( 'wp_ajax_ajax_ct_approve_comment', 'ct_comment_check_approve_comment' );
10
 
11
-
12
  function ct_add_comments_menu(){
13
  if(current_user_can('activate_plugins'))
14
- add_comments_page( __("Check for spam", 'cleantalk'), __("Check for spam", 'cleantalk'), 'read', 'ct_check_spam', 'ct_show_checkspam_page');
15
  }
16
 
17
  function ct_show_checkspam_page(){
@@ -31,26 +31,45 @@ function ct_show_checkspam_page(){
31
 
32
  ?>
33
  <div class="wrap">
34
- <h2><?php echo $ct_plugin_name; ?></h2><br />
35
 
36
- <!-- AJAX error message -->
37
  <div id="ct_error_message" style="display:none">
38
  <h3>
39
  <?php _e("Ajax error. Process will be automatically restarted in 3 seconds. Status: ", 'cleantalk'); ?><span id="cleantalk_ajax_error"></span> (<span id="cleantalk_js_func"></span>)
40
  </h3>
41
- <h4 style="text-align:center;width:90%;">Please, check for JavaScript errors in your dashboard and and repair it.</h4>
42
  </div>
43
 
44
- <!-- Deleting message -->
45
  <div id="ct_deleting_message" style="display:none;">
46
  <?php _e("Please wait for a while. CleanTalk is deleting spam comments. Comments left: ", 'cleantalk'); ?> <span id="cleantalk_comments_left">
47
  <?php echo $cnt_spam; ?>
48
  </span>
49
  </div>
50
 
51
- <!-- Main info -->
52
  <h3 id="ct_checking_status"><?php echo ct_ajax_info_comments(true);?></h3>
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  <!-- Cooling notice -->
55
  <h3 id="ct_cooling_notice"></h3>
56
 
@@ -61,6 +80,7 @@ function ct_show_checkspam_page(){
61
  <div id="ct_working_message">
62
  <?php _e("Please wait! CleanTalk is checking all approved and pending comments via blacklist database at cleantalk.org. You will have option to delete found spam comments after plugin finish.", 'cleantalk'); ?>
63
  </div>
 
64
  <?php
65
 
66
  // Pagination
@@ -84,7 +104,7 @@ function ct_show_checkspam_page(){
84
 
85
  $pages = ceil(intval($cnt_spam)/$on_page);
86
  if($pages && $pages != 1){
87
- echo "<div class='pagination'>"
88
  ."<b>Pages:</b>"
89
  ."<ul class='pagination'>";
90
  for($i = 1; $i <= $pages; $i++){
@@ -98,7 +118,7 @@ function ct_show_checkspam_page(){
98
  echo "</div>";
99
  }
100
  ?>
101
- <table class="widefat fixed comments" id="ct_check_comments_table">
102
  <thead>
103
  <th scope="col" id="cb" class="manage-column column-cb check-column">
104
  <label class="screen-reader-text" for="cb-select-all-1">Select All</label>
@@ -193,7 +213,7 @@ function ct_show_checkspam_page(){
193
  <?php
194
  // Pagination
195
  if($pages && $pages != 1){
196
- echo "<div class='pagination'>"
197
  ."<b>Pages:</b>"
198
  ."<ul class='pagination'>";
199
  for($i = 1; $i <= $pages; $i++){
@@ -207,45 +227,24 @@ function ct_show_checkspam_page(){
207
  echo "</div>";
208
  }
209
  ?>
210
- <div id="ct_tools_buttons" style="margin-top: 10px;">
211
- <button class="button" id="ct_delete_all"><?php _e('Delete all comments from the list', 'cleantalk'); ?></button>
212
  <button class="button" id="ct_delete_checked"><?php _e('Delete selected', 'cleantalk'); ?></button><br /><br />
213
  </div>
214
  <?php
215
  }
216
- echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<br /><button class="button" id="ct_insert_comments">'. __('Insert comments', 'cleantalk') .' (100)</button> ' : '';
217
- echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<button class="button" id="ct_delete_comments">'. __('Delete comments', 'cleantalk') .' (110)</button><br />' : '';
218
- ?>
219
- <br />
220
- <table id="ct_check_button_table">
221
- <tr>
222
- <td style="width: 130px;">
223
- <button class="button" id="ct_check_spam_button"><?php _e("Check for spam", 'cleantalk'); ?></button>
224
- </td>
225
- <td style="padding-left: 2em;">
226
- <div id="ct_info_message">
227
- <?php _e("The plugin will check all comments against blacklists database and show you senders that have spam activity on other websites.", 'cleantalk'); ?>
228
- </div>
229
- </td>
230
- </tr>
231
- <tr>
232
- <td>
233
- <div style="margin: 10px 0 0 20px">
234
- <input id="ct_accurate_check" type="checkbox" value="1" /><?php _e("Accurate check", 'cleantalk'); ?>
235
- </div>
236
- </td>
237
- <td style="padding-left: 2em;">
238
- <div id="ct_info_message" class="wrap"><?php _e("Allow to use comment's dates to perform more accurate check. Could seriously slow down the check.", 'cleantalk'); ?></div>
239
- </td>
240
- </tr>
241
- </table>
242
- <?php
243
  if($cnt_spam > 0)
244
  echo "<div id='ct_search_info'>"
245
  ."<br />"
246
  .__('There is some differencies between blacklists database and our API mechanisms. Blacklists shows all history of spam activity, but our API (that used in spam checking) used another parameters, too: last day of activity, number of spam attacks during last days etc. This mechanisms help us to reduce number of false positivitie. So, there is nothing strange, if some emails/IPs will be not found by this checking.', 'cleantalk')
247
  ."</div>";
248
  ?>
 
 
 
249
  </div>
250
  <?php
251
  }
@@ -253,13 +252,21 @@ function ct_show_checkspam_page(){
253
  function ct_ajax_check_comments(){
254
 
255
  check_ajax_referer( 'ct_secret_nonce', 'security' );
 
256
  global $ct_options, $ct_ip_penalty_days;
 
257
  $ct_options = ct_get_options();
258
 
259
- $args_unchecked = array(
 
 
 
 
 
 
260
  'meta_query' => array(
261
  'relation' => 'AND',
262
- Array(
263
  'key' => 'ct_checked',
264
  'compare' => 'NOT EXISTS'
265
  ),
@@ -268,12 +275,25 @@ function ct_ajax_check_comments(){
268
  'compare' => 'NOT EXISTS'
269
  )
270
  ),
271
- 'orderby' => 'comment_date',
272
  'order' => 'ASC',
273
  'number' => 100
274
  );
275
- $c = get_comments($args_unchecked);
276
- $c = array_values($c);
 
 
 
 
 
 
 
 
 
 
 
 
 
277
 
278
  $check_result = array(
279
  'end' => 0,
@@ -287,12 +307,13 @@ function ct_ajax_check_comments(){
287
 
288
  if(!empty($_POST['accurate_check'])){
289
  // Leaving comments only with first comment's date. Unsetting others.
 
290
  foreach($c as $comment_index => $comment){
291
 
292
  if(!isset($curr_date))
293
- $curr_date = (substr($comment->comment_date, 0, 10) ? substr($comment->comment_date, 0, 10) : '');
294
-
295
- if(substr($comment->comment_date, 0, 10) != $curr_date)
296
  unset($c[$comment_index]);
297
 
298
  }
@@ -314,7 +335,6 @@ function ct_ajax_check_comments(){
314
  $check_result['bad']++;
315
  update_comment_meta($c[$i]->comment_ID,'ct_bad','1');
316
  unset($c[$i]);
317
-
318
  }else{
319
  if(!empty($curr_ip))
320
  $data[] = $curr_ip;
@@ -360,20 +380,11 @@ function ct_ajax_check_comments(){
360
  }else{
361
 
362
  $result=json_decode($result);
 
363
  if(isset($result->error_message)){
364
-
365
- // Data not set, marks comments as checked to avoid loops.
366
- // if (isset($result->error_no) && $result->error_no == 8) { // Data not set.
367
- // for($i=0;$i<sizeof($c);$i++) {
368
- // add_comment_meta($c[$i]->comment_ID,'ct_checked',date("Y-m-d H:m:s"),true);
369
- // }
370
- // print 1;
371
- // }else{
372
- $check_result['error'] = 1;
373
- $check_result['error_message'] = __('Server response: ', 'cleantalk').$result->error_message;
374
- print "Server response: ".$result->error_message;
375
- // }
376
-
377
  }else{
378
  for($i=0;$i<sizeof($c);$i++){
379
 
@@ -411,33 +422,48 @@ function ct_ajax_info_comments($direct_call = false){
411
 
412
  if (!$direct_call)
413
  check_ajax_referer( 'ct_secret_nonce', 'security' );
414
-
 
 
 
 
 
 
 
415
  // Total comments
416
- $cnt = get_comments(Array('count'=>true));
 
 
 
 
 
417
 
418
  // Spam comments
419
- $cnt_spam = get_comments(
420
- array(
421
- 'meta_key' => 'ct_marked_as_spam',
422
- 'count' => true
423
- )
424
  );
 
 
425
 
426
  // Checked comments
427
- $cnt_checked =get_comments(
428
- array(
429
- 'meta_key' => 'ct_checked',
430
- 'count' => true
431
- )
432
  );
433
-
 
 
434
  // Bad comments (without IP and Email)
435
- $cnt_bad =get_comments(
436
- array(
437
- 'meta_key' => 'ct_bad',
438
- 'count' => true
439
- )
440
  );
 
 
441
 
442
  $return = array(
443
  'message' => '',
1
  <?php
2
+
3
  add_action('admin_menu', 'ct_add_comments_menu');
4
  add_action( 'wp_ajax_ajax_check_comments', 'ct_ajax_check_comments' );
5
  add_action( 'wp_ajax_ajax_info_comments', 'ct_ajax_info_comments' );
9
  add_action( 'wp_ajax_ajax_clear_comments', 'ct_ajax_clear_comments' );
10
  add_action( 'wp_ajax_ajax_ct_approve_comment', 'ct_comment_check_approve_comment' );
11
 
 
12
  function ct_add_comments_menu(){
13
  if(current_user_can('activate_plugins'))
14
+ add_comments_page( __("Check for spam", 'cleantalk'), __("Show spam comments", 'cleantalk'), 'read', 'ct_check_spam', 'ct_show_checkspam_page');
15
  }
16
 
17
  function ct_show_checkspam_page(){
31
 
32
  ?>
33
  <div class="wrap">
34
+ <h2><img src="<?php echo plugin_dir_url(__FILE__) ?>/images/logo_color.png" /> <?php echo $ct_plugin_name; ?></h2><br />
35
 
36
+ <!-- AJAX error message -->
37
  <div id="ct_error_message" style="display:none">
38
  <h3>
39
  <?php _e("Ajax error. Process will be automatically restarted in 3 seconds. Status: ", 'cleantalk'); ?><span id="cleantalk_ajax_error"></span> (<span id="cleantalk_js_func"></span>)
40
  </h3>
41
+ <h4>Please, check for JavaScript errors in your dashboard and and repair it.</h4>
42
  </div>
43
 
44
+ <!-- Deleting message -->
45
  <div id="ct_deleting_message" style="display:none;">
46
  <?php _e("Please wait for a while. CleanTalk is deleting spam comments. Comments left: ", 'cleantalk'); ?> <span id="cleantalk_comments_left">
47
  <?php echo $cnt_spam; ?>
48
  </span>
49
  </div>
50
 
51
+ <!-- Main info -->
52
  <h3 id="ct_checking_status"><?php echo ct_ajax_info_comments(true);?></h3>
53
 
54
+ <!-- Check options -->
55
+ <div class="ct_to_hide" id="ct_check_params_wrapper">
56
+ <button class="button ct_check_params_elem" id="ct_check_spam_button"><?php _e("Start check", 'cleantalk'); ?></button>
57
+ <p class="ct_check_params_desc"><?php _e("The plugin will check all comments against blacklists database and show you senders that have spam activity on other websites.", 'cleantalk'); ?></p>
58
+ <br />
59
+ <div class="ct_check_params_elem ct_check_params_elem_sub">
60
+ <input id="ct_accurate_check" type="checkbox" value="1" /><b><label for="ct_accurate_check"><?php _e("Accurate check", 'cleantalk'); ?></b></label>
61
+ </div>
62
+ <p class="ct_check_params_desc"><?php _e("Allows to use comment's dates to perform more accurate check. Could seriously slow down the check.", 'cleantalk'); ?></p>
63
+ <br />
64
+ <div class="ct_check_params_elem ct_check_params_elem_sub">
65
+ <input id="ct_allow_date_range" type="checkbox" value="1" /><label for="ct_allow_date_range"><b><?php _e("Specify date range", 'cleantalk'); ?></b></label>
66
+ </div>
67
+ <div class="ct_check_params_desc">
68
+ <input class="ct_date" type="text" id="ct_date_range_from" value="<?php echo isset($_GET['from']) ? $_GET['from'] : ''; ?>" readonly />
69
+ <input class="ct_date" type="text" id="ct_date_range_till" value="<?php echo isset($_GET['till']) ? $_GET['till'] : ''; ?>" readonly />
70
+ </div>
71
+ </div>
72
+
73
  <!-- Cooling notice -->
74
  <h3 id="ct_cooling_notice"></h3>
75
 
80
  <div id="ct_working_message">
81
  <?php _e("Please wait! CleanTalk is checking all approved and pending comments via blacklist database at cleantalk.org. You will have option to delete found spam comments after plugin finish.", 'cleantalk'); ?>
82
  </div>
83
+
84
  <?php
85
 
86
  // Pagination
104
 
105
  $pages = ceil(intval($cnt_spam)/$on_page);
106
  if($pages && $pages != 1){
107
+ echo "<div class='ct_to_hide pagination'>"
108
  ."<b>Pages:</b>"
109
  ."<ul class='pagination'>";
110
  for($i = 1; $i <= $pages; $i++){
118
  echo "</div>";
119
  }
120
  ?>
121
+ <table class="ct_to_hide widefat fixed comments" id="ct_check_comments_table">
122
  <thead>
123
  <th scope="col" id="cb" class="manage-column column-cb check-column">
124
  <label class="screen-reader-text" for="cb-select-all-1">Select All</label>
213
  <?php
214
  // Pagination
215
  if($pages && $pages != 1){
216
+ echo "<div class='ct_to_hide pagination'>"
217
  ."<b>Pages:</b>"
218
  ."<ul class='pagination'>";
219
  for($i = 1; $i <= $pages; $i++){
227
  echo "</div>";
228
  }
229
  ?>
230
+ <div class="ct_to_hide" id="ct_tools_buttons" style="margin-top: 10px;">
231
+ <button class= "button" id="ct_delete_all"><?php _e('Delete all comments from the list', 'cleantalk'); ?></button>
232
  <button class="button" id="ct_delete_checked"><?php _e('Delete selected', 'cleantalk'); ?></button><br /><br />
233
  </div>
234
  <?php
235
  }
236
+ echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<button class="button ct_to_hide" id="ct_insert_comments">'. __('Insert comments', 'cleantalk') .' (100)</button> ' : '';
237
+ echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<button class="button ct_to_hide" id="ct_delete_comments">'. __('Delete comments', 'cleantalk') .' (110)</button>' : '';
238
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  if($cnt_spam > 0)
240
  echo "<div id='ct_search_info'>"
241
  ."<br />"
242
  .__('There is some differencies between blacklists database and our API mechanisms. Blacklists shows all history of spam activity, but our API (that used in spam checking) used another parameters, too: last day of activity, number of spam attacks during last days etc. This mechanisms help us to reduce number of false positivitie. So, there is nothing strange, if some emails/IPs will be not found by this checking.', 'cleantalk')
243
  ."</div>";
244
  ?>
245
+ <div>
246
+ <button class="button" id="ct_stop_deletion" style="display:none;"><?php _e("Stop deletion", 'cleantalk'); ?></button>
247
+ </div>
248
  </div>
249
  <?php
250
  }
252
  function ct_ajax_check_comments(){
253
 
254
  check_ajax_referer( 'ct_secret_nonce', 'security' );
255
+
256
  global $ct_options, $ct_ip_penalty_days;
257
+
258
  $ct_options = ct_get_options();
259
 
260
+ $params = array(
261
+ 'fields' => array(
262
+ 'comment_ID',
263
+ 'comment_date_gmt',
264
+ 'comment_author_IP',
265
+ 'comment_author_email',
266
+ ),
267
  'meta_query' => array(
268
  'relation' => 'AND',
269
+ array(
270
  'key' => 'ct_checked',
271
  'compare' => 'NOT EXISTS'
272
  ),
275
  'compare' => 'NOT EXISTS'
276
  )
277
  ),
278
+ 'orderby' => 'comment_date_gmt',
279
  'order' => 'ASC',
280
  'number' => 100
281
  );
282
+
283
+ if(isset($_POST['from'], $_POST['till'])){
284
+
285
+ $from_date = date('Y-m-d', intval(strtotime($_POST['from'])));
286
+ $till_date = date('Y-m-d', intval(strtotime($_POST['till'])));
287
+
288
+ $params['date_query'] = array(
289
+ 'column' => 'comment_date_gmt',
290
+ 'after' => $from_date,
291
+ 'before' => $till_date,
292
+ 'inclusive' => true,
293
+ );
294
+ }
295
+
296
+ $c = get_comments( $params );
297
 
298
  $check_result = array(
299
  'end' => 0,
307
 
308
  if(!empty($_POST['accurate_check'])){
309
  // Leaving comments only with first comment's date. Unsetting others.
310
+
311
  foreach($c as $comment_index => $comment){
312
 
313
  if(!isset($curr_date))
314
+ $curr_date = (substr($comment->comment_date_gmt, 0, 10) ? substr($comment->comment_date_gmt, 0, 10) : '');
315
+
316
+ if(substr($comment->comment_date_gmt, 0, 10) != $curr_date)
317
  unset($c[$comment_index]);
318
 
319
  }
335
  $check_result['bad']++;
336
  update_comment_meta($c[$i]->comment_ID,'ct_bad','1');
337
  unset($c[$i]);
 
338
  }else{
339
  if(!empty($curr_ip))
340
  $data[] = $curr_ip;
380
  }else{
381
 
382
  $result=json_decode($result);
383
+
384
  if(isset($result->error_message)){
385
+ $check_result['error'] = 1;
386
+ $check_result['error_message'] = __('Server response: ', 'cleantalk').$result->error_message;
387
+ print "Server response: ".$result->error_message;
 
 
 
 
 
 
 
 
 
 
388
  }else{
389
  for($i=0;$i<sizeof($c);$i++){
390
 
422
 
423
  if (!$direct_call)
424
  check_ajax_referer( 'ct_secret_nonce', 'security' );
425
+
426
+ // Checking dates value
427
+ if(isset($_POST['from'], $_POST['till'])){
428
+
429
+ $from_date = date('Y-m-d', intval(strtotime($_POST['from'])));
430
+ $till_date = date('Y-m-d', intval(strtotime($_POST['till'])));
431
+ }
432
+
433
  // Total comments
434
+ $params = array(
435
+ 'fields' => 'ids',
436
+ 'count' => true,
437
+ );
438
+ if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'comment_date_gmt', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
439
+ $cnt = get_comments( $params );
440
 
441
  // Spam comments
442
+ $params = array(
443
+ 'fields' => 'ids',
444
+ 'meta_key' => 'ct_marked_as_spam',
445
+ 'count' => true
 
446
  );
447
+ if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'comment_date_gmt', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
448
+ $cnt_spam = get_comments( $params );
449
 
450
  // Checked comments
451
+ $params = array(
452
+ 'fields' => 'ids',
453
+ 'meta_key' => 'ct_checked',
454
+ 'count' => true
 
455
  );
456
+ if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'comment_date_gmt', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
457
+ $cnt_checked = get_comments( $params );
458
+
459
  // Bad comments (without IP and Email)
460
+ $params = array(
461
+ 'fields' => 'ids',
462
+ 'meta_key' => 'ct_bad',
463
+ 'count' => true
 
464
  );
465
+ if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'comment_date_gmt', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
466
+ $cnt_bad = get_comments( $params );
467
 
468
  $return = array(
469
  'message' => '',
inc/cleantalk-users.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  add_action('admin_menu', 'ct_add_users_menu');
3
  add_action( 'wp_ajax_ajax_check_users', 'ct_ajax_check_users' );
4
  add_action( 'wp_ajax_ajax_info_users', 'ct_ajax_info_users' );
@@ -30,28 +31,47 @@ function ct_show_users_page(){
30
 
31
  ?>
32
  <div class="wrap">
33
- <h2><?php echo $ct_plugin_name; ?></h2><br />
34
 
35
- <!-- AJAX error message -->
36
  <div id="ct_error_message" style="display:none">
37
- <h3 style="text-align: center;width:90%;">
38
  <?php _e("Ajax error. Process will be automatically restarted in 3 seconds. Status: ", 'cleantalk'); ?><span id="cleantalk_ajax_error"></span> (<span id="cleantalk_js_func"></span>)
39
  </h3>
40
- <h4 style="text-align:center;width:90%;">Please, check for JavaScript errors in your dashboard and and repair it.</h4>
41
  </div>
42
 
43
- <!-- Deleting message -->
44
  <div id="ct_deleting_message" style="display:none">
45
  <?php _e("Please wait for a while. CleanTalk is deleting spam users. Users left: ", 'cleantalk'); ?> <span id="cleantalk_users_left">
46
  <?php echo $cnt_spam1;?>
47
  </span>
48
  </div>
49
 
50
- <!-- Main info -->
51
- <h3 id="ct_checking_users_status" style="text-align:center;width:90%;"><?php echo ct_ajax_info_users(true); ?></h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  <!-- Cooling notice -->
54
- <h3 id="ct_cooling_notice" style="text-align:center;width:90%;"></h3>
55
 
56
  <!-- Preloader and working message -->
57
  <div id="ct_preloader">
@@ -62,9 +82,11 @@ function ct_show_users_page(){
62
  </div>
63
 
64
  <?php
 
65
  // Pagination
66
  $page = !empty($_GET['spam_page']) ? intval($_GET['spam_page']) : 1;
67
  $on_page = 20;
 
68
  $args_spam = array(
69
  'meta_query' => array(
70
  Array(
@@ -82,7 +104,7 @@ function ct_show_users_page(){
82
 
83
  $pages = ceil(intval($cnt_spam1)/$on_page);
84
  if($pages && $pages != 1){
85
- echo "<div class='pagination'>"
86
  ."<b>Pages:</b>"
87
  ."<ul class='pagination'>";
88
  for($i = 1; $i <= $pages; $i++){
@@ -96,7 +118,7 @@ function ct_show_users_page(){
96
  echo "</div>";
97
  }
98
  ?>
99
- <table class="widefat fixed comments" id="ct_check_users_table">
100
  <thead>
101
  <th scope="col" id="cb" class="manage-column column-cb check-column">
102
  <label class="screen-reader-text" for="cb-select-all-1">Select All</label>
@@ -190,7 +212,7 @@ function ct_show_users_page(){
190
  <?php
191
  // Pagination
192
  if($pages && $pages != 1){
193
- echo "<div class='pagination'>"
194
  ."<b>Pages:</b>"
195
  ."<ul class='pagination'>";
196
  for($i = 1; $i <= $pages; $i++){
@@ -204,41 +226,16 @@ function ct_show_users_page(){
204
  echo "</div>";
205
  }
206
  ?>
207
- <div id="ct_tools_buttons" style="margin-top: 10px;">
208
  <button class="button" id="ct_delete_all_users"><?php _e('Delete all users from list', 'cleantalk'); ?></button>
209
  <button class="button" id="ct_delete_checked_users"><?php _e('Delete selected', 'cleantalk'); ?></button>
210
  <button class="button" id="ct_get_csv_file"><?php _e('Download results in CSV', 'cleantalk'); ?></button>
211
  </div>
212
  <?php
213
  }
214
- echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<br /><button class="button" id="ct_insert_users">'. __('Insert accounts', 'cleantalk'). ' (100)</button> ' : '';
215
- echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<button class="button" id="ct_delete_users">'. __('Delete accounts', 'cleantalk'). ' (110)</button><br />' : '';
216
- ?>
217
- <br />
218
- <br />
219
- <table id="ct_check_button_table">
220
- <tr>
221
- <td style="width: 130px;">
222
- <button class="button" id="ct_check_users_button"><?php _e("Check for spam", 'cleantalk'); ?></button>
223
- </td>
224
- <td style="padding-left: 2em;">
225
- <div id="ct_info_message" class="wrap">
226
- <?php _e("The plugin will check all users against blacklists database and show you senders that have spam activity on other websites. Just click 'Find spam users' to start.", 'cleantalk'); ?>
227
- </div>
228
- </td>
229
- </tr>
230
- <tr>
231
- <td>
232
- <div style="margin: 10px 0 0 20px">
233
- <input id="ct_accurate_check" type="checkbox" value="1" /><?php _e("Accurate check", 'cleantalk'); ?>
234
- </div>
235
- </td>
236
- <td style="padding-left: 2em;">
237
- <div id="ct_info_message" class="wrap"><?php _e("Allow to use registrations dates to perform more accurate check. Could seriously slow down the check.", 'cleantalk'); ?></div>
238
- </td>
239
- </tr>
240
- </table>
241
- <?php
242
  if($cnt_spam1 > 0)
243
  echo "<div id='ct_search_info'>"
244
  ."<br />"
@@ -255,18 +252,25 @@ function ct_show_users_page(){
255
 
256
  function ct_ajax_check_users(){
257
 
258
- global $ct_options,$ct_ip_penalty_days;
259
-
260
  check_ajax_referer('ct_secret_nonce', 'security');
261
 
 
 
262
  $ct_options = ct_get_options();
263
 
264
  $skip_roles = array(
265
  'administrator'
266
  );
267
 
268
- $args_unchecked = array(
 
 
 
 
 
 
269
  'meta_query' => array(
 
270
  array(
271
  'key' => 'ct_checked',
272
  'compare' => 'NOT EXISTS'
@@ -280,7 +284,21 @@ function ct_ajax_check_users(){
280
  'order' => 'ASC',
281
  'number' => 100
282
  );
283
- $u = get_users($args_unchecked);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
 
285
  $check_result = array(
286
  'end' => 0,
@@ -341,10 +359,8 @@ function ct_ajax_check_users(){
341
 
342
  // Drop if data empty and there's no users to check
343
  if(count($data) == 0){
344
-
345
  if($_POST['unchecked'] === 0)
346
  $check_result['end'] = 1;
347
-
348
  print json_encode($check_result);
349
  die();
350
  }
@@ -441,28 +457,48 @@ function ct_ajax_info_users($direct_call = false)
441
  {
442
  if (!$direct_call)
443
  check_ajax_referer( 'ct_secret_nonce', 'security' );
 
 
 
 
 
 
 
444
 
445
- global $wpdb;
 
 
 
 
 
 
446
 
447
- // All users
448
- $r=$wpdb->get_results("
449
- SELECT
450
- COUNT(ID) AS cnt
451
- FROM $wpdb->users
452
- ");
453
- $cnt = $r[0]->cnt;
454
-
455
- // Checked
456
- $r=$wpdb->get_results("select distinct count($wpdb->users.ID) as cnt from $wpdb->users inner join $wpdb->usermeta on $wpdb->users.ID=$wpdb->usermeta.user_id where $wpdb->usermeta.meta_key='ct_checked';");
457
- $cnt_checked = $r[0]->cnt;
458
 
459
- //Spam
460
- $r=$wpdb->get_results("select distinct count($wpdb->users.ID) as cnt from $wpdb->users inner join $wpdb->usermeta on $wpdb->users.ID=$wpdb->usermeta.user_id where $wpdb->usermeta.meta_key='ct_marked_as_spam';", ARRAY_A);
461
- $cnt_spam = $r[0]['cnt'];
 
 
 
 
 
462
 
463
- //Bad
464
- $r=$wpdb->get_results("select distinct count($wpdb->users.ID) as cnt from $wpdb->users inner join $wpdb->usermeta on $wpdb->users.ID=$wpdb->usermeta.user_id where $wpdb->usermeta.meta_key='ct_bad';", ARRAY_A);
465
- $cnt_bad = $r[0]['cnt'];
 
 
 
 
 
466
 
467
  $return = array(
468
  'message' => '',
1
  <?php
2
+
3
  add_action('admin_menu', 'ct_add_users_menu');
4
  add_action( 'wp_ajax_ajax_check_users', 'ct_ajax_check_users' );
5
  add_action( 'wp_ajax_ajax_info_users', 'ct_ajax_info_users' );
31
 
32
  ?>
33
  <div class="wrap">
34
+ <h2><img src="<?php echo plugin_dir_url(__FILE__) ?>/images/logo_color.png" /> <?php echo $ct_plugin_name; ?></h2><br />
35
 
36
+ <!-- AJAX error message -->
37
  <div id="ct_error_message" style="display:none">
38
+ <h3>
39
  <?php _e("Ajax error. Process will be automatically restarted in 3 seconds. Status: ", 'cleantalk'); ?><span id="cleantalk_ajax_error"></span> (<span id="cleantalk_js_func"></span>)
40
  </h3>
41
+ <h4>Please, check for JavaScript errors in your dashboard and and repair it.</h4>
42
  </div>
43
 
44
+ <!-- Deleting message -->
45
  <div id="ct_deleting_message" style="display:none">
46
  <?php _e("Please wait for a while. CleanTalk is deleting spam users. Users left: ", 'cleantalk'); ?> <span id="cleantalk_users_left">
47
  <?php echo $cnt_spam1;?>
48
  </span>
49
  </div>
50
 
51
+ <!-- Main info -->
52
+ <h3 id="ct_checking_status"><?php echo ct_ajax_info_users(true); ?></h3>
53
+
54
+ <!-- Check options -->
55
+ <div class="ct_to_hide" id="ct_check_params_wrapper">
56
+ <button class="button ct_check_params_elem" id="ct_check_spam_button"><?php _e("Start check", 'cleantalk'); ?></button>
57
+ <p class="ct_check_params_desc"><?php _e("The plugin will check all comments against blacklists database and show you senders that have spam activity on other websites.", 'cleantalk'); ?></p>
58
+ <br />
59
+ <div class="ct_check_params_elem ct_check_params_elem_sub">
60
+ <input id="ct_accurate_check" type="checkbox" value="1" /><b><label for="ct_accurate_check"><?php _e("Accurate check", 'cleantalk'); ?></b></label>
61
+ </div>
62
+ <p class="ct_check_params_desc"><?php _e("Allows to use comment's dates to perform more accurate check. Could seriously slow down the check.", 'cleantalk'); ?></p>
63
+ <br />
64
+ <div class="ct_check_params_elem ct_check_params_elem_sub">
65
+ <input id="ct_allow_date_range" type="checkbox" value="1" /><label for="ct_allow_date_range"><b><?php _e("Specify date range", 'cleantalk'); ?></b></label>
66
+ </div>
67
+ <div class="ct_check_params_desc">
68
+ <input class="ct_date" type="text" id="ct_date_range_from" value="<?php echo isset($_GET['from']) ? $_GET['from'] : ''; ?>" readonly />
69
+ <input class="ct_date" type="text" id="ct_date_range_till" value="<?php echo isset($_GET['till']) ? $_GET['till'] : ''; ?>" readonly />
70
+ </div>
71
+ </div>
72
 
73
  <!-- Cooling notice -->
74
+ <h3 id="ct_cooling_notice"></h3>
75
 
76
  <!-- Preloader and working message -->
77
  <div id="ct_preloader">
82
  </div>
83
 
84
  <?php
85
+
86
  // Pagination
87
  $page = !empty($_GET['spam_page']) ? intval($_GET['spam_page']) : 1;
88
  $on_page = 20;
89
+
90
  $args_spam = array(
91
  'meta_query' => array(
92
  Array(
104
 
105
  $pages = ceil(intval($cnt_spam1)/$on_page);
106
  if($pages && $pages != 1){
107
+ echo "<div class='ct_to_hide pagination'>"
108
  ."<b>Pages:</b>"
109
  ."<ul class='pagination'>";
110
  for($i = 1; $i <= $pages; $i++){
118
  echo "</div>";
119
  }
120
  ?>
121
+ <table class="ct_to_hide widefat fixed comments" id="ct_check_users_table">
122
  <thead>
123
  <th scope="col" id="cb" class="manage-column column-cb check-column">
124
  <label class="screen-reader-text" for="cb-select-all-1">Select All</label>
212
  <?php
213
  // Pagination
214
  if($pages && $pages != 1){
215
+ echo "<div class='ct_to_hide pagination'>"
216
  ."<b>Pages:</b>"
217
  ."<ul class='pagination'>";
218
  for($i = 1; $i <= $pages; $i++){
226
  echo "</div>";
227
  }
228
  ?>
229
+ <div class="ct_to_hide" id="ct_tools_buttons" style="margin-top: 10px;">
230
  <button class="button" id="ct_delete_all_users"><?php _e('Delete all users from list', 'cleantalk'); ?></button>
231
  <button class="button" id="ct_delete_checked_users"><?php _e('Delete selected', 'cleantalk'); ?></button>
232
  <button class="button" id="ct_get_csv_file"><?php _e('Download results in CSV', 'cleantalk'); ?></button>
233
  </div>
234
  <?php
235
  }
236
+ echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<br /><button class=" ct_to_hide button" id="ct_insert_users">'. __('Insert accounts', 'cleantalk'). ' (100)</button> ' : '';
237
+ echo $_SERVER['REMOTE_ADDR']=='127.0.0.1' ? '<button class="ct_to_hide button" id="ct_delete_users">'. __('Delete accounts', 'cleantalk'). ' (110)</button><br />' : '';
238
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  if($cnt_spam1 > 0)
240
  echo "<div id='ct_search_info'>"
241
  ."<br />"
252
 
253
  function ct_ajax_check_users(){
254
 
 
 
255
  check_ajax_referer('ct_secret_nonce', 'security');
256
 
257
+ global $ct_options,$ct_ip_penalty_days;
258
+
259
  $ct_options = ct_get_options();
260
 
261
  $skip_roles = array(
262
  'administrator'
263
  );
264
 
265
+ $params = array(
266
+ // 'fields' => array(
267
+ // 'ID',
268
+ // 'user_login',
269
+ // 'user_email',
270
+ // 'user_registered',
271
+ // ),
272
  'meta_query' => array(
273
+ 'relation' => 'AND',
274
  array(
275
  'key' => 'ct_checked',
276
  'compare' => 'NOT EXISTS'
284
  'order' => 'ASC',
285
  'number' => 100
286
  );
287
+
288
+ if(isset($_POST['from'], $_POST['till'])){
289
+
290
+ $from_date = date('Y-m-d', intval(strtotime($_POST['from'])));
291
+ $till_date = date('Y-m-d', intval(strtotime($_POST['till'])));
292
+
293
+ $params['date_query'] = array(
294
+ 'column' => 'user_registered',
295
+ 'after' => $from_date,
296
+ 'before' => $till_date,
297
+ 'inclusive' => true,
298
+ );
299
+ }
300
+
301
+ $u = get_users( $params );
302
 
303
  $check_result = array(
304
  'end' => 0,
359
 
360
  // Drop if data empty and there's no users to check
361
  if(count($data) == 0){
 
362
  if($_POST['unchecked'] === 0)
363
  $check_result['end'] = 1;
 
364
  print json_encode($check_result);
365
  die();
366
  }
457
  {
458
  if (!$direct_call)
459
  check_ajax_referer( 'ct_secret_nonce', 'security' );
460
+
461
+ // Checking dates value
462
+ if(isset($_POST['from'], $_POST['till'])){
463
+
464
+ $from_date = date('Y-m-d', intval(strtotime($_POST['from'])));
465
+ $till_date = date('Y-m-d', intval(strtotime($_POST['till'])));
466
+ }
467
 
468
+ // Total users
469
+ $params = array(
470
+ 'fields' => 'ID',
471
+ 'count'=>true,
472
+ );
473
+ if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'user_registered', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
474
+ $cnt = (new WP_User_Query($params))->get_total();
475
 
476
+ // Checked users
477
+ $params = array(
478
+ 'fields' => 'ID',
479
+ 'meta_key' => 'ct_checked',
480
+ 'count_total' => true,
481
+ );
482
+ if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'user_registered', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
483
+ $cnt_checked = (new WP_User_Query($params))->get_total();
 
 
 
484
 
485
+ // Spam users
486
+ $params = array(
487
+ 'fields' => 'ID',
488
+ 'meta_key' => 'ct_marked_as_spam',
489
+ 'count_total' => true,
490
+ );
491
+ if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'user_registered', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
492
+ $cnt_spam = (new WP_User_Query($params))->get_total();
493
 
494
+ // Bad users (without IP and Email)
495
+ $params = array(
496
+ 'fields' => 'ID',
497
+ 'meta_key' => 'ct_bad',
498
+ 'count_total' => true,
499
+ );
500
+ if(isset($from_date, $till_date)) $params['date_query'] = array('column' => 'user_registered', 'after' => $from_date, 'before' => $till_date, 'inclusive' => true);
501
+ $cnt_bad = (new WP_User_Query($params))->get_total();
502
 
503
  $return = array(
504
  'message' => '',
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: znaeff, shagimuratov, serge00, sartemd174, amagsumov
3
  Tags: antispam, protection, contact form, comments, spam
4
  Requires at least: 3.0
5
  Tested up to: 4.8
6
- Stable tag: 5.74
7
  License: GPLv2
8
 
9
  Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
@@ -506,6 +506,10 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
506
  1. The plugin deletes/removes the existing spam comments and users accounts.
507
 
508
  == Changelog ==
 
 
 
 
509
  = 5.74 August 31 2017 =
510
  * Users and comments spam check: Two check types (fast and accurate).
511
  * Fix for WooCommerce checkout test.
@@ -1421,6 +1425,10 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
1421
  * First version
1422
 
1423
  == Upgrade Notice ==
 
 
 
 
1424
  = 5.74 August 31 2017 =
1425
  * Users and comments spam check: Two check types (fast and accurate).
1426
  * Fix for WooCommerce checkout test.
3
  Tags: antispam, protection, contact form, comments, spam
4
  Requires at least: 3.0
5
  Tested up to: 4.8
6
+ Stable tag: 5.74.1
7
  License: GPLv2
8
 
9
  Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
506
  1. The plugin deletes/removes the existing spam comments and users accounts.
507
 
508
  == Changelog ==
509
+ = 5.74.1 September 2 2017 =
510
+ * Fix for the update system and cloud communication.
511
+ * Added possibility to check users and comments for spam with a specific date range.
512
+
513
  = 5.74 August 31 2017 =
514
  * Users and comments spam check: Two check types (fast and accurate).
515
  * Fix for WooCommerce checkout test.
1425
  * First version
1426
 
1427
  == Upgrade Notice ==
1428
+ = 5.74.1 September 2 2017 =
1429
+ * Fix for the update system and cloud communication.
1430
+ * Added possibility to check users and comments for spam with a specific date range.
1431
+
1432
  = 5.74 August 31 2017 =
1433
  * Users and comments spam check: Two check types (fast and accurate).
1434
  * Fix for WooCommerce checkout test.