Ejemplo n.º 1
0
    $jRound->load($round_id);
    if ($jRound->scored != 1) {
        $prev_id = $jRound->getPrev();
        if ($prev_id !== false) {
            $jRound->load($prev_id);
        }
    }
}
$render->assign('jRound', $jRound);
$jTipsCurrentUserParams = array('season_id' => $jSeason->id, 'status' => 1);
$total = $jTipsCurrentUser->getCount($jTipsCurrentUserParams);
//Better pagination
$start = jTipsGetParam($_REQUEST, 'start', jTipsGetParam($_REQUEST, 'limitstart', 0));
$limit = jTipsGetParam($_REQUEST, 'limit', $jTips['NumMax']);
//BUG 238 - Busted page calculations filter down to select queries
$page = $start > 0 ? $start / $limit : 0;
$pageNav = new mosPageNav($total, $start, $limit);
$render->assign('pageNav', $pageNav);
if ($limit == 0) {
    $limit = false;
}
$direction = jTipsGetParam($_REQUEST, 'filter_order_Dir', 'asc');
$jHistory = new jHistory($database);
$jTipsUsers = $jHistory->getLadder($limit, $jRound->id, $page, jTipsGetParam($_REQUEST, 'filter_order', 'rank'), $direction, $jRound->id);
$render->assign('jTipsUsers', $jTipsUsers);
//build season dropdown
$jSeasonParams = array('end_time' => array('type' => 'query', 'query' => "> '" . gmdate('Y-m-d H:i:s') . "'"));
$jSeasons = forceArray($jSeason->loadByParams($jSeasonParams));
$render->assign('jSeasons', $jSeasons);
$render->display();
//return jtips_HTML::jtips_ladder($jTipsUsers, $jSeason, $jRound, $pageNav);
Ejemplo n.º 2
0
    }
}
$jRound = new jRound($database);
$round_id = $jSeason->getCurrentRound();
$jRound->load($round_id);
if ($jRound->scored == 0) {
    $prev_round_id = $jSeason->getLastRound();
    $prev_round = new jRound($database);
    $prev_round->load($prev_round_id);
    $jRound =& $prev_round;
    $load_round = $prev_round_id;
} else {
    $load_round = $jRound->id;
}
$jHistory = new jHistory($database);
$jTipsUsers = $jHistory->getLadder($jTips['NumDefault'], $load_round);
?>
<table width='100%' cellspacing="0">
	<thead>
		<tr class='sectiontableheader jtableheader'>
		<th>#</th>
		<th><?php 
echo $jLang['_COM_TIP_LADDER_USER'];
?>
</th>
		<th><?php 
echo $jLang['_COM_TIP_LADDER_LAST'];
?>
</th>
		<th><?php 
echo $jLang['_COM_TIP_LADDER_SCORE'];
Ejemplo n.º 3
0
	<?php 
    $round_id = $jSeason->getLastRound();
    $jRound = new jRound($database);
    $jRound->load($round_id);
    $jHistory = new jHistory($database);
    $orderField = ($user_field != 'moved' and $user_field != '-1') ? $user_field : 'pointst';
    if ($orderField == 'points' or $orderField == 'comment') {
        $order = 'desc';
    } else {
        if ($orderField == 'rank' or $orderField == 'pointst') {
            $order = 'asc';
        } else {
            $order = 'default';
        }
    }
    $userLadder = $jHistory->getLadder($numtoshow, $round_id, 0, $orderField, $order);
    $i = 1;
    foreach ($userLadder as $jUser) {
        ?>
		<tr class="sectiontableentry<?php 
        echo $i % 2 + 1;
        ?>
">
			<td class="sectiontableentry<?php 
        echo $i % 2 + 1;
        ?>
" align="right"><?php 
        echo $i;
        ?>
.</td>
			<td class="sectiontableentry<?php