$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 $pagesPerSection = 10; $options = array(25, "All"); $stylePageOff = "pageOff"; $stylePageOn = "pageOn"; $styleErrors = "paginationErrors"; $styleSelect = "paginationSelect"; $Pagination = new WP_Statistics_Pagination($total, $pagesPerSection, $options, false, $stylePageOff, $stylePageOn, $styleErrors, $styleSelect); $start = $Pagination->getEntryStart(); $end = $Pagination->getEntryEnd(); // 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'); foreach($result as $items) { if( !$WP_Statistics->Search_Engine_QueryString($items->referred) ) continue; if( substr( $items->ip, 0, 6 ) == '#hash#' ) { $ip_string = __('#hash#', 'wp_statistics'); $map_string = ""; } else { $ip_string = "{$items->ip}"; $map_string = "{$dash_icon}"; } 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 "
".$words."
"; echo "
" . date(get_option('date_format'), strtotime($items->last_counter)) . " - {$ip_string}
"; echo "
"; echo "
"; echo $map_string; if($WP_Statistics->get_option('geoip')) { echo "location . '.png')."' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>"; } echo ""; if( array_search( strtolower( $items->agent ), array( "chrome", "firefox", "msie", "opera", "safari" ) ) !== FALSE ){ $agent = "agent.".png' class='log-tools' title='{$items->agent}'/>"; } else { $agent = wp_statistics_icons('dashicons-editor-help', 'unknown'); } echo "{$agent}"; echo "".wp_statistics_icons('dashicons-admin-links', 'link') . " " . htmlentities($items->referred,ENT_QUOTES) . "
"; echo "
"; } } echo "
"; ?>
0 ) { echo $Pagination->display(); ?>

getCurrentPage() . ' ' . __('From', 'wp_statistics') . ' ' . $Pagination->getTotalPages(); ?>