$se ) { $search_result[ $key ] = wp_statistics_searchword( $key, 'total' ); } if ( array_key_exists( 'referred', $_GET ) ) { if ( $_GET['referred'] != '' ) { $referred = $_GET['referred']; } else { $referred = 'All'; } } else { $referred = 'All'; } $total = $search_result[ $referred ]; ?>

0 ) { // Instantiate pagination object with appropriate arguments $items_per_page = 10; $page = isset( $_GET['pagination-page'] ) ? abs( (int) $_GET['pagination-page'] ) : 1; $offset = ( $page * $items_per_page ) - $items_per_page; $start = $offset; $end = $offset + $items_per_page; // Retrieve MySQL data if ( $referred && $referred != '' ) { $search_query = wp_statistics_searchword_query( $referred ); } else { $search_query = wp_statistics_searchword_query( 'all' ); } // Determine if we're using the old or new method of storing search engine info and build the appropriate table name. $tablename = $wpdb->prefix . 'statistics_'; if ( $WP_Statistics->get_option( 'search_converted' ) ) { $tabletwo = $tablename . 'visitor'; $tablename .= 'search'; $result = $wpdb->get_results( "SELECT * FROM `{$tablename}` INNER JOIN `{$tabletwo}` on {$tablename}.`visitor` = {$tabletwo}.`ID` WHERE {$search_query} ORDER BY `{$tablename}`.`ID` DESC LIMIT {$start}, {$end}" ); } else { $tablename .= 'visitor'; $result = $wpdb->get_results( "SELECT * FROM `{$tablename}` WHERE {$search_query} ORDER BY `{$tablename}`.`ID` DESC LIMIT {$start}, {$end}" ); } $ISOCountryCode = $WP_Statistics->get_country_codes(); $dash_icon = wp_statistics_icons( 'dashicons-location-alt', 'map' ); echo ""; 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 ) { if ( ! $WP_Statistics->Search_Engine_QueryString( $items->referred ) ) { continue; } if ( $WP_Statistics->get_option( 'search_converted' ) ) { $this_search_engine = $WP_Statistics->Search_Engine_Info_By_Engine( $items->engine ); $words = $items->words; } else { $this_search_engine = $WP_Statistics->Search_Engine_Info( $items->referred ); $words = $WP_Statistics->Search_Engine_QueryString( $items->referred ); } echo ""; 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 "
" . __( 'Word', 'wp-statistics' ) . "" . __( 'Browser', 'wp-statistics' ) . "" . __( 'Country', 'wp-statistics' ) . "" . __( 'City', 'wp-statistics' ) . "" . __( 'Date', 'wp-statistics' ) . "" . __( 'IP', 'wp-statistics' ) . "" . __( 'Referrer', 'wp-statistics' ) . "
"; echo $words; echo ""; 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( 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 "
"; } ?>
0 ) { wp_statistics_paginate_links( array( 'item_per_page' => $items_per_page, 'total' => $total, 'current' => $page, ) ); } ?>