"; } /* Register the link on the left sidebar in the administration interface */ function websitez_configuration_menu(){ add_menu_page( __( WEBSITEZ_PLUGIN_NAME, 'Websitez' ), __( ''.__(WEBSITEZ_PLUGIN_NAME).'', 'Websitez' ), 8, 'websitez_config', 'websitez_configuration_page',plugin_dir_url(__FILE__).'images/phone_icon_16x16.png'); add_submenu_page( 'websitez_config', __('Settings', 'Websitez'), __('Settings', 'Websitez'), 8, 'websitez_config', 'websitez_configuration_page' ); add_submenu_page( 'websitez_config', __('Stats', 'Websitez'), __('Stats', 'Websitez'), 8, 'websitez_stats', 'websitez_stats_page' ); add_submenu_page( 'websitez_config', __('Mobile Themes', 'Websitez'), __('Mobile Themes', 'Websitez'), 8, 'websitez_themes', 'websitez_themes_page' ); } function websitez_stats_page(){ global $wpdb, $websitez_plugin_description, $table_prefix, $websitez_free_version; ?>

Basic Mobile Device

Total Unique Visitors: '.$total_basic_unique_visits.'

Total Visits: '.$total_basic_visits.'

') ?>
Advanced Mobile Device

Total Unique Visitors: '.$total_advanced_unique_visits.'

Total Visits: '.$total_advanced_visits.'

') ?>
Mobile Device Details

Total Googlebot Mobile Visitors: '.$total_googlebot_visits.'

Total Bing Bot Mobile Visitors: '.$total_bing_bot_visits.'

') ?>

0){ foreach($visitors as $v): ?>
"> '.count($v['visits']).'

') ?>
'.date("Y-m-d H:i:s", strtotime($v['visits'][(count($v['visits'])-1)])).'

') ?>
'.$v['data']['REMOTE_ADDR'].'

') ?>
'.$v['data']['HTTP_USER_AGENT'].'

') ?>

<?php _e('Check the mobile readiness of this website.') ?>

Basic Mobile Device

The WP Mobile Detector will remove all images and advanced HTML from being displayed on basic devices.

') ?>
Advanced Mobile Device

The WP Mobile Detector will resize images that are too large to display on advanced mobile devices.

') ?>

Settings saved.

'; else echo '

Error saving settings.

'.$error_message.'

'; }else if(isset($_POST['record_stats'])){ $value = $_POST['record_stats']; if(get_option(WEBSITEZ_RECORD_STATS_NAME)){ if(update_option(WEBSITEZ_RECORD_STATS_NAME, $value)){ $u = true; }else{ $u = false; } }else{ $u = false; } if($u) echo '

Settings saved.

'; else echo '

Error saving settings.

'; }else if(isset($_POST['show_attribution'])){ $value = $_POST['show_attribution']; if(get_option(WEBSITEZ_SHOW_ATTRIBUTION_NAME)){ if(update_option(WEBSITEZ_SHOW_ATTRIBUTION_NAME, $value)){ $u = true; }else{ $u = false; } }else{ $u = false; } if($u) echo '

Settings saved.

'; else echo '

Error saving settings.

'; } //Now that the settings are saved, get the themes $current_themes_installed = websitez_get_current_themes(); ?>
Record mobile statistics? Operation
Give credit to WP Mobile Detector with a footer link? Operation