get_country_codes(); //Get Custom Country $country_name = ''; $total_visitor = 0; if ( isset( $_REQUEST['country'] ) ) { if ( array_key_exists( $_REQUEST['country'], $ISOCountryCode ) ) { $country_name = $ISOCountryCode[ $_REQUEST['country'] ]; $total = $wpdb->get_var( "SELECT COUNT(`location`) AS `count` FROM `{$wpdb->prefix}statistics_visitor` WHERE `location` = '" . $_REQUEST['country'] . "'" ); } else { echo ''; } } ?>

real_current_date( 'Y-m-d', '-0', $rangestart_utime ); $rangeenddate = $WP_Statistics->real_current_date( 'Y-m-d', '-0', $rangeend_utime ); $result = $wpdb->get_results( sprintf( "SELECT `location`, COUNT(`location`) AS `count` FROM `{$wpdb->prefix}statistics_visitor` WHERE `last_counter` BETWEEN '%s' AND '%s' GROUP BY `location` ORDER BY `count` DESC", $rangestartdate, $rangeenddate ) ); $i = 0; foreach ( $result as $item ) { $i ++; $item->location = strtoupper( $item->location ); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } ?>
$ilocation . '.png' ) . "' title='{$ISOCountryCode[$item->location]}'/>{$ISOCountryCode[$item->location]} $item->location ) ) . "'>" . number_format_i18n( $item->count ) . "
prefix}statistics_visitor` WHERE `location` = '" . $_REQUEST['country'] . "'"; // Instantiate pagination object with appropriate arguments $total = $wpdb->get_var( $sql ); $items_per_page = 15; $page = isset( $_GET['pagination-page'] ) ? abs( (int) $_GET['pagination-page'] ) : 1; $offset = ( $page * $items_per_page ) - $items_per_page; //Get Query Result $query = str_replace( "SELECT count(*) FROM", "SELECT * FROM", $sql ) . " ORDER BY `{$wpdb->prefix}statistics_visitor`.`ID` DESC LIMIT {$offset}, {$items_per_page}"; $result = $wpdb->get_results( $query ); echo ""; echo ""; if ( $WP_Statistics->get_option( 'geoip' ) ) { echo ""; } if ( $WP_Statistics->get_option( 'geoip_city' ) ) { echo ""; } echo ""; echo ""; echo ""; echo ""; // Load city name $geoip_reader = false; if ( $WP_Statistics->get_option( 'geoip_city' ) ) { $geoip_reader = $WP_Statistics::geoip_loader( 'city' ); } foreach ( $result as $items ) { echo ""; echo ""; $city = ''; if ( $WP_Statistics->get_option( 'geoip_city' ) ) { if ( $geoip_reader != false ) { try { $reader = $geoip_reader->city( $items->ip ); $city = $reader->city->name; } catch ( Exception $e ) { $city = __( 'Unknown', 'wp-statistics' ); } if ( ! $city ) { $city = __( 'Unknown', 'wp-statistics' ); } } } if ( $WP_Statistics->get_option( 'geoip' ) ) { echo ""; } if ( $WP_Statistics->get_option( 'geoip_city' ) ) { echo ""; } echo ""; echo ""; echo ""; echo ""; } echo "
" . __( 'Browser', 'wp-statistics' ) . "" . __( 'Country', 'wp-statistics' ) . "" . __( 'City', 'wp-statistics' ) . "" . __( 'Date', 'wp-statistics' ) . "" . __( 'IP', 'wp-statistics' ) . "" . __( 'Referrer', 'wp-statistics' ) . "
"; if ( array_search( strtolower( $items->agent ), wp_statistics_get_browser_list( 'key' ) ) !== false ) { $agent = "agent . ".png' class='log-tools' title='{$items->agent}'/>"; } else { $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' ); } echo " 'last-all-visitor', 'agent' => $items->agent ) ) . "'>{$agent}"; echo ""; echo "location . '.png' ) . "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>"; echo ""; echo $city; echo ""; echo date_i18n( get_option( 'date_format' ), strtotime( $items->last_counter ) ); echo ""; if ( substr( $items->ip, 0, 6 ) == '#hash#' ) { $ip_string = __( '#hash#', 'wp-statistics' ); } else { $ip_string = " 'last-all-visitor', 'ip' => $items->ip ) ) . "'>{$items->ip}"; } echo $ip_string; echo ""; echo $WP_Statistics->get_referrer_link( $items->referred ); echo "
"; } ?>
$items_per_page, 'total' => $total, 'current' => $page, ) ); } ?>