. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include('config.php'); include(mnminclude.'html1.php'); include(mnminclude.'link.php'); $globals['ads'] = true; $min_pts = 10; $max_pts = 44; $words_limit = 100; $line_height = $max_pts * 0.75; $range_names = array(_('24 horas'), _('48 horas'), _('una semana'), _('un mes'), _('un año'), _('todas')); $range_values = array(1, 2, 7, 30, 365, 0); if(($from = check_integer('range')) >= 0 && $from < count($range_values) && $range_values[$from] > 0 ) { // we use this to allow sql caching $from_time = '"'.date("Y-m-d H:00:00", time() - 86400 * $range_values[$from]).'"'; $from_where = "FROM tags, links WHERE tag_lang='$dblang' and tag_date > $from_time and link_id = tag_link_id and link_status != 'discard'"; } else { $from_where = "FROM tags, links WHERE tag_lang='$dblang' and link_id = tag_link_id and link_status != 'discard'"; } $from_where .= " GROUP BY tag_words"; $max = max($db->get_var("select count(*) as words $from_where order by words desc limit 1"), 2); //echo "MAX= $max\n"; $coef = ($max_pts - $min_pts)/($max-1); do_header(_('nube de etiquetas')); do_banner_top(); echo '
'."\n"; do_sidebar(); echo '
'; do_tabs('main', _('etiquetas'), true); print_period_tabs(); echo '

+ '.$words_limit.'

'; echo '
'; $res = $db->get_results("select tag_words, count(*) as count $from_where order by count desc limit $words_limit"); if ($res) { foreach ($res as $item) { $words[$item->tag_words] = $item->count; } ksort($words); foreach ($words as $word => $count) { $size = round($min_pts + ($count-1)*$coef, 1); echo ''.$word.'   '; } } echo '
'; echo '
'; do_footer(); function print_period_tabs() { global $globals, $current_user, $range_values, $range_names; if(!($current_range = check_integer('range')) || $current_range < 1 || $current_range >= count($range_values)) $current_range = 0; echo ''."\n"; } ?>