WordPress Ad Widget - Version 2.15.0

Version Description

Download this release

Release Info

Developer broadstreetads
Plugin Icon wp plugin WordPress Ad Widget
Version 2.15.0
Comparing to
See all releases

Code changes from version 2.14.0 to 2.15.0

adwidget.php CHANGED
@@ -1,9 +1,11 @@
1
  <?php
 
 
2
  /*
3
  Plugin Name: Wordpress Ad Widget
4
  Plugin URI: https://github.com/broadstreetads/wordpress-ad-widget
5
  Description: The easiest way to place ads in your Wordpress sidebar. Go to Settings -> Ad Widget
6
- Version: 2.14.0
7
  Author: Broadstreet XPRESS
8
  Author URI: http://broadstreetads.com
9
  */
@@ -20,7 +22,7 @@ add_action('admin_menu', array('AdWidget_Core', 'registerAdmin'));
20
  class AdWidget_Core
21
  {
22
  CONST KEY_INSTALL_REPORT = 'AdWidget_Installed';
23
- CONST VERSION = '2.14.0';
24
  CONST KEY_WELCOME = 'AdWidget_Welcome';
25
 
26
  /**
@@ -262,7 +264,7 @@ class AdWidget_ImageWidget extends WP_Widget
262
  if(!$img)
263
  {
264
  $img = AdWidget_Core::getBaseURL() . 'assets/sample-ad.png';
265
- $link = 'http://adsofthefuture.com';
266
  }
267
 
268
  if(Broadstreet_Adwidget_Mini_Utility::hasAdserving() && is_numeric($instance['bs_ad_id']))
@@ -376,42 +378,6 @@ class AdWidget_ImageWidget extends WP_Widget
376
  <p>
377
  <span style="color: green; font-weight: bold;">Tip:</span> If you're using this widget, you might also find <a target="_blank" href="http://broadstreetads.com/ad-platform/ad-formats/">our special ad formats for sales people and publishers</a> useful.
378
  </p>
379
- <?php if(!Broadstreet_Adwidget_Mini_Utility::hasAdserving()): ?>
380
- <p>
381
- When you're ready for a more powerful adserver with click reporting <a target="_blank" href="#" onclick="broadstreet_upgrade(); return false;">click here</a>.
382
- <script language="javascript">
383
- if(!window.broadstreet_upgrade)
384
- {
385
- function broadstreet_upgrade()
386
- {
387
- window.send_to_editor = function(html) {
388
- tb_remove();
389
- alert('Save any unsaved widgets and refresh this page to see new upgraded options');
390
- };
391
-
392
- tb_show('Broadstreet', '<?php echo bsadwidget_get_base_url('views/modal/') ?>' + '?fake=fake&width=650&height=580&TB_iframe=true');
393
- }
394
- }
395
- </script>
396
- </p>
397
- <?php elseif(isset($instance['bs_ad_id'])): ?>
398
- <p>
399
- Reporting: <a target="_blank" href="#" onclick="broadstreet_reports(); return false;">View stats for clicks and views</a>
400
- <script language="javascript">
401
- if(!window.broadstreet_reports)
402
- {
403
- function broadstreet_reports()
404
- {
405
- window.send_to_editor = function(html) {
406
- tb_remove();
407
- };
408
-
409
- tb_show('Broadstreet', '<?php echo bsadwidget_get_base_url('views/modal/?step=reports&adv_id=' . @$instance['bs_adv_id'] . '&ad_id=' . @$instance['bs_ad_id']) ?>' + '&width=650&height=580&TB_iframe=true');
410
- }
411
- }
412
- </script>
413
- </p>
414
- <?php endif; ?>
415
  </div>
416
  <?php
417
  }
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
  /*
5
  Plugin Name: Wordpress Ad Widget
6
  Plugin URI: https://github.com/broadstreetads/wordpress-ad-widget
7
  Description: The easiest way to place ads in your Wordpress sidebar. Go to Settings -> Ad Widget
8
+ Version: 2.15.0
9
  Author: Broadstreet XPRESS
10
  Author URI: http://broadstreetads.com
11
  */
22
  class AdWidget_Core
23
  {
24
  CONST KEY_INSTALL_REPORT = 'AdWidget_Installed';
25
+ CONST VERSION = '2.15.0';
26
  CONST KEY_WELCOME = 'AdWidget_Welcome';
27
 
28
  /**
264
  if(!$img)
265
  {
266
  $img = AdWidget_Core::getBaseURL() . 'assets/sample-ad.png';
267
+ $link = '#';
268
  }
269
 
270
  if(Broadstreet_Adwidget_Mini_Utility::hasAdserving() && is_numeric($instance['bs_ad_id']))
378
  <p>
379
  <span style="color: green; font-weight: bold;">Tip:</span> If you're using this widget, you might also find <a target="_blank" href="http://broadstreetads.com/ad-platform/ad-formats/">our special ad formats for sales people and publishers</a> useful.
380
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  </div>
382
  <?php
383
  }
assets/sample-ad.png CHANGED
Binary file
lib/Broadstreet.php CHANGED
@@ -5,6 +5,8 @@
5
  * @author Broadstreet Ads <labs@broadstreetads.com>
6
  */
7
 
 
 
8
  if(!class_exists('Broadstreet')):
9
 
10
  /**
5
  * @author Broadstreet Ads <labs@broadstreetads.com>
6
  */
7
 
8
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
9
+
10
  if(!class_exists('Broadstreet')):
11
 
12
  /**
lib/Utility.php CHANGED
@@ -1,5 +1,7 @@
1
  <?php
2
 
 
 
3
  require 'Broadstreet.php';
4
 
5
  if(!class_exists('Broadstreet_Mini_Utility')):
1
  <?php
2
 
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
  require 'Broadstreet.php';
6
 
7
  if(!class_exists('Broadstreet_Mini_Utility')):
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Broadstreet
3
  Tags: wordpress,ad,widget,sidebar,google,tag,code
4
  Requires at least: 3.0
5
  Tested up to: 4.7
6
- Stable tag: 2.14.0
7
 
8
  Easily upload ad images and ad code to your sidebar. For those that don't need or
9
  want a complicated ad management system.
3
  Tags: wordpress,ad,widget,sidebar,google,tag,code
4
  Requires at least: 3.0
5
  Tested up to: 4.7
6
+ Stable tag: 2.15.0
7
 
8
  Easily upload ad images and ad code to your sidebar. For those that don't need or
9
  want a complicated ad management system.
views/admin.php CHANGED
@@ -1,57 +1,14 @@
1
  <div style="float: left; width: 550px;">
2
- <script>(function(d, s, id) {
3
- var js, fjs = d.getElementsByTagName(s)[0];
4
- if (d.getElementById(id)) return;
5
- js = d.createElement(s); js.id = id;
6
- js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=313569238757581";
7
- fjs.parentNode.insertBefore(js, fjs);
8
- }(document, 'script', 'facebook-jssdk'));</script>
9
- <script>window.admin_email = '<?php bloginfo('admin_email'); ?>';</script>
10
- <script>
11
- jQuery(function() {
12
- var bs = new Broadstreet.Network();
13
- bs.postList('#bs-blog');
14
- });
15
- </script>
16
 
17
  <h1>Wordpress Ad Widget</h1>
18
  <script src="https://broadstreet-common.s3.amazonaws.com/broadstreet-net/init.js"></script>
19
  <script type="text/javascript" src="http://cdn.broadstreetads.com/init.js"></script>
20
 
21
 
22
- <?php if(Broadstreet_Adwidget_Mini_Utility::hasAdserving()): ?>
23
-
24
- <h2>Adserver Subscription</h2>
25
-
26
- You are currently subscribed to Broadstreet's Adserver, giving your site stress-free adserving,
27
- and click/view reporting. You can cancel this subscription here. Canceling will revert
28
- your ads to start serving from your site instead of an adserver.
29
-
30
- <form method="post">
31
- <input style="background-color: red; color: white;" type="submit" name="cancel" value="Cancel Adserving Subscription">
32
- </form>
33
-
34
- <?php endif; ?>
35
-
36
- <?php if(!Broadstreet_Adwidget_Mini_Utility::hasAdserving() && Broadstreet_Adwidget_Mini_Utility::hasNetwork()): ?>
37
-
38
- <h2>Adserver Subscription</h2>
39
-
40
- You were once subscribed to Broadstreet's Adserver, giving your site stress-free adserving,
41
- and click/view reporting. You can re-enable your subscription here. Changes will
42
- be immediate.
43
-
44
- <form method="post">
45
- <input style="background-color: green; color: white;" type="submit" name="subscribe" value="Subscribe me for $5 / month">
46
- </form>
47
-
48
- <?php endif; ?>
49
 
50
  <p>Thank you for using our plugin! This plugin was built by <a href="http://broadstreetads.com">Broadstreet</a>, the
51
  company for independent publishers.</p>
52
 
53
- <p>If you're a local publisher, please <strong><a href="http://broadstreetads.us5.list-manage.com/subscribe?u=508de363fda633d674a0a123b&id=e2fbcef169">sign up for our newsletter</a></strong>, and join the community.</p>
54
-
55
  <p>To put an ad on your website, just go to <a href="widgets.php">the widgets page</a>,
56
  and look for:</p>
57
 
@@ -73,10 +30,6 @@ Here's a short instructional video if you need help:
73
 
74
  </div>
75
 
76
- <div style="float: left; width: 300px; margin-top: 10px; margin-left: 20px;">
77
- <script type="text/javascript">broadstreet.zone(423);</script>
78
- <br/>
79
-
80
  <div>
81
  <div class="fb-like" data-href="http://www.facebook.com/broadstreetads" data-send="false" data-layout="box_count" data-width="450" data-show-faces="true"></div>
82
  <a href="https://twitter.com/broadstreetads" class="twitter-follow-button" data-show-count="false">Follow @broadstreetads</a>
1
  <div style="float: left; width: 550px;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  <h1>Wordpress Ad Widget</h1>
4
  <script src="https://broadstreet-common.s3.amazonaws.com/broadstreet-net/init.js"></script>
5
  <script type="text/javascript" src="http://cdn.broadstreetads.com/init.js"></script>
6
 
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  <p>Thank you for using our plugin! This plugin was built by <a href="http://broadstreetads.com">Broadstreet</a>, the
10
  company for independent publishers.</p>
11
 
 
 
12
  <p>To put an ad on your website, just go to <a href="widgets.php">the widgets page</a>,
13
  and look for:</p>
14
 
30
 
31
  </div>
32
 
 
 
 
 
33
  <div>
34
  <div class="fb-like" data-href="http://www.facebook.com/broadstreetads" data-send="false" data-layout="box_count" data-width="450" data-show-faces="true"></div>
35
  <a href="https://twitter.com/broadstreetads" class="twitter-follow-button" data-show-count="false">Follow @broadstreetads</a>
views/modal/footer.php DELETED
@@ -1,15 +0,0 @@
1
- <div id="footer">
2
- Broadstreet Ads &copy; <?php echo date('Y') ?> &minus; www.broadstreetads.com
3
- </div>
4
- <script src="https://broadstreet-common.s3.amazonaws.com/broadstreet-net/init.js"></script>
5
- <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
6
- <script type="text/javascript">
7
-
8
- var broadstreet = new Broadstreet.Network();
9
- broadstreet.getNetworkStats(function(data){
10
- $('#pub-count').text(data.network_count);
11
- });
12
-
13
- </script>
14
- </body>
15
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/modal/header.php DELETED
@@ -1,174 +0,0 @@
1
- <html>
2
- <head>
3
- <title>Broadstreet Premium Signup</title>
4
- <style type="text/css">
5
- /* Broadstreet CSS */
6
- body {
7
- font-family: 'Lucida Grande', Verdana, Arial, sans-serif;
8
- font-size: 12px;
9
- font-style: normal;
10
- font-variant: normal;
11
- font-weight: normal;
12
- margin: 0;
13
- padding: 0;
14
- background: rgb(255,255,255); /* Old browsers */
15
- background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(246,246,246,1) 47%, rgba(237,237,237,1) 100%); /* FF3.6+ */
16
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(47%,rgba(246,246,246,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */
17
- background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */
18
- background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* Opera 11.10+ */
19
- background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* IE10+ */
20
- background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* W3C */
21
- }
22
-
23
- #header {
24
- padding: 10px 15px;
25
- background-color: #eee;
26
- border-bottom: 1px solid #ccc;
27
- background: rgb(255,255,255); /* Old browsers */
28
- background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(246,246,246,1) 47%, rgba(237,237,237,1) 100%); /* FF3.6+ */
29
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(47%,rgba(246,246,246,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */
30
- background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */
31
- background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* Opera 11.10+ */
32
- background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* IE10+ */
33
- background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* W3C */
34
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
35
- }
36
-
37
- #header h1 {
38
- font-size: 24px;
39
- text-align: center;
40
- font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', sans-serif;
41
- font-weight: normal;
42
- }
43
-
44
- #header h1 > * {
45
- vertical-align: bottom;
46
- }
47
-
48
- h2 {
49
- font-size: 18px;
50
- font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', sans-serif;
51
- text-align: center;
52
- font-weight: normal;
53
- padding: 5px 10px;
54
- }
55
-
56
- #clients {
57
- width: 100%;
58
- }
59
-
60
- #clients td {
61
- text-align: center;
62
- }
63
-
64
- #clients td img {
65
- -moz-box-shadow: 0 0 5px #888;
66
- -webkit-box-shadow: 0 0 5px#888;
67
- box-shadow: 0 0 5px #888;
68
- width: 140px;
69
- }
70
-
71
- #clients-section {
72
- padding: 10px 0px;
73
- background: #258dc8; /* Old browsers */
74
- background: -moz-linear-gradient(top, #258dc8 0%, #258dc8 100%); /* FF3.6+ */
75
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#258dc8), color-stop(100%,#258dc8)); /* Chrome,Safari4+ */
76
- background: -webkit-linear-gradient(top, #258dc8 0%,#258dc8 100%); /* Chrome10+,Safari5.1+ */
77
- background: -o-linear-gradient(top, #258dc8 0%,#258dc8 100%); /* Opera 11.10+ */
78
- background: -ms-linear-gradient(top, #258dc8 0%,#258dc8 100%); /* IE10+ */
79
- background: linear-gradient(to bottom, #258dc8 0%,#258dc8 100%); /* W3C */
80
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#258dc8', endColorstr='#258dc8',GradientType=0 ); /* IE6-9 */
81
-
82
- }
83
-
84
- a.btn {
85
- font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', sans-serif;
86
- text-decoration: none;
87
- line-height: inherit;
88
- font-weight: inherit;
89
- cursor: pointer;
90
- display: inline-block;
91
- background-color: #E6E6E6;
92
- background-repeat: no-repeat;
93
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), color-stop(25%, white), to(#E6E6E6));
94
- background-image: -webkit-linear-gradient(white, white 25%, #E6E6E6);
95
- background-image: -moz-linear-gradient(top, white, white 25%, #E6E6E6);
96
- background-image: -ms-linear-gradient(white, white 25%, #E6E6E6);
97
- background-image: -o-linear-gradient(white, white 25%, #E6E6E6);
98
- background-image: linear-gradient(white, white 25%, #E6E6E6);
99
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
100
- padding: 5px 14px 6px;
101
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
102
- color: #333;
103
- font-size: 13px;
104
- line-height: normal;
105
- border: 1px solid #CCC;
106
- border-bottom-color: #BBB;
107
- -webkit-border-radius: 4px;
108
- -moz-border-radius: 4px;
109
- border-radius: 4px;
110
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
111
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
112
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
113
- -webkit-transition: 0.1s linear all;
114
- -moz-transition: 0.1s linear all;
115
- -ms-transition: 0.1s linear all;
116
- -o-transition: 0.1s linear all;
117
- transition: 0.1s linear all;
118
- font-size: 15px;
119
- line-height: normal;
120
- padding: 9px 14px 9px;
121
- -webkit-border-radius: 6px;
122
- -moz-border-radius: 6px;
123
- }
124
-
125
-
126
- a.btn.smaller {
127
- padding: 4px 12px;
128
- }
129
-
130
- a.call-to-action {
131
- color: white;
132
- border-radius: 6px;
133
- background-color: #57A957;
134
- background-repeat: repeat-x;
135
- background-image: -khtml-gradient(linear, left top, left bottom, from(#62C462), to(#57A957));
136
- background-image: -moz-linear-gradient(top, #62C462, #57A957);
137
- background-image: -ms-linear-gradient(top, #62C462, #57A957);
138
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62C462), color-stop(100%, #57A957));
139
- background-image: -webkit-linear-gradient(top, #62C462, #57A957);
140
- background-image: -o-linear-gradient(top, #62C462, #57A957);
141
- background-image: linear-gradient(top, #62C462, #57A957);
142
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
143
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
144
- border-color: #57A957 #57A957 #3D773D;
145
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
146
-
147
- }
148
-
149
- #call-to-action {
150
- padding-top: 30px;
151
- text-align: center;
152
- }
153
-
154
- #footer {
155
- position: fixed;
156
- bottom: 0px;
157
- height: 20px;
158
- background-color: #444;
159
- color: #ccc;
160
- width: 100%;
161
- text-align: center;
162
- }
163
-
164
- #signup input, #report input {
165
- height: 38px;
166
- width: 200px;
167
- font-size: 16px;
168
- border: 1px solid #ccc;
169
- border-radius: 4px;
170
- padding-left: 4px;
171
- }
172
- </style>
173
- </head>
174
- <body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/modal/index.php DELETED
@@ -1,71 +0,0 @@
1
- <?php
2
- /**
3
- * We need to do a little handywork to make sure that Wordpress
4
- * thinks we're a standard built-in modal.
5
- */
6
-
7
- # Include this so Wordpress doesn't throw NOTICEs when setting $pagenow
8
- $_SERVER['PHP_SELF'] = '/wp-admin';
9
-
10
- # Turn on DEBUG if needed
11
- if(defined('BROADSTREET_DEBUG') && BROADSTREET_DEBUG) {
12
- error_reporting(E_ALL);
13
- ini_set('display_errors', 1);
14
- ini_set('log_errors', 1);
15
- }
16
-
17
- if(!isset( $_GET['inline']))
18
- define('IFRAME_REQUEST', true);
19
-
20
- # Include libraries
21
- require_once '../../lib/Utility.php';
22
- require_once '../../lib/Broadstreet.php';
23
-
24
- if(!defined('WP_ADMIN'))
25
- {
26
- # Find the wp-admin directory
27
- if(!preg_match('#(.*)/wp-content/plugins/#', $_SERVER['SCRIPT_FILENAME'], $matches))
28
- exit("We're awfully sorry. You have a strange server configuration we can't figure out. Email us, and we'll help figure it out. errors@broadstreetads.com");
29
-
30
- $root = $matches[1];
31
-
32
- chdir("$root/wp-admin");
33
-
34
- /** Load WordPress Administration Bootstrap **/
35
- require_once('./admin.php');
36
- }
37
-
38
- $page = @$_GET['step'];
39
-
40
- if (FALSE === array_search($page, array('signup', 'signedup', 'reports'))) {
41
- $page = 'signup';
42
- }
43
-
44
- if($page == 'signup')
45
- {
46
- if(Broadstreet_Adwidget_Mini_Utility::hasAdserving() || @$_GET['status'] == 'agree') {
47
-
48
- if(!Broadstreet_Adwidget_Mini_Utility::hasAdserving())
49
- {
50
- # New user
51
- if(!isset($_POST['resub']))
52
- {
53
- $email = $_POST['email'];
54
- $success = Broadstreet_Adwidget_Mini_Utility::hasAdserving(true, $email);
55
- }
56
- else
57
- {
58
- # Someone who cancelled and resubscribed
59
- $success = Broadstreet_Adwidget_Mini_Utility::hasAdserving(true);
60
- }
61
-
62
- if(!$success) exit("We're sorry! We couldn't upgrade you to premium adserving! Is your email address already linked to a Broadstreet account? This may be the problem.");
63
- }
64
-
65
- require "signedup.php";
66
- exit;
67
- }
68
- }
69
-
70
- require "$page.php";
71
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/modal/reports.php DELETED
@@ -1,96 +0,0 @@
1
- <?php
2
-
3
- $ad_id = sanitize_text_field($_GET['ad_id']);
4
- $adv_id = sanitize_text_field($_GET['adv_id']);
5
- $net_id = Broadstreet_Adwidget_Mini_Utility::getNetworkID();
6
-
7
- $start = sanitize_text_field(@$_GET['start']);
8
- $end = sanitize_text_field(@$_GET['end']);
9
-
10
- $day = 60 * 60 * 24 * 31;
11
-
12
- if($start && !$end) $end = date('Y-m-d');
13
- if($end && !$start) $start = date('Y-m-d', strtotime($end) - $day);
14
- if(!$start && !$end) { $end = date('Y-m-d'); $start = date('Y-m-d', time() - $day); }
15
-
16
- $api = Broadstreet_Adwidget_Mini_Utility::getClient();
17
- $error = false;
18
- $stats = array();
19
-
20
- try {
21
- $stats = $api->getAdvertisementReport($net_id, $adv_id, $ad_id, $start, $end);
22
- } catch(Exception $ex) {
23
- $error = 'There was an error retrieving your report. Try selecting a valid date range of 2 years or smaller.';
24
- }
25
-
26
- ?>
27
- <?php require 'header.php' ?>
28
- <style type="text/css">
29
- .datagrid table { border-collapse: collapse; text-align: left; width: 100%; } .datagrid {font: normal 12px/150% Arial, Helvetica, sans-serif; background: #fff; overflow: hidden; border: 1px solid #006699; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }.datagrid table td, .datagrid table th { padding: 3px 10px; }.datagrid table thead th {background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #006699), color-stop(1, #00557F) );background:-moz-linear-gradient( center top, #006699 5%, #00557F 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#006699', endColorstr='#00557F');background-color:#006699; color:#FFFFFF; font-size: 15px; font-weight: bold; border-left: 1px solid #0070A8; } .datagrid table thead th:first-child { border: none; }.datagrid table tbody td { color: #00557F; border-left: 1px solid #E1EEF4;font-size: 12px;font-weight: normal; }.datagrid table tbody .alt td { background: #E1EEf4; color: #00557F; }.datagrid table tbody td:first-child { border-left: none; }.datagrid table tbody tr:last-child td { border-bottom: none; }.datagrid table tfoot td div { border-top: 1px solid #006699;background: #E1EEf4;} .datagrid table tfoot td { padding: 0; font-size: 12px } .datagrid table tfoot td div{ padding: 2px; }.datagrid table tfoot td ul { margin: 0; padding:0; list-style: none; text-align: right; }.datagrid table tfoot li { display: inline; }.datagrid table tfoot li a { text-decoration: none; display: inline-block; padding: 2px 8px; margin: 1px;color: #FFFFFF;border: 1px solid #006699;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #006699), color-stop(1, #00557F) );background:-moz-linear-gradient( center top, #006699 5%, #00557F 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#006699', endColorstr='#00557F');background-color:#006699; }.datagrid table tfoot ul.active, .datagrid table tfoot ul a:hover { text-decoration: none;border-color: #00557F; color: #FFFFFF; background: none; background-color:#006699;}
30
- body { padding-bottom: 50px; }
31
- .date-container {
32
- background-color: #fff;
33
- padding: 10px;
34
- text-align: center;
35
- }
36
- .alert {
37
- padding: 8px 35px 8px 14px;
38
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
39
- background-color: #fcf8e3;
40
- border: 1px solid #fbeed5;
41
- }
42
- .alert-error {
43
- color: #b94a48;
44
- background-color: #f2dede;
45
- border-color: #eed3d7;
46
- }
47
-
48
- </style>
49
- <div id="header">
50
- <h1>Click Report from <?php echo $start ?> to <?php echo $end ?></h1>
51
- </div>
52
- <?php if($error): ?>
53
- <div class="alert alert-error">
54
- <?php echo $error; ?>
55
- </div>
56
- <?php endif; ?>
57
- <div class="date-container">
58
- <form id="report" action="?" method="get">
59
- <input type="text" name="start" placeholder="your@email.com" value="<?php echo $start ?>" />
60
- &nbsp;&nbsp;&nbsp;&nbsp; through &nbsp;&nbsp;&nbsp;&nbsp;
61
- <input type="text" name="end" placeholder="your@email.com" value="<?php echo $end ?>" />
62
- <input type="hidden" name="ad_id" value="<?php echo $ad_id ?>" />
63
- <input type="hidden" name="adv_id" value="<?php echo $adv_id ?>" />
64
- <input type="hidden" name="step" value="reports" />
65
- <a href="#" onclick="$('#report').submit();" class="btn call-to-action">Go </a>
66
- </form>
67
- </div>
68
- <div style="padding: 0px 0px 5px 5px; color: #808080;">* Stats are delayed by roughly 10 minutes</div>
69
- <div style="margin: 0 5px;" class="datagrid">
70
- <table id="stats">
71
- <thead>
72
- <tr>
73
- <th>Date</th>
74
- <th>Views</th>
75
- <th>Clicks</th>
76
- <th>Click-Through Rate</th>
77
- </tr>
78
- </thead>
79
- <tbody>
80
- <?php if(count($stats)): ?>
81
- <?php $count = 0; foreach($stats as $day): ?>
82
- <tr <?php if($count % 2 == 0) echo "class='alt'" ?>>
83
- <td><?php echo $day->date ?></td>
84
- <td><?php echo $day->views ?></td>
85
- <td><?php echo $day->clicks ?></td>
86
- <td><?php if($day->views == 0) echo 'NA'; else echo round($day->clicks / $day->views, 2) . '' ?></td>
87
- </tr>
88
- <?php $count++; endforeach; ?>
89
- <?php endif; ?>
90
- </tbody>
91
- </table>
92
- </div>
93
- <div id="call-to-action">
94
- <a href="#" onclick="(window.dialogArguments || opener || parent || top).tb_remove(); return false;" class="btn call-to-action">Close</a>
95
- </div>
96
- <?php require 'footer.php' ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/modal/signedup.php DELETED
@@ -1,49 +0,0 @@
1
- <?php require 'header.php' ?>
2
- <div id="header">
3
- <h1>Welcome to the Club!</h1>
4
- </div>
5
- <div id="clients-section">
6
- <table id="clients">
7
- <tr>
8
- <td><a href="http://baristanet.com/"><img src="http://broadstreetads.com/assets/images/featured-clients/baristanet.png" /></a></td>
9
- <td><a href="http://thebatavian.com/"><img src="http://broadstreetads.com/assets/images/featured-clients/batavian.png" /></a></td>
10
- <td><a href="http://arlnow.com/"><img src="http://broadstreetads.com/assets/images/featured-clients/arlingtonnow.png" /></a></td>
11
- <td><a href="http://hulafrog.com/"><img src="http://broadstreetads.com/assets/images/featured-clients/hulafrog.png" /></a></td>
12
- </tr>
13
- <tr>
14
- <td><a href="http://natomasbuzz.com/"><img src="http://broadstreetads.com/assets/images/featured-clients/natomas.png" /></a></td>
15
- <td><a href="http://www.sheepsheadbites.com/"><img src="http://broadstreetads.com/assets/images/featured-clients/sheepshead.png" /></a></td>
16
- <td><a href="http://www.pvpost.com/"><img src="http://broadstreetads.com/assets/images/featured-clients/pvpost.png" /></a></td>
17
- <td><a href="http://njnewscommons.com/"><img src="http://broadstreetads.com/assets/images/featured-clients/njnewscommons.png" /></a></td>
18
- </tr>
19
- </table>
20
- </div>
21
- <div id="info">
22
-
23
- <h2>
24
- Your existing ads and any ads you create going forward will
25
- have reporting available and be hosting in our cloud. You will
26
- soon receive a welcome email. Thank you for taking a spin with Broadstreet!
27
- <br />
28
- <small><strong>Be sure to save unsaved widgets and refresh the widgets page after closing this window.</strong></small>
29
- </h2>
30
- <div id="call-to-action">
31
- <a href="#" onclick="bs_close()" class="btn call-to-action">Close this Window</a>
32
- </div>
33
-
34
- </div>
35
- <script>
36
- function bs_close() {
37
- var win = window.dialogArguments || opener || parent || top;
38
-
39
- if(typeof win.send_to_editor === 'function')
40
- {
41
- win.send_to_editor();
42
- }
43
- else
44
- {
45
- win.tb_remove();
46
- }
47
- }
48
- </script>
49
- <?php require 'footer.php' ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/modal/signup.php DELETED
@@ -1,38 +0,0 @@
1
- <?php require 'header.php' ?>
2
- <div id="header">
3
- <h1>Join <span id="pub-count">500+</span> Publishers Who Upgraded</h1>
4
- </div>
5
- <div id="clients-section">
6
- <table id="clients">
7
- <tr>
8
- <td><a href="http://baristanet.com/"><img src="http://broadstreetads.com/assets/app/images/featured-clients/baristanet.png" /></a></td>
9
- <td><a href="http://thebatavian.com/"><img src="http://broadstreetads.com/assets/app/images/featured-clients/batavian.png" /></a></td>
10
- <td><a href="http://arlnow.com/"><img src="http://broadstreetads.com/assets/app/images/featured-clients/arlingtonnow.png" /></a></td>
11
- <td><a href="http://hulafrog.com/"><img src="http://broadstreetads.com/assets/app/images/featured-clients/hulafrog.png" /></a></td>
12
- </tr>
13
- <tr>
14
- <td><a href="http://natomasbuzz.com/"><img src="http://broadstreetads.com/assets/app/images/featured-clients/natomas.png" /></a></td>
15
- <td><a href="http://www.sheepsheadbites.com/"><img src="http://broadstreetads.com/assets/app/images/featured-clients/sheepshead.png" /></a></td>
16
- <td><a href="http://www.pvpost.com/"><img src="http://broadstreetads.com/assets/app/images/featured-clients/pvpost.png" /></a></td>
17
- <td><a href="http://njnewscommons.com/"><img src="http://broadstreetads.com/assets/app/images/featured-clients/njnewscommons.png" /></a></td>
18
- </tr>
19
- </table>
20
- </div>
21
- <div id="call-to-action">
22
- <form id="signup" action="?step=signup&status=agree" method="post">
23
- <?php if(!Broadstreet_Adwidget_Mini_Utility::getNetworkID()): ?>
24
- <input id="email" type="text" name="email" placeholder="your@email.com" value="<?php echo get_bloginfo('admin_email') ?>" />
25
- <a href="#" onclick="$('#signup').submit();" class="btn call-to-action">$5 / month. Click for an Instant Signup</a>
26
- <?php else: ?>
27
- <input type="hidden" name="resub" value="1" />
28
- <a href="#" onclick="$('#signup').submit();" class="btn call-to-action">$5 / month. Click to re-subscribe.</a>
29
- <?php endif; ?>
30
- </form>
31
- </div>
32
- <div id="info">
33
- <h2>Or, watch a demo first (and <a href="http://broadstreetads.com">check out our website</a>)</h2>
34
- </div>
35
- <div style="width: 660px; margin: 0 auto 22px auto;">
36
- <iframe width="660" height="370" src="//www.youtube.com/embed/yAFFhjWnOgk" frameborder="0" allowfullscreen></iframe>
37
- </div>
38
- <?php require 'footer.php' ?>