예제 #1
0
$generalstats['020_averageresultcount'] = number_format($generalstats['020_averageresultcount'], 2, ',', '');
$generalstats['100_datalength'] = a587_stats_bytesize($generalstats['100_datalength']);
$generalstats['110_indexlength'] = a587_stats_bytesize($generalstats['110_indexlength']);
ksort($generalstats);
$odd = true;
$table_general = '<dl id="generalstats-list">';
foreach ($generalstats as $key => $value) {
    $table_general .= '<dt class="' . ($odd ? 'odd' : 'even') . '">' . $I18N->Msg('a587_stats_generalstats_' . $key) . '</dt><dd class="' . ($odd ? 'odd' : 'even') . '">' . $value . '</dd>';
    $odd = !$odd;
}
$table_general .= '</dl>';
echo a587_getStatSection('generalstats', $I18N->Msg('a587_stats_generalstats_title'), $table_general);
// top search terms
$topsearchtermlist = '';
$topsearchtermselect = '<option value="all">' . htmlspecialchars($I18N->Msg('a587_stats_searchterm_timestats_title0_all')) . '</option>';
$topsearchterms = $stats->getTopSearchterms($REX['ADDON']['rexsearch_plugins'][$parent][$mypage]['settings']['maxtopSearchitems']);
foreach ($topsearchterms as $term) {
    $topsearchtermlist .= '<li class="' . ($term['success'] == '1' ? 'rexsearch-stats-success' : 'rexsearch-stats-fail') . '"><strong>' . htmlspecialchars($term['term']) . '</strong> <em>(' . $term['count'] . ')</em></li>';
    $topsearchtermselect .= '<option value="_' . htmlspecialchars($term['term']) . '"' . ($REX['ADDON']['rexsearch_plugins'][$parent][$mypage]['settings']['searchtermselect'] == '_' . $term['term'] ? ' selected="selected"' : '') . '>' . $I18N->Msg('a587_stats_searchterm_timestats_title0_single', htmlspecialchars($term['term'])) . '</option>';
}
if (!empty($topsearchterms)) {
    $topsearchtermlist = '<ol>' . $topsearchtermlist . '</ol>';
} else {
    $topsearchtermlist = $I18N->Msg('a587_stats_topsearchterms_none');
}
$selectMaxTopSearchitems = '<select name="a587_rexsearch_stats[maxtopSearchitems]" id="a587_rexsearch_stats_maxTopSearchitems">';
foreach (array(10, 20, 50, 100, 200, 500, 1000) as $option) {
    $selectMaxTopSearchitems .= '<option value="' . $option . '"' . (intval($REX['ADDON']['rexsearch_plugins'][$parent][$mypage]['settings']['maxtopSearchitems']) == $option ? ' selected="selected"' : '') . '>' . $option . '</option>';
}
$selectMaxTopSearchitems .= '</select>';
echo a587_getStatSection('topsearchterms', $I18N->Msg('a587_stats_topsearchterms_title', $selectMaxTopSearchitems, $stats->getSearchtermCount()), $topsearchtermlist);