Version Description
FREE = * [change] Removed many unused Debug code * [change] Tweaks to the installation script * [fix] Dashboard widgets
Download this release
Release Info
Developer | adegans |
Plugin | ![]() |
Version | 5.5 |
Comparing to | |
See all releases |
Code changes from version 5.4.2 to 5.5
- adrotate-functions.php +1 -14
- adrotate-manage-publisher.php +1 -1
- adrotate-output.php +5 -42
- adrotate-setup.php +129 -145
- adrotate.php +5 -4
- dashboard/adrotatepro.php +8 -8
- dashboard/info.php +40 -23
- dashboard/publisher/adverts-disabled.php +0 -10
- dashboard/publisher/adverts-error.php +0 -7
- dashboard/publisher/adverts-main.php +0 -15
- dashboard/settings/maintenance.php +0 -1
- images/buttons/3.png +0 -0
- images/buttons/4.png +0 -0
- images/offers/html5-service.jpg +0 -0
- language/adrotate-bg_BG.mo +0 -0
- language/adrotate-el.mo +0 -0
- language/adrotate-es_ES.mo +0 -0
- language/adrotate-fr_FR.mo +0 -0
- language/adrotate-id_ID.mo +0 -0
- language/adrotate-ja.mo +0 -0
- language/adrotate-pl_PL.mo +0 -0
- language/adrotate-sr_RS.mo +0 -0
- language/adrotate-sv_SV.mo +0 -0
- language/adrotate.pot +2953 -0
- library/dashboard.css +2 -2
- readme.txt +18 -23
adrotate-functions.php
CHANGED
@@ -65,27 +65,14 @@ function adrotate_is_human() {
|
|
65 |
Since: 3.6.11
|
66 |
-------------------------------------------------------------*/
|
67 |
function adrotate_filter_schedule($selected, $banner) {
|
68 |
-
global $wpdb, $adrotate_config
|
69 |
|
70 |
$now = adrotate_now();
|
71 |
|
72 |
-
if($adrotate_debug['general'] == true) {
|
73 |
-
echo "<p><strong>[DEBUG][adrotate_filter_schedule()] Filtering banner</strong><pre>";
|
74 |
-
print_r($banner->id);
|
75 |
-
echo "</pre></p>";
|
76 |
-
}
|
77 |
-
|
78 |
// Get schedules for advert
|
79 |
$schedules = $wpdb->get_results("SELECT `{$wpdb->prefix}adrotate_schedule`.`id`, `starttime`, `stoptime`, `maxclicks`, `maximpressions` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` AND `ad` = '".$banner->id."' ORDER BY `starttime` ASC LIMIT 1;");
|
80 |
$schedule = $schedules[0];
|
81 |
|
82 |
-
if($adrotate_debug['general'] == true) {
|
83 |
-
echo "<p><strong>[DEBUG][adrotate_filter_schedule] Ad ".$banner->id." - Has schedule (id: ".$schedule->id.")</strong><pre>";
|
84 |
-
echo "<br />Start: ".$schedule->starttime." (".date("F j, Y, g:i a", $schedule->starttime).")";
|
85 |
-
echo "<br />End: ".$schedule->stoptime." (".date("F j, Y, g:i a", $schedule->stoptime).")";
|
86 |
-
echo "</pre></p>";
|
87 |
-
}
|
88 |
-
|
89 |
if($now < $schedule->starttime OR $now > $schedule->stoptime) {
|
90 |
unset($selected[$banner->id]);
|
91 |
} else {
|
65 |
Since: 3.6.11
|
66 |
-------------------------------------------------------------*/
|
67 |
function adrotate_filter_schedule($selected, $banner) {
|
68 |
+
global $wpdb, $adrotate_config;
|
69 |
|
70 |
$now = adrotate_now();
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
// Get schedules for advert
|
73 |
$schedules = $wpdb->get_results("SELECT `{$wpdb->prefix}adrotate_schedule`.`id`, `starttime`, `stoptime`, `maxclicks`, `maximpressions` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` AND `ad` = '".$banner->id."' ORDER BY `starttime` ASC LIMIT 1;");
|
74 |
$schedule = $schedules[0];
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
if($now < $schedule->starttime OR $now > $schedule->stoptime) {
|
77 |
unset($selected[$banner->id]);
|
78 |
} else {
|
adrotate-manage-publisher.php
CHANGED
@@ -553,6 +553,7 @@ function adrotate_delete($id, $what) {
|
|
553 |
} else if ($what == 'group') {
|
554 |
$wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_groups` WHERE `id` = %d;", $id));
|
555 |
$wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = %d;", $id));
|
|
|
556 |
} else if ($what == 'bannergroup') {
|
557 |
$linkmeta = $wpdb->get_results($wpdb->prepare("SELECT `ad` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = %d AND `user` = '0' AND `schedule` = '0';", $id));
|
558 |
foreach($linkmeta as $meta) {
|
@@ -757,7 +758,6 @@ function adrotate_options_submit() {
|
|
757 |
$debug = get_option('adrotate_debug');
|
758 |
|
759 |
$debug['general'] = (isset($_POST['adrotate_debug'])) ? true : false;
|
760 |
-
$debug['publisher'] = (isset($_POST['adrotate_debug_publisher'])) ? true : false;
|
761 |
$debug['timers'] = (isset($_POST['adrotate_debug_timers'])) ? true : false;
|
762 |
$debug['track'] = (isset($_POST['adrotate_debug_track'])) ? true : false;
|
763 |
|
553 |
} else if ($what == 'group') {
|
554 |
$wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_groups` WHERE `id` = %d;", $id));
|
555 |
$wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = %d;", $id));
|
556 |
+
$wpdb->update($wpdb->prefix.'adrotate_groups', array('fallback' => 0), array('fallback' => $id));
|
557 |
} else if ($what == 'bannergroup') {
|
558 |
$linkmeta = $wpdb->get_results($wpdb->prepare("SELECT `ad` FROM `{$wpdb->prefix}adrotate_linkmeta` WHERE `group` = %d AND `user` = '0' AND `schedule` = '0';", $id));
|
559 |
foreach($linkmeta as $meta) {
|
758 |
$debug = get_option('adrotate_debug');
|
759 |
|
760 |
$debug['general'] = (isset($_POST['adrotate_debug'])) ? true : false;
|
|
|
761 |
$debug['timers'] = (isset($_POST['adrotate_debug_timers'])) ? true : false;
|
762 |
$debug['track'] = (isset($_POST['adrotate_debug_track'])) ? true : false;
|
763 |
|
adrotate-output.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
Since: 3.0
|
16 |
-------------------------------------------------------------*/
|
17 |
function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
|
18 |
-
global $wpdb, $adrotate_config
|
19 |
|
20 |
$output = '';
|
21 |
|
@@ -23,12 +23,6 @@ function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
|
|
23 |
$banner = $wpdb->get_row($wpdb->prepare("SELECT `id`, `title`, `bannercode`, `tracker`, `image` FROM `{$wpdb->prefix}adrotate` WHERE `id` = %d AND (`type` = 'active' OR `type` = '2days' OR `type` = '7days');", $banner_id));
|
24 |
|
25 |
if($banner) {
|
26 |
-
if($adrotate_debug['general'] == true) {
|
27 |
-
echo "<p><strong>[DEBUG][adrotate_ad()] Selected Ad ID</strong><pre>";
|
28 |
-
print_r($banner->id);
|
29 |
-
echo "</pre></p>";
|
30 |
-
}
|
31 |
-
|
32 |
$selected = array($banner->id => 0);
|
33 |
$selected = adrotate_filter_schedule($selected, $banner);
|
34 |
} else {
|
@@ -62,7 +56,7 @@ function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
|
|
62 |
Since: 3.0
|
63 |
-------------------------------------------------------------*/
|
64 |
function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
|
65 |
-
global $wpdb, $adrotate_config
|
66 |
|
67 |
$output = $group_select = '';
|
68 |
if($group_ids) {
|
@@ -78,12 +72,6 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
|
|
78 |
|
79 |
$group = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' AND `id` = %d;", $group_array[0]));
|
80 |
|
81 |
-
if($adrotate_debug['general'] == true) {
|
82 |
-
echo "<p><strong>[DEBUG][adrotate_group] Selected group</strong><pre>";
|
83 |
-
print_r($group);
|
84 |
-
echo "</pre></p>";
|
85 |
-
}
|
86 |
-
|
87 |
if($group) {
|
88 |
// Get all ads in all selected groups
|
89 |
$ads = $wpdb->get_results(
|
@@ -108,24 +96,12 @@ function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
|
|
108 |
ORDER BY `{$wpdb->prefix}adrotate`.`id`;");
|
109 |
|
110 |
if($ads) {
|
111 |
-
if($adrotate_debug['general'] == true) {
|
112 |
-
echo "<p><strong>[DEBUG][adrotate_group()] All ads in group</strong><pre>";
|
113 |
-
print_r($ads);
|
114 |
-
echo "</pre></p>";
|
115 |
-
}
|
116 |
-
|
117 |
foreach($ads as $ad) {
|
118 |
$selected[$ad->id] = $ad;
|
119 |
$selected = adrotate_filter_schedule($selected, $ad);
|
120 |
}
|
121 |
unset($ads);
|
122 |
|
123 |
-
if($adrotate_debug['general'] == true) {
|
124 |
-
echo "<p><strong>[DEBUG][adrotate_group] Reduced array based on schedule restrictions</strong><pre>";
|
125 |
-
print_r($selected);
|
126 |
-
echo "</pre></p>";
|
127 |
-
}
|
128 |
-
|
129 |
$array_count = count($selected);
|
130 |
if($array_count > 0) {
|
131 |
$before = $after = '';
|
@@ -274,7 +250,7 @@ function adrotate_shortcode($atts, $content = null) {
|
|
274 |
Added: 3.7
|
275 |
-------------------------------------------------------------*/
|
276 |
function adrotate_inject_posts($post_content) {
|
277 |
-
global $wpdb, $post, $adrotate_config
|
278 |
|
279 |
$group_array = array();
|
280 |
if(is_page()) {
|
@@ -313,13 +289,6 @@ function adrotate_inject_posts($post_content) {
|
|
313 |
$group_array = adrotate_shuffle($group_array);
|
314 |
$group_count = count($group_array);
|
315 |
|
316 |
-
if($adrotate_debug['general'] == true) {
|
317 |
-
echo "<p><strong>[DEBUG][adrotate_inject_posts()] group_array</strong><pre>";
|
318 |
-
echo "Group count: ".$group_count."</br>";
|
319 |
-
print_r($group_array);
|
320 |
-
echo "</pre></p>";
|
321 |
-
}
|
322 |
-
|
323 |
if($group_count > 0) {
|
324 |
$before = $after = $inside = 0;
|
325 |
$advert_output = '';
|
@@ -392,19 +361,13 @@ function adrotate_inject_posts($post_content) {
|
|
392 |
Since: 3.0
|
393 |
-------------------------------------------------------------*/
|
394 |
function adrotate_preview($banner_id) {
|
395 |
-
global $wpdb
|
396 |
|
397 |
if($banner_id) {
|
398 |
$now = adrotate_now();
|
399 |
|
400 |
$banner = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$wpdb->prefix}adrotate` WHERE `id` = %d;", $banner_id));
|
401 |
|
402 |
-
if($adrotate_debug['general'] == true) {
|
403 |
-
echo "<p><strong>[DEBUG][adrotate_preview()] Ad information</strong><pre>";
|
404 |
-
print_r($banner);
|
405 |
-
echo "</pre></p>";
|
406 |
-
}
|
407 |
-
|
408 |
if($banner) {
|
409 |
$image = str_replace('%folder%', '/banners/', $banner->image);
|
410 |
$output = adrotate_ad_output($banner->id, 0, $banner->title, $banner->bannercode, $banner->tracker, $image);
|
@@ -855,7 +818,7 @@ function adrotate_help_info() {
|
|
855 |
'content' => '<h4>Thank you for using AdRotate</h4>'.
|
856 |
'<p>AdRotate is becoming one of the most popular WordPress plugins for Advertising and is a household name for many companies and websites around the world. AdRotate wouldn\'t be possible without your support and my life wouldn\'t be what it is today without your help.</p><p><em>- Arnan</em></p>'.
|
857 |
|
858 |
-
'<p><strong>Business:</strong> <a href="https://ajdg.solutions/" target="_blank">ajdg.solutions website</a
|
859 |
'<strong>Personal:</strong> <a href="https://www.arnan.me" target="_blank">arnan.me website</a> also Arnan has <a href="https://arnandegans.tumblr.com" target="_blank">Tumblr</a>, <a href="https://www.twitter.com/arnandegans/" target="_blank">Twitter</a> and <a href="https://linkedin.com/in/arnandegans/" target="_blank">LinkedIn</a>.</p>'
|
860 |
)
|
861 |
);
|
15 |
Since: 3.0
|
16 |
-------------------------------------------------------------*/
|
17 |
function adrotate_ad($banner_id, $individual = true, $group = null, $site = 0) {
|
18 |
+
global $wpdb, $adrotate_config;
|
19 |
|
20 |
$output = '';
|
21 |
|
23 |
$banner = $wpdb->get_row($wpdb->prepare("SELECT `id`, `title`, `bannercode`, `tracker`, `image` FROM `{$wpdb->prefix}adrotate` WHERE `id` = %d AND (`type` = 'active' OR `type` = '2days' OR `type` = '7days');", $banner_id));
|
24 |
|
25 |
if($banner) {
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
$selected = array($banner->id => 0);
|
27 |
$selected = adrotate_filter_schedule($selected, $banner);
|
28 |
} else {
|
56 |
Since: 3.0
|
57 |
-------------------------------------------------------------*/
|
58 |
function adrotate_group($group_ids, $fallback = 0, $weight = 0, $site = 0) {
|
59 |
+
global $wpdb, $adrotate_config;
|
60 |
|
61 |
$output = $group_select = '';
|
62 |
if($group_ids) {
|
72 |
|
73 |
$group = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' AND `id` = %d;", $group_array[0]));
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
if($group) {
|
76 |
// Get all ads in all selected groups
|
77 |
$ads = $wpdb->get_results(
|
96 |
ORDER BY `{$wpdb->prefix}adrotate`.`id`;");
|
97 |
|
98 |
if($ads) {
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
foreach($ads as $ad) {
|
100 |
$selected[$ad->id] = $ad;
|
101 |
$selected = adrotate_filter_schedule($selected, $ad);
|
102 |
}
|
103 |
unset($ads);
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
$array_count = count($selected);
|
106 |
if($array_count > 0) {
|
107 |
$before = $after = '';
|
250 |
Added: 3.7
|
251 |
-------------------------------------------------------------*/
|
252 |
function adrotate_inject_posts($post_content) {
|
253 |
+
global $wpdb, $post, $adrotate_config;
|
254 |
|
255 |
$group_array = array();
|
256 |
if(is_page()) {
|
289 |
$group_array = adrotate_shuffle($group_array);
|
290 |
$group_count = count($group_array);
|
291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
if($group_count > 0) {
|
293 |
$before = $after = $inside = 0;
|
294 |
$advert_output = '';
|
361 |
Since: 3.0
|
362 |
-------------------------------------------------------------*/
|
363 |
function adrotate_preview($banner_id) {
|
364 |
+
global $wpdb;
|
365 |
|
366 |
if($banner_id) {
|
367 |
$now = adrotate_now();
|
368 |
|
369 |
$banner = $wpdb->get_row($wpdb->prepare("SELECT * FROM `{$wpdb->prefix}adrotate` WHERE `id` = %d;", $banner_id));
|
370 |
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
if($banner) {
|
372 |
$image = str_replace('%folder%', '/banners/', $banner->image);
|
373 |
$output = adrotate_ad_output($banner->id, 0, $banner->title, $banner->bannercode, $banner->tracker, $image);
|
818 |
'content' => '<h4>Thank you for using AdRotate</h4>'.
|
819 |
'<p>AdRotate is becoming one of the most popular WordPress plugins for Advertising and is a household name for many companies and websites around the world. AdRotate wouldn\'t be possible without your support and my life wouldn\'t be what it is today without your help.</p><p><em>- Arnan</em></p>'.
|
820 |
|
821 |
+
'<p><strong>Business:</strong> <a href="https://ajdg.solutions/" target="_blank">ajdg.solutions website</a> and on <a href="https://ajdgsolutions.tumblr.com" target="_blank">AJdG Solutions Tumblr</a>.<br />'.
|
822 |
'<strong>Personal:</strong> <a href="https://www.arnan.me" target="_blank">arnan.me website</a> also Arnan has <a href="https://arnandegans.tumblr.com" target="_blank">Tumblr</a>, <a href="https://www.twitter.com/arnandegans/" target="_blank">Twitter</a> and <a href="https://linkedin.com/in/arnandegans/" target="_blank">LinkedIn</a>.</p>'
|
823 |
)
|
824 |
);
|
adrotate-setup.php
CHANGED
@@ -40,9 +40,9 @@ function adrotate_activate($network_wide) {
|
|
40 |
function adrotate_activate_setup() {
|
41 |
global $wpdb, $userdata;
|
42 |
|
43 |
-
if(version_compare(PHP_VERSION, '5.
|
44 |
deactivate_plugins(plugin_basename('adrotate/adrotate.php'));
|
45 |
-
wp_die('AdRotate
|
46 |
return;
|
47 |
} else {
|
48 |
if(!current_user_can('activate_plugins')) {
|
@@ -50,6 +50,8 @@ function adrotate_activate_setup() {
|
|
50 |
wp_die('You do not have appropriate access to activate this plugin! Contact your administrator!<br /><a href="'. get_option('siteurl').'/wp-admin/plugins.php">Back to dashboard</a>.');
|
51 |
return;
|
52 |
} else {
|
|
|
|
|
53 |
// Set defaults for internal versions
|
54 |
add_option('adrotate_db_version', array('current' => ADROTATE_DB_VERSION, 'previous' => ''));
|
55 |
add_option('adrotate_version', array('current' => ADROTATE_VERSION, 'previous' => ''));
|
@@ -59,7 +61,7 @@ function adrotate_activate_setup() {
|
|
59 |
add_option('adrotate_notifications', array());
|
60 |
add_option('adrotate_crawlers', array());
|
61 |
add_option('adrotate_db_timer', date('U'));
|
62 |
-
add_option('adrotate_debug', array('general' => false, '
|
63 |
add_option('adrotate_advert_status', array('error' => 0, 'expired' => 0, 'expiressoon' => 0, 'normal' => 0, 'total' => 0));
|
64 |
add_option('adrotate_geo_required', 0);
|
65 |
add_option('adrotate_geo_requests', 0);
|
@@ -281,7 +283,6 @@ function adrotate_check_config() {
|
|
281 |
update_option('adrotate_crawlers', $crawlers);
|
282 |
|
283 |
if(!isset($debug['general'])) $debug['general'] = false;
|
284 |
-
if(!isset($debug['publisher'])) $debug['publisher'] = false;
|
285 |
if(!isset($debug['timers'])) $debug['timers'] = false;
|
286 |
if(!isset($debug['track'])) $debug['track'] = false;
|
287 |
update_option('adrotate_debug', $debug);
|
@@ -347,7 +348,7 @@ function adrotate_dummy_data() {
|
|
347 |
|
348 |
if(is_null($no_ads) AND is_null($no_schedules) AND is_null($no_linkmeta)) {
|
349 |
// Demo ad 1
|
350 |
-
$wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo
|
351 |
$ad_id = $wpdb->insert_id;
|
352 |
$wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', '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'));
|
353 |
$schedule_id = $wpdb->insert_id;
|
@@ -355,7 +356,7 @@ function adrotate_dummy_data() {
|
|
355 |
unset($ad_id, $schedule_id);
|
356 |
|
357 |
// Demo ad 2
|
358 |
-
$wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo
|
359 |
$ad_id = $wpdb->insert_id;
|
360 |
$wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', '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'));
|
361 |
$schedule_id = $wpdb->insert_id;
|
@@ -380,7 +381,6 @@ function adrotate_database_install() {
|
|
380 |
// Initial data
|
381 |
$charset_collate = $engine = '';
|
382 |
$now = adrotate_now();
|
383 |
-
$in84days = $now + 7257600;
|
384 |
|
385 |
if(!empty($wpdb->charset)) {
|
386 |
$charset_collate .= " DEFAULT CHARACTER SET {$wpdb->charset}";
|
@@ -394,144 +394,128 @@ function adrotate_database_install() {
|
|
394 |
$engine = ' ENGINE=InnoDB';
|
395 |
}
|
396 |
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
)
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
)
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
)
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
INDEX `thetime` (`thetime`)
|
520 |
-
) ".$charset_collate.$engine.";");
|
521 |
-
}
|
522 |
-
|
523 |
-
if(!in_array("{$wpdb->prefix}adrotate_tracker", $found_tables)) {
|
524 |
-
dbDelta("CREATE TABLE `{$wpdb->prefix}adrotate_tracker` (
|
525 |
-
`id` bigint(9) unsigned NOT NULL auto_increment,
|
526 |
-
`ipaddress` varchar(15) NOT NULL default '0',
|
527 |
-
`timer` int(15) unsigned NOT NULL default '0',
|
528 |
-
`bannerid` int(15) unsigned NOT NULL default '0',
|
529 |
-
`stat` char(1) NOT NULL default 'c',
|
530 |
-
PRIMARY KEY (`id`),
|
531 |
-
KEY `ipaddress` (`ipaddress`),
|
532 |
-
KEY `timer` (`timer`)
|
533 |
-
) ".$charset_collate.$engine.";");
|
534 |
-
}
|
535 |
}
|
536 |
|
537 |
/*-------------------------------------------------------------
|
40 |
function adrotate_activate_setup() {
|
41 |
global $wpdb, $userdata;
|
42 |
|
43 |
+
if(version_compare(PHP_VERSION, '5.6.0', '<') == -1) {
|
44 |
deactivate_plugins(plugin_basename('adrotate/adrotate.php'));
|
45 |
+
wp_die('AdRotate 5.0 and newer requires PHP 5.6 or higher. Your server reports version '.PHP_VERSION.'. Contact your hosting provider about upgrading your server!<br /><a href="'. get_option('siteurl').'/wp-admin/plugins.php">Back to dashboard</a>.');
|
46 |
return;
|
47 |
} else {
|
48 |
if(!current_user_can('activate_plugins')) {
|
50 |
wp_die('You do not have appropriate access to activate this plugin! Contact your administrator!<br /><a href="'. get_option('siteurl').'/wp-admin/plugins.php">Back to dashboard</a>.');
|
51 |
return;
|
52 |
} else {
|
53 |
+
deactivate_plugins(plugin_basename('adrotate-pro/adrotate-pro.php'));
|
54 |
+
|
55 |
// Set defaults for internal versions
|
56 |
add_option('adrotate_db_version', array('current' => ADROTATE_DB_VERSION, 'previous' => ''));
|
57 |
add_option('adrotate_version', array('current' => ADROTATE_VERSION, 'previous' => ''));
|
61 |
add_option('adrotate_notifications', array());
|
62 |
add_option('adrotate_crawlers', array());
|
63 |
add_option('adrotate_db_timer', date('U'));
|
64 |
+
add_option('adrotate_debug', array('general' => false, 'timers' => false, 'track' => false));
|
65 |
add_option('adrotate_advert_status', array('error' => 0, 'expired' => 0, 'expiressoon' => 0, 'normal' => 0, 'total' => 0));
|
66 |
add_option('adrotate_geo_required', 0);
|
67 |
add_option('adrotate_geo_requests', 0);
|
283 |
update_option('adrotate_crawlers', $crawlers);
|
284 |
|
285 |
if(!isset($debug['general'])) $debug['general'] = false;
|
|
|
286 |
if(!isset($debug['timers'])) $debug['timers'] = false;
|
287 |
if(!isset($debug['track'])) $debug['track'] = false;
|
288 |
update_option('adrotate_debug', $debug);
|
348 |
|
349 |
if(is_null($no_ads) AND is_null($no_schedules) AND is_null($no_linkmeta)) {
|
350 |
// Demo ad 1
|
351 |
+
$wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo banner 468x60', 'bannercode' => '<a href=\"https:\/\/ajdg.solutions\"><img src=\"http://ajdg.solutions/assets/banners/adrotate-468x60.jpg\" /></a>', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'tracker' => 'N', 'show_everyone' => 'Y', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'os_other' => 'Y', 'type' => 'active', 'weight' => 6, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
|
352 |
$ad_id = $wpdb->insert_id;
|
353 |
$wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', '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'));
|
354 |
$schedule_id = $wpdb->insert_id;
|
356 |
unset($ad_id, $schedule_id);
|
357 |
|
358 |
// Demo ad 2
|
359 |
+
$wpdb->insert("{$wpdb->prefix}adrotate", array('title' => 'Demo banner 728x90', 'bannercode' => '<a href=\"https:\/\/ajdg.solutions\"><img src=\"http://ajdg.solutions/assets/banners/adrotate-728x90.jpg\" /></a>', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => '', 'image' => '', 'tracker' => 'Y', 'show_everyone' => 'Y', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'os_other' => 'Y', 'type' => 'active', 'weight' => 6, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array())));
|
360 |
$ad_id = $wpdb->insert_id;
|
361 |
$wpdb->insert("{$wpdb->prefix}adrotate_schedule", array('name' => 'Schedule for ad '.$ad_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0, 'spread' => 'N', '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'));
|
362 |
$schedule_id = $wpdb->insert_id;
|
381 |
// Initial data
|
382 |
$charset_collate = $engine = '';
|
383 |
$now = adrotate_now();
|
|
|
384 |
|
385 |
if(!empty($wpdb->charset)) {
|
386 |
$charset_collate .= " DEFAULT CHARACTER SET {$wpdb->charset}";
|
394 |
$engine = ' ENGINE=InnoDB';
|
395 |
}
|
396 |
|
397 |
+
dbDelta("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}adrotate` (
|
398 |
+
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
399 |
+
`title` varchar(255) NOT NULL DEFAULT '',
|
400 |
+
`bannercode` longtext NOT NULL,
|
401 |
+
`thetime` int(15) NOT NULL default '0',
|
402 |
+
`updated` int(15) NOT NULL,
|
403 |
+
`author` varchar(60) NOT NULL default '',
|
404 |
+
`imagetype` varchar(10) NOT NULL,
|
405 |
+
`image` varchar(255) NOT NULL,
|
406 |
+
`tracker` char(1) NOT NULL default 'N',
|
407 |
+
`show_everyone` char(1) NOT NULL default 'Y',
|
408 |
+
`desktop` char(1) NOT NULL default 'Y',
|
409 |
+
`mobile` char(1) NOT NULL default 'Y',
|
410 |
+
`tablet` char(1) NOT NULL default 'Y',
|
411 |
+
`os_ios` char(1) NOT NULL default 'Y',
|
412 |
+
`os_android` char(1) NOT NULL default 'Y',
|
413 |
+
`os_other` char(1) NOT NULL default 'Y',
|
414 |
+
`type` varchar(10) NOT NULL default '0',
|
415 |
+
`weight` int(3) NOT NULL default '6',
|
416 |
+
`autodelete` char(1) NOT NULL default 'N',
|
417 |
+
`budget` double NOT NULL default '0',
|
418 |
+
`crate` double NOT NULL default '0',
|
419 |
+
`irate` double NOT NULL default '0',
|
420 |
+
`cities` text NOT NULL,
|
421 |
+
`countries` text NOT NULL,
|
422 |
+
PRIMARY KEY (`id`)
|
423 |
+
) ".$charset_collate.$engine.";");
|
424 |
+
|
425 |
+
dbDelta("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}adrotate_groups` (
|
426 |
+
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
427 |
+
`name` varchar(255) NOT NULL default '',
|
428 |
+
`modus` tinyint(1) NOT NULL default '0',
|
429 |
+
`fallback` varchar(5) NOT NULL default '0',
|
430 |
+
`cat` longtext NOT NULL,
|
431 |
+
`cat_loc` tinyint(1) NOT NULL default '0',
|
432 |
+
`cat_par` tinyint(2) NOT NULL default '0',
|
433 |
+
`page` longtext NOT NULL,
|
434 |
+
`page_loc` tinyint(1) NOT NULL default '0',
|
435 |
+
`page_par` tinyint(2) NOT NULL default '0',
|
436 |
+
`mobile` tinyint(1) NOT NULL default '0',
|
437 |
+
`geo` tinyint(1) NOT NULL default '0',
|
438 |
+
`wrapper_before` longtext NOT NULL,
|
439 |
+
`wrapper_after` longtext NOT NULL,
|
440 |
+
`align` tinyint(1) NOT NULL default '0',
|
441 |
+
`gridrows` int(3) NOT NULL DEFAULT '2',
|
442 |
+
`gridcolumns` int(3) NOT NULL DEFAULT '2',
|
443 |
+
`admargin` int(2) NOT NULL DEFAULT '0',
|
444 |
+
`admargin_bottom` int(2) NOT NULL DEFAULT '0',
|
445 |
+
`admargin_left` int(2) NOT NULL DEFAULT '0',
|
446 |
+
`admargin_right` int(2) NOT NULL DEFAULT '0',
|
447 |
+
`adwidth` varchar(6) NOT NULL DEFAULT '125',
|
448 |
+
`adheight` varchar(6) NOT NULL DEFAULT '125',
|
449 |
+
`adspeed` int(5) NOT NULL DEFAULT '6000',
|
450 |
+
`repeat_impressions` char(1) NOT NULL default 'Y',
|
451 |
+
PRIMARY KEY (`id`)
|
452 |
+
) ".$charset_collate.$engine.";");
|
453 |
+
|
454 |
+
dbDelta("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}adrotate_linkmeta` (
|
455 |
+
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
456 |
+
`ad` int(5) unsigned NOT NULL default '0',
|
457 |
+
`group` int(5) unsigned NOT NULL default '0',
|
458 |
+
`user` int(5) unsigned NOT NULL default '0',
|
459 |
+
`schedule` int(5) unsigned NOT NULL default '0',
|
460 |
+
PRIMARY KEY (`id`)
|
461 |
+
) ".$charset_collate.$engine.";");
|
462 |
+
|
463 |
+
dbDelta("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}adrotate_schedule` (
|
464 |
+
`id` int(8) unsigned NOT NULL auto_increment,
|
465 |
+
`name` varchar(255) NOT NULL default '',
|
466 |
+
`starttime` int(15) unsigned NOT NULL default '0',
|
467 |
+
`stoptime` int(15) unsigned NOT NULL default '0',
|
468 |
+
`maxclicks` int(15) unsigned NOT NULL default '0',
|
469 |
+
`maximpressions` int(15) unsigned NOT NULL default '0',
|
470 |
+
`spread` char(1) NOT NULL default 'N',
|
471 |
+
`daystarttime` char(4) NOT NULL default '0000',
|
472 |
+
`daystoptime` char(4) NOT NULL default '0000',
|
473 |
+
`day_mon` char(1) NOT NULL default 'Y',
|
474 |
+
`day_tue` char(1) NOT NULL default 'Y',
|
475 |
+
`day_wed` char(1) NOT NULL default 'Y',
|
476 |
+
`day_thu` char(1) NOT NULL default 'Y',
|
477 |
+
`day_fri` char(1) NOT NULL default 'Y',
|
478 |
+
`day_sat` char(1) NOT NULL default 'Y',
|
479 |
+
`day_sun` char(1) NOT NULL default 'Y',
|
480 |
+
`autodelete` char(1) NOT NULL default 'N',
|
481 |
+
PRIMARY KEY (`id`),
|
482 |
+
KEY `starttime` (`starttime`)
|
483 |
+
) ".$charset_collate.$engine.";");
|
484 |
+
|
485 |
+
dbDelta("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}adrotate_stats` (
|
486 |
+
`id` bigint(9) unsigned NOT NULL auto_increment,
|
487 |
+
`ad` int(5) unsigned NOT NULL default '0',
|
488 |
+
`group` int(5) unsigned NOT NULL default '0',
|
489 |
+
`thetime` int(15) unsigned NOT NULL default '0',
|
490 |
+
`clicks` int(15) unsigned NOT NULL default '0',
|
491 |
+
`impressions` int(15) unsigned NOT NULL default '0',
|
492 |
+
PRIMARY KEY (`id`),
|
493 |
+
INDEX `ad` (`ad`),
|
494 |
+
INDEX `thetime` (`thetime`)
|
495 |
+
) ".$charset_collate.$engine.";");
|
496 |
+
|
497 |
+
dbDelta("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}adrotate_stats_archive` (
|
498 |
+
`id` bigint(9) unsigned NOT NULL auto_increment,
|
499 |
+
`ad` int(5) unsigned NOT NULL default '0',
|
500 |
+
`group` int(5) unsigned NOT NULL default '0',
|
501 |
+
`thetime` int(15) unsigned NOT NULL default '0',
|
502 |
+
`clicks` int(15) unsigned NOT NULL default '0',
|
503 |
+
`impressions` int(15) unsigned NOT NULL default '0',
|
504 |
+
PRIMARY KEY (`id`),
|
505 |
+
INDEX `ad` (`ad`),
|
506 |
+
INDEX `thetime` (`thetime`)
|
507 |
+
) ".$charset_collate.$engine.";");
|
508 |
+
|
509 |
+
dbDelta("CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}adrotate_tracker` (
|
510 |
+
`id` bigint(9) unsigned NOT NULL auto_increment,
|
511 |
+
`ipaddress` varchar(15) NOT NULL default '0',
|
512 |
+
`timer` int(15) unsigned NOT NULL default '0',
|
513 |
+
`bannerid` int(15) unsigned NOT NULL default '0',
|
514 |
+
`stat` char(1) NOT NULL default 'c',
|
515 |
+
PRIMARY KEY (`id`),
|
516 |
+
KEY `ipaddress` (`ipaddress`),
|
517 |
+
KEY `timer` (`timer`)
|
518 |
+
) ".$charset_collate.$engine.";");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
}
|
520 |
|
521 |
/*-------------------------------------------------------------
|
adrotate.php
CHANGED
@@ -6,7 +6,7 @@ Author: Arnan de Gans
|
|
6 |
Author URI: https://www.arnan.me/
|
7 |
Description: AdRotate Banner Manager - Monetise your website with adverts while keeping things simple. Start making money today!
|
8 |
Text Domain: adrotate
|
9 |
-
Version: 5.
|
10 |
License: GPLv3
|
11 |
*/
|
12 |
|
@@ -21,7 +21,7 @@ License: GPLv3
|
|
21 |
------------------------------------------------------------------------------------ */
|
22 |
|
23 |
/*--- AdRotate values ---------------------------------------*/
|
24 |
-
define("ADROTATE_DISPLAY", '5.
|
25 |
define("ADROTATE_VERSION", 393);
|
26 |
define("ADROTATE_DB_VERSION", 65);
|
27 |
$plugin_folder = plugin_dir_path(__FILE__);
|
@@ -38,6 +38,7 @@ include_once($plugin_folder.'/adrotate-widget.php');
|
|
38 |
/*-----------------------------------------------------------*/
|
39 |
|
40 |
/*--- Check and Load config ---------------------------------*/
|
|
|
41 |
$adrotate_config = get_option('adrotate_config');
|
42 |
$adrotate_crawlers = get_option('adrotate_crawlers');
|
43 |
$adrotate_version = get_option("adrotate_version");
|
@@ -164,7 +165,7 @@ function adrotate_pro() {
|
|
164 |
Purpose: Admin management page
|
165 |
-------------------------------------------------------------*/
|
166 |
function adrotate_manage() {
|
167 |
-
global $wpdb, $userdata, $adrotate_config
|
168 |
|
169 |
$status = $file = $view = $ad_edit_id = '';
|
170 |
if(isset($_GET['status'])) $status = esc_attr($_GET['status']);
|
@@ -286,7 +287,7 @@ function adrotate_manage() {
|
|
286 |
Purpose: Manage groups
|
287 |
-------------------------------------------------------------*/
|
288 |
function adrotate_manage_group() {
|
289 |
-
global $wpdb, $adrotate_config
|
290 |
|
291 |
$status = $view = $group_edit_id = '';
|
292 |
if(isset($_GET['status'])) $status = esc_attr($_GET['status']);
|
6 |
Author URI: https://www.arnan.me/
|
7 |
Description: AdRotate Banner Manager - Monetise your website with adverts while keeping things simple. Start making money today!
|
8 |
Text Domain: adrotate
|
9 |
+
Version: 5.5
|
10 |
License: GPLv3
|
11 |
*/
|
12 |
|
21 |
------------------------------------------------------------------------------------ */
|
22 |
|
23 |
/*--- AdRotate values ---------------------------------------*/
|
24 |
+
define("ADROTATE_DISPLAY", '5.5');
|
25 |
define("ADROTATE_VERSION", 393);
|
26 |
define("ADROTATE_DB_VERSION", 65);
|
27 |
$plugin_folder = plugin_dir_path(__FILE__);
|
38 |
/*-----------------------------------------------------------*/
|
39 |
|
40 |
/*--- Check and Load config ---------------------------------*/
|
41 |
+
load_plugin_textdomain('adrotate', false, 'adrotate/language');
|
42 |
$adrotate_config = get_option('adrotate_config');
|
43 |
$adrotate_crawlers = get_option('adrotate_crawlers');
|
44 |
$adrotate_version = get_option("adrotate_version");
|
165 |
Purpose: Admin management page
|
166 |
-------------------------------------------------------------*/
|
167 |
function adrotate_manage() {
|
168 |
+
global $wpdb, $userdata, $adrotate_config;
|
169 |
|
170 |
$status = $file = $view = $ad_edit_id = '';
|
171 |
if(isset($_GET['status'])) $status = esc_attr($_GET['status']);
|
287 |
Purpose: Manage groups
|
288 |
-------------------------------------------------------------*/
|
289 |
function adrotate_manage_group() {
|
290 |
+
global $wpdb, $adrotate_config;
|
291 |
|
292 |
$status = $view = $group_edit_id = '';
|
293 |
if(isset($_GET['status'])) $status = esc_attr($_GET['status']);
|
dashboard/adrotatepro.php
CHANGED
@@ -87,28 +87,28 @@
|
|
87 |
<div class="clear"></div>
|
88 |
|
89 |
<div style="text-align: center; margin-top: 30px;">
|
90 |
-
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:20px;">
|
91 |
<a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/pro/single.jpg", dirname(__FILE__)); ?>" alt="WordPress Maintenance & Updates" width="228" height="120"></div></a>
|
92 |
<a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><div class="title">AdRotate Professional</div></a>
|
93 |
-
<div class="sub_title">Use on 1 website</div>
|
94 |
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/?add-to-cart=1124" target="_blank">Buy now for € 39</a></div>
|
95 |
</div>
|
96 |
-
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:20px;">
|
97 |
<a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/pro/duo.jpg", dirname(__FILE__)); ?>" alt="WordPress Maintenance & Updates" width="228" height="120"></div></a>
|
98 |
<a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><div class="title">AdRotate Professional</div></a>
|
99 |
-
<div class="sub_title">Use on 2 websites</div>
|
100 |
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/?add-to-cart=1126" target="_blank">Buy now for € 49</a></div>
|
101 |
</div>
|
102 |
-
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:20px;">
|
103 |
<a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/pro/multi.jpg", dirname(__FILE__)); ?>" alt="WordPress Maintenance & Updates" width="228" height="120"></div></a>
|
104 |
<a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><div class="title">AdRotate Professional</div></a>
|
105 |
-
<div class="sub_title">Use on up-to 5 websites</div>
|
106 |
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/?add-to-cart=1128" target="_blank">Buy now for € 99</a></div>
|
107 |
</div>
|
108 |
-
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:20px;">
|
109 |
<a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/pro/developer.jpg", dirname(__FILE__)); ?>" alt="WordPress Maintenance & Updates" width="228" height="120"></div></a>
|
110 |
<a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><div class="title">AdRotate Professional</div></a>
|
111 |
-
<div class="sub_title">Use on up-to 100 websites</div>
|
112 |
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/?add-to-cart=1130" target="_blank">Buy now for € 199</a></div>
|
113 |
</div>
|
114 |
</div>
|
87 |
<div class="clear"></div>
|
88 |
|
89 |
<div style="text-align: center; margin-top: 30px;">
|
90 |
+
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:20px; width: 230px;">
|
91 |
<a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/pro/single.jpg", dirname(__FILE__)); ?>" alt="WordPress Maintenance & Updates" width="228" height="120"></div></a>
|
92 |
<a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><div class="title">AdRotate Professional</div></a>
|
93 |
+
<div class="sub_title">Use on 1 website<br /><a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank">More information</a></div>
|
94 |
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/?add-to-cart=1124" target="_blank">Buy now for € 39</a></div>
|
95 |
</div>
|
96 |
+
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:20px; width: 230px;">
|
97 |
<a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/pro/duo.jpg", dirname(__FILE__)); ?>" alt="WordPress Maintenance & Updates" width="228" height="120"></div></a>
|
98 |
<a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank"><div class="title">AdRotate Professional</div></a>
|
99 |
+
<div class="sub_title">Use on 2 websites<br /><a href="https://ajdg.solutions/product/adrotate-pro-duo/" target="_blank">More information</a></div>
|
100 |
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/?add-to-cart=1126" target="_blank">Buy now for € 49</a></div>
|
101 |
</div>
|
102 |
+
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:20px; width: 230px;">
|
103 |
<a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/pro/multi.jpg", dirname(__FILE__)); ?>" alt="WordPress Maintenance & Updates" width="228" height="120"></div></a>
|
104 |
<a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank"><div class="title">AdRotate Professional</div></a>
|
105 |
+
<div class="sub_title">Use on up-to 5 websites<br /><a href="https://ajdg.solutions/product/adrotate-pro-multi/" target="_blank">More information</a></div>
|
106 |
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/?add-to-cart=1128" target="_blank">Buy now for € 99</a></div>
|
107 |
</div>
|
108 |
+
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:20px; width: 230px;">
|
109 |
<a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/pro/developer.jpg", dirname(__FILE__)); ?>" alt="WordPress Maintenance & Updates" width="228" height="120"></div></a>
|
110 |
<a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank"><div class="title">AdRotate Professional</div></a>
|
111 |
+
<div class="sub_title">Use on up-to 100 websites<br /><a href="https://ajdg.solutions/product/adrotate-pro-developer/" target="_blank">More information</a></div>
|
112 |
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/?add-to-cart=1130" target="_blank">Buy now for € 199</a></div>
|
113 |
</div>
|
114 |
</div>
|
dashboard/info.php
CHANGED
@@ -22,7 +22,7 @@ $partner = mt_rand(1,3);
|
|
22 |
<div id="left-column" class="ajdg-postbox-container">
|
23 |
|
24 |
<div class="ajdg-postbox">
|
25 |
-
<h2 class="ajdg-postbox-title"><?php _e('
|
26 |
<div id="currently" class="ajdg-postbox-content">
|
27 |
<table width="100%">
|
28 |
<thead>
|
@@ -41,36 +41,52 @@ $partner = mt_rand(1,3);
|
|
41 |
<td class="first b"><a href="admin.php?page=adrotate-groups"><?php echo $groups; ?> <?php _e('Groups', 'adrotate'); ?></a></td>
|
42 |
<td class="b"><a href="admin.php?page=adrotate-ads"><?php echo $data['error']; ?> <?php _e('Have errors', 'adrotate'); ?></a></td>
|
43 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
<tr>
|
45 |
-
<td
|
46 |
-
<
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
49 |
</td>
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
<
|
55 |
-
<a href="https://ajdg.solutions/product/wordpress-maintenance-and-updates/" target="_blank"
|
56 |
-
<div class="sub_title">Professional WordPress service</div>
|
57 |
-
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/product/wordpress-maintenance-and-updates/" target="_blank">Something for you?</a></div>
|
58 |
<hr>
|
59 |
-
<div class="description"
|
60 |
-
</div
|
61 |
</td>
|
62 |
<td>
|
63 |
-
<
|
64 |
<a href="https://ajdg.solutions/product/woocommerce-single-page-checkout/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/offers/single-page-checkout.jpg", dirname(__FILE__)); ?>" alt="WooCommerce Single Page Checkout" width="228" height="120"></div></a>
|
65 |
-
<a href="https://ajdg.solutions/product/woocommerce-single-page-checkout/" target="_blank"><div class="title"
|
66 |
-
<div class="sub_title"
|
67 |
-
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/product/woocommerce-single-page-checkout/" target="_blank">
|
68 |
<hr>
|
69 |
-
<div class="description"
|
70 |
-
</div
|
71 |
</td>
|
72 |
</tr>
|
73 |
-
</tbody>
|
74 |
</table>
|
75 |
</div>
|
76 |
</div>
|
@@ -81,7 +97,8 @@ $partner = mt_rand(1,3);
|
|
81 |
<div class="ajdg-postbox">
|
82 |
<h2 class="ajdg-postbox-title"><?php _e('News & Updates', 'adrotate'); ?></h2>
|
83 |
<div id="news" class="ajdg-postbox-content">
|
84 |
-
<p><center><a href="https://www.arnan.me" title="Visit Arnan's website" target="_blank"><img src="<?php echo plugins_url("/images/buttons/1.png", dirname(__FILE__)); ?>" alt="Arnan de Gans website" /></a><a href="https://ajdg.solutions" title="Visit the
|
|
|
85 |
<?php wp_widget_rss_output(array(
|
86 |
'url' => 'http://ajdg.solutions/feed/',
|
87 |
'items' => 2,
|
22 |
<div id="left-column" class="ajdg-postbox-container">
|
23 |
|
24 |
<div class="ajdg-postbox">
|
25 |
+
<h2 class="ajdg-postbox-title"><?php _e('At a Glance', 'adrotate'); ?></h2>
|
26 |
<div id="currently" class="ajdg-postbox-content">
|
27 |
<table width="100%">
|
28 |
<thead>
|
41 |
<td class="first b"><a href="admin.php?page=adrotate-groups"><?php echo $groups; ?> <?php _e('Groups', 'adrotate'); ?></a></td>
|
42 |
<td class="b"><a href="admin.php?page=adrotate-ads"><?php echo $data['error']; ?> <?php _e('Have errors', 'adrotate'); ?></a></td>
|
43 |
</tr>
|
44 |
+
</tbody>
|
45 |
+
</table>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
|
49 |
+
<div class="ajdg-postbox">
|
50 |
+
<h2 class="ajdg-postbox-title"><?php _e('AdRotate Banner Manager', 'adrotate'); ?></h2>
|
51 |
+
<div id="services" class="ajdg-postbox-content">
|
52 |
+
<p><strong><?php _e('Support AdRotate Banner Manager', 'adrotate'); ?></strong></p>
|
53 |
+
<p><?php _e('Consider writing a review or making a donation if you like the plugin or if you find the plugin useful. Thanks for your support!', 'adrotate'); ?></p>
|
54 |
+
<center><a class="button-primary" href="https://www.paypal.me/ajdgsolutions/10eur" target="_blank">Donate €10 via Paypal</a> <a class="button" target="_blank" href="https://wordpress.org/support/plugin/adrotate/reviews/?rate=5#new-post">Write review on WordPress.org</a> <a class="button" target="_blank" href="https://translate.wordpress.org/projects/wp-plugins/adrotate/">Help translate</a></center></p>
|
55 |
+
|
56 |
+
<p><strong><?php _e('Plugins and services', 'adrotate'); ?></strong></p>
|
57 |
+
<table width="100%">
|
58 |
<tr>
|
59 |
+
<td width="33%">
|
60 |
+
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:2%;">
|
61 |
+
<a href="https://ajdg.solutions/product/adrotate-html5-setup-service/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/offers/html5-service.jpg", dirname(__FILE__)); ?>" alt="HTML5 Advert setup" width="228" height="120"></div></a>
|
62 |
+
<a href="https://ajdg.solutions/product/adrotate-html5-setup-service/" target="_blank"><div class="title"><?php _e('HTML5 Advert setup', 'adrotate'); ?></div></a>
|
63 |
+
<div class="sub_title"><?php _e('Professional service', 'adrotate'); ?></div>
|
64 |
+
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/product/adrotate-html5-setup-service/" target="_blank">Only € 22,50 p/ad</a></div>
|
65 |
+
<hr>
|
66 |
+
<div class="description"><?php _e('Did you get a HTML5 advert and can’t get it to work in AdRotate Pro? I’ll install and configure it for you.', 'adrotate'); ?></div>
|
67 |
+
</div>
|
68 |
</td>
|
69 |
+
<td width="33%">
|
70 |
+
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:2%;">
|
71 |
+
<a href="https://ajdg.solutions/product/wordpress-maintenance-and-updates/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/offers/wordpress-maintenance.jpg", dirname(__FILE__)); ?>" alt="WordPress Maintenance" width="228" height="120"></div></a>
|
72 |
+
<a href="https://ajdg.solutions/product/wordpress-maintenance-and-updates/" target="_blank"><div class="title"><?php _e('WP Maintenance', 'adrotate'); ?></div></a>
|
73 |
+
<div class="sub_title"><?php _e('Professional service', 'adrotate'); ?></div>
|
74 |
+
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/product/wordpress-maintenance-and-updates/" target="_blank">Starting at € 22,50</a></div>
|
|
|
|
|
75 |
<hr>
|
76 |
+
<div class="description"><?php _e('Get all the latest updates for WordPress and plugins. Maintenance, delete spam and clean up files.', 'adrotate'); ?></div>
|
77 |
+
</div>
|
78 |
</td>
|
79 |
<td>
|
80 |
+
<div class="ajdg-sales-widget" style="display: inline-block;">
|
81 |
<a href="https://ajdg.solutions/product/woocommerce-single-page-checkout/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/offers/single-page-checkout.jpg", dirname(__FILE__)); ?>" alt="WooCommerce Single Page Checkout" width="228" height="120"></div></a>
|
82 |
+
<a href="https://ajdg.solutions/product/woocommerce-single-page-checkout/" target="_blank"><div class="title"><?php _e('Single Page Checkout', 'adrotate'); ?></div></a>
|
83 |
+
<div class="sub_title"><?php _e('WooCommerce Plugin', 'adrotate'); ?></div>
|
84 |
+
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/product/woocommerce-single-page-checkout/" target="_blank">Only € 10,-</a></div>
|
85 |
<hr>
|
86 |
+
<div class="description"><?php _e('Merge your cart and checkout pages into one single page in seconds with no setup required at all.', 'adrotate'); ?></div>
|
87 |
+
</div>
|
88 |
</td>
|
89 |
</tr>
|
|
|
90 |
</table>
|
91 |
</div>
|
92 |
</div>
|
97 |
<div class="ajdg-postbox">
|
98 |
<h2 class="ajdg-postbox-title"><?php _e('News & Updates', 'adrotate'); ?></h2>
|
99 |
<div id="news" class="ajdg-postbox-content">
|
100 |
+
<p><center><a href="https://www.arnan.me" title="Visit Arnan's website" target="_blank"><img src="<?php echo plugins_url("/images/buttons/1.png", dirname(__FILE__)); ?>" alt="Arnan de Gans website" /></a><a href="https://ajdg.solutions" title="Visit the AJdG Solutions website" target="_blank"><img src="<?php echo plugins_url("/images/buttons/2.png", dirname(__FILE__)); ?>" alt="AJdG Solutions website" /></a><a href="https://ajdgsolutions.tumblr.com" title="AJdG Solutions on Tumblr" target="_blank"><img src="<?php echo plugins_url("/images/buttons/3.png", dirname(__FILE__)); ?>" alt="AJdG Solutions on Tumblr" /></a></center></p>
|
101 |
+
|
102 |
<?php wp_widget_rss_output(array(
|
103 |
'url' => 'http://ajdg.solutions/feed/',
|
104 |
'items' => 2,
|
dashboard/publisher/adverts-disabled.php
CHANGED
@@ -51,16 +51,6 @@
|
|
51 |
$ctr = adrotate_ctr($stats['clicks'], $stats['impressions']);
|
52 |
|
53 |
$class = ($class != 'alternate') ? 'alternate' : '';
|
54 |
-
|
55 |
-
if($adrotate_debug['publisher'] == true) {
|
56 |
-
echo "<tr><td> </td><td><strong>[DEBUG]</strong></td><td colspan='9'><pre>";
|
57 |
-
echo "Ad Specs: <pre>";
|
58 |
-
print_r($banner);
|
59 |
-
echo "</pre>";
|
60 |
-
echo "Stats: <pre>";
|
61 |
-
print_r($stats);
|
62 |
-
echo "</pre></td></tr>";
|
63 |
-
}
|
64 |
?>
|
65 |
<tr id='adrotateindex' class='<?php echo $class; ?>'>
|
66 |
<th class="check-column"><input type="checkbox" name="disabledbannercheck[]" value="<?php echo $banner['id']; ?>" /></th>
|
51 |
$ctr = adrotate_ctr($stats['clicks'], $stats['impressions']);
|
52 |
|
53 |
$class = ($class != 'alternate') ? 'alternate' : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
?>
|
55 |
<tr id='adrotateindex' class='<?php echo $class; ?>'>
|
56 |
<th class="check-column"><input type="checkbox" name="disabledbannercheck[]" value="<?php echo $banner['id']; ?>" /></th>
|
dashboard/publisher/adverts-error.php
CHANGED
@@ -45,13 +45,6 @@
|
|
45 |
<?php foreach($error as $banner) {
|
46 |
$grouplist = adrotate_ad_is_in_groups($banner['id']);
|
47 |
|
48 |
-
if($adrotate_debug['publisher'] == true) {
|
49 |
-
echo "<tr><td> </td><td><strong>[DEBUG]</strong></td><td colspan='9'>";
|
50 |
-
echo "Ad Specs: <pre>";
|
51 |
-
print_r($banner);
|
52 |
-
echo "</pre></td></tr>";
|
53 |
-
}
|
54 |
-
|
55 |
$class = '';
|
56 |
if($banner['type'] == 'error') $class = ' row_yellow';
|
57 |
if($banner['type'] == 'expired') $class = ' row_red';
|
45 |
<?php foreach($error as $banner) {
|
46 |
$grouplist = adrotate_ad_is_in_groups($banner['id']);
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
$class = '';
|
49 |
if($banner['type'] == 'error') $class = ' row_yellow';
|
50 |
if($banner['type'] == 'expired') $class = ' row_red';
|
dashboard/publisher/adverts-main.php
CHANGED
@@ -56,22 +56,7 @@
|
|
56 |
$stats = adrotate_stats($banner['id']);
|
57 |
$stats_today = adrotate_stats($banner['id'], false, adrotate_date_start('day'));
|
58 |
$grouplist = adrotate_ad_is_in_groups($banner['id']);
|
59 |
-
|
60 |
$ctr = adrotate_ctr($stats['clicks'], $stats['impressions']);
|
61 |
-
|
62 |
-
if($adrotate_debug['publisher'] == true) {
|
63 |
-
echo "<tr><td> </td><td><strong>[DEBUG]</strong></td><td colspan='9'><pre>";
|
64 |
-
echo "Ad Specs: <pre>";
|
65 |
-
print_r($banner);
|
66 |
-
echo "</pre>";
|
67 |
-
echo "Stats: <pre>";
|
68 |
-
print_r($stats);
|
69 |
-
echo "</pre>";
|
70 |
-
echo "Stats today: <pre>";
|
71 |
-
print_r($stats_today);
|
72 |
-
echo "</pre></td></tr>";
|
73 |
-
}
|
74 |
-
|
75 |
$class = ($class != 'alternate') ? 'alternate' : '';
|
76 |
?>
|
77 |
<tr id='adrotateindex' class='<?php echo $class; ?>'>
|
56 |
$stats = adrotate_stats($banner['id']);
|
57 |
$stats_today = adrotate_stats($banner['id'], false, adrotate_date_start('day'));
|
58 |
$grouplist = adrotate_ad_is_in_groups($banner['id']);
|
|
|
59 |
$ctr = adrotate_ctr($stats['clicks'], $stats['impressions']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
$class = ($class != 'alternate') ? 'alternate' : '';
|
61 |
?>
|
62 |
<tr id='adrotateindex' class='<?php echo $class; ?>'>
|
dashboard/settings/maintenance.php
CHANGED
@@ -50,7 +50,6 @@
|
|
50 |
<th valign="top"><?php _e('Developer Debug', 'adrotate'); ?></th>
|
51 |
<td>
|
52 |
<input type="checkbox" name="adrotate_debug" <?php if($adrotate_debug['general'] == true) { ?>checked="checked" <?php } ?> /> General - <span class="description"><?php _e('Troubleshoot ads and how they are selected. Visible on the front-end.', 'adrotate'); ?></span><br />
|
53 |
-
<input type="checkbox" name="adrotate_debug_publisher" <?php if($adrotate_debug['publisher'] == true) { ?>checked="checked" <?php } ?> /> Publisher - <span class="description"><?php _e('View advert specs and (some) stats in the dashboard.', 'adrotate'); ?></span><br />
|
54 |
<input type="checkbox" name="adrotate_debug_timers" <?php if($adrotate_debug['timers'] == true) { ?>checked="checked" <?php } ?> /> Clicktracking - <span class="description"><?php _e('Disable timers for clicks and impressions.', 'adrotate'); ?></span><br />
|
55 |
<input type="checkbox" name="adrotate_debug_track" <?php if($adrotate_debug['track'] == true) { ?>checked="checked" <?php } ?> /> Tracking Encryption - <span class="description"><?php _e('Temporarily disable encryption on the redirect url.', 'adrotate'); ?></span><br />
|
56 |
</td>
|
50 |
<th valign="top"><?php _e('Developer Debug', 'adrotate'); ?></th>
|
51 |
<td>
|
52 |
<input type="checkbox" name="adrotate_debug" <?php if($adrotate_debug['general'] == true) { ?>checked="checked" <?php } ?> /> General - <span class="description"><?php _e('Troubleshoot ads and how they are selected. Visible on the front-end.', 'adrotate'); ?></span><br />
|
|
|
53 |
<input type="checkbox" name="adrotate_debug_timers" <?php if($adrotate_debug['timers'] == true) { ?>checked="checked" <?php } ?> /> Clicktracking - <span class="description"><?php _e('Disable timers for clicks and impressions.', 'adrotate'); ?></span><br />
|
54 |
<input type="checkbox" name="adrotate_debug_track" <?php if($adrotate_debug['track'] == true) { ?>checked="checked" <?php } ?> /> Tracking Encryption - <span class="description"><?php _e('Temporarily disable encryption on the redirect url.', 'adrotate'); ?></span><br />
|
55 |
</td>
|
images/buttons/3.png
CHANGED
Binary file
|
images/buttons/4.png
DELETED
Binary file
|
images/offers/html5-service.jpg
ADDED
Binary file
|
language/adrotate-bg_BG.mo
ADDED
Binary file
|
language/adrotate-el.mo
ADDED
Binary file
|
language/adrotate-es_ES.mo
ADDED
Binary file
|
language/adrotate-fr_FR.mo
ADDED
Binary file
|
language/adrotate-id_ID.mo
ADDED
Binary file
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