. // 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; $limit = 200; $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 blogs, links WHERE link_published_date > $from_time and link_status = 'published' and link_lang = '$dblang' and link_blog = blog_id"; } else { $from_where = "FROM blogs, links WHERE link_status = 'published' and link_lang = '$dblang' and link_blog = blog_id"; } $from_where .= " GROUP BY blog_id"; $max = max($db->get_var("select count(*) as count $from_where order by count desc limit 1"), 2); //echo "MAX= $max\n"; $coef = ($max_pts - $min_pts)/($max-1); do_header(_('nube de sitios web')); do_banner_top(); echo '
'."\n"; do_sidebar(); echo '
'; do_tabs("main", _('+ webs'), true); print_period_tabs(); echo '

Los sitios más enlazados

'; echo '
'; $res = $db->get_results("select blog_url, count(*) as count $from_where order by count desc limit $limit"); if ($res) { foreach ($res as $item) { $blogs[$item->blog_url] = $item->count; } ksort($blogs); foreach ($blogs as $url => $count) { $text = preg_replace('/http:\/\//', '', $url); $text = preg_replace('/^www\./', '', $text); $text = preg_replace('/\/$/', '', $text); $size = intval($min_pts + ($count-1)*$coef); echo ''.$text.'   '; } } 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"; } ?>