<commit_before><?
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// <NAME> <gallir at uib dot es>.
// 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');

//header('Cache-Control: max-age=0, must-revalidate');
header('Cache-Control: no-cache');

$offset=(get_current_page()-1)*$page_size;
$globals['ads'] = true;


do_header(_('noticias pendientes'));
do_banner_top();
echo '<div id="'.$globals['css_container'].'">'."\n";
echo '<div id="contents">'."\n";
do_tabs("main","shakeit");
$order_by = " ORDER BY link_date DESC ";


$view = clean_input_string($_REQUEST['view']);
$cat = check_integer('category');

// Select friends if it's the default for the user and there is no extra arguments
if ($current_user->user_id > 0 && ($current_user->user_comment_pref & 2) > 0) {
	$globals['link_to_all'] = '?view=all';
	if (empty($view)) 
		$view = 'friends';
}

switch ($view) {
	case 'friends':
		// Show last in four days
		$from_time = '"'.date("Y-m-d H:00:00", time() - 86400*4).'"';
		$from_where = "FROM links, friends WHERE link_date >  $from_time and link_status='queued' and friend_type='manual' and friend_from = $current_user->user_id and friend_to=link_author";
		$order_by = " ORDER BY link_date DESC ";	
		print_shakeit_tabs(2);
		$globals['tag_status'] = 'queued';
		break;
	case 'popular':
		// Show  the hihgher karma first
		$from_time = '"'.date("Y-m-d H:00:00", time() - 86400*2).'"';
		$from_where = "FROM links WHERE link_date > $from_time and link_status='queued' and link_karma > 10";
		$order_by = " ORDER BY link_karma DESC ";	
		print_shakeit_tabs(3);
		$globals['tag_status'] = 'queued';
		break;
	case 'discarded':
		// Show only discarded in four days
		$from_time = '"'.date("Y-m-d H:00:00", time() - 86400*4).'"';
		$from_where = "FROM links WHERE link_date > $from_time and link_status='discard' and (link_votes >0 || link_author = $current_user->user_id)";
		print_shakeit_tabs(5);
		$globals['tag_status'] = 'discard';
		break;
	case 'all':
	default:
		// Show last in seven days
		$from_time = '"'.date("Y-m-d H:00:00", time() - 86400*7).'"';
		$from_where = "FROM links WHERE link_date > $from_time and link_status='queued'";
		print_shakeit_tabs(1);
		$globals['tag_status'] = 'queued';
		break;
}

// fora en posar dropdown echo '</div>';  // Left margin
// end of tabs

if($cat) {
	$from_where .= " AND link_category=$cat ";
}<commit_msg>Muestra las pendientes y amigos sólo en el período habilitadas para el voto.<commit_after><?
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// <NAME> <gallir at uib dot es>.
// 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');

//header('Cache-Control: max-age=0, must-revalidate');
header('Cache-Control: no-cache');

$offset=(get_current_page()-1)*$page_size;
$globals['ads'] = true;


do_header(_('noticias pendientes'));
do_banner_top();
echo '<div id="'.$globals['css_container'].'">'."\n";
echo '<div id="contents">'."\n";
do_tabs("main","shakeit");
$order_by = " ORDER BY link_date DESC ";


$view = clean_input_string($_REQUEST['view']);
$cat = check_integer('category');

// Select friends if it's the default for the user and there is no extra arguments
if ($current_user->user_id > 0 && ($current_user->user_comment_pref & 2) > 0) {
	$globals['link_to_all'] = '?view=all';
	if (empty($view)) 
		$view = 'friends';
}

switch ($view) {
	case 'friends':
		$from_time = '"'.date("Y-m-d H:00:00", time() - $globals['time_enabled_votes']).'"';
		$from_where = "FROM links, friends WHERE link_date >  $from_time and link_status='queued' and friend_type='manual' and friend_from = $current_user->user_id and friend_to=link_author";
		$order_by = " ORDER BY link_date DESC ";	
		print_shakeit_tabs(2);
		$globals['tag_status'] = 'queued';
		break;
	case 'popular':
		// Show  the hihgher karma first
		$from_time = '"'.date("Y-m-d H:00:00", time() - 86400*2).'"';
		$from_where = "FROM links WHERE link_date > $from_time and link_status='queued' and link_karma > 10";
		$order_by = " ORDER BY link_karma DESC ";	
		print_shakeit_tabs(3);
		$globals['tag_status'] = 'queued';
		break;
	case 'discarded':
		// Show only discarded in four days
		$from_time = '"'.date("Y-m-d H:00:00", time() - 86400*4).'"';
		$from_where = "FROM links WHERE link_date > $from_time and link_status='discard' and (link_votes >0 || link_author = $current_user->user_id)";
		print_shakeit_tabs(5);
		$globals['tag_status'] = 'discard';
		break;
	case 'all':
	default:
		// Show last in seven days
		$from_time = '"'.date("Y-m-d H:00:00", time() - $globals['time_enabled_votes']).'"';
		$from_where = "FROM links WHERE link_date > $from_time and link_status='queued'";
		print_shakeit_tabs(1);
		$globals['tag_status'] = 'queued';
		break;
}

// fora en posar dropdown echo '</div>';  // Left margin
// end of tabs

if($cat) {
	$from_where .= " AND link_category=$cat ";
}
{'fraction_non_alphanumeric': 0.17666483214089157, 'fraction_numerical': 0.018712162905888827, 'mean_word_length': 4.679166666666666, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7227790', 'n_tokens_mistral': 2128, 'n_tokens_neox': 1964, 'n_words': 509}