function adrotate_network_license() { global $wpdb, $adrotate_advert_status; $status = ''; if (isset($_GET['status'])) { $status = esc_attr($_GET['status']); } $adrotate_activate = get_site_option('adrotate_activate'); ?> <div class="wrap"> <h1><?php _e('AdRotate Network License', 'adrotate-pro'); ?> </h1> <?php if ($status > 0) { adrotate_status($status); } ?> <form name="settings" id="post" method="post" action="admin.php?page=adrotate-network-settings"> <input type="hidden" name="adrotate_license_network" value="1" /> <?php wp_nonce_field('adrotate_license', 'adrotate_nonce_license'); ?> <span class="description"><?php _e('Activate your AdRotate License here to receive automated updates and enable support via the fast and personal ticket system.', 'adrotate-pro'); ?> <br /> <?php _e('For network activated setups like this you need a Network or Developer License.', 'adrotate-pro'); ?> </span> <table class="form-table"> <tr> <th valign="top"><?php _e('License Type', 'adrotate-pro'); ?> </th> <td> <?php echo $adrotate_activate['type'] != '' ? $adrotate_activate['type'] : __('Not activated - Not eligible for support and updates.', 'adrotate-pro'); ?> </td> </tr> <tr> <th valign="top"><?php _e('License Key', 'adrotate-pro'); ?> </th> <td> <input name="adrotate_license_key" type="text" class="search-input" size="50" value="<?php echo $adrotate_activate['key']; ?> " autocomplete="off" <?php echo $adrotate_activate['status'] == 1 ? 'disabled' : ''; ?> /> <span class="description"><?php _e('You can find the license key in your order email.', 'adrotate-pro'); ?> </span> </td> </tr> <tr> <th valign="top"><?php _e('License Email', 'adrotate-pro'); ?> </th> <td> <input name="adrotate_license_email" type="text" class="search-input" size="50" value="<?php echo $adrotate_activate['email']; ?> " autocomplete="off" <?php echo $adrotate_activate['status'] == 1 ? 'disabled' : ''; ?> /> <span class="description"><?php _e('The email address you used in your purchase of AdRotate Pro.', 'adrotate-pro'); ?> </span> </td> </tr> <tr> <th valign="top"> </th> <td> <?php if ($adrotate_activate['status'] == 0) { ?> <input type="submit" id="post-role-submit" name="adrotate_license_activate" value="<?php _e('Activate', 'adrotate-pro'); ?> " class="button-primary" /> <?php } else { ?> <input type="submit" id="post-role-submit" name="adrotate_license_deactivate" value="<?php _e('De-activate', 'adrotate-pro'); ?> " class="button-secondary" /> <?php } ?> </td> </tr> </table> </form> </div> <?php }
function adrotate_options() { global $wpdb, $wp_roles; $active_tab = isset($_GET['tab']) ? esc_attr($_GET['tab']) : 'general'; $status = isset($_GET['status']) ? esc_attr($_GET['status']) : ''; $error = isset($_GET['error']) ? esc_attr($_GET['error']) : ''; ?> <div class="wrap"> <h1><?php _e('AdRotate Settings', 'adrotate'); ?> </h1> <?php if ($status > 0) { adrotate_status($status, array('error' => $error)); } ?> <h2 class="nav-tab-wrapper"> <a href="?page=adrotate-settings&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?> ">General</a> <a href="?page=adrotate-settings&tab=notifications" class="nav-tab <?php echo $active_tab == 'notifications' ? 'nav-tab-active' : ''; ?> ">Notifications</a> <a href="?page=adrotate-settings&tab=stats" class="nav-tab <?php echo $active_tab == 'stats' ? 'nav-tab-active' : ''; ?> ">Stats</a> <a href="?page=adrotate-settings&tab=geo" class="nav-tab <?php echo $active_tab == 'geo' ? 'nav-tab-active' : ''; ?> ">Geo Targeting</a> <a href="?page=adrotate-settings&tab=advertisers" class="nav-tab <?php echo $active_tab == 'advertisers' ? 'nav-tab-active' : ''; ?> ">Advertisers</a> <a href="?page=adrotate-settings&tab=roles" class="nav-tab <?php echo $active_tab == 'roles' ? 'nav-tab-active' : ''; ?> ">Roles</a> <a href="?page=adrotate-settings&tab=misc" class="nav-tab <?php echo $active_tab == 'misc' ? 'nav-tab-active' : ''; ?> ">Misc</a> <a href="?page=adrotate-settings&tab=maintenance" class="nav-tab <?php echo $active_tab == 'maintenance' ? 'nav-tab-active' : ''; ?> ">Maintenance</a> </h2> <form name="settings" id="post" method="post" action="admin.php?page=adrotate-settings"> <input type="hidden" name="adrotate_settings_tab" value="<?php echo $active_tab; ?> " /> <?php wp_nonce_field('adrotate_email_test', 'adrotate_nonce'); ?> <?php wp_nonce_field('adrotate_settings', 'adrotate_nonce_settings'); ?> <?php $adrotate_config = get_option('adrotate_config'); if ($active_tab == 'general') { $adrotate_crawlers = get_option('adrotate_crawlers'); $crawlers = ''; if (is_array($adrotate_crawlers)) { $crawlers = implode(', ', $adrotate_crawlers); } include "dashboard/settings/general.php"; } elseif ($active_tab == 'notifications') { include "dashboard/settings/notifications.php"; } elseif ($active_tab == 'stats') { include "dashboard/settings/statistics.php"; } elseif ($active_tab == 'geo') { include "dashboard/settings/geotargeting.php"; } elseif ($active_tab == 'advertisers') { include "dashboard/settings/advertisers.php"; } elseif ($active_tab == 'roles') { include "dashboard/settings/roles.php"; } elseif ($active_tab == 'misc') { include "dashboard/settings/misc.php"; } elseif ($active_tab == 'maintenance') { $adrotate_debug = get_option('adrotate_debug'); $adrotate_version = get_option('adrotate_version'); $adrotate_db_version = get_option('adrotate_db_version'); $adrotate_advert_status = get_option("adrotate_advert_status"); $adevaluate = wp_next_scheduled('adrotate_evaluate_ads'); $adschedule = wp_next_scheduled('adrotate_notification'); $adtracker = wp_next_scheduled('adrotate_clean_trackerdata'); include "dashboard/settings/maintenance.php"; } elseif ($active_tab == 'license') { $adrotate_is_networked = adrotate_is_networked(); $adrotate_hide_license = get_option('adrotate_hide_license'); if ($adrotate_is_networked) { $adrotate_activate = get_site_option('adrotate_activate'); } else { $adrotate_activate = get_option('adrotate_activate'); } include "dashboard/settings/license.php"; } ?> <?php if ($active_tab != 'license') { ?> <p class="submit"> <input type="submit" name="adrotate_options_submit" class="button-primary" value="<?php _e('Update Options', 'adrotate'); ?> " /> </p> <?php } ?> </form> </div> <?php }
* COPYRIGHT AND TRADEMARK NOTICE * Copyright 2008-2015 Arnan de Gans. All Rights Reserved. * ADROTATE is a registered trademark of Arnan de Gans. * COPYRIGHT NOTICES AND ALL THE COMMENTS SHOULD REMAIN INTACT. * By using this code you agree to indemnify Arnan de Gans from any * liability that might arise from it's use. ------------------------------------------------------------------------------------ */ $banners = $groups = $schedules = $queued = 0; $banners = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}adrotate` WHERE `type` != 'empty' AND `type` != 'a_empty';"); $groups = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '';"); $schedules = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}adrotate_schedule` WHERE `name` != '';"); $queued = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}adrotate` WHERE `type` = 'queue';"); $data = get_option("adrotate_advert_status"); if ($status > 0) { adrotate_status($status, array('ticket' => $ticketid)); } ?> <div id="dashboard-widgets-wrap"> <div id="dashboard-widgets" class="metabox-holder"> <div id="postbox-container-1" class="postbox-container" style="width:50%;"> <div id="normal-sortables" class="meta-box-sortables ui-sortable"> <h3><?php _e('Currently', 'adrotate-pro'); ?> </h3> <div class="postbox-adrotate"> <div class="inside">