function BSA_PRO_add_custom_stylesheet() { echo "<style>\n\t/* Custom BSA_PRO Styles */\n\n\t/* fonts */\n"; $model = new BSA_PRO_Model(); if ($model->getSpaces('active')) { foreach ($model->getSpaces('active') as $space) { if ($space["font"] != '' && $space["font_url"] != '') { echo $space["font_url"]; echo ".bsaProContainer.bsa-" . $space["template"] . "{\n\t\t\t\t" . $space["font"] . "\n\t\t\t}"; } } } echo "\n\t/* form */\n\t.bsaProOrderingForm { " . bsaProGetOpt('form_bg', 'bg') . " " . bsaProGetOpt('form_c', 'c') . " }\n\t.bsaProInput input,\n\t.bsaProInput input[type='file'],\n\t.bsaProSelectSpace select,\n\t.bsaProInputsRight .bsaInputInner,\n\t.bsaProInputsRight .bsaInputInner label { " . bsaProGetOpt('form_input_bg', 'bg') . " " . bsaProGetOpt('form_input_c', 'c') . " }\n\t.bsaProPrice { " . bsaProGetOpt('form_price_c', 'c') . " }\n\t.bsaProDiscount { " . bsaProGetOpt('form_discount_bg', 'bg') . " " . bsaProGetOpt('form_discount_c', 'c') . " }\n\t.bsaProOrderingForm .bsaProSubmit,\n\t.bsaProOrderingForm .bsaProSubmit:hover,\n\t.bsaProOrderingForm .bsaProSubmit:active { " . bsaProGetOpt('form_button_bg', 'bg') . " " . bsaProGetOpt('form_button_c', 'c') . " }\n\n\t/* allerts */\n\t.bsaProAlert,\n\t.bsaProAlert > a,\n\t.bsaProAlert > a:hover,\n\t.bsaProAlert > a:focus { " . bsaProGetOpt('form_alert_c', 'c') . " }\n\t.bsaProAlertSuccess { " . bsaProGetOpt('form_alert_success_bg', 'bg') . " }\n\t.bsaProAlertFailed { " . bsaProGetOpt('form_alert_failed_bg', 'bg') . " }\n\n\t/* stats */\n\t.bsaStatsWrapper .ct-chart .ct-series.ct-series-b .ct-bar,\n\t.bsaStatsWrapper .ct-chart .ct-series.ct-series-b .ct-line,\n\t.bsaStatsWrapper .ct-chart .ct-series.ct-series-b .ct-point,\n\t.bsaStatsWrapper .ct-chart .ct-series.ct-series-b .ct-slice.ct-donut { " . bsaProGetOpt('stats_views_line', 's') . " }\n\n\t.bsaStatsWrapper .ct-chart .ct-series.ct-series-a .ct-bar,\n\t.bsaStatsWrapper .ct-chart .ct-series.ct-series-a .ct-line,\n\t.bsaStatsWrapper .ct-chart .ct-series.ct-series-a .ct-point,\n\t.bsaStatsWrapper .ct-chart .ct-series.ct-series-a .ct-slice.ct-donut { " . bsaProGetOpt('stats_clicks_line', 's') . " }\n\n\n\t/* Custom CSS */\n\t" . get_option('bsa_pro_plugin_custom_css') . "\n</style>"; }
if (get_option('bsa_pro_plugin_symbol_position') != 'before') { $after = get_option('bsa_pro_plugin_currency_symbol'); } else { $after = ''; } // active order by column function get_order_ads($sid, $column) { if (isset($sid) && bsa_space($sid, 'order_ads') == $column) { return 'bsaOrderActive'; } else { return null; } } $model = new BSA_PRO_Model(); $get_spaces = $model->getSpaces('both'); $first_space = $get_spaces[0]['id']; if (isset($_GET['space_id']) && $_GET['space_id'] != NULL && $_GET['space_id'] != '') { $space_id = $_GET['space_id']; } elseif ($get_spaces != NULL) { $space_id = $first_space; } else { $space_id = 0; } $getActiveAds = $model->getActiveAds($space_id, bsa_space($space_id, 'max_items'), 'admin'); $getPendingAds = $model->getPendingAds('pending_ads', $space_id); $getNotPaidAds = $model->getNotPaidAds($space_id); $getBlockedAds = $model->getBlockedAds($space_id); $getArchiveAds = $model->getArchiveAds($space_id); ?>
?> </p> </div> <div id="bsaSuccessProRedirect"> <div class="bsaPayPalSectionBg"></div> <div class="bsaPayPalSectionCenter"> <span class="bsaLoaderRedirect" style="margin-top:200px;"></span> </div> <form><input id="bsa_payment_url" type="hidden" name="bsa_payment_url" value="<?php echo isset($_SESSION['bsa_payment_url']) ? $_SESSION['bsa_payment_url'] : ''; ?> "></form> </div> <?php } $spaces = $model->getSpaces('active', 'html'); $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;
</p> </div> <div id="bsaSuccessProAgencyRedirect"> <div class="bsaPayPalSectionBg"></div> <div class="bsaPayPalSectionCenter"> <span class="bsaLoaderRedirect" style="margin-top:200px;"></span> </div> <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; }
echo admin_url(); ?> admin.php?page=bsa-pro-sub-menu-spaces">back to <strong>spaces / ads list</strong></a></p> <?php } ?> <?php } ?> </h2> <?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 .= ''; }