Exemplo n.º 1
0
} 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">
	<div class="bsaDashboard-stats">
		<div class="bsaDashboard-stat">
			<div class="bsaDashboard-inner greenBg">
				<span class="dashicons dashicons-welcome-widgets-menus"></span>
				<button type="submit" name="bsaProSubmit" value="1" class="bsaProSubmit clearfix">' . get_option($bsaTrans . 'form_right_button_pay') . '</button>
		</form>';
        } else {
            echo "<strong>ADS PRO Notice!</strong> Spaces are full or doesn't exists. If you are admin of this Site, please add new Ad Space in Admin Panel.";
        }
    }
} else {
    echo '
		<div class="bsaProContainer bsa-pro-col-3">
			<h3 style="font-size: 20px; text-align: center;">' . get_option($bsaTrans . 'agency_title_form') . '</h3>
			<div class="bsaProItems bsaGridGutter">
			';
    ?>

<?php 
    foreach ($model->getSites('agency_form', 'active') as $site) {
        if ($model->countSpaces('agency_form', $site["id"]) > 0) {
            $agency_form = get_option('bsa_pro_plugin_agency_ordering_form_url');
            echo '
					<div class="bsaProItem bsaSite bsaHidden animated fadeIn" data-animation="fadeIn" style="' . ($site["thumb"] != '' ? 'background-image: url(&#39;' . bsa_upload_url() . $site["thumb"] : '') . '&#39;);">
						<div class="bsaSiteInner">
							<div class="bsaSiteInnerBg"></div>
							<h3>
								<a href="' . $agency_form . (strpos($agency_form, '?') ? '&' : '?') . 'site_id=' . $site["id"] . '">' . $site["title"] . '</a>
								<small>' . $site["url"] . '</small>
							</h3>
							<div class="bsaSiteActions">
								<div class="bsaSiteAction bsaSiteActionLeft"><a href="' . $site["url"] . '" target="_blank">' . get_option($bsaTrans . 'agency_visit_site') . '</a></div>
								<div class="bsaSiteAction bsaSiteActionRight"><a href="' . $agency_form . (strpos($agency_form, '?') ? '&' : '?') . 'site_id=' . $site["id"] . '">' . get_option($bsaTrans . 'agency_buy_ad') . '</a></div>
							</div>
						</div>