Add modifications for show_table of matches and bet_type for leagues in ACP.
This commit is contained in:
@@ -416,7 +416,7 @@ class leagues_module
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
if ($league > 0 AND $league <= 99)
|
||||
if ($league > 0 AND $league <= 101)
|
||||
{
|
||||
if ($league_info)
|
||||
{
|
||||
@@ -494,6 +494,7 @@ class leagues_module
|
||||
$league_info['join_in_season'] = $this->request->variable('league_join_in_season', $league_info['join_in_season'], true);
|
||||
$league_info['bet_in_time'] = $this->request->variable('league_bet_in_time', $league_info['bet_in_time'], true);
|
||||
$league_info['rules_post_id'] = $this->request->variable('league_rules_post_id', $league_info['rules_post_id'], true);
|
||||
$league_info['bet_type'] = $this->request->variable('bet_type', false);
|
||||
|
||||
if (!$league_info['rules_post_id'] and $league_info['join_by_user'] == 1)
|
||||
{
|
||||
@@ -509,6 +510,15 @@ class leagues_module
|
||||
{
|
||||
$error[] = $user->lang['CHECK_HITS02_WINS'];
|
||||
}
|
||||
|
||||
if ($league_info['bet_type'] == true)
|
||||
{
|
||||
$bet_type = '0';
|
||||
}
|
||||
else
|
||||
{
|
||||
$bet_type = '1';
|
||||
}
|
||||
|
||||
$matchday_wins = explode(';',$league_info['win_matchday']);
|
||||
foreach ($matchday_wins as $matchday_win)
|
||||
@@ -555,6 +565,7 @@ class leagues_module
|
||||
'bet_in_time' => $league_info['bet_in_time'],
|
||||
'rules_post_id' => (is_numeric($league_info['rules_post_id'])) ? $league_info['rules_post_id'] : 0,
|
||||
'bet_points' => $league_info['bet_points'],
|
||||
'bet_type' => (int) $bet_type,
|
||||
);
|
||||
|
||||
$data['league'] = $league;
|
||||
@@ -564,8 +575,8 @@ class leagues_module
|
||||
$data['league_matches'] = ($league_info['league_type'] == LEAGUE_KO) ? 0 : $league_info['matches_on_matchday'];
|
||||
|
||||
$var_ary = array(
|
||||
'league' => array('num', false, 1, 99),
|
||||
'league_name' => array('string', false, 2, 20),
|
||||
'league' => array('num', false, 1, 101),
|
||||
'league_name' => array('string', false, 2, 25),
|
||||
'league_short' => array('string', false, 1, 3),
|
||||
'league_matchdays' => array('num', false, 0, 99),
|
||||
'league_matches' => array('num', false, 0, 99),
|
||||
@@ -620,6 +631,15 @@ class leagues_module
|
||||
// check if matches created
|
||||
$existing_matches_on_league = count_existing_matches($season, $league, 0);
|
||||
|
||||
if ($league_info['bet_type'] == true)
|
||||
{
|
||||
$bet_type = '0';
|
||||
}
|
||||
else
|
||||
{
|
||||
$bet_type = '1';
|
||||
}
|
||||
|
||||
$u_back = $this->u_action . "&s=$season";
|
||||
|
||||
$template->assign_vars(array(
|
||||
@@ -661,7 +681,8 @@ class leagues_module
|
||||
'LEAGUE_WIN_MATCHDAYS' => $league_info['win_matchday'],
|
||||
'LEAGUE_WIN_SEASON' => $league_info['win_season'],
|
||||
'POINTS_LAST_YES' => ($league_info['points_last'] == 1) ? ' checked="checked"' : '',
|
||||
'POINTS_LAST_NO' => ($league_info['points_last'] == 0) ? ' checked="checked"' : '',
|
||||
'POINTS_LAST_NO' => ($league_info['points_last'] == 0) ? ' checked="checked"' : '',
|
||||
'S_BET_TYPE' => $bet_type,
|
||||
'U_BACK' => $u_back,
|
||||
'U_ACTION' => "{$this->u_action}&action=$action&s=$season",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user