示例#1
0
$ex_fid_ary = array_keys($auth->acl_getf('!f_read', true));
$ex_fid_ary = (sizeof($ex_fid_ary)) ? $ex_fid_ary : true;
$pagination_url = append_sid("{$phpbb_root_path}toplist.$phpEx",'mode=' . $mode);

if (!$auth->acl_gets('u_viewtoplist'))
{
	if ($user->data['user_id'] != ANONYMOUS)
	{
		trigger_error('RATING_NO_VIEW_TOPLIST');
	}
	login_box('', ((isset($user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)])) ? $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)] : $user->lang['RETING_LOGIN_EXPLAIN']));
}
$notoplist = true;
$start	= request_var('start', 0);
$max_post_thanks = $config['thanks_post_reput_view'] ? get_max_post_thanks() : 1;
$max_topic_thanks = $config['thanks_topic_reput_view'] ? get_max_topic_thanks() : 1;
$max_forum_thanks = $config['thanks_forum_reput_view'] ? get_max_forum_thanks() : 1;
switch ($mode)
{
		case 'post':
		$sql = 'SELECT COUNT(DISTINCT post_id) as total_post_count
			FROM ' . THANKS_TABLE .'
			WHERE ' . $db->sql_in_set('forum_id', $ex_fid_ary, true);
		$result = $db->sql_query($sql);
		$total_match_count = (int) $db->sql_fetchfield('total_post_count');
		$db->sql_freeresult($result);			
		$full_post_rating = true;
		$notoplist = false;
		break;
		
		case 'topic':
示例#2
0
$template->assign_vars(array(
	'PAGINATION'	=> generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '')), $topics_count, $config['topics_per_page'], $start),
	'PAGE_NUMBER'	=> on_page($topics_count, $config['topics_per_page'], $start),
	'TOTAL_TOPICS'	=> ($s_display_active) ? false : (($total_topic_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $total_topic_count)))
);

$topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list);
$topic_tracking_info = $tracking_topics = array();


if (!function_exists('get_max_topic_thanks'))
{
	include($phpbb_root_path . 'includes/functions_thanks.' . $phpEx);
}
get_max_topic_thanks();
if ($topic_list)
{
	get_thanks_topic_number();
}
// Okay, lets dump out the page ...
if (sizeof($topic_list))
{
	$mark_forum_read = true;
	$mark_time_forum = 0;

	// Active topics?
	if ($s_display_active && sizeof($active_forum_ary))
	{
		// Generate topic forum list...
		$topic_forum_list = array();