Ejemplo n.º 1
0
function wpmp_analytics_admin()
{
    if (sizeof($_POST) > 0) {
        print '<div id="message" class="updated fade"><p><strong>' . wpmp_analytics_options_write() . '</strong></p></div>';
        if (isset($_POST['wpmp_analytics_local_reset']) && $_POST['wpmp_analytics_local_reset'] == 'true') {
            if (wpmp_analytics_local_enabled()) {
                wpmp_switcher_hit_reset();
                print '<div id="message" class="updated fade"><p><strong>' . __('Hit counter reset.', 'wpmp') . '</strong></p></div>';
            }
        }
    }
    include_once 'wpmp_analytics_admin.php';
}
Ejemplo n.º 2
0
function wpmp_switcher_hit($type = 'desktop')
{
    $current = get_option("wpmp_switcher_hits_{$type}");
    if (!is_numeric($current)) {
        wpmp_switcher_hit_reset();
        $current = '0';
    }
    if (function_exists('bcadd')) {
        $next = bcadd($current, '1');
    } else {
        $next = $current + 1;
    }
    update_option("wpmp_switcher_hits_{$type}", $next);
}