Exemple #1
0
 /**
  * The function used by WP to print the admin settings page
  */
 static function adminMenuCallback()
 {
     self::sendInstallReportIfNew();
     if (isset($_POST['cancel'])) {
         Broadstreet_Mini_Utility::hasAdserving(false);
     }
     if (isset($_POST['subscribe'])) {
         Broadstreet_Mini_Utility::hasAdserving(true);
     }
     include dirname(__FILE__) . '/views/admin.php';
 }
Exemple #2
0
    }
    $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_Mini_Utility::hasAdserving() || @$_GET['status'] == 'agree') {
        if (!Broadstreet_Mini_Utility::hasAdserving()) {
            # New user
            if (!isset($_POST['resub'])) {
                $email = $_POST['email'];
                $success = Broadstreet_Mini_Utility::hasAdserving(true, $email);
            } else {
                # Someone who cancelled and resubscribed
                $success = Broadstreet_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_Mini_Utility::sendReport('Premium Exloration');
require "{$page}.php";
Exemple #3
0
<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_Mini_Utility::hasAdserving() && Broadstreet_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 
}
?>