Changeset 639767
- Timestamp:
- 12/15/2012 06:40:01 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
traffic-counter-widget/trunk/wp-traffic-counter-widget.php
r443646 r639767 5 5 Description: Counts the number of visitors of your blog and shows the traffic information on a widget 6 6 Author: Bogdan Nicolaescu 7 Version: 2. 0.27 Version: 2.1.2 8 8 Author URI: http://www.pixme.org/ 9 9 */ … … 134 134 $sql .= ' AND IS_BOT <> 1'; 135 135 136 return number_format_i18n($wpdb->get_var($ wpdb->prepare($sql)));136 return number_format_i18n($wpdb->get_var($sql)); 137 137 } 138 138 … … 156 156 $ip = $_SERVER['REMOTE_ADDR']; 157 157 158 $user_count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $table_name where ".time()." - Time <= 3 and IP = '".$ip."'"));158 $user_count = $wpdb->get_var("SELECT COUNT(*) FROM $table_name where ".time()." - Time <= 3 and IP = '".$ip."'"); 159 159 160 160 if (!$user_count) { … … 227 227 $table_name = $wpdb->prefix . "wtc_log"; 228 228 229 $user_count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $table_name where ".time()." - Time <= 1000 and IP = '".$ip."'"));229 $user_count = $wpdb->get_var("SELECT COUNT(*) FROM $table_name where ".time()." - Time <= 1000 and IP = '".$ip."'"); 230 230 231 231 return $user_count == 0;
Note: See TracChangeset
for help on using the changeset viewer.