AdRotate Banner Manager - Version 4.10

Version Description

FREE = * [fix] Improved integration with Jetpack Photon * [fix] Improved PHP7.2+ compatibility * [new] Date pickers for advert scheduling * [change] Compatibility with Borlabs Cache 1.1.9.1+

Download this release

Release Info

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

Code changes from version 4.9 to 4.10

adrotate-functions.php CHANGED
@@ -30,34 +30,24 @@ function adrotate_shortcode($atts, $content = null) {
30
  $output = '';
31
  if($adrotate_config['w3caching'] == "Y") {
32
  $output .= '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
33
-
34
  if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
35
  $output .= 'echo adrotate_ad('.$banner_id.', true, 0, 0);';
36
- }
37
-
38
  if($banner_id == 0 AND $group_ids > 0) { // Show group
39
  $output .= 'echo adrotate_group('.$group_ids.', 0, 0, 0);';
40
  }
41
-
42
  $output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
43
- } else if($adrotate_config['borlabscache'] == "Y") {
44
- if(class_exists('\Borlabs\Factory')) {
45
- $borlabsphrase = \Borlabs\Factory::get('Cache\Config')->get('fragmentCachingMaskPhrase');
46
 
47
- $output .= '<!--[borlabs cache start: '.$borlabsphrase.']-->';
48
-
49
- if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
50
- $output .= 'echo adrotate_ad('.$banner_id.', true, 0, 0);';
51
- }
52
-
53
- if($banner_id == 0 AND $group_ids > 0) { // Show group
54
- $output .= 'echo adrotate_group('.$group_ids.', 0, 0, 0);';
55
- }
56
-
57
- $output .= '<!--[borlabs cache end: '.$borlabsphrase.']-->';
58
- } else {
59
- $output .= '<!-- Borlabs Cache does not appear to be active -->';
60
  }
 
61
  } else {
62
  if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
63
  $output .= adrotate_ad($banner_id, true, 0, 0);
@@ -590,7 +580,7 @@ function adrotate_get_remote_ip(){
590
  Since: 4.11
591
  -------------------------------------------------------------*/
592
  function adrotate_apply_jetpack_photon($image) {
593
- if(function_exists('jetpack_photon_url')) {
594
  return jetpack_photon_url($image);
595
  } else {
596
  return $image;
@@ -656,6 +646,7 @@ function adrotate_dashboard_scripts() {
656
  $page = (isset($_GET['page'])) ? $_GET['page'] : '';
657
  if(strpos($page, 'adrotate') !== false) {
658
  wp_enqueue_script('jquery');
 
659
  wp_enqueue_script('raphael', plugins_url('/library/raphael-min.js', __FILE__), array('jquery'));
660
  wp_enqueue_script('elycharts', plugins_url('/library/elycharts.min.js', __FILE__), array('jquery', 'raphael'));
661
  wp_enqueue_script('textatcursor', plugins_url('/library/textatcursor.js', __FILE__));
@@ -667,7 +658,6 @@ function adrotate_dashboard_scripts() {
667
  $seen_it = explode(',', get_user_meta(get_current_user_id(), 'dismissed_wp_pointers', true));
668
  if(!in_array('adrotatefree_'.ADROTATE_VERSION.ADROTATE_DB_VERSION, $seen_it)) {
669
  wp_enqueue_script('wp-pointer');
670
- wp_enqueue_style('wp-pointer');
671
  add_action('admin_print_footer_scripts', 'adrotate_welcome_pointer');
672
  }
673
  }
@@ -682,6 +672,17 @@ function adrotate_dashboard_scripts() {
682
  -------------------------------------------------------------*/
683
  function adrotate_dashboard_styles() {
684
  wp_enqueue_style('adrotate-admin-stylesheet', plugins_url('library/dashboard.css', __FILE__));
 
 
 
 
 
 
 
 
 
 
 
685
  }
686
 
687
  /*-------------------------------------------------------------
30
  $output = '';
31
  if($adrotate_config['w3caching'] == "Y") {
32
  $output .= '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
 
33
  if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
34
  $output .= 'echo adrotate_ad('.$banner_id.', true, 0, 0);';
35
+ }
 
36
  if($banner_id == 0 AND $group_ids > 0) { // Show group
37
  $output .= 'echo adrotate_group('.$group_ids.', 0, 0, 0);';
38
  }
 
39
  $output .= '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
40
+ } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
41
+ $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
 
42
 
43
+ $output .= '<!--[borlabs cache start: '.$borlabsphrase.']--> ';
44
+ if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
45
+ $output .= 'echo adrotate_ad('.$banner_id.', true, 0, 0);';
46
+ }
47
+ if($banner_id == 0 AND $group_ids > 0) { // Show group
48
+ $output .= 'echo adrotate_group('.$group_ids.', 0, 0, 0);';
 
 
 
 
 
 
 
49
  }
50
+ $output .= ' <!--[borlabs cache end: '.$borlabsphrase.']-->';
51
  } else {
52
  if($banner_id > 0 AND ($group_ids == 0 OR $group_ids > 0)) { // Show one Ad
53
  $output .= adrotate_ad($banner_id, true, 0, 0);
580
  Since: 4.11
581
  -------------------------------------------------------------*/
582
  function adrotate_apply_jetpack_photon($image) {
583
+ if(class_exists('Jetpack_Photon') AND Jetpack::is_module_active('photon') AND function_exists('jetpack_photon_url')) {
584
  return jetpack_photon_url($image);
585
  } else {
586
  return $image;
646
  $page = (isset($_GET['page'])) ? $_GET['page'] : '';
647
  if(strpos($page, 'adrotate') !== false) {
648
  wp_enqueue_script('jquery');
649
+ wp_enqueue_script('jquery-ui-datepicker');
650
  wp_enqueue_script('raphael', plugins_url('/library/raphael-min.js', __FILE__), array('jquery'));
651
  wp_enqueue_script('elycharts', plugins_url('/library/elycharts.min.js', __FILE__), array('jquery', 'raphael'));
652
  wp_enqueue_script('textatcursor', plugins_url('/library/textatcursor.js', __FILE__));
658
  $seen_it = explode(',', get_user_meta(get_current_user_id(), 'dismissed_wp_pointers', true));
659
  if(!in_array('adrotatefree_'.ADROTATE_VERSION.ADROTATE_DB_VERSION, $seen_it)) {
660
  wp_enqueue_script('wp-pointer');
 
661
  add_action('admin_print_footer_scripts', 'adrotate_welcome_pointer');
662
  }
663
  }
672
  -------------------------------------------------------------*/
673
  function adrotate_dashboard_styles() {
674
  wp_enqueue_style('adrotate-admin-stylesheet', plugins_url('library/dashboard.css', __FILE__));
675
+
676
+ $page = (isset($_GET['page'])) ? $_GET['page'] : '';
677
+ if(strpos($page, 'adrotate') !== false) {
678
+ wp_enqueue_style('jquery-ui-datepicker');
679
+ }
680
+
681
+ // WP Pointers
682
+ $seen_it = explode(',', get_user_meta(get_current_user_id(), 'dismissed_wp_pointers', true));
683
+ if(!in_array('adrotatefree_'.ADROTATE_VERSION.ADROTATE_DB_VERSION, $seen_it)) {
684
+ wp_enqueue_style('wp-pointer');
685
+ }
686
  }
687
 
688
  /*-------------------------------------------------------------
adrotate-manage-publisher.php CHANGED
@@ -161,19 +161,13 @@ function adrotate_insert_input() {
161
  if(isset($_POST['adrotate_active'])) $active = strip_tags(htmlspecialchars(trim($_POST['adrotate_active'], "\t\n "), ENT_QUOTES));
162
 
163
  // Schedules
164
- $sday = $smonth = $syear = $shour = $sminute = '';
165
- if(isset($_POST['adrotate_sday'])) $sday = strip_tags(trim($_POST['adrotate_sday'], "\t\n "));
166
- if(isset($_POST['adrotate_smonth'])) $smonth = strip_tags(trim($_POST['adrotate_smonth'], "\t\n "));
167
- if(isset($_POST['adrotate_syear'])) $syear = strip_tags(trim($_POST['adrotate_syear'], "\t\n "));
168
- if(isset($_POST['adrotate_shour'])) $shour = strip_tags(trim($_POST['adrotate_shour'], "\t\n "));
169
- if(isset($_POST['adrotate_sminute'])) $sminute = strip_tags(trim($_POST['adrotate_sminute'], "\t\n "));
170
-
171
- $eday = $emonth = $eyear = $ehour = $eminute = '';
172
- if(isset($_POST['adrotate_eday'])) $eday = strip_tags(trim($_POST['adrotate_eday'], "\t\n "));
173
- if(isset($_POST['adrotate_emonth'])) $emonth = strip_tags(trim($_POST['adrotate_emonth'], "\t\n "));
174
- if(isset($_POST['adrotate_eyear'])) $eyear = strip_tags(trim($_POST['adrotate_eyear'], "\t\n "));
175
- if(isset($_POST['adrotate_ehour'])) $ehour = strip_tags(trim($_POST['adrotate_ehour'], "\t\n "));
176
- if(isset($_POST['adrotate_eminute'])) $eminute = strip_tags(trim($_POST['adrotate_eminute'], "\t\n "));
177
 
178
  $maxclicks = $maxshown = '';
179
  if(isset($_POST['adrotate_maxclicks'])) $maxclicks = strip_tags(trim($_POST['adrotate_maxclicks'], "\t\n "));
@@ -205,37 +199,39 @@ function adrotate_insert_input() {
205
  if(preg_match("/%RANDOM%/", $bannercode)) $bannercode = str_replace('%RANDOM%', '%random%', $bannercode);
206
 
207
  // Sort out start dates
208
- if(strlen($smonth) > 0 AND !is_numeric($smonth)) $smonth = date_i18n('m');
209
- if(strlen($sday) > 0 AND !is_numeric($sday)) $sday = date_i18n('d');
210
- if(strlen($syear) > 0 AND !is_numeric($syear)) $syear = date_i18n('Y');
211
- if(strlen($shour) > 0 AND !is_numeric($shour)) $shour = date_i18n('H');
212
- if(strlen($sminute) > 0 AND !is_numeric($sminute)) $sminute = date_i18n('i');
213
- if(($smonth > 0 AND $sday > 0 AND $syear > 0) AND strlen($shour) == 0) $shour = '00';
214
- if(($smonth > 0 AND $sday > 0 AND $syear > 0) AND strlen($sminute) == 0) $sminute = '00';
 
215
 
216
- if($smonth > 0 AND $sday > 0 AND $syear > 0) {
217
- $startdate = mktime($shour, $sminute, 0, $smonth, $sday, $syear);
218
  } else {
219
- $startdate = 0;
220
  }
221
 
222
  // Sort out end dates
223
- if(strlen($emonth) > 0 AND !is_numeric($emonth)) $emonth = $smonth;
224
- if(strlen($eday) > 0 AND !is_numeric($eday)) $eday = $sday;
225
- if(strlen($eyear) > 0 AND !is_numeric($eyear)) $eyear = $syear+1;
226
- if(strlen($ehour) > 0 AND !is_numeric($ehour)) $ehour = $shour;
227
- if(strlen($eminute) > 0 AND !is_numeric($eminute)) $eminute = $sminute;
228
- if(($emonth > 0 AND $eday > 0 AND $eyear > 0) AND strlen($ehour) == 0) $ehour = '00';
229
- if(($emonth > 0 AND $eday > 0 AND $eyear > 0) AND strlen($eminute) == 0) $eminute = '00';
 
230
 
231
- if($emonth > 0 AND $eday > 0 AND $eyear > 0) {
232
- $enddate = mktime($ehour, $eminute, 0, $emonth, $eday, $eyear);
233
  } else {
234
- $enddate = 0;
235
  }
236
 
237
  // Enddate is too early, reset to default
238
- if($enddate <= $startdate) $enddate = $startdate + 7257600; // 84 days (12 weeks)
239
 
240
  // Sort out click and impressions restrictions
241
  if(strlen($maxclicks) < 1 OR !is_numeric($maxclicks)) $maxclicks = 0;
@@ -260,7 +256,7 @@ function adrotate_insert_input() {
260
  if($type != 'empty') {
261
  $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_schedule` WHERE `id` IN (SELECT `schedule` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `schedule` != %d AND `schedule` > 0 AND `ad` = %d AND `group` = 0 AND `user` = 0);", $schedule_id, $id));
262
  }
263
- $wpdb->update($wpdb->prefix.'adrotate_schedule', array('starttime' => $startdate, 'stoptime' => $enddate, 'maxclicks' => $maxclicks, 'maximpressions' => $maxshown), array('id' => $schedule_id));
264
 
265
  // Save the ad to the DB
266
  $wpdb->update($wpdb->prefix.'adrotate', array('title' => $title, 'bannercode' => $bannercode, 'updated' => $thetime, 'author' => $author, 'imagetype' => $imagetype, 'image' => $image, 'tracker' => $tracker, 'responsive' => 'N', 'type' => $active), array('id' => $id));
161
  if(isset($_POST['adrotate_active'])) $active = strip_tags(htmlspecialchars(trim($_POST['adrotate_active'], "\t\n "), ENT_QUOTES));
162
 
163
  // Schedules
164
+ $start_date = $start_hour = $start_minute = $end_date = $end_hour = $end_minute = '';
165
+ if(isset($_POST['adrotate_start_date'])) $start_date = strip_tags(trim($_POST['adrotate_start_date'], "\t\n "));
166
+ if(isset($_POST['adrotate_start_hour'])) $start_hour = strip_tags(trim($_POST['adrotate_start_hour'], "\t\n "));
167
+ if(isset($_POST['adrotate_start_minute'])) $start_minute = strip_tags(trim($_POST['adrotate_start_minute'], "\t\n "));
168
+ if(isset($_POST['adrotate_end_date'])) $end_date = strip_tags(trim($_POST['adrotate_end_date'], "\t\n "));
169
+ if(isset($_POST['adrotate_end_hour'])) $end_hour = strip_tags(trim($_POST['adrotate_end_hour'], "\t\n "));
170
+ if(isset($_POST['adrotate_end_minute'])) $end_minute = strip_tags(trim($_POST['adrotate_end_minute'], "\t\n "));
 
 
 
 
 
 
171
 
172
  $maxclicks = $maxshown = '';
173
  if(isset($_POST['adrotate_maxclicks'])) $maxclicks = strip_tags(trim($_POST['adrotate_maxclicks'], "\t\n "));
199
  if(preg_match("/%RANDOM%/", $bannercode)) $bannercode = str_replace('%RANDOM%', '%random%', $bannercode);
200
 
201
  // Sort out start dates
202
+ if(strlen($start_date) > 0) {
203
+ list($start_year, $start_month, $start_day) = explode('-', $start_date);
204
+ } else {
205
+ $start_year = $start_month = $start_day = 0;
206
+ }
207
+
208
+ if(($start_year > 0 AND $start_month > 0 AND $start_day > 0) AND strlen($start_hour) == 0) $start_hour = '00';
209
+ if(($start_year > 0 AND $start_month > 0 AND $start_day > 0) AND strlen($start_minute) == 0) $start_minute = '00';
210
 
211
+ if($start_month > 0 AND $start_day > 0 AND $start_year > 0) {
212
+ $start_date = mktime($start_hour, $start_minute, 0, $start_month, $start_day, $start_year);
213
  } else {
214
+ $start_date = 0;
215
  }
216
 
217
  // Sort out end dates
218
+ if(strlen($end_date) > 0) {
219
+ list($end_year, $end_month, $end_day) = explode('-', $end_date);
220
+ } else {
221
+ $end_year = $end_month = $end_day = 0;
222
+ }
223
+
224
+ if(($end_year > 0 AND $end_month > 0 AND $end_day > 0) AND strlen($end_hour) == 0) $end_hour = '00';
225
+ if(($end_year > 0 AND $end_month > 0 AND $end_day > 0) AND strlen($end_minute) == 0) $end_minute = '00';
226
 
227
+ if($end_month > 0 AND $end_day > 0 AND $end_year > 0) {
228
+ $end_date = mktime($end_hour, $end_minute, 0, $end_month, $end_day, $end_year);
229
  } else {
230
+ $end_date = 0;
231
  }
232
 
233
  // Enddate is too early, reset to default
234
+ if($end_date <= $start_date) $end_date = $start_date + 7257600; // 84 days (12 weeks)
235
 
236
  // Sort out click and impressions restrictions
237
  if(strlen($maxclicks) < 1 OR !is_numeric($maxclicks)) $maxclicks = 0;
256
  if($type != 'empty') {
257
  $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_schedule` WHERE `id` IN (SELECT `schedule` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `schedule` != %d AND `schedule` > 0 AND `ad` = %d AND `group` = 0 AND `user` = 0);", $schedule_id, $id));
258
  }
259
+ $wpdb->update($wpdb->prefix.'adrotate_schedule', array('starttime' => $start_date, 'stoptime' => $end_date, 'maxclicks' => $maxclicks, 'maximpressions' => $maxshown), array('id' => $schedule_id));
260
 
261
  // Save the ad to the DB
262
  $wpdb->update($wpdb->prefix.'adrotate', array('title' => $title, 'bannercode' => $bannercode, 'updated' => $thetime, 'author' => $author, 'imagetype' => $imagetype, 'image' => $image, 'tracker' => $tracker, 'responsive' => 'N', 'type' => $active), array('id' => $id));
adrotate-widget.php CHANGED
@@ -58,22 +58,18 @@ class adrotate_widgets extends WP_Widget {
58
  echo 'echo adrotate_group('.$instance['adid'].', 0, 0, 0);';
59
  }
60
  echo '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
61
- } else if($adrotate_config['borlabscache'] == 'Y') {
62
- if(class_exists('\Borlabs\Factory')) {
63
- $borlabsphrase = \Borlabs\Factory::get('Cache\Config')->get('fragmentCachingMaskPhrase');
64
 
65
- echo '<!--[borlabs cache start: '.$borlabsphrase.']-->';
66
- if($instance['type'] == "single") {
67
- echo adrotate_ad($instance['adid'], true, 0, 0, 0);
68
- }
69
-
70
- if($instance['type'] == "group") {
71
- echo adrotate_group($instance['adid'], 0, 0, 0);
72
- }
73
- echo '<!--[borlabs cache end: '.$borlabsphrase.']-->';
74
- } else {
75
- $output .= '<!-- Borlabs Cache does not appear to be active -->';
76
  }
 
77
  } else {
78
  if($instance['type'] == "single") {
79
  echo adrotate_ad($instance['adid'], true, 0, 0, 0);
58
  echo 'echo adrotate_group('.$instance['adid'].', 0, 0, 0);';
59
  }
60
  echo '<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->';
61
+ } else if($adrotate_config['borlabscache'] == "Y" AND function_exists('BorlabsCacheHelper') AND BorlabsCacheHelper()->willFragmentCachingPerform()) {
62
+ $borlabsphrase = BorlabsCacheHelper()->getFragmentCachingPhrase();
 
63
 
64
+ echo '<!--[borlabs cache start: '.$borlabsphrase.']-->';
65
+ if($instance['type'] == "single") {
66
+ echo adrotate_ad($instance['adid'], true, 0, 0, 0);
67
+ }
68
+
69
+ if($instance['type'] == "group") {
70
+ echo adrotate_group($instance['adid'], 0, 0, 0);
 
 
 
 
71
  }
72
+ echo '<!--[borlabs cache end: '.$borlabsphrase.']-->';
73
  } else {
74
  if($instance['type'] == "single") {
75
  echo adrotate_ad($instance['adid'], true, 0, 0, 0);
adrotate.php CHANGED
@@ -7,7 +7,7 @@ Author URI: http://www.arnan.me/
7
  Description: Monetise your website with adverts while keeping things simple. Start making money today!
8
  Text Domain: adrotate
9
  Domain Path: /languages/
10
- Version: 4.9
11
  License: GPLv3
12
  */
13
 
@@ -22,7 +22,7 @@ License: GPLv3
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
- define("ADROTATE_DISPLAY", '4.9');
26
  define("ADROTATE_VERSION", 391);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
7
  Description: Monetise your website with adverts while keeping things simple. Start making money today!
8
  Text Domain: adrotate
9
  Domain Path: /languages/
10
+ Version: 4.10
11
  License: GPLv3
12
  */
13
 
22
  ------------------------------------------------------------------------------------ */
23
 
24
  /*--- AdRotate values ---------------------------------------*/
25
+ define("ADROTATE_DISPLAY", '4.10');
26
  define("ADROTATE_VERSION", 391);
27
  define("ADROTATE_DB_VERSION", 64);
28
  $plugin_folder = plugin_dir_path(__FILE__);
dashboard/adrotatepro.php CHANGED
@@ -48,7 +48,7 @@
48
  <h3><?php _e('AdRotate is brought to you by', 'adrotate'); ?></h3>
49
  <div class="postbox-ajdg">
50
  <div class="inside">
51
- <p><center><a href="https://m.me/adegans" target="_blank" title="Connect with Arnan on Facebook"><img src="<?php echo plugins_url("/images/arnan-left.jpg", dirname(__FILE__)); ?>" alt="Connect with Arnan" /></a><a href="http://www.arnan.me" title="Visit Arnan's website"><img src="<?php echo plugins_url("/images/arnan-right.jpg", dirname(__FILE__)); ?>" alt="Arnan.me website" /></a></center></p>
52
  </div>
53
  </div>
54
 
48
  <h3><?php _e('AdRotate is brought to you by', 'adrotate'); ?></h3>
49
  <div class="postbox-ajdg">
50
  <div class="inside">
51
+ <p><center><a href="http://www.arnan.me" title="Visit Arnan's website"><img src="<?php echo plugins_url("/images/arnan.png", dirname(__FILE__)); ?>" alt="Arnan.me website" /></a></center></p>
52
  </div>
53
  </div>
54
 
dashboard/info.php CHANGED
@@ -59,7 +59,7 @@ $partner = mt_rand(1,3);
59
  <h3><?php _e('Arnan de Gans News & Updates', 'adrotate'); ?></h3>
60
  <div class="postbox-ajdg">
61
  <div class="inside">
62
- <p><center><a href="https://m.me/adegans" target="_blank" title="Connect with Arnan on Facebook"><img src="<?php echo plugins_url("/images/arnan-left.jpg", dirname(__FILE__)); ?>" alt="Connect with Arnan" /></a><a href="http://www.arnan.me" title="Visit Arnan's website"><img src="<?php echo plugins_url("/images/arnan-right.jpg", dirname(__FILE__)); ?>" alt="Arnan.me website" /></a></center></p>
63
  <?php wp_widget_rss_output(array(
64
  'url' => 'http://ajdg.solutions/feed/',
65
  'items' => 3,
@@ -100,23 +100,23 @@ $partner = mt_rand(1,3);
100
  <h3><?php _e('Join the Media.net advertising network', 'adrotate'); ?></h3>
101
  <div class="postbox-ajdg">
102
  <div class="inside">
103
- <center><a href="http://bit.ly/2leh9sW" target="_blank"><img src="<?php echo plugins_url("/images/offers/medianet-large-$partner.jpg", dirname(__FILE__)); ?>" width="440" /></a></center>
104
- <p><a href="http://bit.ly/2leh9sW" target="_blank">Media.net</a> is the <strong>#2 largest contextual ads platform</strong> in the world that provides its publishers with an <strong>exclusive access to the Yahoo! Bing Network of advertisers and $6bn worth of search demand.</strong></p>
105
 
106
- <p><a href="http://bit.ly/2leh9sW" target="_blank">Media.net</a> <strong>ads are contextual</strong> and hence always relevant to your content. They are also <strong>native by design</strong> and highly customizable, delivering a great user experience and higher CTRs.</p>
107
 
108
  <strong><u>Exclusive offer for AdRotate users</u></strong>
109
- <p>As an AdRotate user, sign up with <a href="http://bit.ly/2leh9sW" target="_blank">Media.net</a> and you'll earn 10% more, over and above your regular earnings for your first 3 months.</p>
110
 
111
- <p><a class="button-primary" href="http://bit.ly/2leh9sW" target="_blank">Sign up with Media.net now &raquo;</a>&nbsp;&nbsp;<a class="button" target="_blank" href="http://bit.ly/2leh9sW">Learn more &raquo;</a></p>
112
  </div>
113
  </div>
114
 
115
  <h3><?php _e('Sponsored offers', 'adrotate'); ?></h3>
116
  <div class="postbox-ajdg">
117
  <div class="inside">
118
- <p><center><a rel="nofollow" href="https://db.tt/lfQBwVVL3v"><img src="<?php echo plugins_url("/images/offers/dropbox.jpg", dirname(__FILE__)); ?>" width="440" alt="Dropbox.com"></a></center></p>
119
- <p><center><a rel="nofollow" href="https://affiliate.namecheap.com/?affId=69775"><img src="<?php echo plugins_url("/images/offers/namecheap-ssl.jpg", dirname(__FILE__)); ?>" width="440" alt="Namecheap.com"></a></center></p>
120
 
121
  <center><small><em><?php _e('These are affiliate banners, clicking them costs you nothing but it helps me and AdRotate a lot!', 'adrotate'); ?></em></small></center>
122
 
59
  <h3><?php _e('Arnan de Gans News & Updates', 'adrotate'); ?></h3>
60
  <div class="postbox-ajdg">
61
  <div class="inside">
62
+ <p><center><a href="http://www.arnan.me" title="Visit Arnan's website"><img src="<?php echo plugins_url("/images/arnan.png", dirname(__FILE__)); ?>" alt="Arnan.me website" /></a></center></p>
63
  <?php wp_widget_rss_output(array(
64
  'url' => 'http://ajdg.solutions/feed/',
65
  'items' => 3,
100
  <h3><?php _e('Join the Media.net advertising network', 'adrotate'); ?></h3>
101
  <div class="postbox-ajdg">
102
  <div class="inside">
103
+ <center><a href="https://ajdg.solutions/go/medianet/" target="_blank"><img src="<?php echo plugins_url("/images/offers/medianet-large-$partner.jpg", dirname(__FILE__)); ?>" width="440" /></a></center>
104
+ <p><a href="https://ajdg.solutions/go/medianet/" target="_blank">Media.net</a> is the <strong>#2 largest contextual ads platform</strong> in the world that provides its publishers with an <strong>exclusive access to the Yahoo! Bing Network of advertisers and $6bn worth of search demand.</strong></p>
105
 
106
+ <p><a href="https://ajdg.solutions/go/medianet/" target="_blank">Media.net</a> <strong>ads are contextual</strong> and hence always relevant to your content. They are also <strong>native by design</strong> and highly customizable, delivering a great user experience and higher CTRs.</p>
107
 
108
  <strong><u>Exclusive offer for AdRotate users</u></strong>
109
+ <p>As an AdRotate user, sign up with <a href="https://ajdg.solutions/go/medianet/" target="_blank">Media.net</a> and you'll earn 10% more, over and above your regular earnings for your first 3 months.</p>
110
 
111
+ <p><a class="button-primary" href="https://ajdg.solutions/go/medianet/" target="_blank">Sign up with Media.net now &raquo;</a>&nbsp;&nbsp;<a class="button" target="_blank" href="https://ajdg.solutions/go/medianet/">Learn more &raquo;</a></p>
112
  </div>
113
  </div>
114
 
115
  <h3><?php _e('Sponsored offers', 'adrotate'); ?></h3>
116
  <div class="postbox-ajdg">
117
  <div class="inside">
118
+ <p><center><a rel="nofollow" href="https://ajdg.solutions/go/dropbox/"><img src="<?php echo plugins_url("/images/offers/dropbox.jpg", dirname(__FILE__)); ?>" width="440" alt="Dropbox.com"></a></center></p>
119
+ <p><center><a rel="nofollow" href="https://ajdg.solutions/go/namecheap/"><img src="<?php echo plugins_url("/images/offers/namecheap-ssl.jpg", dirname(__FILE__)); ?>" width="440" alt="Namecheap.com"></a></center></p>
120
 
121
  <center><small><em><?php _e('These are affiliate banners, clicking them costs you nothing but it helps me and AdRotate a lot!', 'adrotate'); ?></em></small></center>
122
 
dashboard/publisher/adverts-edit.php CHANGED
@@ -24,14 +24,17 @@ if(!$ad_edit_id) {
24
 
25
  $edit_banner = $wpdb->get_row("SELECT * FROM `{$wpdb->prefix}adrotate` WHERE `id` = {$ad_edit_id};");
26
  $groups = $wpdb->get_results("SELECT * FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' ORDER BY `id` ASC;");
27
- $schedules = $wpdb->get_row("SELECT `{$wpdb->prefix}adrotate_schedule`.`id`, `starttime`, `stoptime`, `maxclicks`, `maximpressions` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = {$edit_banner->id} AND `group` = 0 AND `user` = 0 AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `{$wpdb->prefix}adrotate_schedule`.`id` ASC LIMIT 1;");
28
  $linkmeta = $wpdb->get_results("SELECT `group` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = {$edit_banner->id} AND `user` = 0 AND `schedule` = 0;");
29
 
30
  wp_enqueue_media();
31
  wp_enqueue_script('uploader-hook', plugins_url().'/adrotate/library/uploader-hook.js', array('jquery'));
32
 
33
- list($sday, $smonth, $syear, $shour, $sminute) = explode(" ", date("d m Y H i", $schedules->starttime));
34
- list($eday, $emonth, $eyear, $ehour, $eminute) = explode(" ", date("d m Y H i", $schedules->stoptime));
 
 
 
35
 
36
  $meta_array = array();
37
  foreach($linkmeta as $meta) {
@@ -100,7 +103,7 @@ if($edit_banner->imagetype == "field") {
100
  <input type="hidden" name="adrotate_username" value="<?php echo $userdata->user_login;?>" />
101
  <input type="hidden" name="adrotate_id" value="<?php echo $edit_banner->id;?>" />
102
  <input type="hidden" name="adrotate_type" value="<?php echo $edit_banner->type;?>" />
103
- <input type="hidden" name="adrotate_schedule" value="<?php echo $schedules->id;?>" />
104
 
105
  <?php if($edit_banner->type == 'empty') { ?>
106
  <h3><?php _e('New Advert', 'adrotate'); ?></h3>
@@ -127,7 +130,7 @@ if($edit_banner->imagetype == "field") {
127
  <p><em><a href="#" onclick="textatcursor('adrotate_bannercode','&lt;iframe src=&quot;%asset%&quot; height=&quot;250&quot; frameborder=&quot;0&quot; style=&quot;border:none;&quot;&gt;&lt;/iframe&gt;');return false;">&lt;iframe src=&quot;%asset%&quot; height=&quot;250&quot; frameborder=&quot;0&quot; style=&quot;border:none;&quot;&gt;&lt;/iframe&gt;</a></em></p>
128
 
129
  <p><strong><?php _e('Get adverts from Media.net', 'adrotate'); ?></strong></p>
130
- <p><a href="http://bit.ly/2leh9sW" target="_blank"><img src="<?php echo plugins_url("../images/offers/medianet-small-$partner.jpg", dirname(__FILE__)); ?>" width="250" /></a></p>
131
  </td>
132
  </tr>
133
  <tr>
@@ -192,7 +195,7 @@ if($edit_banner->imagetype == "field") {
192
  <a href="admin.php?page=adrotate-ads&view=manage" class="button"><?php _e('Cancel', 'adrotate'); ?></a>
193
  </p>
194
 
195
- <h3><?php _e('Usage', 'adrotate'); ?></h3>
196
  <table class="widefat" style="margin-top: .5em">
197
  <tbody>
198
  <tr>
@@ -208,81 +211,44 @@ if($edit_banner->imagetype == "field") {
208
  </tbody>
209
  </table>
210
 
211
- <h3><?php _e('Schedule your advert', 'adrotate'); ?></h3>
 
212
  <table class="widefat" style="margin-top: .5em">
213
  <tbody>
214
- <tr>
215
- <th width="15%"><?php _e('Start date (day/month/year)', 'adrotate'); ?></th>
216
- <td width="35%">
217
- <label for="adrotate_sday">
218
- <input tabindex="9" name="adrotate_sday" class="search-input" type="text" size="4" maxlength="2" value="<?php echo $sday;?>" /> /
219
- <select tabindex="10" name="adrotate_smonth">
220
- <option value="01" <?php if($smonth == "01") { echo 'selected'; } ?>><?php _e('January', 'adrotate'); ?></option>
221
- <option value="02" <?php if($smonth == "02") { echo 'selected'; } ?>><?php _e('February', 'adrotate'); ?></option>
222
- <option value="03" <?php if($smonth == "03") { echo 'selected'; } ?>><?php _e('March', 'adrotate'); ?></option>
223
- <option value="04" <?php if($smonth == "04") { echo 'selected'; } ?>><?php _e('April', 'adrotate'); ?></option>
224
- <option value="05" <?php if($smonth == "05") { echo 'selected'; } ?>><?php _e('May', 'adrotate'); ?></option>
225
- <option value="06" <?php if($smonth == "06") { echo 'selected'; } ?>><?php _e('June', 'adrotate'); ?></option>
226
- <option value="07" <?php if($smonth == "07") { echo 'selected'; } ?>><?php _e('July', 'adrotate'); ?></option>
227
- <option value="08" <?php if($smonth == "08") { echo 'selected'; } ?>><?php _e('August', 'adrotate'); ?></option>
228
- <option value="09" <?php if($smonth == "09") { echo 'selected'; } ?>><?php _e('September', 'adrotate'); ?></option>
229
- <option value="10" <?php if($smonth == "10") { echo 'selected'; } ?>><?php _e('October', 'adrotate'); ?></option>
230
- <option value="11" <?php if($smonth == "11") { echo 'selected'; } ?>><?php _e('November', 'adrotate'); ?></option>
231
- <option value="12" <?php if($smonth == "12") { echo 'selected'; } ?>><?php _e('December', 'adrotate'); ?></option>
232
- </select> /
233
- <input tabindex="11" name="adrotate_syear" class="search-input" type="text" size="4" maxlength="4" value="<?php echo $syear;?>" />&nbsp;&nbsp;&nbsp;
234
- </label>
235
  </td>
236
- <th width="15%"><?php _e('End date (day/month/year)', 'adrotate'); ?></th>
237
  <td>
238
- <label for="adrotate_eday">
239
- <input tabindex="12" name="adrotate_eday" class="search-input" type="text" size="4" maxlength="2" value="<?php echo $eday;?>" /> /
240
- <select tabindex="13" name="adrotate_emonth">
241
- <option value="01" <?php if($emonth == "01") { echo 'selected'; } ?>><?php _e('January', 'adrotate'); ?></option>
242
- <option value="02" <?php if($emonth == "02") { echo 'selected'; } ?>><?php _e('February', 'adrotate'); ?></option>
243
- <option value="03" <?php if($emonth == "03") { echo 'selected'; } ?>><?php _e('March', 'adrotate'); ?></option>
244
- <option value="04" <?php if($emonth == "04") { echo 'selected'; } ?>><?php _e('April', 'adrotate'); ?></option>
245
- <option value="05" <?php if($emonth == "05") { echo 'selected'; } ?>><?php _e('May', 'adrotate'); ?></option>
246
- <option value="06" <?php if($emonth == "06") { echo 'selected'; } ?>><?php _e('June', 'adrotate'); ?></option>
247
- <option value="07" <?php if($emonth == "07") { echo 'selected'; } ?>><?php _e('July', 'adrotate'); ?></option>
248
- <option value="08" <?php if($emonth == "08") { echo 'selected'; } ?>><?php _e('August', 'adrotate'); ?></option>
249
- <option value="09" <?php if($emonth == "09") { echo 'selected'; } ?>><?php _e('September', 'adrotate'); ?></option>
250
- <option value="10" <?php if($emonth == "10") { echo 'selected'; } ?>><?php _e('October', 'adrotate'); ?></option>
251
- <option value="11" <?php if($emonth == "11") { echo 'selected'; } ?>><?php _e('November', 'adrotate'); ?></option>
252
- <option value="12" <?php if($emonth == "12") { echo 'selected'; } ?>><?php _e('December', 'adrotate'); ?></option>
253
- </select> /
254
- <input tabindex="14" name="adrotate_eyear" class="search-input" type="text" size="4" maxlength="4" value="<?php echo $eyear;?>" />&nbsp;&nbsp;&nbsp;
255
- </label>
256
  </td>
257
  </tr>
258
- <tr>
259
  <th><?php _e('Start time (hh:mm)', 'adrotate'); ?></th>
260
  <td>
261
  <label for="adrotate_sday">
262
- <input tabindex="15" name="adrotate_shour" class="search-input" type="text" size="2" maxlength="4" value="<?php echo $shour;?>" /> :
263
- <input tabindex="16" name="adrotate_sminute" class="search-input" type="text" size="2" maxlength="4" value="<?php echo $sminute;?>" />
264
  </label>
265
  </td>
266
  <th><?php _e('End time (hh:mm)', 'adrotate'); ?></th>
267
  <td>
268
  <label for="adrotate_eday">
269
- <input tabindex="17" name="adrotate_ehour" class="search-input" type="text" size="2" maxlength="4" value="<?php echo $ehour;?>" /> :
270
- <input tabindex="18" name="adrotate_eminute" class="search-input" type="text" size="2" maxlength="4" value="<?php echo $eminute;?>" />
271
  </label>
272
  </td>
273
  </tr>
274
  <?php if($adrotate_config['stats'] == 1) { ?>
275
  <tr>
276
  <th><?php _e('Maximum Clicks', 'adrotate'); ?></th>
277
- <td><input tabindex="19" name="adrotate_maxclicks" type="text" size="5" class="search-input" autocomplete="off" value="<?php echo $schedules->maxclicks;?>" /> <em><?php _e('Leave empty or 0 to skip this.', 'adrotate'); ?></em></td>
278
  <th><?php _e('Maximum Impressions', 'adrotate'); ?></th>
279
- <td><input tabindex="20" name="adrotate_maxshown" type="text" size="5" class="search-input" autocomplete="off" value="<?php echo $schedules->maximpressions;?>" /> <em><?php _e('Leave empty or 0 to skip this.', 'adrotate'); ?></em></td>
280
  </tr>
281
  <?php } ?>
282
- <tr>
283
- <th valign="top"><?php _e('Important', 'adrotate'); ?></th>
284
- <td colspan="3"><em><?php _e('Note: Time uses a 24 hour clock. When you are used to the AM/PM system keep this in mind: If the start or end time is after lunch, add 12 hours. 2PM is 14:00 hours. 6AM is 6:00 hours.', 'adrotate'); ?></em></td>
285
- </tr>
286
  </tbody>
287
  </table>
288
  <center><?php _e('Create multiple and more advanced schedules for each advert with AdRotate Pro.', 'adrotate'); ?> <a href="admin.php?page=adrotate-pro"><?php _e('Upgrade now', 'adrotate'); ?></a>!</center>
24
 
25
  $edit_banner = $wpdb->get_row("SELECT * FROM `{$wpdb->prefix}adrotate` WHERE `id` = {$ad_edit_id};");
26
  $groups = $wpdb->get_results("SELECT * FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' ORDER BY `id` ASC;");
27
+ $schedule = $wpdb->get_row("SELECT `{$wpdb->prefix}adrotate_schedule`.`id`, `starttime`, `stoptime`, `maxclicks`, `maximpressions` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = {$edit_banner->id} AND `group` = 0 AND `user` = 0 AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `{$wpdb->prefix}adrotate_schedule`.`id` ASC LIMIT 1;");
28
  $linkmeta = $wpdb->get_results("SELECT `group` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = {$edit_banner->id} AND `user` = 0 AND `schedule` = 0;");
29
 
30
  wp_enqueue_media();
31
  wp_enqueue_script('uploader-hook', plugins_url().'/adrotate/library/uploader-hook.js', array('jquery'));
32
 
33
+ // Set up start and end date
34
+ list($start_day, $start_month, $start_year, $start_hour, $start_minute) = explode(" ", date("d m Y H i", $schedule->starttime));
35
+ list($end_day, $end_month, $end_year, $end_hour, $end_minute) = explode(" ", date("d m Y H i", $schedule->stoptime));
36
+ $start_date = $start_year.'-'.$start_month.'-'.$start_day;
37
+ $end_date = $end_year.'-'.$end_month.'-'.$end_day;
38
 
39
  $meta_array = array();
40
  foreach($linkmeta as $meta) {
103
  <input type="hidden" name="adrotate_username" value="<?php echo $userdata->user_login;?>" />
104
  <input type="hidden" name="adrotate_id" value="<?php echo $edit_banner->id;?>" />
105
  <input type="hidden" name="adrotate_type" value="<?php echo $edit_banner->type;?>" />
106
+ <input type="hidden" name="adrotate_schedule" value="<?php echo $schedule->id;?>" />
107
 
108
  <?php if($edit_banner->type == 'empty') { ?>
109
  <h3><?php _e('New Advert', 'adrotate'); ?></h3>
130
  <p><em><a href="#" onclick="textatcursor('adrotate_bannercode','&lt;iframe src=&quot;%asset%&quot; height=&quot;250&quot; frameborder=&quot;0&quot; style=&quot;border:none;&quot;&gt;&lt;/iframe&gt;');return false;">&lt;iframe src=&quot;%asset%&quot; height=&quot;250&quot; frameborder=&quot;0&quot; style=&quot;border:none;&quot;&gt;&lt;/iframe&gt;</a></em></p>
131
 
132
  <p><strong><?php _e('Get adverts from Media.net', 'adrotate'); ?></strong></p>
133
+ <p><a href="https://ajdg.solutions/go/medianet/" target="_blank"><img src="<?php echo plugins_url("../images/offers/medianet-small-$partner.jpg", dirname(__FILE__)); ?>" width="250" /></a></p>
134
  </td>
135
  </tr>
136
  <tr>
195
  <a href="admin.php?page=adrotate-ads&view=manage" class="button"><?php _e('Cancel', 'adrotate'); ?></a>
196
  </p>
197
 
198
+ <h2><?php _e('Usage', 'adrotate'); ?></h2>
199
  <table class="widefat" style="margin-top: .5em">
200
  <tbody>
201
  <tr>
211
  </tbody>
212
  </table>
213
 
214
+ <h2><?php _e('Schedule your advert', 'adrotate'); ?></h2>
215
+ <p><em><?php _e('Time uses a 24 hour clock. When you\'re used to the AM/PM system keep this in mind: If the start or end time is after lunch, add 12 hours. 2PM is 14:00 hours. 6AM is 6:00 hours.', 'adrotate'); ?></em></p>
216
  <table class="widefat" style="margin-top: .5em">
217
  <tbody>
218
+ <tr>
219
+ <th><?php _e('Start date', 'adrotate'); ?></th>
220
+ <td>
221
+ <input tabindex="9" type="date" id="datepicker" name="adrotate_start_date" value="<?php echo $start_date; ?>" class="datepicker" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  </td>
223
+ <th><?php _e('End date', 'adrotate'); ?></th>
224
  <td>
225
+ <input tabindex="10" type="date" id="datepicker" name="adrotate_end_date" value="<?php echo $end_date; ?>" class="datepicker" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  </td>
227
  </tr>
228
+ <tr>
229
  <th><?php _e('Start time (hh:mm)', 'adrotate'); ?></th>
230
  <td>
231
  <label for="adrotate_sday">
232
+ <input tabindex="11" name="adrotate_start_hour" class="search-input" type="text" size="2" maxlength="4" value="<?php echo $start_hour; ?>" /> :
233
+ <input tabindex="12" name="adrotate_start_minute" class="search-input" type="text" size="2" maxlength="4" value="<?php echo $start_hour; ?>" />
234
  </label>
235
  </td>
236
  <th><?php _e('End time (hh:mm)', 'adrotate'); ?></th>
237
  <td>
238
  <label for="adrotate_eday">
239
+ <input tabindex="13" name="adrotate_end_hour" class="search-input" type="text" size="2" maxlength="4" value="<?php echo $end_hour; ?>" /> :
240
+ <input tabindex="14" name="adrotate_end_minute" class="search-input" type="text" size="2" maxlength="4" value="<?php echo $end_minute; ?>" />
241
  </label>
242
  </td>
243
  </tr>
244
  <?php if($adrotate_config['stats'] == 1) { ?>
245
  <tr>
246
  <th><?php _e('Maximum Clicks', 'adrotate'); ?></th>
247
+ <td><input tabindex="19" name="adrotate_maxclicks" type="text" size="5" class="search-input" autocomplete="off" value="<?php echo $schedule->maxclicks;?>" /> <em><?php _e('Leave empty or 0 to skip this.', 'adrotate'); ?></em></td>
248
  <th><?php _e('Maximum Impressions', 'adrotate'); ?></th>
249
+ <td><input tabindex="20" name="adrotate_maxshown" type="text" size="5" class="search-input" autocomplete="off" value="<?php echo $schedule->maximpressions;?>" /> <em><?php _e('Leave empty or 0 to skip this.', 'adrotate'); ?></em></td>
250
  </tr>
251
  <?php } ?>
 
 
 
 
252
  </tbody>
253
  </table>
254
  <center><?php _e('Create multiple and more advanced schedules for each advert with AdRotate Pro.', 'adrotate'); ?> <a href="admin.php?page=adrotate-pro"><?php _e('Upgrade now', 'adrotate'); ?></a>!</center>
dashboard/publisher/statistics-advert.php CHANGED
@@ -10,7 +10,6 @@
10
  ------------------------------------------------------------------------------------ */
11
 
12
  $banner = $wpdb->get_row("SELECT `title`, `tracker`, `type` FROM `{$wpdb->prefix}adrotate` WHERE `id` = '{$id}';");
13
- $schedules = $wpdb->get_results("SELECT `{$wpdb->prefix}adrotate_schedule`.`id`, `starttime`, `stoptime`, `maxclicks`, `maximpressions`, COUNT(`clicks`) as `clicks`, COUNT(`impressions`) as `impressions` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta`, `{$wpdb->prefix}adrotate_stats` WHERE `{$wpdb->prefix}adrotate_linkmeta`.`ad` = '{$id}' AND `{$wpdb->prefix}adrotate_linkmeta`.`ad` = `{$wpdb->prefix}adrotate_stats`.`ad` AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` AND `thetime` > `starttime` AND `thetime` < `stoptime` ORDER BY `{$wpdb->prefix}adrotate_schedule`.`id` ASC;");
14
 
15
  $stats = adrotate_stats($id, false);
16
  $stats_today = adrotate_stats($id, false, adrotate_date_start('day'));
@@ -105,37 +104,6 @@ $ctr_graph_month = adrotate_ctr($stats_graph_month['clicks'], $stats_graph_month
105
  </table>
106
  </form>
107
 
108
- <h2><?php _e('Periodic overview of clicks and impressions', 'adrotate'); ?></h2>
109
- <table class="widefat" style="margin-top: .5em">
110
- <thead>
111
- <tr>
112
- <th><?php _e('Shown from', 'adrotate'); ?></th>
113
- <th><?php _e('Shown until', 'adrotate'); ?></th>
114
- <th><center><?php _e('Max Clicks', 'adrotate'); ?> / <?php _e('Used', 'adrotate'); ?></center></th>
115
- <th><center><?php _e('Max Impressions', 'adrotate'); ?> / <?php _e('Used', 'adrotate'); ?></center></th>
116
- </tr>
117
- </thead>
118
-
119
- <tbody>
120
- <?php
121
- foreach($schedules as $schedule) {
122
- $stats_schedule = adrotate_stats($id, false, $schedule->starttime, $schedule->stoptime);
123
- if($schedule->maxclicks == 0) $schedule->maxclicks = '&infin;';
124
- if($schedule->maximpressions == 0) $schedule->maximpressions = '&infin;';
125
- ?>
126
- <tr id='schedule-<?php echo $schedule->id; ?>'>
127
- <td><?php echo date_i18n("F d, Y - H:i", $schedule->starttime);?></td>
128
- <td><?php echo date_i18n("F d, Y - H:i", $schedule->stoptime);?></td>
129
- <td><center><?php echo $schedule->maxclicks; ?> / <?php echo $stats_schedule['clicks']; ?></center></td>
130
- <td><center><?php echo $schedule->maximpressions; ?> / <?php echo $stats_schedule['impressions']; ?></center></td>
131
- </tr>
132
- <?php
133
- unset($stats_schedule);
134
- }
135
- ?>
136
- </tbody>
137
- </table>
138
-
139
  <p><center>
140
  <?php _e('Get more features with AdRotate Pro', 'adrotate'); ?> - <a href="admin.php?page=adrotate-pro"><?php _e('Upgrade now', 'adrotate'); ?></a>!<br />
141
  <em><small><strong><?php _e('Note:', 'adrotate'); ?></strong> <?php _e('All statistics are indicative. They do not nessesarily reflect results counted by other parties.', 'adrotate'); ?></small></em>
10
  ------------------------------------------------------------------------------------ */
11
 
12
  $banner = $wpdb->get_row("SELECT `title`, `tracker`, `type` FROM `{$wpdb->prefix}adrotate` WHERE `id` = '{$id}';");
 
13
 
14
  $stats = adrotate_stats($id, false);
15
  $stats_today = adrotate_stats($id, false, adrotate_date_start('day'));
104
  </table>
105
  </form>
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  <p><center>
108
  <?php _e('Get more features with AdRotate Pro', 'adrotate'); ?> - <a href="admin.php?page=adrotate-pro"><?php _e('Upgrade now', 'adrotate'); ?></a>!<br />
109
  <em><small><strong><?php _e('Note:', 'adrotate'); ?></strong> <?php _e('All statistics are indicative. They do not nessesarily reflect results counted by other parties.', 'adrotate'); ?></small></em>
images/arnan-left.jpg DELETED
Binary file
images/arnan-right.jpg DELETED
Binary file
images/arnan.png ADDED
Binary file
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.arnan.me/#donate
4
  Tags: ad, advert, adsense, advertising, doubleclick, responsive, ad rotator, ad manager, banner manager, advert manager, analytics, advertisement,
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
- Stable tag: 4.9
8
  License: GPLv3
9
 
10
  Monetise your website with adverts while keeping things simple. Start making money today!
@@ -51,7 +51,7 @@ Please post bug reports for AdRotate Pro on [the support forum for bug reports](
51
  * Get email notifications when your ads need you
52
  * Any size advertisement, including 125x125, 468x60, 729x90, 160x600
53
  * Easy to read stats so you can follow how each advert is performing
54
- * Compatible with plugins like Yoast SEO, W3 Total Cache, SEO Framework, bbPress, Contact form 7, All in one SEO Pack, Jetpack from Automattic, WooCommerce, Wordfence, Regenerate Thumbnails and many more...
55
  * Compatible with responsive adverts
56
  * Daily, monthly and yearly stats
57
  * Couple adverts to users for personalized stats
@@ -99,27 +99,33 @@ You can also post your questions on the [forum](https://ajdg.solutions/forums/?u
99
  Be a Professional and go Pro. With [AdRotate Professional](https://ajdg.solutions/plugins/adrotate-for-wordpress/?utm_campaign=adrotate-page&utm_medium=readme&utm_source=adrotate-free)!
100
 
101
 
102
- = 4.9 FREE =
103
- * [new] Borlabs Cache support
104
- * [change] Dashboard notifications improved
105
- * [change] Dashboard updates and improvements
106
-
107
- = 4.11 PRO =
108
- * [new] Borlabs Cache support
109
- * [new] Google Analytics Global Tag support
110
- * [new] Support Jetpack Photon for certain advert assets
111
- * [new] FreegeoIP support for Geo Targeting
112
- * [change] Dashboard updates and improvements
113
- * [change] Dashboard notifications improved
114
- * [fix] Incorrect function call to advert preview when editing
 
 
 
 
 
115
 
116
  All recent changes are available on the [AdRotate website](https://ajdg.solutions/plugins/adrotate-for-wordpress/development/?utm_campaign=development&utm_medium=readme&utm_source=adrotate-free).
117
 
118
  == Upgrade Notice ==
119
 
120
- * [new] Borlabs Cache support
121
- * [change] Dashboard notifications improved
122
- * [change] Dashboard updates and improvements
 
123
 
124
  == Screenshots ==
125
 
4
  Tags: ad, advert, adsense, advertising, doubleclick, responsive, ad rotator, ad manager, banner manager, advert manager, analytics, advertisement,
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
+ Stable tag: 4.10
8
  License: GPLv3
9
 
10
  Monetise your website with adverts while keeping things simple. Start making money today!
51
  * Get email notifications when your ads need you
52
  * Any size advertisement, including 125x125, 468x60, 729x90, 160x600
53
  * Easy to read stats so you can follow how each advert is performing
54
+ * Compatible with plugins like Yoast SEO, W3 Total Cache, SEO Framework, Borlabs Cache, bbPress, Contact form 7, All in one SEO Pack, Jetpack from Automattic, WooCommerce, Wordfence, Regenerate Thumbnails and many more...
55
  * Compatible with responsive adverts
56
  * Daily, monthly and yearly stats
57
  * Couple adverts to users for personalized stats
99
  Be a Professional and go Pro. With [AdRotate Professional](https://ajdg.solutions/plugins/adrotate-for-wordpress/?utm_campaign=adrotate-page&utm_medium=readme&utm_source=adrotate-free)!
100
 
101
 
102
+ = 4.10 FREE =
103
+ * [fix] Improved integration with Jetpack Photon
104
+ * [fix] Improved PHP7.2+ compatibility
105
+ * [new] Date pickers for advert scheduling
106
+ * [change] Compatibility with Borlabs Cache 1.1.9.1+
107
+
108
+ = 4.12 PRO =
109
+ * [fix] Improved integration with Jetpack Photon
110
+ * [fix] Improved PHP7.2+ compatibility
111
+ * [fix] Improved compatibility with Google Global Tag (gtag.js)
112
+ * [fix] Statistics display for 'the best' and 'the worst'
113
+ * [new] Date pickers for schedules
114
+ * [new] Date pickers for statistics export
115
+ * [new] Set a tracking value for clicks in Google Analytics
116
+ * [new] Set a tracking value for impressions in Google Analytics
117
+ * [new] Network group widget for multisite networks
118
+ * [change] Compatibility with Borlabs Cache 1.1.9.1+
119
+ * [change] Advert and group widgets no longer support multisite
120
 
121
  All recent changes are available on the [AdRotate website](https://ajdg.solutions/plugins/adrotate-for-wordpress/development/?utm_campaign=development&utm_medium=readme&utm_source=adrotate-free).
122
 
123
  == Upgrade Notice ==
124
 
125
+ * [fix] Improved integration with Jetpack Photon
126
+ * [fix] Improved PHP7.2+ compatibility
127
+ * [new] Date pickers for advert scheduling
128
+ * [change] Compatibility with Borlabs Cache 1.1.9.1+
129
 
130
  == Screenshots ==
131