query($sqlQuery) == 0 && $options_ignore_users != $wpdb->get_var("SELECT option_value FROM $table_stattraq_options WHERE option_name='options_ignore_users'")) { $sqlQuery = "INSERT INTO $table_stattraq_options (option_name, option_value) VALUES ('options_ignore_users', '$options_ignore_users')"; $wpdb->query($sqlQuery); } // disable login $sqlQuery = "UPDATE $table_stattraq_options SET option_value='$options_defaults_disable_login' WHERE option_name='options_defaults_disable_login'"; if($wpdb->query($sqlQuery) == 0 && $options_defaults_disable_login != $wpdb->get_var("SELECT option_value FROM $table_stattraq_options WHERE option_name='options_defaults_disable_login'")) { $sqlQuery = "INSERT INTO $table_stattraq_options (option_name, option_value) VALUES ('options_defaults_disable_login', '$options_defaults_disable_login')"; $wpdb->query($sqlQuery); } // default view $sqlQuery = "UPDATE $table_stattraq_options SET option_value='$options_defaults_view' WHERE option_name='options_defaults_view'"; if($wpdb->query($sqlQuery) == 0 && $options_defaults_view != $wpdb->get_var("SELECT option_value FROM $table_stattraq_options WHERE option_name='options_defaults_view'")) { $sqlQuery = "INSERT INTO $table_stattraq_options (option_name, option_value) VALUES ('options_defaults_view', '$options_defaults_view')"; $wpdb->query($sqlQuery); } // TIME_FRAME $sqlQuery = "UPDATE $table_stattraq_options SET option_value='$options_defaults_time_frame' WHERE option_name='options_defaults_time_frame'"; if($wpdb->query($sqlQuery) == 0 && $options_defaults_time_frame != $wpdb->get_var("SELECT option_value FROM $table_stattraq_options WHERE option_name='options_defaults_time_frame'")) { $sqlQuery = "INSERT INTO $table_stattraq_options (option_name, option_value) VALUES ('options_defaults_time_frame', '$options_defaults_time_frame')"; $wpdb->query($sqlQuery); } // options_defaults_limit_number $sqlQuery = "UPDATE $table_stattraq_options SET option_value='$options_defaults_limit_number' WHERE option_name='options_defaults_limit_number'"; if($wpdb->query($sqlQuery) == 0 && $options_defaults_limit_number != $wpdb->get_var("SELECT option_value FROM $table_stattraq_options WHERE option_name='options_defaults_limit_number'")) { $sqlQuery = "INSERT INTO $table_stattraq_options (option_name, option_value) VALUES ('options_defaults_limit_number', '$options_defaults_limit_number')"; $wpdb->query($sqlQuery); } // options_user_counts_hide_bots $sqlQuery = "UPDATE $table_stattraq_options SET option_value='$options_user_counts_hide_bots' WHERE option_name='options_user_counts_hide_bots'"; if($wpdb->query($sqlQuery) == 0 && $options_user_counts_hide_bots != $wpdb->get_var("SELECT option_value FROM $table_stattraq_options WHERE option_name='options_user_counts_hide_bots'")) { $sqlQuery = "INSERT INTO $table_stattraq_options (option_name, option_value) VALUES ('options_user_counts_hide_bots', '$options_user_counts_hide_bots')"; $wpdb->query($sqlQuery); } $sqlQuery = "UPDATE $table_stattraq_options SET option_value='$options_user_agents_hide_bots' WHERE option_name='options_user_agents_hide_bots'"; if($wpdb->query($sqlQuery) == 0 && $options_user_agents_hide_bots != $wpdb->get_var("SELECT option_value FROM $table_stattraq_options WHERE option_name='options_user_agents_hide_bots'")) { $sqlQuery = "INSERT INTO $table_stattraq_options (option_name, option_value) VALUES ('options_user_agents_hide_bots', '$options_user_agents_hide_bots')"; $wpdb->query($sqlQuery); } $sqlQuery = "UPDATE $table_stattraq_options SET option_value='$options_referrers_hide_this_blog' WHERE option_name='options_referrers_hide_this_blog'"; if($wpdb->query($sqlQuery) == 0 && $options_referrers_hide_this_blog != $wpdb->get_var("SELECT option_value FROM $table_stattraq_options WHERE option_name='options_referrers_hide_this_blog'")) { $sqlQuery = "INSERT INTO $table_stattraq_options (option_name, option_value) VALUES ('options_referrers_hide_this_blog', '$options_referrers_hide_this_blog')"; $wpdb->query($sqlQuery); } $sqlQuery = "UPDATE $table_stattraq_options SET option_value='$options_ip_addresses_hide_bots' WHERE option_name='options_ip_addresses_hide_bots'"; if($wpdb->query($sqlQuery) == 0 && $options_ip_addresses_hide_bots != $wpdb->get_var("SELECT option_value FROM $table_stattraq_options WHERE option_name='options_ip_addresses_hide_bots'")) { $sqlQuery = "INSERT INTO $table_stattraq_options (option_name, option_value) VALUES ('options_ip_addresses_hide_bots', '$options_ip_addresses_hide_bots')"; $wpdb->query($sqlQuery); } $saved = true; } $results = $wpdb->get_results("SELECT * FROM $table_stattraq_options"); if($results) { foreach($results as $result){ switch($result->option_name){ case 'options_defaults_disable_login': $options_defaults_disable_login = $result->option_value; break; case 'options_defaults_view': $options_defaults_view = $result->option_value; break; case 'options_defaults_time_frame': $options_defaults_time_frame = $result->option_value; break; case 'options_defaults_limit_number': $options_defaults_limit_number = $result->option_value; break; case 'options_user_counts_hide_bots': $options_user_counts_hide_bots = $result->option_value; break; case'options_user_agents_hide_bots': $options_user_agents_hide_bots = $result->option_value; break; case 'options_referrers_hide_this_blog': $options_referrers_hide_this_blog = $result->option_value; break; case 'options_ip_addresses_hide_bots': $options_ip_addresses_hide_bots = $result->option_value; break; //PAULCOOK: case 'options_ignore_users': $options_ignore_users = $result->option_value; break; } } } ?>

SummaryOptions

Set options for StatTraq

Options Saved."; }elseif($options['default_view'] == 'options') { echo "

Please choose your options to start using StatTraq.

"; } ?>
Default Settings
>
Allow anyone to view StatTraq reports. This option does not allow anyone to delete data from your database or access your WordPress administration page. However, it does allow you to share the reports with other people.

When the StatTraq reporter loads up, show me this view
Default number of results per report
/> /> /> /> /> />
You will still be able to change the number of results after setting this default value, when you first load up the StatTraq reporter you will be shown results with these settings.
User Count Report Settings
/>
Browser/User Agent Report Settings
/>
Show only browsers in this list and not bots or RSS/Atom feed aggregators.
IP Address Report Settings
/>
Show only browsers in this list and not bots or feed spiders.
Referrer Report Settings
/>
Ignore user activity