if($cat) { $from_where .= " AND link_category=$cat "; } do_header(_('noticias pendientes') . ' | ' . _('menéame')); do_tabs("main","shakeit"); print_shakeit_tabs($tab); do_mnu_categories_horizontal($_REQUEST['category']); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); if ($globals['show_popular_queued']) do_best_queued(); //do_best_comments(); do_categories_cloud('queued', 24); do_vertical_tags('queued'); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">'."\n"; $links = $db->get_col("SELECT SQL_CACHE link_id $from_where $order_by LIMIT $offset,$page_size"); if ($links) { foreach($links as $link_id) { $link = Link::from_db($link_id); if ($link->votes == 0 && $link->author != $current_user->user_id) continue; if ($offset < 1000) {
} if ($cat) { $where .= " AND category={$cat} "; } $pagetitle = _('noticias pendientes'); if ($page > 1) { $pagetitle .= " ({$page})"; } do_header($pagetitle, _('pendientes')); do_tabs("main", "shakeit"); print_shakeit_tabs($tab); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); if ($globals['show_popular_queued']) { do_best_queued(); } do_last_blogs(); //do_best_comments(); //do_categories_cloud('queued', 24); do_vertical_tags('queued'); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; $sql = "SELECT" . Link::SQL . "INNER JOIN (SELECT link FROM sub_statuses {$from} WHERE sub_statuses.id = " . SitesMgr::my_id() . " AND {$where} {$order_by} LIMIT {$offset},{$page_size}) as ids on (ids.link = link_id)"; $links = $db->object_iterator($sql, "Link"); if ($links) { foreach ($links as $link) { if ($link->votes == 0 && $link->author != $current_user->user_id) { continue; }