} $root = $matches[1]; chdir("{$root}/wp-admin"); /** Load WordPress Administration Bootstrap **/ require_once './admin.php'; } $page = @$_GET['step']; if (!$page) { $page = 'signup'; } if ($page == 'signup') { if (Broadstreet_Adwidget_Mini_Utility::hasAdserving() || @$_GET['status'] == 'agree') { if (!Broadstreet_Adwidget_Mini_Utility::hasAdserving()) { # New user if (!isset($_POST['resub'])) { $email = $_POST['email']; $success = Broadstreet_Adwidget_Mini_Utility::hasAdserving(true, $email); } else { # Someone who cancelled and resubscribed $success = Broadstreet_Adwidget_Mini_Utility::hasAdserving(true); } 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."); } } require "signedup.php"; exit; } } Broadstreet_Adwidget_Mini_Utility::sendReport('Premium Exloration'); require "{$page}.php";
/** * Display the widget update form * @param array $instance */ function form($instance) { $link_id = $this->get_field_id('w_link'); $img_id = $this->get_field_id('w_img'); $defaults = array('w_link' => get_bloginfo('url'), 'w_img' => '', 'w_adv' => 'New Advertiser', 'w_resize' => 'no', 'w_new' => 'no'); $instance = wp_parse_args((array) $instance, $defaults); $img = $instance['w_img']; $link = $instance['w_link']; $adv = $instance['w_adv']; ?> <div class="widget-content"> <p style="text-align: center;" class="bs-proof"> <?php if ($instance['w_img']) { ?> Your ad is ready. <br/><br/><strong>Scaled Visual:</strong><br/> <div class="bs-proof"><img style="width:100%;" src="<?php echo $instance['w_img']; ?> " alt="Ad" /></div><br/> <?php } ?> <a href="#" class="upload-button" rel="<?php echo $img_id; ?> ">Click here to upload a new image.</a> You can also paste in an image URL below. </p> <input class="widefat tag" placeholder="Image URL" type="text" id="<?php echo $img_id; ?> " name="<?php echo $this->get_field_name('w_img'); ?> " value="<?php echo htmlentities($instance['w_img']); ?> " /> <br/><br/> <p> <label for="<?php echo $this->get_field_id('w_link'); ?> ">Ad Click Destination:</label><br/> <input class="widefat" type="text" id="<?php echo $this->get_field_id('w_link'); ?> " name="<?php echo $this->get_field_name('w_link'); ?> " value="<?php echo $instance['w_link']; ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('w_adv'); ?> ">Advertiser Name:</label><br/> <input class="widefat" type="text" id="<?php echo $this->get_field_id('w_adv'); ?> " name="<?php echo $this->get_field_name('w_adv'); ?> " value="<?php echo $instance['w_adv']; ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('w_resize'); ?> ">Auto Resize to Max Width? </label> <input type="checkbox" name="<?php echo $this->get_field_name('w_resize'); ?> " value="yes" <?php if ($instance['w_resize'] == 'yes') { echo 'checked'; } ?> /> </p> <p> <label for="<?php echo $this->get_field_id('w_new'); ?> ">Open in New Window? </label> <input type="checkbox" name="<?php echo $this->get_field_name('w_new'); ?> " value="yes" <?php if ($instance['w_new'] == 'yes') { echo 'checked'; } ?> /> </p> <p> <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. </p> <?php if (!Broadstreet_Adwidget_Mini_Utility::hasAdserving()) { ?> <p> When you're ready for a more powerful adserver with click reporting <a target="_blank" href="#" onclick="broadstreet_upgrade(); return false;">click here</a>. <script language="javascript"> if(!window.broadstreet_upgrade) { function broadstreet_upgrade() { window.send_to_editor = function(html) { tb_remove(); alert('Save any unsaved widgets and refresh this page to see new upgraded options'); }; tb_show('Broadstreet', '<?php echo bsadwidget_get_base_url('views/modal/'); ?> ' + '?fake=fake&width=650&height=580&TB_iframe=true'); } } </script> </p> <?php } elseif (isset($instance['bs_ad_id'])) { ?> <p> Reporting: <a target="_blank" href="#" onclick="broadstreet_reports(); return false;">View stats for clicks and views</a> <script language="javascript"> if(!window.broadstreet_reports) { function broadstreet_reports() { window.send_to_editor = function(html) { tb_remove(); }; 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'); } } </script> </p> <?php } ?> </div> <?php }
<h2>Adserver Subscription</h2> You are currently subscribed to Broadstreet's Adserver, giving your site stress-free adserving, and click/view reporting. You can cancel this subscription here. Canceling will revert your ads to start serving from your site instead of an adserver. <form method="post"> <input style="background-color: red; color: white;" type="submit" name="cancel" value="Cancel Adserving Subscription"> </form> <?php } ?> <?php if (!Broadstreet_Adwidget_Mini_Utility::hasAdserving() && Broadstreet_Adwidget_Mini_Utility::hasNetwork()) { ?> <h2>Adserver Subscription</h2> You were once subscribed to Broadstreet's Adserver, giving your site stress-free adserving, and click/view reporting. You can re-enable your subscription here. Changes will be immediate. <form method="post"> <input style="background-color: green; color: white;" type="submit" name="subscribe" value="Subscribe me for $5 / month"> </form> <?php } ?>