Add modifications for show_table of matches and bet_type for leagues in ACP.

This commit is contained in:
2018-06-03 13:57:34 +02:00
parent 66dceff9f2
commit 90172d076b
6 changed files with 64 additions and 9 deletions

View File

@@ -398,6 +398,7 @@ class matches_module
$match_row['formula_guest'] = utf8_normalize_nfc($this->request->variable('formula_guest', '', true));
$match_row['ko_match'] = $this->request->variable('match_ko', false);
$match_row['group_id'] = ($this->request->variable('group_match', false)) ? utf8_normalize_nfc($this->request->variable('match_group', '', true)) : '';
$match_row['show_table'] = $this->request->variable('show_table', false);
if ($match_row['team_id_home'] <> '')
{
@@ -436,6 +437,15 @@ class matches_module
{
$error[] = $user->lang['NO_MATCH_BEGIN'];
}
if ($match_row['show_table'] == true)
{
$show_table = '0';
}
else
{
$show_table = '1';
}
if (!sizeof($error))
{
@@ -459,7 +469,8 @@ class matches_module
'formula_guest' => strlen($match_row['formula_guest']) ? $match_row['formula_guest'] : '',
'ko_match' => $match_row['ko_match'] ? $match_row['ko_match'] : 0,
'goals_overtime_home' => (is_numeric($match_row['goals_overtime_home'])) ? $match_row['goals_overtime_home'] : '',
'goals_overtime_guest' => (is_numeric($match_row['goals_overtime_guest'])) ? $match_row['goals_overtime_guest'] : '',
'goals_overtime_guest' => (is_numeric($match_row['goals_overtime_guest'])) ? $match_row['goals_overtime_guest'] : '',
'show_table' => (int) $show_table,
);
@@ -628,6 +639,16 @@ class matches_module
$team_home_options .= '<option value="' . $row['group_id'] . ';' . $row['team_id'] .'"' . $selected_home . '>' . $row['team_name'] . '</option>';
}
$db->sql_freeresult($result);
if($match_row['show_table'] == 1)
{
$show_table = false;
}
else
{
$show_table = true;
}
$u_back = $this->u_action . "&amp;s=$season&amp;l=$league&amp;m=$matchday";
$template->assign_vars(array(
@@ -648,7 +669,8 @@ class matches_module
'MATCH_STATUS' => $match_row['status'],
'STATUS_OPTIONS' => $status_options,
'S_GROUP_CHECKED' => (strlen($match_row['group_id']) > 0) ? true : false,
'MATCH_GROUP' => $match_group,
'MATCH_GROUP' => $match_group,
'S_SHOW_TABLE' => $show_table,
'S_KO_CHECKED' => $match_row['ko_match'],
'FORMULA_HOME' => $match_row['formula_home'],
'FORMULA_GUEST' => $match_row['formula_guest'],