<form><input id="bsa_payment_agency_url" type="hidden" name="bsa_payment_url" value="<?php 
    echo isset($_SESSION['bsa_payment_url']) ? $_SESSION['bsa_payment_url'] : '';
    ?>
"></form>
		</div>
	<?php 
}
if (isset($_GET['site_id']) && $_GET['site_id'] != '' && $model->countSpaces('agency_form', $_GET['site_id']) > 0) {
    $spaces = $model->getSpaces('active', 'html', 'agency_form', $_GET['site_id']);
    $space_verify = NULL;
    if (is_array($spaces)) {
        foreach ($spaces as $key => $space) {
            if ($space['cpc_price'] == 0 && $space['cpm_price'] == 0 && $space['cpd_price'] == 0) {
                $space_verify .= '';
            } else {
                if ($model->countAds($space["id"]) < bsa_space($space["id"], 'max_items')) {
                    $space_verify .= $key > 0 ? ',' . $space["id"] : $space["id"];
                } else {
                    $space_verify .= '';
                }
            }
        }
        $space_verify = $space_verify != '' ? explode(',', $space_verify) : FALSE;
    }
    if (isset($_GET['oid']) && $_GET['oid'] != '' && bsa_ad($_GET['oid'], 'id') != null) {
        // Payments
        if (empty($_GET)) {
            $checkGET = '?';
        } else {
            $checkGET = '&';
        }
Пример #2
0
<?php

if (get_option('bsa_pro_plugin_symbol_position') == 'before') {
    $before = '<small>' . get_option('bsa_pro_plugin_currency_symbol') . '</small> ';
} else {
    $before = '';
}
if (get_option('bsa_pro_plugin_symbol_position') != 'before') {
    $after = ' <small>' . get_option('bsa_pro_plugin_currency_symbol') . '</small>';
} else {
    $after = '';
}
$model = new BSA_PRO_Model();
$countSpaces = $model->countSpaces();
$countAds = $model->countAds();
$countEarnings = $model->countEarnings();
$getPendingAds = $model->getPendingAds('admin_dashboard');
$getLastAds = $model->getLastAds();
$getAffiliateWithdrawals = $model->getAffiliateWithdrawals('pending', bsa_role());
$getSites = $model->getSites(bsa_role(), 'pending');
$getWithdrawals = $model->getWithdrawals('pending', bsa_role());
?>
<div style="float:right;">
	<strong><a href="http://codecanyon.net/item/ads-pro-multipurpose-wordpress-ad-manager/10275010?ref=scripteo">ADS PRO</a></strong> - Version <?php 
echo get_option('bsa_pro_plugin_version');
?>
</div>
<h2>
	<i class="dashicons dashicons-megaphone"></i> ADS PRO - Dashboard
</h2>
<div class="bsaDashboard">
Пример #3
0
<?php 
if (isset($_GET['ad_id']) && bsa_ad($_GET['ad_id'], 'id') != NULL && $role == 'a' || !isset($_GET['ad_id']) && $role == 'a' || isset($_GET['ad_id']) && bsa_ad($_GET['ad_id'], 'id') != NULL && array_search($_GET['ad_id'], $get_ids) !== false && $role == 'u' || !isset($_GET['ad_id']) && $get_free_ads['free_ads'] > 0 && $role == 'u') {
    if ($role == 'a') {
        // if admin
        $spaces = $model->getSpaces('active') ? $model->getSpaces('active') : NULL;
    } else {
        // if user
        $spaces = $model->getSpaces('active', 'html') ? $model->getSpaces('active', 'html') : NULL;
    }
    $count_ads = NULL;
    $space_verify = NULL;
    if (is_array($spaces)) {
        foreach ($spaces as $key => $space) {
            if ($role == 'a') {
                $count_ads = $model->countAds($space["id"]);
                if ($model->countAds($space["id"]) < bsa_space($space["id"], 'max_items')) {
                    $space_verify .= $key > 0 ? ',' . $space["id"] : $space["id"];
                } else {
                    $space_verify .= '';
                }
            } else {
                if ($space['cpc_price'] == 0 && $space['cpm_price'] == 0 && $space['cpd_price'] == 0) {
                    $space_verify .= '';
                } else {
                    $count_ads = $model->countAds($space["id"]);
                    if ($model->countAds($space["id"]) < bsa_space($space["id"], 'max_items')) {
                        $space_verify .= $key > 0 ? ',' . $space["id"] : $space["id"];
                    } else {
                        $space_verify .= '';
                    }