real_current_date( 'Y-m-d', '-0', $rangestart_utime ); $rangeenddate = $WP_Statistics->real_current_date( 'Y-m-d', '-0', $rangeend_utime ); if ( array_key_exists( 'phrase', $_GET ) ) { $phrase = $_GET['phrase']; $title = $_GET['phrase']; $referr_field = '&phrase=' . $phrase; } else { $phrase = ''; $phrase_field = null; } $get_urls = array(); $total = 0; if ( $phrase ) { $q_string = $wpdb->prepare( "SELECT `words` , count(`words`) as `count` FROM `{$wpdb->prefix}statistics_search` WHERE `words` LIKE %s AND `words` <> '' AND `last_counter` BETWEEN %s AND %s GROUP BY `words` order by `count` DESC", '%' . $phrase . '%', $rangestartdate, $rangeenddate ); $result = $wpdb->get_results( $q_string ); $total = count( $result ); } else { $q_string = $wpdb->prepare( "SELECT `words` , count(`words`) as `count` FROM `{$wpdb->prefix}statistics_search` WHERE `words` <> '' AND `last_counter` BETWEEN %s AND %s GROUP BY `words` order by `count` DESC", $rangestartdate, $rangeenddate ); $result = $wpdb->get_results( $q_string ); $total = count( $result ); } ?>

0 ) { // Initiate 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(); if ( $result ) { $result = array_slice( $result, $start, $end ); $i = $start; foreach ( $result as $item ) { $i ++; echo "
"; echo "
{$i} - {$item->words}
"; echo "
"; echo "
{$item->count}
"; echo "
"; } } } ?>
0 ) { echo $Pagination->display(); ?>

getCurrentPage(), $Pagination->getTotalPages() ); ?>