AdRotate Banner Manager - Version 3.15.3

Version Description

FREE = * [fix] Demo adverts schedules created correctly * [fix] Widget padding setting using current class

Download this release

Release Info

Developer adegans
Plugin Icon 128x128 AdRotate Banner Manager
Version 3.15.3
Comparing to
See all releases

Code changes from version 3.15.2 to 3.15.3

adrotate-manage-publisher.php CHANGED
@@ -11,10 +11,7 @@
11
 
12
  /*-------------------------------------------------------------
13
  Name: adrotate_insert_input
14
-
15
  Purpose: Prepare input form on saving new or updated banners
16
- Receive: -None-
17
- Return: -None-
18
  Since: 0.1
19
  -------------------------------------------------------------*/
20
  function adrotate_insert_input() {
@@ -197,10 +194,7 @@ function adrotate_insert_input() {
197
 
198
  /*-------------------------------------------------------------
199
  Name: adrotate_insert_group
200
-
201
  Purpose: Save provided data for groups, update linkmeta where required
202
- Receive: -None-
203
- Return: -None-
204
  Since: 0.4
205
  -------------------------------------------------------------*/
206
  function adrotate_insert_group() {
@@ -322,10 +316,7 @@ function adrotate_insert_group() {
322
 
323
  /*-------------------------------------------------------------
324
  Name: adrotate_request_action
325
-
326
  Purpose: Prepare action for banner or group from database
327
- Receive: -none-
328
- Return: -none-
329
  Since: 2.2
330
  -------------------------------------------------------------*/
331
  function adrotate_request_action() {
@@ -472,27 +463,19 @@ function adrotate_delete($id, $what) {
472
  $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_groups` WHERE `id` = %d;", $id));
473
  $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = %d;", $id));
474
  } else if ($what == 'bannergroup') {
475
- $linkmeta = $wpdb->get_results($wpdb->prepare("SELECT `ad` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = %d;", $id));
476
  foreach($linkmeta as $meta) {
477
- $wpdb->query("DELETE FROM `{$wpdb->prefix}adrotate` WHERE `id` = ".$meta->ad.";");
478
- $wpdb->query("DELETE FROM `{$wpdb->prefix}adrotate_stats` WHERE `ad` = ".$meta->ad.";");
479
- $wpdb->query("DELETE FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = ".$meta->ad.";");
480
  }
481
- $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_groups` WHERE `id` = %d;", $id));
482
- $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = %d;", $id));
483
- $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_stats` WHERE `group` = %d;", $id)); // Perhaps unnessesary
484
  }
485
- // Verify all ads
486
- adrotate_prepare_evaluate_ads(false);
487
  }
488
  }
489
 
490
  /*-------------------------------------------------------------
491
  Name: adrotate_active
492
-
493
  Purpose: Activate or Deactivate a banner
494
- Receive: $id, $what
495
- Return: -none-
496
  Since: 0.1
497
  -------------------------------------------------------------*/
498
  function adrotate_active($id, $what) {
@@ -505,8 +488,8 @@ function adrotate_active($id, $what) {
505
  if ($what == 'activate') {
506
  // Determine status of ad
507
  $adstate = adrotate_evaluate_ad($id);
508
- if($adstate == 'error' OR $adstate == 'expired') $adtype = 'error';
509
- else $adtype = 'active';
510
  $wpdb->update($wpdb->prefix.'adrotate', array('type' => $adtype), array('id' => $id));
511
  }
512
  }
@@ -514,10 +497,7 @@ function adrotate_active($id, $what) {
514
 
515
  /*-------------------------------------------------------------
516
  Name: adrotate_reset
517
-
518
  Purpose: Reset statistics for a banner
519
- Receive: $id
520
- Return: -none-
521
  Since: 2.2
522
  -------------------------------------------------------------*/
523
  function adrotate_reset($id) {
@@ -531,10 +511,7 @@ function adrotate_reset($id) {
531
 
532
  /*-------------------------------------------------------------
533
  Name: adrotate_renew
534
-
535
  Purpose: Renew the end date of a banner with a new schedule starting where the last ended
536
- Receive: $id, $howlong
537
- Return: -none-
538
  Since: 2.2
539
  -------------------------------------------------------------*/
540
  function adrotate_renew($id, $howlong = 2592000) {
@@ -555,10 +532,7 @@ function adrotate_renew($id, $howlong = 2592000) {
555
 
556
  /*-------------------------------------------------------------
557
  Name: adrotate_export
558
-
559
  Purpose: Export selected banners
560
- Receive: $id
561
- Return: -none-
562
  Since: 3.8.5
563
  -------------------------------------------------------------*/
564
  function adrotate_export($ids, $format) {
@@ -569,10 +543,7 @@ function adrotate_export($ids, $format) {
569
 
570
  /*-------------------------------------------------------------
571
  Name: adrotate_options_submit
572
-
573
  Purpose: Save options from dashboard
574
- Receive: $_POST
575
- Return: -none-
576
  Since: 0.1
577
  -------------------------------------------------------------*/
578
  function adrotate_options_submit() {
@@ -612,6 +583,12 @@ function adrotate_options_submit() {
612
 
613
  $notifications = get_option('adrotate_notifications');
614
 
 
 
 
 
 
 
615
  // Turn options off. Available in AdRotate Pro only
616
  $notifications['notification_email'] = 'N';
617
  $notifications['notification_push'] = 'N';
@@ -691,10 +668,7 @@ function adrotate_options_submit() {
691
 
692
  /*-------------------------------------------------------------
693
  Name: adrotate_prepare_roles
694
-
695
  Purpose: Prepare user roles for WordPress
696
- Receive: $action
697
- Return: -None-
698
  Since: 3.0
699
  -------------------------------------------------------------*/
700
  function adrotate_prepare_roles($action) {
11
 
12
  /*-------------------------------------------------------------
13
  Name: adrotate_insert_input
 
14
  Purpose: Prepare input form on saving new or updated banners
 
 
15
  Since: 0.1
16
  -------------------------------------------------------------*/
17
  function adrotate_insert_input() {
194
 
195
  /*-------------------------------------------------------------
196
  Name: adrotate_insert_group
 
197
  Purpose: Save provided data for groups, update linkmeta where required
 
 
198
  Since: 0.4
199
  -------------------------------------------------------------*/
200
  function adrotate_insert_group() {
316
 
317
  /*-------------------------------------------------------------
318
  Name: adrotate_request_action
 
319
  Purpose: Prepare action for banner or group from database
 
 
320
  Since: 2.2
321
  -------------------------------------------------------------*/
322
  function adrotate_request_action() {
463
  $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_groups` WHERE `id` = %d;", $id));
464
  $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = %d;", $id));
465
  } else if ($what == 'bannergroup') {
466
+ $linkmeta = $wpdb->get_results($wpdb->prepare("SELECT `ad` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = %d AND `user` = '0' AND `schedule` = '0';", $id));
467
  foreach($linkmeta as $meta) {
468
+ adrotate_delete($meta->ad, 'banner');
 
 
469
  }
470
+ unset($linkmeta);
471
+ adrotate_delete($id, 'group');
 
472
  }
 
 
473
  }
474
  }
475
 
476
  /*-------------------------------------------------------------
477
  Name: adrotate_active
 
478
  Purpose: Activate or Deactivate a banner
 
 
479
  Since: 0.1
480
  -------------------------------------------------------------*/
481
  function adrotate_active($id, $what) {
488
  if ($what == 'activate') {
489
  // Determine status of ad
490
  $adstate = adrotate_evaluate_ad($id);
491
+ $adtype = ($adstate == 'error' OR $adstate == 'expired') ? 'error' : 'active';
492
+
493
  $wpdb->update($wpdb->prefix.'adrotate', array('type' => $adtype), array('id' => $id));
494
  }
495
  }
497
 
498
  /*-------------------------------------------------------------
499
  Name: adrotate_reset
 
500
  Purpose: Reset statistics for a banner
 
 
501
  Since: 2.2
502
  -------------------------------------------------------------*/
503
  function adrotate_reset($id) {
511
 
512
  /*-------------------------------------------------------------
513
  Name: adrotate_renew
 
514
  Purpose: Renew the end date of a banner with a new schedule starting where the last ended
 
 
515
  Since: 2.2
516
  -------------------------------------------------------------*/
517
  function adrotate_renew($id, $howlong = 2592000) {
532
 
533
  /*-------------------------------------------------------------
534
  Name: adrotate_export
 
535
  Purpose: Export selected banners
 
 
536
  Since: 3.8.5
537
  -------------------------------------------------------------*/
538
  function adrotate_export($ids, $format) {
543
 
544
  /*-------------------------------------------------------------
545
  Name: adrotate_options_submit
 
546
  Purpose: Save options from dashboard
 
 
547
  Since: 0.1
548
  -------------------------------------------------------------*/
549
  function adrotate_options_submit() {
583
 
584
  $notifications = get_option('adrotate_notifications');
585
 
586
+ $notifications['notification_dashboard'] = (isset($_POST['adrotate_notification_dashboard'])) ? 'Y' : 'N';
587
+
588
+ // Dashboard Notifications
589
+ $notifications['notification_dash_expired'] = (isset($_POST['adrotate_notification_dash_expired'])) ? 'Y' : 'N';
590
+ $notifications['notification_dash_soon'] = (isset($_POST['adrotate_notification_dash_soon'])) ? 'Y' : 'N';
591
+
592
  // Turn options off. Available in AdRotate Pro only
593
  $notifications['notification_email'] = 'N';
594
  $notifications['notification_push'] = 'N';
668
 
669
  /*-------------------------------------------------------------
670
  Name: adrotate_prepare_roles
 
671
  Purpose: Prepare user roles for WordPress
 
 
672
  Since: 3.0
673
  -------------------------------------------------------------*/
674
  function adrotate_prepare_roles($action) {
adrotate-output.php CHANGED
@@ -11,10 +11,7 @@
11
 
12
  /*-------------------------------------------------------------
13
  Name: adrotate_ad
14
-
15
  Purpose: Show requested ad
16
- Receive: $banner_id, $individual, $group, $site
17
- Return: $output
18
  Since: 3.0
19
  -------------------------------------------------------------*/
20
  function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
@@ -61,10 +58,7 @@ function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
61
 
62
  /*-------------------------------------------------------------
63
  Name: adrotate_group
64
-
65
  Purpose: Fetch ads in specified group(s) and show a random ad
66
- Receive: $group_ids, $fallback, $weight, $site
67
- Return: $output
68
  Since: 3.0
69
  -------------------------------------------------------------*/
70
  function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
@@ -224,10 +218,7 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
224
 
225
  /*-------------------------------------------------------------
226
  Name: adrotate_inject_posts
227
-
228
  Purpose: Add an advert to a single post
229
- Receive: $post_content
230
- Return: $post_content
231
  Added: 3.7
232
  -------------------------------------------------------------*/
233
  function adrotate_inject_posts($post_content) {
@@ -325,10 +316,7 @@ function adrotate_inject_posts($post_content) {
325
 
326
  /*-------------------------------------------------------------
327
  Name: adrotate_preview
328
-
329
  Purpose: Show preview of selected ad (Dashboard)
330
- Receive: $banner_id
331
- Return: $output
332
  Since: 3.0
333
  -------------------------------------------------------------*/
334
  function adrotate_preview($banner_id) {
@@ -360,10 +348,7 @@ function adrotate_preview($banner_id) {
360
 
361
  /*-------------------------------------------------------------
362
  Name: adrotate_ad_output
363
-
364
  Purpose: Prepare the output for viewing
365
- Receive: $id, $group, $bannercode, $tracker, $image, $responsive
366
- Return: $banner_output
367
  Since: 3.0
368
  -------------------------------------------------------------*/
369
  function adrotate_ad_output($id, $group = 0, $name, $bannercode, $tracker, $image, $responsive) {
@@ -430,10 +415,7 @@ function adrotate_ad_output($id, $group = 0, $name, $bannercode, $tracker, $imag
430
 
431
  /*-------------------------------------------------------------
432
  Name: adrotate_custom_scripts
433
-
434
  Purpose: Add required scripts to site head
435
- Receive: -None-
436
- Return: -None-
437
  Since: 3.6
438
  -------------------------------------------------------------*/
439
  function adrotate_custom_scripts() {
@@ -464,10 +446,7 @@ function adrotate_custom_scripts() {
464
 
465
  /*-------------------------------------------------------------
466
  Name: adrotate_custom_javascript
467
-
468
  Purpose: Add required JavaScript to site
469
- Receive: -None-
470
- Return: -None-
471
  Since: 3.10.5
472
  -------------------------------------------------------------*/
473
  function adrotate_custom_javascript() {
@@ -493,10 +472,7 @@ function adrotate_custom_javascript() {
493
 
494
  /*-------------------------------------------------------------
495
  Name: adrotate_custom_css
496
-
497
  Purpose: Add required CSS to site head
498
- Receive: -None-
499
- Return: -None-
500
  Since: 3.8
501
  -------------------------------------------------------------*/
502
  function adrotate_custom_css() {
@@ -580,7 +556,7 @@ function adrotate_custom_css() {
580
  unset($output_css);
581
  }
582
  if($adrotate_config['widgetpadding'] == "Y") {
583
- $output .= ".widget_adrotate_widgets { overflow:hidden; padding:0; }\n";
584
  }
585
  $output .= "</style>\n";
586
  $output .= "<!-- /AdRotate CSS -->\n\n";
@@ -591,10 +567,7 @@ function adrotate_custom_css() {
591
 
592
  /*-------------------------------------------------------------
593
  Name: adrotate_nonce_error
594
-
595
  Purpose: Display a formatted error if Nonce fails
596
- Receive: -none-
597
- Return: -none-
598
  Since: 3.7.4.2
599
  -------------------------------------------------------------*/
600
  function adrotate_nonce_error() {
@@ -606,10 +579,7 @@ function adrotate_nonce_error() {
606
 
607
  /*-------------------------------------------------------------
608
  Name: adrotate_error
609
-
610
  Purpose: Show errors for problems in using AdRotate, should they occur
611
- Receive: $action, $arg
612
- Return: -none-
613
  Since: 3.0
614
  -------------------------------------------------------------*/
615
  function adrotate_error($action, $arg = null) {
@@ -667,14 +637,26 @@ function adrotate_error($action, $arg = null) {
667
 
668
  /*-------------------------------------------------------------
669
  Name: adrotate_dashboard_error
670
-
671
  Purpose: Show errors for problems in using AdRotate
672
  Since: 3.19.1
673
  -------------------------------------------------------------*/
674
  function adrotate_dashboard_error() {
675
  global $adrotate_config;
676
 
 
677
  $status = get_option('adrotate_advert_status');
 
 
 
 
 
 
 
 
 
 
 
 
678
 
679
  // Adverts
680
  if($status['expired'] > 0) {
@@ -707,10 +689,7 @@ function adrotate_dashboard_error() {
707
 
708
  /*-------------------------------------------------------------
709
  Name: adrotate_notifications_dashboard
710
-
711
  Purpose: Notify user of expired banners in the dashboard
712
- Receive: -none-
713
- Return: -none-
714
  Since: 3.0
715
  -------------------------------------------------------------*/
716
  function adrotate_notifications_dashboard() {
@@ -729,32 +708,55 @@ function adrotate_notifications_dashboard() {
729
  echo '</div>';
730
  }
731
 
732
- if(isset($_GET['hide']) AND $_GET['hide'] == 1) update_option('adrotate_hide_banner', 1);
733
- if(isset($_GET['hide']) AND $_GET['hide'] == 2) update_option('adrotate_hide_review', 1);
734
  if(isset($_GET['page'])) { $page = $_GET['page']; } else { $page = ''; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
 
736
- $pro_banner = get_option('adrotate_hide_banner');
737
- if($pro_banner != 1 AND $pro_banner < (adrotate_now() - 604800) AND strpos($page, 'adrotate') !== false) {
738
- echo '<div class="updated" style="padding: 0; margin: 0;">';
739
- echo ' <div class="adrotate_banner">';
740
- echo ' <div class="button_div"><a class="button" target="_blank" href="https://ajdg.solutions/products/adrotate-for-wordpress/?add-to-cart=1126?pk_campaign=adrotatefree-upgradebanner">'.__('Buy now', 'adrotate').'</a></div>';
741
- echo ' <div class="text">'.__("You've been using <strong>AdRotate</strong> for a while now. Why not upgrade to the <strong>PRO</strong> version", 'adrotate').'?<br /><span>'.__('Use discount code <b>getadrotatepro</b> for 10% off on any AdRotate license!', 'adrotate' ).' '.__('Thank you for your purchase!', 'adrotate' ).'</span></div>';
742
- echo ' <a class="close_banner" href="admin.php?page=adrotate-pro&hide=1"><img title="Close" src="'.plugins_url('/images/icon-close.png', __FILE__).'" alt=""/></a>';
743
- echo ' <div class="icon"><img title="" src="'.plugins_url('/images/logo-60x60.png', __FILE__).'" alt=""/></div>';
744
- echo ' </div>';
745
- echo '</div>';
746
- }
747
-
748
- $review_banner = get_option('adrotate_hide_review');
749
- if($review_banner != 1 AND $review_banner < (adrotate_now() - 2419200) AND strpos($page, 'adrotate') !== false) {
750
- echo '<div class="updated" style="padding: 0; margin: 0;">';
751
- echo ' <div class="adrotate_banner">';
752
- echo ' <div class="button_div"><a class="button" target="_blank" href="https://wordpress.org/support/view/plugin-reviews/adrotate?rate=5#postform">Rate AdRotate</a></div>';
753
- echo ' <div class="text">If you like <strong>AdRotate</strong> please let the world know that you do. Thanks for your support!<br /><span>If you have questions, suggestions or something else that doesn\'t belong in a review, please <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/?pk_campaign=adrotatefree-reviewbanner" target="_blank">get in touch</a>!</span></div>';
754
- echo ' <a class="close_banner" href="admin.php?page=adrotate&hide=2"><img title="Close" src="'.plugins_url('/images/icon-close.png', __FILE__).'" alt=""/></a>';
755
- echo ' <div class="icon"><img title="" src="'.plugins_url('/images/logo-60x60.png', __FILE__).'" alt=""/></div>';
756
- echo ' </div>';
757
- echo '</div>';
758
  }
759
  }
760
 
@@ -774,10 +776,7 @@ function adrotate_notifications_dashboard() {
774
 
775
  /*-------------------------------------------------------------
776
  Name: adrotate_welcome_pointer
777
-
778
  Purpose: Show dashboard pointers
779
- Receive: -none-
780
- Return: -none-
781
  Since: 3.9.14
782
  -------------------------------------------------------------*/
783
  function adrotate_welcome_pointer() {
@@ -804,10 +803,7 @@ function adrotate_welcome_pointer() {
804
 
805
  /*-------------------------------------------------------------
806
  Name: adrotate_help_info
807
-
808
  Purpose: Help tab on all pages
809
- Receive: -none-
810
- Return: -none-
811
  Since: 3.10.17
812
  -------------------------------------------------------------*/
813
  function adrotate_help_info() {
@@ -836,10 +832,7 @@ function adrotate_help_info() {
836
 
837
  /*-------------------------------------------------------------
838
  Name: adrotate_credits
839
-
840
  Purpose: Promotional stuff shown throughout the plugin
841
- Receive: -none-
842
- Return: -none-
843
  Since: 3.7
844
  -------------------------------------------------------------*/
845
  function adrotate_credits() {
@@ -874,10 +867,7 @@ function adrotate_credits() {
874
 
875
  /*-------------------------------------------------------------
876
  Name: adrotate_trademark
877
-
878
  Purpose: Trademark notice
879
- Receive: -none-
880
- Return: -none-
881
  Since: 3.9.14
882
  -------------------------------------------------------------*/
883
  function adrotate_trademark() {
@@ -886,10 +876,7 @@ function adrotate_trademark() {
886
 
887
  /*-------------------------------------------------------------
888
  Name: adrotate_pro_notice
889
-
890
  Purpose: Credits shown on user statistics
891
- Receive: $d
892
- Return: -none-
893
  Since: 3.8
894
  -------------------------------------------------------------*/
895
  function adrotate_pro_notice($d = '') {
11
 
12
  /*-------------------------------------------------------------
13
  Name: adrotate_ad
 
14
  Purpose: Show requested ad
 
 
15
  Since: 3.0
16
  -------------------------------------------------------------*/
17
  function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
58
 
59
  /*-------------------------------------------------------------
60
  Name: adrotate_group
 
61
  Purpose: Fetch ads in specified group(s) and show a random ad
 
 
62
  Since: 3.0
63
  -------------------------------------------------------------*/
64
  function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
218
 
219
  /*-------------------------------------------------------------
220
  Name: adrotate_inject_posts
 
221
  Purpose: Add an advert to a single post
 
 
222
  Added: 3.7
223
  -------------------------------------------------------------*/
224
  function adrotate_inject_posts($post_content) {
316
 
317
  /*-------------------------------------------------------------
318
  Name: adrotate_preview
 
319
  Purpose: Show preview of selected ad (Dashboard)
 
 
320
  Since: 3.0
321
  -------------------------------------------------------------*/
322
  function adrotate_preview($banner_id) {
348
 
349
  /*-------------------------------------------------------------
350
  Name: adrotate_ad_output
 
351
  Purpose: Prepare the output for viewing
 
 
352
  Since: 3.0
353
  -------------------------------------------------------------*/
354
  function adrotate_ad_output($id, $group = 0, $name, $bannercode, $tracker, $image, $responsive) {
415
 
416
  /*-------------------------------------------------------------
417
  Name: adrotate_custom_scripts
 
418
  Purpose: Add required scripts to site head
 
 
419
  Since: 3.6
420
  -------------------------------------------------------------*/
421
  function adrotate_custom_scripts() {
446
 
447
  /*-------------------------------------------------------------
448
  Name: adrotate_custom_javascript
 
449
  Purpose: Add required JavaScript to site
 
 
450
  Since: 3.10.5
451
  -------------------------------------------------------------*/
452
  function adrotate_custom_javascript() {
472
 
473
  /*-------------------------------------------------------------
474
  Name: adrotate_custom_css
 
475
  Purpose: Add required CSS to site head
 
 
476
  Since: 3.8
477
  -------------------------------------------------------------*/
478
  function adrotate_custom_css() {
556
  unset($output_css);
557
  }
558
  if($adrotate_config['widgetpadding'] == "Y") {
559
+ $output .= ".adrotate_widgets { overflow:hidden; padding:0; }\n";
560
  }
561
  $output .= "</style>\n";
562
  $output .= "<!-- /AdRotate CSS -->\n\n";
567
 
568
  /*-------------------------------------------------------------
569
  Name: adrotate_nonce_error
 
570
  Purpose: Display a formatted error if Nonce fails
 
 
571
  Since: 3.7.4.2
572
  -------------------------------------------------------------*/
573
  function adrotate_nonce_error() {
579
 
580
  /*-------------------------------------------------------------
581
  Name: adrotate_error
 
582
  Purpose: Show errors for problems in using AdRotate, should they occur
 
 
583
  Since: 3.0
584
  -------------------------------------------------------------*/
585
  function adrotate_error($action, $arg = null) {
637
 
638
  /*-------------------------------------------------------------
639
  Name: adrotate_dashboard_error
 
640
  Purpose: Show errors for problems in using AdRotate
641
  Since: 3.19.1
642
  -------------------------------------------------------------*/
643
  function adrotate_dashboard_error() {
644
  global $adrotate_config;
645
 
646
+ // Adverts
647
  $status = get_option('adrotate_advert_status');
648
+ $adrotate_notifications = get_option("adrotate_notifications");
649
+ if($adrotate_notifications['notification_dash'] == "Y") {
650
+ if($status['expired'] > 0 AND $adrotate_notifications['notification_dash_expired'] == "Y") {
651
+ $error['advert_expired'] = sprintf(_n('One advert is expired.', '%1$s adverts expired!', $status['expired'], 'adrotate-pro'), $status['expired']).' <a href="'.admin_url('admin.php?page=adrotate-ads').'">'.__('Check adverts', 'adrotate-pro').'</a>!';
652
+ }
653
+ if($status['expiressoon'] > 0 AND $adrotate_notifications['notification_dash_soon'] == "Y") {
654
+ $error['advert_soon'] = sprintf(_n('One advert expires soon.', '%1$s adverts are almost expiring!', $status['expiressoon'], 'adrotate-pro'), $status['expiressoon']).' <a href="'.admin_url('admin.php?page=adrotate-ads').'">'.__('Check adverts', 'adrotate-pro').'</a>!';
655
+ }
656
+ }
657
+ if($status['error'] > 0) {
658
+ $error['advert_config'] = sprintf(_n('One advert with configuration errors.', '%1$s adverts have configuration errors!', $status['error'], 'adrotate-pro'), $status['error']).' <a href="'.admin_url('admin.php?page=adrotate-ads').'">'.__('Check adverts', 'adrotate-pro').'</a>!';
659
+ }
660
 
661
  // Adverts
662
  if($status['expired'] > 0) {
689
 
690
  /*-------------------------------------------------------------
691
  Name: adrotate_notifications_dashboard
 
692
  Purpose: Notify user of expired banners in the dashboard
 
 
693
  Since: 3.0
694
  -------------------------------------------------------------*/
695
  function adrotate_notifications_dashboard() {
708
  echo '</div>';
709
  }
710
 
 
 
711
  if(isset($_GET['page'])) { $page = $_GET['page']; } else { $page = ''; }
712
+ if(strpos($page, 'adrotate') !== false) {
713
+
714
+ if(isset($_GET['hide']) AND $_GET['hide'] == 1) update_option('adrotate_hide_banner', 1);
715
+ if(isset($_GET['hide']) AND $_GET['hide'] == 2) update_option('adrotate_hide_review', 1);
716
+ if(isset($_GET['hide']) AND $_GET['hide'] == 3) update_option('adrotate_hide_competition', 1);
717
+
718
+ $pro_banner = get_option('adrotate_hide_banner');
719
+ if($pro_banner != 1 AND $pro_banner < (adrotate_now() - 604800)) {
720
+ echo '<div class="updated" style="padding: 0; margin: 0;">';
721
+ echo ' <div class="adrotate_banner">';
722
+ echo ' <div class="button_div"><a class="button" target="_blank" href="https://ajdg.solutions/products/adrotate-for-wordpress/?add-to-cart=1126?pk_campaign=adrotatefree-upgradebanner">'.__('Buy now', 'adrotate').'</a></div>';
723
+ echo ' <div class="text">'.__("You've been using <strong>AdRotate</strong> for a while now. Why not upgrade to the <strong>PRO</strong> version", 'adrotate').'?<br /><span>'.__('Use discount code <b>getadrotatepro</b> for 10% off on any AdRotate license!', 'adrotate' ).' '.__('Thank you for your purchase!', 'adrotate' ).'</span></div>';
724
+ echo ' <a class="close_banner" href="admin.php?page=adrotate-pro&hide=1"><img title="Close" src="'.plugins_url('/images/icon-close.png', __FILE__).'" alt=""/></a>';
725
+ echo ' <div class="icon"><img title="" src="'.plugins_url('/images/logo-60x60.png', __FILE__).'" alt=""/></div>';
726
+ echo ' </div>';
727
+ echo '</div>';
728
+ }
729
+
730
+ $review_banner = get_option('adrotate_hide_review');
731
+ if($review_banner != 1 AND $review_banner < (adrotate_now() - 2419200)) {
732
+ echo '<div class="updated" style="padding: 0; margin: 0;">';
733
+ echo ' <div class="adrotate_banner">';
734
+ echo ' <div class="button_div"><a class="button" target="_blank" href="https://wordpress.org/support/view/plugin-reviews/adrotate?rate=5#postform">Rate AdRotate</a></div>';
735
+ echo ' <div class="text">If you like <strong>AdRotate</strong> please let the world know that you do. Thanks for your support!<br /><span>If you have questions, suggestions or something else that doesn\'t belong in a review, please <a href="https://ajdg.solutions/forums/forum/adrotate-for-wordpress/?pk_campaign=adrotatefree-reviewbanner" target="_blank">get in touch</a>!</span></div>';
736
+ echo ' <a class="close_banner" href="admin.php?page=adrotate&hide=2"><img title="Close" src="'.plugins_url('/images/icon-close.png', __FILE__).'" alt=""/></a>';
737
+ echo ' <div class="icon"><img title="" src="'.plugins_url('/images/logo-60x60.png', __FILE__).'" alt=""/></div>';
738
+ echo ' </div>';
739
+ echo '</div>';
740
+ }
741
 
742
+ $competition_banner = get_option('adrotate_hide_competition');
743
+ if($competition_banner != 1) {
744
+ $adrotate_has_competition = adrotate_check_competition();
745
+ if($adrotate_has_competition) {
746
+ echo '<div class="updated" style="padding: 0; margin: 0;">';
747
+ echo ' <div class="adrotate_banner">';
748
+ echo ' <div class="button_div"><a class="button button_large" data-slug="adrotate-switch" href="'.admin_url('plugin-install.php?tab=search&s=adrotate+switch').'" aria-label="Install AdRotate Switch now" data-name="AdRotate Switch">Install AdRotate Switch</a></div>';
749
+ echo ' <div class="text">AdRotate found '._n('one plugin', 'several plugins', count($adrotate_has_competition), 'adrotate-pro').' that can be imported:<br /><span>';
750
+ foreach($adrotate_has_competition as $plugin) {
751
+ echo '&raquo; '.$plugin.'<br />';
752
+ }
753
+ echo ' </span>Configured plugins can be imported into AdRotate! What is <a target="_blank" href="https://ajdg.solutions/products/adrotate-switch/?pk_campaign=adrotatepro-getswitch">AdRotate Switch</a>?</div>';
754
+ echo ' <a class="close_banner" href="admin.php?page=adrotate&hide=3"><img title="Close" src="'.plugins_url('/images/icon-close.png', __FILE__).'" alt=""/></a>';
755
+ echo ' <div class="icon"><img title="AdRotate Logo" src="'.plugins_url('/images/logo-60x60.png', __FILE__).'" alt=""/></div>';
756
+ echo ' </div>';
757
+ echo '</div>';
758
+ }
759
+ }
 
 
 
 
760
  }
761
  }
762
 
776
 
777
  /*-------------------------------------------------------------
778
  Name: adrotate_welcome_pointer
 
779
  Purpose: Show dashboard pointers
 
 
780
  Since: 3.9.14
781
  -------------------------------------------------------------*/
782
  function adrotate_welcome_pointer() {
803
 
804
  /*-------------------------------------------------------------
805
  Name: adrotate_help_info
 
806
  Purpose: Help tab on all pages
 
 
807
  Since: 3.10.17
808
  -------------------------------------------------------------*/
809
  function adrotate_help_info() {
832
 
833
  /*-------------------------------------------------------------
834
  Name: adrotate_credits
 
835
  Purpose: Promotional stuff shown throughout the plugin
 
 
836
  Since: 3.7
837
  -------------------------------------------------------------*/
838
  function adrotate_credits() {
867
 
868
  /*-------------------------------------------------------------
869
  Name: adrotate_trademark
 
870
  Purpose: Trademark notice
 
 
871
  Since: 3.9.14
872
  -------------------------------------------------------------*/
873
  function adrotate_trademark() {
876
 
877
  /*-------------------------------------------------------------
878
  Name: adrotate_pro_notice
 
879
  Purpose: Credits shown on user statistics
 
 
880
  Since: 3.8
881
  -------------------------------------------------------------*/
882
  function adrotate_pro_notice($d = '') {
adrotate-setup.php CHANGED
@@ -288,8 +288,12 @@ function adrotate_check_config() {
288
  if(!isset($config['jsfooter']) OR ($config['jsfooter'] != 'Y' AND $config['jsfooter'] != 'N')) $config['jsfooter'] = 'Y';
289
  update_option('adrotate_config', $config);
290
 
291
- if(!isset($notifications['notification_push']) OR ($notifications['notification_push'] != 'Y' AND $notifications['notification_push'] != 'N')) $notifications['notification_push'] = 'N';
292
- if(!isset($notifications['notification_email']) OR ($notifications['notification_email'] != 'Y' AND $notifications['notification_email'] != 'N')) $notifications['notification_email'] = 'Y';
 
 
 
 
293
 
294
  if(!isset($notifications['notification_push_geo']) OR ($notifications['notification_push_geo'] != 'Y' AND $notifications['notification_push_geo'] != 'N')) $notifications['notification_push_geo'] = 'N';
295
  if(!isset($notifications['notification_push_status']) OR ($notifications['notification_push_status'] != 'Y' AND $notifications['notification_push_status'] != 'N')) $notifications['notification_push_status'] = 'N';
@@ -315,11 +319,50 @@ function adrotate_check_config() {
315
  }
316
 
317
  /*-------------------------------------------------------------
318
- Name: adrotate_dummy_data
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
 
 
 
 
 
 
320
  Purpose: Install dummy data in empty tables
321
- Receive: -none-
322
- Return: -none-
323
  Since: 3.11.3
324
  -------------------------------------------------------------*/
325
  function adrotate_dummy_data() {
@@ -337,7 +380,7 @@ function adrotate_dummy_data() {
337
  // Demo ad 1
338
  $wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo ad 468x60', 'bannercode' => '&lt;a href=\&quot;http:\/\/www.adrotateforwordpress.com\&quot;&gt;&lt;img src=\&quot;http://ajdg.solutions/assets/dummy-banners/adrotate-468x60.jpg\&quot; /&gt;&lt;/a&gt;', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'responsive' => 'N', 'type' => 'active', 'weight' => 6, 'sortorder' => 0, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
339
  $ad_id = $wpdb->insert_id;
340
- $wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', 'dayimpressions' => 0));
341
  $schedule_id = $wpdb->insert_id;
342
  $wpdb->insert("{$wpdb->prefix}adrotate_linkmeta", array('ad' => $ad_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
343
  unset($ad_id, $schedule_id);
@@ -345,7 +388,7 @@ function adrotate_dummy_data() {
345
  // Demo ad 2
346
  $wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo ad 200x200', 'bannercode' => '&lt;a href=\&quot;http:\/\/www.adrotateforwordpress.com\&quot;&gt;&lt;img src=\&quot;http://ajdg.solutions/assets/dummy-banners/adrotate-200x200.jpg\&quot; /&gt;&lt;/a&gt;', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'responsive' => 'N', 'type' => 'active', 'weight' => 6, 'sortorder' => 0, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
347
  $ad_id = $wpdb->insert_id;
348
- $wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', 'dayimpressions' => 0));
349
  $schedule_id = $wpdb->insert_id;
350
  $wpdb->insert("{$wpdb->prefix}adrotate_linkmeta", array('ad' => $ad_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
351
  unset($ad_id, $schedule_id);
@@ -818,7 +861,7 @@ function adrotate_database_upgrade() {
818
  }
819
 
820
  // Database: 57
821
- // AdRotate: 4.0
822
  if($adrotate_db_version['current'] < 57) {
823
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
824
 
288
  if(!isset($config['jsfooter']) OR ($config['jsfooter'] != 'Y' AND $config['jsfooter'] != 'N')) $config['jsfooter'] = 'Y';
289
  update_option('adrotate_config', $config);
290
 
291
+ if(!isset($notifications['notification_dash']) OR ($notifications['notification_dash'] != 'Y' AND $notifications['notification_dash'] != 'N')) $notifications['notification_dash'] = 'Y';
292
+ if(!isset($notifications['notification_email'])) $notifications['notification_email'] = 'N';
293
+ if(!isset($notifications['notification_push'])) $notifications['notification_push'] = 'N';
294
+
295
+ if(!isset($notifications['notification_dash_expired']) OR ($notifications['notification_dash_expired'] != 'Y' AND $notifications['notification_dash_expired'] != 'N')) $notifications['notification_dash_expired'] = 'Y';
296
+ if(!isset($notifications['notification_dash_soon']) OR ($notifications['notification_dash_soon'] != 'Y' AND $notifications['notification_dash_soon'] != 'N')) $notifications['notification_dash_soon'] = 'Y';
297
 
298
  if(!isset($notifications['notification_push_geo']) OR ($notifications['notification_push_geo'] != 'Y' AND $notifications['notification_push_geo'] != 'N')) $notifications['notification_push_geo'] = 'N';
299
  if(!isset($notifications['notification_push_status']) OR ($notifications['notification_push_status'] != 'Y' AND $notifications['notification_push_status'] != 'N')) $notifications['notification_push_status'] = 'N';
319
  }
320
 
321
  /*-------------------------------------------------------------
322
+ Name: adrotate_check_competition
323
+ Purpose: Checks if WP has other advertising plugins installed
324
+ Since: 3.21
325
+ -------------------------------------------------------------*/
326
+ function adrotate_check_competition() {
327
+
328
+ $compatible_plugins = array(
329
+ 'ad-injection/ad-injection.php',
330
+ 'adkingpro/adkingpro.php',
331
+ // 'advanced-advertising-system/advanced_advertising_system.php',
332
+ // 'advert/advert.php',
333
+ // 'advertising-manager/advertising-manager.php',
334
+ 'bannerman/bannerman.php',
335
+ // 'easy-ads-manager/easy-ads-manager.php',
336
+ // 'easy-adsense-injection/easy-adsense-injection.php',
337
+ // 'max-adsense/adsense.php',
338
+ // 'random-banners/random-banners.php',
339
+ 'simple-ads-manager/simple-ads-manager.php',
340
+ 'useful-banner-manager/useful-banner-manager.php',
341
+ 'wp-advertize-it/bootstrap.php',
342
+ 'wp-bannerize/main.php',
343
+ 'wp-ad-manager/ad-minister.php',
344
+ 'wp125/wp125.php',
345
+ );
346
+
347
+ if(!function_exists('get_plugins')) {
348
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
349
+ }
350
+ $installed_plugins = get_plugins();
351
+
352
+ $compatible = array();
353
+ foreach($installed_plugins as $slug => $plugin) {
354
+ if(in_array($slug, $compatible_plugins)) {
355
+ $compatible[$slug] = $plugin['Title'].' v'.$plugin['Version'];
356
+ }
357
+ }
358
+ unset($installed_plugins, $compatible_plugins, $status);
359
 
360
+ return $compatible;
361
+ }
362
+
363
+ /*-------------------------------------------------------------
364
+ Name: adrotate_dummy_data
365
  Purpose: Install dummy data in empty tables
 
 
366
  Since: 3.11.3
367
  -------------------------------------------------------------*/
368
  function adrotate_dummy_data() {
380
  // Demo ad 1
381
  $wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo ad 468x60', 'bannercode' => '&lt;a href=\&quot;http:\/\/www.adrotateforwordpress.com\&quot;&gt;&lt;img src=\&quot;http://ajdg.solutions/assets/dummy-banners/adrotate-468x60.jpg\&quot; /&gt;&lt;/a&gt;', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'responsive' => 'N', 'type' => 'active', 'weight' => 6, 'sortorder' => 0, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
382
  $ad_id = $wpdb->insert_id;
383
+ $wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', 'dayimpressions' => 0, 'daystarttime' => '0000', 'daystoptime' => '0000', 'day_mon' => 'Y', 'day_tue' => 'Y', 'day_wed' => 'Y', 'day_thu' => 'Y', 'day_fri' => 'Y', 'day_sat' => 'Y', 'day_sun' => 'Y'));
384
  $schedule_id = $wpdb->insert_id;
385
  $wpdb->insert("{$wpdb->prefix}adrotate_linkmeta", array('ad' => $ad_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
386
  unset($ad_id, $schedule_id);
388
  // Demo ad 2
389
  $wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo ad 200x200', 'bannercode' => '&lt;a href=\&quot;http:\/\/www.adrotateforwordpress.com\&quot;&gt;&lt;img src=\&quot;http://ajdg.solutions/assets/dummy-banners/adrotate-200x200.jpg\&quot; /&gt;&lt;/a&gt;', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'responsive' => 'N', 'type' => 'active', 'weight' => 6, 'sortorder' => 0, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
390
  $ad_id = $wpdb->insert_id;
391
+ $wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', 'dayimpressions' => 0, 'daystarttime' => '0000', 'daystoptime' => '0000', 'day_mon' => 'Y', 'day_tue' => 'Y', 'day_wed' => 'Y', 'day_thu' => 'Y', 'day_fri' => 'Y', 'day_sat' => 'Y', 'day_sun' => 'Y'));
392
  $schedule_id = $wpdb->insert_id;
393
  $wpdb->insert("{$wpdb->prefix}adrotate_linkmeta", array('ad' => $ad_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id));
394
  unset($ad_id, $schedule_id);
861
  }
862
 
863
  // Database: 57
864
+ // AdRotate: 3.15
865
  if($adrotate_db_version['current'] < 57) {
866
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
867
 
adrotate.php CHANGED
@@ -7,7 +7,7 @@ Author URI: http://ajdg.solutions/?pk_campaign=adrotatefree-pluginpage
7
  Description: The popular choice for monetizing your website with adverts while keeping things simple. Start making money today!
8
  Text Domain: adrotate
9
  Domain Path: /languages/
10
- Version: 3.15.2
11
  License: GPLv3
12
  */
13
 
@@ -22,8 +22,8 @@ License: GPLv3
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
- define("ADROTATE_DISPLAY", '3.15.2');
26
- define("ADROTATE_VERSION", 380);
27
  define("ADROTATE_DB_VERSION", 57);
28
  /*-----------------------------------------------------------*/
29
 
@@ -171,7 +171,7 @@ function adrotate_pro() {
171
  Return: -none-
172
  -------------------------------------------------------------*/
173
  function adrotate_manage() {
174
- global $wpdb, $current_user, $userdata, $adrotate_config, $adrotate_debug;
175
 
176
  $status = $file = $view = $ad_edit_id = '';
177
  if(isset($_GET['status'])) $status = esc_attr($_GET['status']);
@@ -197,105 +197,89 @@ function adrotate_manage() {
197
  <div class="wrap">
198
  <h1><?php _e('Advert Management', 'adrotate'); ?></h1>
199
 
200
- <?php if($status > 0) adrotate_status($status, array('file' => $file)); ?>
 
201
 
202
- <?php if($wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."adrotate';") AND $wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."adrotate_groups';") AND $wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."adrotate_schedule';") AND $wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."adrotate_linkmeta';")) { ?>
203
 
204
- <?php
205
- $allbanners = $wpdb->get_results("SELECT `id`, `title`, `type`, `tracker`, `weight` FROM `".$wpdb->prefix."adrotate` WHERE `type` = 'active' OR `type` = 'error' OR `type` = 'expired' OR `type` = '2days' OR `type` = '7days' OR `type` = 'disabled' ORDER BY `sortorder` ASC, `id` ASC;");
206
- $activebanners = $errorbanners = $disabledbanners = false;
207
- foreach($allbanners as $singlebanner) {
208
- $starttime = $stoptime = 0;
209
- $starttime = $wpdb->get_var("SELECT `starttime` FROM `".$wpdb->prefix."adrotate_schedule`, `".$wpdb->prefix."adrotate_linkmeta` WHERE `ad` = '".$singlebanner->id."' AND `schedule` = `".$wpdb->prefix."adrotate_schedule`.`id` ORDER BY `starttime` ASC LIMIT 1;");
210
- $stoptime = $wpdb->get_var("SELECT `stoptime` FROM `".$wpdb->prefix."adrotate_schedule`, `".$wpdb->prefix."adrotate_linkmeta` WHERE `ad` = '".$singlebanner->id."' AND `schedule` = `".$wpdb->prefix."adrotate_schedule`.`id` ORDER BY `stoptime` DESC LIMIT 1;");
211
-
212
- $type = $singlebanner->type;
213
- if($type == 'active' AND $stoptime <= $in7days) $type = '7days';
214
- if($type == 'active' AND $stoptime <= $in2days) $type = '2days';
215
- if($type == 'active' AND $stoptime <= $now) $type = 'expired';
216
-
217
- if($type == 'active' OR $type == '7days') {
218
- $activebanners[$singlebanner->id] = array(
219
- 'id' => $singlebanner->id,
220
- 'title' => $singlebanner->title,
221
- 'type' => $type,
222
- 'tracker' => $singlebanner->tracker,
223
- 'weight' => $singlebanner->weight,
224
- 'firstactive' => $starttime,
225
- 'lastactive' => $stoptime
226
- );
227
- }
228
-
229
- if($type == 'error' OR $type == 'expired' OR $type == '2days') {
230
- $errorbanners[$singlebanner->id] = array(
231
- 'id' => $singlebanner->id,
232
- 'title' => $singlebanner->title,
233
- 'type' => $type,
234
- 'tracker' => $singlebanner->tracker,
235
- 'weight' => $singlebanner->weight,
236
- 'firstactive' => $starttime,
237
- 'lastactive' => $stoptime
238
- );
239
- }
240
-
241
- if($type == 'disabled') {
242
- $disabledbanners[$singlebanner->id] = array(
243
- 'id' => $singlebanner->id,
244
- 'title' => $singlebanner->title,
245
- 'type' => $type,
246
- 'tracker' => $singlebanner->tracker,
247
- 'weight' => $singlebanner->weight,
248
- 'firstactive' => $starttime,
249
- 'lastactive' => $stoptime
250
- );
251
- }
252
  }
253
- ?>
254
 
255
- <div class="tablenav">
256
- <div class="alignleft actions">
257
- <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=manage');?>"><?php _e('Manage', 'adrotate'); ?></a> |
258
- <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=addnew');?>"><?php _e('Add New', 'adrotate'); ?></a>
259
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  </div>
 
261
 
262
- <?php if ($view == "" OR $view == "manage") { ?>
263
-
264
- <?php
265
- // Show list of errorous ads if any
266
- if ($errorbanners) {
267
- include("dashboard/publisher/adverts-error.php");
268
- }
269
-
270
- include("dashboard/publisher/adverts-main.php");
271
 
272
- // Show disabled ads, if any
273
- if ($disabledbanners) {
274
- include("dashboard/publisher/adverts-disabled.php");
275
- }
276
- ?>
277
-
278
- <?php
279
- } else if($view == "addnew" OR $view == "edit") {
280
- ?>
281
-
282
- <?php
283
- include("dashboard/publisher/adverts-edit.php");
284
- ?>
285
-
286
- <?php } else if($view == "report") { ?>
287
-
288
- <?php
289
- include("dashboard/publisher/adverts-report.php");
290
- ?>
291
-
292
- <?php } ?>
293
- <?php } else { ?>
294
- <?php echo adrotate_error('db_error'); ?>
295
- <?php } ?>
296
- <br class="clear" />
297
-
298
- <?php adrotate_credits(); ?>
299
 
300
  </div>
301
  <?php
@@ -337,39 +321,35 @@ function adrotate_manage_group() {
337
 
338
  <?php if($status > 0) adrotate_status($status); ?>
339
 
340
- <?php if($wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."adrotate_groups';") AND $wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."adrotate_linkmeta';")) { ?>
341
- <div class="tablenav">
342
- <div class="alignleft actions">
343
- <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-groups&view=manage');?>"><?php _e('Manage', 'adrotate'); ?></a> |
344
- <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-groups&view=addnew');?>"><?php _e('Add New', 'adrotate'); ?></a>
345
- <?php if($group_edit_id AND $adrotate_config['stats'] == 1) { ?>
346
- | <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-groups&view=report&group='.$group_edit_id);?>"><?php _e('Report', 'adrotate'); ?></a>
347
- <?php } ?>
348
- </div>
349
  </div>
 
350
 
351
- <?php if ($view == "" OR $view == "manage") { ?>
352
 
353
- <?php
354
- include("dashboard/publisher/groups-main.php");
355
- ?>
356
 
357
- <?php } else if($view == "addnew" OR $view == "edit") { ?>
358
 
359
- <?php
360
- include("dashboard/publisher/groups-edit.php");
361
- ?>
362
 
363
- <?php } else if($view == "report") { ?>
364
 
365
- <?php
366
- include("dashboard/publisher/groups-report.php");
367
- ?>
368
 
369
- <?php } ?>
370
- <?php } else { ?>
371
- <?php echo adrotate_error('db_error'); ?>
372
- <?php } ?>
373
  <br class="clear" />
374
 
375
  <?php adrotate_credits(); ?>
@@ -432,11 +412,11 @@ function adrotate_manage_schedules() {
432
  </thead>
433
  <tbody>
434
  <?php
435
- $schedules = $wpdb->get_results("SELECT * FROM `".$wpdb->prefix."adrotate_schedule` WHERE `name` != '' ORDER BY `id` ASC;");
436
  if($schedules) {
437
  $class = '';
438
  foreach($schedules as $schedule) {
439
- $schedulesmeta = $wpdb->get_results("SELECT `ad` FROM `".$wpdb->prefix."adrotate_linkmeta` WHERE `group` = 0 AND `user` = 0 AND `schedule` = ".$schedule->id.";");
440
  if($schedule->maxclicks == 0) $schedule->maxclicks = '&infin;';
441
  if($schedule->maximpressions == 0) $schedule->maximpressions = '&infin;';
442
 
@@ -486,7 +466,7 @@ function adrotate_manage_schedules() {
486
  Return: -none-
487
  -------------------------------------------------------------*/
488
  function adrotate_manage_media() {
489
- global $wpdb, $adrotate_config;
490
  ?>
491
 
492
  <div class="wrap">
@@ -592,6 +572,7 @@ function adrotate_options() {
592
 
593
  include("dashboard/settings/general.php");
594
  } elseif($active_tab == 'notifications') {
 
595
  include("dashboard/settings/notifications.php");
596
  } elseif($active_tab == 'stats') {
597
  include("dashboard/settings/statistics.php");
7
  Description: The popular choice for monetizing your website with adverts while keeping things simple. Start making money today!
8
  Text Domain: adrotate
9
  Domain Path: /languages/
10
+ Version: 3.15.3
11
  License: GPLv3
12
  */
13
 
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
+ define("ADROTATE_DISPLAY", '3.15.3');
26
+ define("ADROTATE_VERSION", 381);
27
  define("ADROTATE_DB_VERSION", 57);
28
  /*-----------------------------------------------------------*/
29
 
171
  Return: -none-
172
  -------------------------------------------------------------*/
173
  function adrotate_manage() {
174
+ global $wpdb, $userdata, $adrotate_config, $adrotate_debug;
175
 
176
  $status = $file = $view = $ad_edit_id = '';
177
  if(isset($_GET['status'])) $status = esc_attr($_GET['status']);
197
  <div class="wrap">
198
  <h1><?php _e('Advert Management', 'adrotate'); ?></h1>
199
 
200
+ <?php
201
+ if($status > 0) adrotate_status($status, array('file' => $file));
202
 
203
+ $allbanners = $wpdb->get_results("SELECT `id`, `title`, `type`, `tracker`, `weight` FROM `{$wpdb->prefix}adrotate` WHERE (`type` != 'empty' OR `type` != 'a_empty' OR `type` != 'queue') ORDER BY `sortorder` ASC, `id` ASC;");
204
 
205
+ $activebanners = $errorbanners = $disabledbanners = false;
206
+ foreach($allbanners as $singlebanner) {
207
+ $starttime = $stoptime = 0;
208
+ $starttime = $wpdb->get_var("SELECT `starttime` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '".$singlebanner->id."' AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `starttime` ASC LIMIT 1;");
209
+ $stoptime = $wpdb->get_var("SELECT `stoptime` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '".$singlebanner->id."' AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `stoptime` DESC LIMIT 1;");
210
+
211
+ $type = $singlebanner->type;
212
+ if($type == 'active' AND $stoptime <= $in7days) $type = '7days';
213
+ if($type == 'active' AND $stoptime <= $in2days) $type = '2days';
214
+ if($type == 'active' AND $stoptime <= $now) $type = 'expired';
215
+
216
+ if($type == 'active' OR $type == '7days') {
217
+ $activebanners[$singlebanner->id] = array(
218
+ 'id' => $singlebanner->id,
219
+ 'title' => $singlebanner->title,
220
+ 'type' => $type,
221
+ 'tracker' => $singlebanner->tracker,
222
+ 'weight' => $singlebanner->weight,
223
+ 'firstactive' => $starttime,
224
+ 'lastactive' => $stoptime
225
+ );
226
+ }
227
+
228
+ if($type == 'error' OR $type == 'expired' OR $type == '2days') {
229
+ $errorbanners[$singlebanner->id] = array(
230
+ 'id' => $singlebanner->id,
231
+ 'title' => $singlebanner->title,
232
+ 'type' => $type,
233
+ 'tracker' => $singlebanner->tracker,
234
+ 'weight' => $singlebanner->weight,
235
+ 'firstactive' => $starttime,
236
+ 'lastactive' => $stoptime
237
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
 
239
 
240
+ if($type == 'disabled') {
241
+ $disabledbanners[$singlebanner->id] = array(
242
+ 'id' => $singlebanner->id,
243
+ 'title' => $singlebanner->title,
244
+ 'type' => $type,
245
+ 'tracker' => $singlebanner->tracker,
246
+ 'weight' => $singlebanner->weight,
247
+ 'firstactive' => $starttime,
248
+ 'lastactive' => $stoptime
249
+ );
250
+ }
251
+ }
252
+ ?>
253
+
254
+ <div class="tablenav">
255
+ <div class="alignleft actions">
256
+ <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=manage');?>"><?php _e('Manage', 'adrotate'); ?></a> |
257
+ <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=addnew');?>"><?php _e('Add New', 'adrotate'); ?></a>
258
  </div>
259
+ </div>
260
 
261
+ <?php
262
+ if ($view == "" OR $view == "manage") {
263
+ // Show list of errorous ads if any
264
+ if ($errorbanners) {
265
+ include("dashboard/publisher/adverts-error.php");
266
+ }
 
 
 
267
 
268
+ include("dashboard/publisher/adverts-main.php");
269
+
270
+ // Show disabled ads, if any
271
+ if ($disabledbanners) {
272
+ include("dashboard/publisher/adverts-disabled.php");
273
+ }
274
+ } else if($view == "addnew" OR $view == "edit") {
275
+ include("dashboard/publisher/adverts-edit.php");
276
+ } else if($view == "report") {
277
+ include("dashboard/publisher/adverts-report.php");
278
+ }
279
+ ?>
280
+ <br class="clear" />
281
+
282
+ <?php adrotate_credits(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
283
 
284
  </div>
285
  <?php
321
 
322
  <?php if($status > 0) adrotate_status($status); ?>
323
 
324
+ <div class="tablenav">
325
+ <div class="alignleft actions">
326
+ <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-groups&view=manage');?>"><?php _e('Manage', 'adrotate'); ?></a> |
327
+ <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-groups&view=addnew');?>"><?php _e('Add New', 'adrotate'); ?></a>
328
+ <?php if($group_edit_id AND $adrotate_config['stats'] == 1) { ?>
329
+ | <a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-groups&view=report&group='.$group_edit_id);?>"><?php _e('Report', 'adrotate'); ?></a>
330
+ <?php } ?>
 
 
331
  </div>
332
+ </div>
333
 
334
+ <?php if ($view == "" OR $view == "manage") { ?>
335
 
336
+ <?php
337
+ include("dashboard/publisher/groups-main.php");
338
+ ?>
339
 
340
+ <?php } else if($view == "addnew" OR $view == "edit") { ?>
341
 
342
+ <?php
343
+ include("dashboard/publisher/groups-edit.php");
344
+ ?>
345
 
346
+ <?php } else if($view == "report") { ?>
347
 
348
+ <?php
349
+ include("dashboard/publisher/groups-report.php");
350
+ ?>
351
 
352
+ <?php } ?>
 
 
 
353
  <br class="clear" />
354
 
355
  <?php adrotate_credits(); ?>
412
  </thead>
413
  <tbody>
414
  <?php
415
+ $schedules = $wpdb->get_results("SELECT * FROM `{$wpdb->prefix}adrotate_schedule` WHERE `name` != '' ORDER BY `id` ASC;");
416
  if($schedules) {
417
  $class = '';
418
  foreach($schedules as $schedule) {
419
+ $schedulesmeta = $wpdb->get_results("SELECT `ad` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = 0 AND `user` = 0 AND `schedule` = ".$schedule->id.";");
420
  if($schedule->maxclicks == 0) $schedule->maxclicks = '&infin;';
421
  if($schedule->maximpressions == 0) $schedule->maximpressions = '&infin;';
422
 
466
  Return: -none-
467
  -------------------------------------------------------------*/
468
  function adrotate_manage_media() {
469
+ global $adrotate_config;
470
  ?>
471
 
472
  <div class="wrap">
572
 
573
  include("dashboard/settings/general.php");
574
  } elseif($active_tab == 'notifications') {
575
+ $adrotate_notifications = get_option("adrotate_notifications");
576
  include("dashboard/settings/notifications.php");
577
  } elseif($active_tab == 'stats') {
578
  include("dashboard/settings/statistics.php");
dashboard/publisher/adverts-edit.php CHANGED
@@ -12,7 +12,7 @@
12
  if(!$ad_edit_id) {
13
  $edit_id = $wpdb->get_var("SELECT `id` FROM `{$wpdb->prefix}adrotate` WHERE `type` = 'empty' ORDER BY `id` DESC LIMIT 1;");
14
  if($edit_id == 0) {
15
- $wpdb->insert($wpdb->prefix."adrotate", array('title' => '', 'bannercode' => '', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => 'dropdown', 'image' => '', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'responsive' => 'N', 'type' => 'empty', 'weight' => 6, 'sortorder' => 0, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
16
  $edit_id = $wpdb->insert_id;
17
 
18
  $wpdb->insert($wpdb->prefix.'adrotate_schedule', array('name' => 'Schedule for ad '.$edit_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', 'dayimpressions' => 0, 'daystarttime' => '0000', 'daystoptime' => '0000', 'day_mon' => 'Y', 'day_tue' => 'Y', 'day_wed' => 'Y', 'day_thu' => 'Y', 'day_fri' => 'Y', 'day_sat' => 'Y', 'day_sun' => 'Y'));
12
  if(!$ad_edit_id) {
13
  $edit_id = $wpdb->get_var("SELECT `id` FROM `{$wpdb->prefix}adrotate` WHERE `type` = 'empty' ORDER BY `id` DESC LIMIT 1;");
14
  if($edit_id == 0) {
15
+ $wpdb->insert($wpdb->prefix."adrotate", array('title' => '', 'bannercode' => '', 'thetime' => $now, 'updated' => $now, 'author' => $userdata->user_login, 'imagetype' => 'dropdown', 'image' => '', 'tracker' => 'N', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'responsive' => 'N', 'type' => 'empty', 'weight' => 6, 'sortorder' => 0, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
16
  $edit_id = $wpdb->insert_id;
17
 
18
  $wpdb->insert($wpdb->prefix.'adrotate_schedule', array('name' => 'Schedule for ad '.$edit_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', 'dayimpressions' => 0, 'daystarttime' => '0000', 'daystoptime' => '0000', 'day_mon' => 'Y', 'day_tue' => 'Y', 'day_wed' => 'Y', 'day_thu' => 'Y', 'day_fri' => 'Y', 'day_sat' => 'Y', 'day_sun' => 'Y'));
dashboard/settings/notifications.php CHANGED
@@ -9,12 +9,13 @@
9
  * liability that might arise from it's use.
10
  ------------------------------------------------------------------------------------ */
11
  ?>
12
- <h3><?php _e('Notifications - Available in AdRotate Pro', 'adrotate'); ?></h3>
13
  <span class="description"><?php _e('Set up who gets notifications if ads need your attention.', 'adrotate'); ?></span>
14
  <table class="form-table">
15
  <tr>
16
- <th valign="top"><?php _e('Delivery method', 'adrotate'); ?></th>
17
  <td>
 
18
  <input type="checkbox" name="adrotate_notification_email_disabled" disabled /> <?php _e('Email message.', 'adrotate'); ?><br />
19
  <input type="checkbox" name="adrotate_notification_push_disabled" disabled /> <?php _e('Push notifications to your smartphone.', 'adrotate'); ?><br />
20
  <span class="description"><?php _e('Push notifications are delivered through Pushover, a notification service for Android and iOS', 'adrotate'); ?><br /><?php _e('The Pushover App is a one time purchase for either Android and/or iOS. More information can be found on the pushover website;', 'adrotate'); ?> <a href="http://www.pushover.net" target="_blank">pushover.net</a>.</span>
@@ -23,12 +24,24 @@
23
  <tr>
24
  <th scope="row" valign="top"><?php _e('Test notification', 'adrotate'); ?></th>
25
  <td>
26
- <input type="submit" name="adrotate_notification_test_submit_disabled" class="button-secondary" value="Test" disabled /> <?php _e('This sends a test notification. Before you test, save the options first!', 'adrotate'); ?>
27
  </td>
28
  </tr>
29
  </table>
30
 
31
- <h3><?php _e('Email Notifications', 'adrotate'); ?></h3>
 
 
 
 
 
 
 
 
 
 
 
 
32
  <span class="description"><?php _e('Set up who gets notification emails.', 'adrotate'); ?></span>
33
  <table class="form-table">
34
  <tr>
@@ -48,11 +61,11 @@
48
  </tr>
49
  </table>
50
 
51
- <h3><?php _e('Push Notifications', 'adrotate'); ?></h3>
52
  <span class="description"><?php _e('Receive information about what is happening with your AdRotate setup on your smartphone via Pushover.', 'adrotate'); ?></span>
53
  <table class="form-table">
54
  <tr>
55
- <th valign="top"><?php _e('Publishers', 'adrotate'); ?></th>
56
  <td>
57
  <input type="checkbox" name="adrotate_notification_push_geo_disabled" disabled /> <?php _e('When you are running out of Geo Targeting Lookups.', 'adrotate'); ?><br /><br />
58
  <input type="checkbox" name="adrotate_notification_push_status_disabled" disabled /> <?php _e('Daily digest of any advert status other than normal.', 'adrotate'); ?><br />
9
  * liability that might arise from it's use.
10
  ------------------------------------------------------------------------------------ */
11
  ?>
12
+ <h3><?php _e('Notifications', 'adrotate'); ?></h3>
13
  <span class="description"><?php _e('Set up who gets notifications if ads need your attention.', 'adrotate'); ?></span>
14
  <table class="form-table">
15
  <tr>
16
+ <th valign="top"><?php _e('How to notify', 'adrotate-pro'); ?></th>
17
  <td>
18
+ <input type="checkbox" name="adrotate_notification_dash" <?php if($adrotate_notifications['notification_dash'] == 'Y') { ?>checked="checked" <?php } ?> /> <?php _e('Dashboard banner.', 'adrotate-pro'); ?><br />
19
  <input type="checkbox" name="adrotate_notification_email_disabled" disabled /> <?php _e('Email message.', 'adrotate'); ?><br />
20
  <input type="checkbox" name="adrotate_notification_push_disabled" disabled /> <?php _e('Push notifications to your smartphone.', 'adrotate'); ?><br />
21
  <span class="description"><?php _e('Push notifications are delivered through Pushover, a notification service for Android and iOS', 'adrotate'); ?><br /><?php _e('The Pushover App is a one time purchase for either Android and/or iOS. More information can be found on the pushover website;', 'adrotate'); ?> <a href="http://www.pushover.net" target="_blank">pushover.net</a>.</span>
24
  <tr>
25
  <th scope="row" valign="top"><?php _e('Test notification', 'adrotate'); ?></th>
26
  <td>
27
+ <input type="submit" name="adrotate_notification_test_submit_disabled" class="button-secondary" value="<?php _e('Test', 'adrotate-pro'); ?>" disabled /> <?php _e('Send a test notification to enabled methods. Before you test, save the options first!', 'adrotate-pro'); ?>
28
  </td>
29
  </tr>
30
  </table>
31
 
32
+ <h3><?php _e('Dashboard', 'adrotate-pro'); ?></h3>
33
+ <span class="description"><?php _e('These go in a dashboard banner visible to all users with access to AdRotate on every WordPress dashboard page.', 'adrotate-pro'); ?></span>
34
+ <table class="form-table">
35
+ <tr>
36
+ <th valign="top"><?php _e('What', 'adrotate-pro'); ?></th>
37
+ <td>
38
+ <input type="checkbox" name="adrotate_notification_dash_expired" <?php if($adrotate_notifications['notification_dash_expired'] == 'Y') { ?>checked="checked" <?php } ?> /> <?php _e('Expired adverts.', 'adrotate-pro'); ?><br />
39
+ <input type="checkbox" name="adrotate_notification_dash_soon" <?php if($adrotate_notifications['notification_dash_soon'] == 'Y') { ?>checked="checked" <?php } ?> /> <?php _e('Almost expired adverts.', 'adrotate-pro'); ?>
40
+ </td>
41
+ </tr>
42
+ </table>
43
+
44
+ <h3><?php _e('Email', 'adrotate'); ?> - <?php _e('Available in AdRotate Pro', 'adrotate'); ?></h3>
45
  <span class="description"><?php _e('Set up who gets notification emails.', 'adrotate'); ?></span>
46
  <table class="form-table">
47
  <tr>
61
  </tr>
62
  </table>
63
 
64
+ <h3><?php _e('Push', 'adrotate'); ?> - <?php _e('Available in AdRotate Pro', 'adrotate'); ?></h3>
65
  <span class="description"><?php _e('Receive information about what is happening with your AdRotate setup on your smartphone via Pushover.', 'adrotate'); ?></span>
66
  <table class="form-table">
67
  <tr>
68
+ <th valign="top"><?php _e('What', 'adrotate'); ?></th>
69
  <td>
70
  <input type="checkbox" name="adrotate_notification_push_geo_disabled" disabled /> <?php _e('When you are running out of Geo Targeting Lookups.', 'adrotate'); ?><br /><br />
71
  <input type="checkbox" name="adrotate_notification_push_status_disabled" disabled /> <?php _e('Daily digest of any advert status other than normal.', 'adrotate'); ?><br />
library/dashboard.css CHANGED
@@ -16,9 +16,10 @@
16
  /* Banner styles */
17
  .adrotate_banner { margin:12px 0; position:relative; overflow:hidden; }
18
  .adrotate_banner .text { color:#000; font-size:15px; line-height:26px; margin:18px 18px 14px; float:left; width:auto; max-width:80%; }
19
- .adrotate_banner .text span { font-size:12px; opacity:0.7; }
20
  .adrotate_banner .button { float:left; border:none; font-size:14px; margin:18px 0 18px 16px; padding:12px 0; color:#FFF; text-shadow:none; font-weight:bold; background:#86c351; -moz-border-radius:3px; border-radius:3px; -webkit-border-radius:3px; text-decoration:none; height:50px; text-align:center; text-transform:uppercase; width:147px; box-shadow:none; line-height:26px; }
21
  .adrotate_banner .button:hover, .adrotate_pro_banner .button:focus { background:#0074A2; color:#FFF; }
 
22
  .adrotate_banner .icon { float:right; margin:12px 8px 8px 8px; }
23
  .adrotate_banner .close_banner { float:right; margin:8px; cursor:pointer; }
24
 
16
  /* Banner styles */
17
  .adrotate_banner { margin:12px 0; position:relative; overflow:hidden; }
18
  .adrotate_banner .text { color:#000; font-size:15px; line-height:26px; margin:18px 18px 14px; float:left; width:auto; max-width:80%; }
19
+ .adrotate_banner .text span { font-size:12px; opacity: 0.7; }
20
  .adrotate_banner .button { float:left; border:none; font-size:14px; margin:18px 0 18px 16px; padding:12px 0; color:#FFF; text-shadow:none; font-weight:bold; background:#86c351; -moz-border-radius:3px; border-radius:3px; -webkit-border-radius:3px; text-decoration:none; height:50px; text-align:center; text-transform:uppercase; width:147px; box-shadow:none; line-height:26px; }
21
  .adrotate_banner .button:hover, .adrotate_pro_banner .button:focus { background:#0074A2; color:#FFF; }
22
+ .adrotate_banner .button_large { width:200px; }
23
  .adrotate_banner .icon { float:right; margin:12px 8px 8px 8px; }
24
  .adrotate_banner .close_banner { float:right; margin:8px; cursor:pointer; }
25
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://meandmymac.net/donate/?pk_campaign=adrotatefree-readme
4
  Tags: ads, banner, commercial, admin, advertise, adrotator, plugin, random, rotator, ad, advertising, advertisement, block, blocks, advertiser, publisher, adsense, geo, geolocation, geotarget, chitika, clickbank, broadstreet, banner manager,advert manager, campaign manager, export, import, telize, maxmind, referrer, email, menu, statistics, stats, report, advert, adverts, popular, best, great, 2014, geoselect, geobytes, schedules, schedule, monetize, header, widget, javascript, jquery, tracking, clicks, impressions, rotate, zone, zones, sidebar, footer, content, posts, pages, 2015
5
  Requires at least: 3.8
6
  Tested up to: 4.5
7
- Stable tag: 3.15.2
8
  License: GPLv3
9
 
10
  The popular choice for monetizing your website with adverts while keeping things simple. Start making money today!
@@ -61,7 +61,7 @@ NOTE: Certain features are exclusive to AdRotate PRO. Learn more about [AdRotate
61
 
62
  Looking to switch from another plugin to AdRotate or AdRotate Pro? Check out [AdRotate Switch](https://wordpress.org/plugins/adrotate-switch/) and see if your current advertising plugin is compatible for migrating your data!
63
 
64
- NOTE: Unsolicited offers, partnerships, job offers, promotional emails or product offers to "enhance" my business or products through this site or any means are not appreciated and will most likely be ignored.
65
 
66
  == Installation ==
67
 
@@ -91,28 +91,30 @@ You can also post your questions on the [forum](https://ajdg.solutions/forums/?p
91
 
92
  Be a Pro and go Pro. With [AdRotate Pro](https://ajdg.solutions/products/adrotate-for-wordpress/?pk_campaign=adrotatefree-readme)!
93
 
94
- = 3.15.2 FREE =
95
- * [change] 'Report' links are now 'Stats' to match AdRotate Pro
96
- * [change] More consistent use of plugins_url()
97
- * [change] More consistent use of dirname()
98
-
99
- = 3.20.2 PRO =
100
- * [fix] AdRotate menu missing in Multisite super admin dashboard
101
- * [fix] No requests made if you run out of lookups for AdRotate Geo
102
- * [change] More logical stats display in advert and group reports
103
- * [change] More consistent use of plugins_url()
104
- * [change] More consistent use of dirname()
 
 
 
105
 
106
  All recent changes are available on the [AdRotate website](https://ajdg.solutions/products/adrotate-for-wordpress/development/?pk_campaign=adrotatefree-readme).
107
 
108
- NOTE: Unsolicited offers, partnerships, job offers, promotional emails or product offers to "enhance" my business or products through this site or any means are not appreciated and will most likely be ignored.
109
 
110
  == Upgrade Notice ==
111
 
112
- = 3.15.1 FREE =
113
- * [change] 'Report' links are now 'Stats' to match AdRotate Pro
114
- * [change] More consistent use of plugins_url()
115
- * [change] More consistent use of dirname()
116
 
117
  All recent changes are available on the [AdRotate website](https://ajdg.solutions/products/adrotate-for-wordpress/development/?pk_campaign=adrotatefree-readme).
118
 
4
  Tags: ads, banner, commercial, admin, advertise, adrotator, plugin, random, rotator, ad, advertising, advertisement, block, blocks, advertiser, publisher, adsense, geo, geolocation, geotarget, chitika, clickbank, broadstreet, banner manager,advert manager, campaign manager, export, import, telize, maxmind, referrer, email, menu, statistics, stats, report, advert, adverts, popular, best, great, 2014, geoselect, geobytes, schedules, schedule, monetize, header, widget, javascript, jquery, tracking, clicks, impressions, rotate, zone, zones, sidebar, footer, content, posts, pages, 2015
5
  Requires at least: 3.8
6
  Tested up to: 4.5
7
+ Stable tag: 3.15.3
8
  License: GPLv3
9
 
10
  The popular choice for monetizing your website with adverts while keeping things simple. Start making money today!
61
 
62
  Looking to switch from another plugin to AdRotate or AdRotate Pro? Check out [AdRotate Switch](https://wordpress.org/plugins/adrotate-switch/) and see if your current advertising plugin is compatible for migrating your data!
63
 
64
+ NOTE: Unsolicited offers, parnterships, job offers, promotional emails or product offers to "enhance" my business or products through this site or any means are not appreciated and will most likely be ignored.
65
 
66
  == Installation ==
67
 
91
 
92
  Be a Pro and go Pro. With [AdRotate Pro](https://ajdg.solutions/products/adrotate-for-wordpress/?pk_campaign=adrotatefree-readme)!
93
 
94
+ = 3.15.3 FREE =
95
+ * [fix] Demo adverts schedules created correctly
96
+ * [fix] Widget padding setting using current class
97
+
98
+ = 3.21 PRO =
99
+ * [new] Automatic trash bin for deleted adverts
100
+ * [new] Expired advert notifications can now be hidden
101
+ * [fix] Live preview switch worked backwards
102
+ * [fix] Demo adverts schedules created correctly
103
+ * [fix] Notice of license activation on some multisite setups
104
+ * [fix] Description label for MaxMind account fields
105
+ * [fix] Serbia and Montenegro are now separated for Geo Targeting
106
+ * [fix] Widget padding setting using current class
107
+ * [fix] Widget padding setting now supports new widgets
108
 
109
  All recent changes are available on the [AdRotate website](https://ajdg.solutions/products/adrotate-for-wordpress/development/?pk_campaign=adrotatefree-readme).
110
 
111
+ NOTE: Unsolicited offers, parnterships, job offers, promotional emails or product offers to "enhance" my business or products through this site or any means are not appreciated and will most likely be ignored.
112
 
113
  == Upgrade Notice ==
114
 
115
+ = 3.15.3 FREE =
116
+ * [fix] Demo adverts schedules created correctly
117
+ * [fix] Widget padding setting using current class
 
118
 
119
  All recent changes are available on the [AdRotate website](https://ajdg.solutions/products/adrotate-for-wordpress/development/?pk_campaign=adrotatefree-readme).
120