Version 0.9.9

- several bugfixes
- Code cleaning
This commit is contained in:
football
2021-04-04 22:15:15 +02:00
parent 7d8b92f1df
commit a2ea3364a4
154 changed files with 16463 additions and 16463 deletions

3
.gitignore vendored
View File

@@ -63,3 +63,6 @@ Icon
/images/arrow_down.gif
/images/arrow_up.gif
/migrations/v099_beta1.php
/.buildpath
/.project
/.settings/

View File

@@ -579,7 +579,7 @@ class all_bets_module
$legend = delivery($season, $league, $matchday);
$template->assign_vars(array(
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_SEASON' => $season,
'S_LEAGUE' => $league,
'S_MATCHDAY' => $matchday,
@@ -596,4 +596,3 @@ class all_bets_module
);
}
}
?>

View File

@@ -555,7 +555,7 @@ class bank_module
'POINTS' => $this->config['points_name'],
'TARGET' => $target,
'ACTUAL' => $actual,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bank', 's' => $season, 'l' => $league)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bank', 's' => $season, 'l' => $league)),
'U_ACTION' => $this->u_action . "&s=$season&l=$league",
'U_BACK' => $this->u_action. "&s=$season&l=$league",
)
@@ -593,7 +593,7 @@ class bank_module
{
$template->assign_block_vars('member', array(
'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&action=edit&u={$row['user_id']}"),
'U_USER_BANK' => $helper->route('football_main_controller',array('side' => 'bank', 's' => $season, 'l' => $league, 'u' => $row['user_id'])),
'U_USER_BANK' => $helper->route('football_football_controller',array('side' => 'bank', 's' => $season, 'l' => $league, 'u' => $row['user_id'])),
'USERNAME' => $row['username'],
'POINTS' => $functions_points->number_format_points($row['user_points']),
'TARGET' => $functions_points->number_format_points($row['target']),
@@ -619,7 +619,7 @@ class bank_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bank', 's' => $season)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bank', 's' => $season)),
'U_DLOAD_BANK_OPEN' => $helper->route('football_football_download',array('downside' => 'dload_bank_open', 's' => $season)),
'S_SEASON' => $season,
'S_LIST_DEPOSITED' => ($this->config['football_ult_points'] == UP_POINTS) ? false : true,
@@ -645,7 +645,7 @@ class bank_module
LEFT JOIN ' . FOOTB_POINTS . " AS p ON (p.season = $season AND p.league = l.league)
WHERE l.season = $season
GROUP BY l.league
ORDER BY league ASC";
ORDER BY l.league ASC";
$result = $db->sql_query($sql);
$rows_leagues = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
@@ -670,5 +670,3 @@ class bank_module
}
}
}
?>

View File

@@ -583,7 +583,7 @@ class bets_module
)
);
}
$db->sql_freeresult($resultopen);
$db->sql_freeresult($result);
// Calculate extra bets of matchday
// Start select team
@@ -730,7 +730,7 @@ class bets_module
$legend = delivery($season, $league, $matchday);
$template->assign_vars(array(
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LEGEND' => $legend,
'S_SUCCESS' => (sizeof($success)) ? true : false,
'SUCCESS_MSG' => (sizeof($success)) ? implode('<br />', $success) : '',
@@ -750,4 +750,3 @@ class bets_module
);
}
}
?>

View File

@@ -415,7 +415,7 @@ class extra_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_SEASON' => $season,
'S_LEAGUE' => $league,
'S_SEASON_OPTIONS' => $season_options,
@@ -456,4 +456,3 @@ class extra_module
}
}
}
?>

View File

@@ -70,7 +70,7 @@ class football_module
$template->assign_vars(array(
'S_IN_FOOTBALL_USERGUIDE' => true,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet')),
'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'],
'ICON_BACK_TO_TOP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" style="vertical-align: middle;" alt="' . $user->lang['BACK_TO_TOP'] . '" title="' . $user->lang['BACK_TO_TOP'] . '" />',
'S_VERSION_NO' => $this->config['football_version'],
@@ -242,7 +242,7 @@ class football_module
$this->page_title = $display_vars['title'];
$template->assign_vars(array(
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet')),
'L_TITLE' => $user->lang[$display_vars['title']],
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
'S_ERROR' => (sizeof($error)) ? true : false,
@@ -434,5 +434,3 @@ class football_module
}
}
?>

View File

@@ -230,7 +230,7 @@ class ko_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'S_SUCCESS' => (sizeof($success)) ? true : false,
@@ -252,4 +252,3 @@ class ko_module
);
}
}
?>

View File

@@ -672,7 +672,7 @@ class leagues_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season)),
'S_SEASON' => $season,
'S_SEASON_OPTIONS' => $season_options,
'S_LEAGUE_ADD' => true,
@@ -690,8 +690,8 @@ class leagues_module
FROM ' . FOOTB_LEAGUES . ' AS l
LEFT JOIN ' . FOOTB_BETS . " AS b ON (b.season = l.season AND b.league = l.league)
WHERE l.season = $season
GROUP BY league
ORDER BY league ASC";
GROUP BY l.league
ORDER BY l.league ASC";
$result = $db->sql_query($sql);
$rows_leagues = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
@@ -730,4 +730,3 @@ class leagues_module
}
}
}
?>

View File

@@ -216,7 +216,7 @@ class matchdays_module
$show_delivery_select = false;
$show_delivery = true;
$lang_dates = $user->lang['datetime'];
$sql = "(SELECT md.matchday,
$sql = "(SELECT md.matchday AS matchday,
1 AS number,
md.delivery_date,
CASE DATE_FORMAT(md.delivery_date,'%w')
@@ -251,7 +251,7 @@ class matchdays_module
AND md.league = agg.league
AND md.matchday = agg.matchday)
UNION
(SELECT md2.matchday,
(SELECT md2.matchday AS matchday,
2 AS number,
md2.delivery_date_2 AS delivery_date,
CASE DATE_FORMAT(md2.delivery_date_2,'%w')
@@ -286,7 +286,7 @@ class matchdays_module
AND md2.league = agg2.league
AND md2.matchday = agg2.matchday)
UNION
(SELECT md3.matchday,
(SELECT md3.matchday AS matchday,
3 AS number,
md3.delivery_date_3 AS delivery_date,
CASE DATE_FORMAT(md3.delivery_date_3,'%w')
@@ -1090,7 +1090,7 @@ class matchdays_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_SEASON' => $season,
'S_LEAGUE' => $league,
'S_SEASON_OPTIONS' => $season_options,
@@ -1131,4 +1131,3 @@ class matchdays_module
}
}
}
?>

View File

@@ -717,7 +717,7 @@ class matches_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_SEASON' => $season,
'S_LEAGUE' => $league,
'S_KO_LEAGUE' => $ko_league,
@@ -761,5 +761,3 @@ class matches_module
}
}
}
?>

View File

@@ -793,7 +793,7 @@ class results_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LEGEND' => $legend,
'S_SUCCESS' => (sizeof($success)) ? true : false,
'SUCCESS_MSG' => (sizeof($success)) ? implode('<br />', $success) : '',
@@ -815,5 +815,3 @@ class results_module
);
}
}
?>

View File

@@ -335,6 +335,7 @@ class seasons_module
'SEASON_SHORT' => $season_row['season_name_short'],
'U_BACK' => $u_back,
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;s=$season",
'S_VERSION_NO' => $this->config['football_version'],
)
);
return;
@@ -343,7 +344,7 @@ class seasons_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet')),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet')),
'S_SEASON_ADD' => true,
)
);
@@ -356,8 +357,8 @@ class seasons_module
COUNT(l.league) AS leagues
FROM ' . FOOTB_SEASONS . ' s
LEFT JOIN ' . FOOTB_LEAGUES . ' l on l.season = s.season
GROUP BY season
ORDER BY season DESC';
GROUP BY s.season
ORDER BY s.season DESC';
$result = $db->sql_query($sql);
$rows_seasons = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
@@ -390,5 +391,3 @@ class seasons_module
}
}
}
?>

View File

@@ -589,7 +589,7 @@ class teams_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_SEASON' => $season,
'S_LEAGUE' => $league,
'S_KO_LEAGUE' => $ko_league,
@@ -597,6 +597,7 @@ class teams_module
'S_LEAGUE_OPTIONS' => $league_options,
'S_TEAM_OPTIONS' => $team_options,
'S_TEAM_ADD' => true,
'S_VERSION_NO' => $this->config['football_version'],
)
);
@@ -609,7 +610,7 @@ class teams_module
WHERE t.season = $season
AND t.league = $league
GROUP BY t.team_id
ORDER BY team_id ASC";
ORDER BY t.team_id ASC";
$result = $db->sql_query($sql);
$rows_teams = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
@@ -654,4 +655,3 @@ class teams_module
);
}
}
?>

View File

@@ -131,7 +131,7 @@ class update_module
$insert_season = $this->request->variable('insert_season', false);
$insert_league = $this->request->variable('insert_league', false);
$list = $this->request->variable('list', false);
$this->xml_ary = unserialize(urldecode($this->request->variable('xml_ary', '')));
$this->xml_ary = json_decode(urldecode($this->request->variable('xml_ary', '')),true);
$display_team_mapping = false;
// Clear some vars
$error = array();
@@ -730,7 +730,7 @@ class update_module
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'U_CHOOSE_ACTION' => $this->u_action . "&amp;action=choose",
'U_FOOTBALL' => $helper->route('football_main_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'U_FOOTBALL' => $helper->route('football_football_controller',array('side' => 'bet', 's' => $season, 'l' => $league)),
'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'S_SUCCESS' => (sizeof($success)) ? true : false,
@@ -750,7 +750,7 @@ class update_module
'DO_MATCHES' => ($insert_league) ? sprintf($user->lang['INSERT_MATCHES']) : sprintf($user->lang['UPDATE_MATCHES']),
'XML_SEASON_URL' => $xml_season_url,
'XML_LEAGUE_URL' => $xml_league_url,
'XML_ARY' => (sizeof($this->xml_ary)) ? urlencode(serialize($this->xml_ary)) : '',
'XML_ARY' => (is_array($this->xml_ary) && sizeof($this->xml_ary)) ? urlencode(json_encode($this->xml_ary)) : '',
'S_XSEASON_OPTIONS' => $xseason_options,
'S_XLEAGUE_OPTIONS' => $xleague_options,
'S_XSEASON' => $xseason,
@@ -851,7 +851,7 @@ class update_module
{
$this->xml_ary['footb_teams'][$key]['team_id'] = $team_id_map_ary[$xml_team['team_id']];
}
usort($this->xml_ary['footb_teams'], 'sort_teams');
usort($this->xml_ary['footb_teams'], array($this, 'sort_teams'));
foreach ($this->xml_ary['footb_matches'] AS $key => $xml_team)
{
@@ -1144,7 +1144,7 @@ class update_module
{
if (sizeof($table_row))
{
$tpl .= '<input type="hidden" name="row_' . $id . '" value="' . urlencode(serialize($diff)) . '" />';
$tpl .= '<input type="hidden" name="row_' . $id . '" value="' . urlencode(json_encode($diff)) . '" />';
// match status update and database
if (substr($id, 0, 13) == 'FOOTB_MATCHES')
{
@@ -1160,7 +1160,7 @@ class update_module
else
{
// Insert team
$tpl .= '<input type="hidden" name="' . $id . '[]" value="' . urlencode(serialize($diff)) . '" />';
$tpl .= '<input type="hidden" name="' . $id . '[]" value="' . urlencode(json_encode($diff)) . '" />';
}
}
@@ -1171,7 +1171,7 @@ class update_module
{
if (sizeof($table_row))
{
$color_open = '<span title= "' . sprintf($user->lang['CURRENT_VALUE']) . ': ' . htmlspecialchars($table_row[$key], ENT_COMPAT, 'UTF-8') . '" style="color: red;">* ';
$color_open = '<span title= "' . sprintf($user->lang['CURRENT_VALUE']) . ': ' . utf8_htmlspecialchars($table_row[$key]) . '" style="color: red;">* ';
$color_close = '</span>';
}
else
@@ -1188,8 +1188,8 @@ class update_module
if (sizeof($order))
{
$value = (substr($key, 0, 7) == 'team_id') ? $value . ' ' . $this->team_ary[$value] : $value;
$tpl_ary[$order[$key]] = ($order[$key] % 2) ? $color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close . '&nbsp;</td>' :
'<td>' . $color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close . '<br />';
$tpl_ary[$order[$key]] = ($order[$key] % 2) ? $color_open . utf8_htmlspecialchars($value) . $color_close . '&nbsp;</td>' :
'<td>' . $color_open . utf8_htmlspecialchars($value) . $color_close . '<br />';
}
else
{
@@ -1198,14 +1198,14 @@ class update_module
// Write table fields
if (sizeof($table_row))
{
$tpl .= '<td title= "' . htmlspecialchars($table_row[$key], ENT_COMPAT, 'UTF-8') . '">' .
$color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close .
$tpl .= '<td title= "' . utf8_htmlspecialchars($table_row[$key]) . '">' .
$color_open . utf8_htmlspecialchars($value) . $color_close .
'</td>';
}
else
{
$tpl .= '<td title= "' . sprintf($user->lang['NEW_TEAM']) . '">' .
$color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close .
$color_open . utf8_htmlspecialchars($value) . $color_close .
'</td>';
}
}
@@ -1245,15 +1245,15 @@ class update_module
if (sizeof($order))
{
$value = (substr($key, 0, 7) == 'team_id') ? $value . ' ' . $this->team_ary[$value] : $value;
$tpl_ary[$order[$key]] = ($order[$key] % 2) ? htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '&nbsp;</td>' :
'<td>' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '<br />';
$tpl_ary[$order[$key]] = ($order[$key] % 2) ? utf8_htmlspecialchars($value) . '&nbsp;</td>' :
'<td>' . utf8_htmlspecialchars($value) . '<br />';
}
else
{
if ($key <> 'season' and $key <> 'league')
{
// Write XML-table fields
$tpl .= '<td>' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '</td>';
$tpl .= '<td>' . utf8_htmlspecialchars($value) . '</td>';
}
}
}
@@ -1322,7 +1322,7 @@ class update_module
if ($this->request->variable($table . '_' . $row['index_field'], false))
{
$diff_ary = unserialize(urldecode($this->request->variable('row_' . $table . '_' . $row['index_field'], '')));
$diff_ary = json_decode(urldecode($this->request->variable('row_' . $table . '_' . $row['index_field'], '')),true);
$sql_ary = array_intersect_ukey($diff_ary, $selected_fields, 'self::key_compare_func');
if ($table == 'FOOTB_MATCHES')
{
@@ -1407,7 +1407,7 @@ class update_module
}
foreach ($insert_ary AS $insert)
{
$sql_ary = unserialize(urldecode($insert));
$sql_ary = json_decode(urldecode($insert),true);
$sql = 'INSERT INTO ' . $table_name . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
if ($db->sql_affectedrows())
@@ -1461,4 +1461,3 @@ class update_module
return $selected_fields;
}
}
?>

View File

@@ -94,7 +94,7 @@ $sql_limit = $config['football_users_per_page'] * $count_matches;
// If we've got a hightlight set pass it on to pagination.
// handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday));
$base_url = $this->helper->route('football_football_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday));
$pagination = $phpbb_container->get('pagination');
if ($user->data['football_mobile'])
{
@@ -492,4 +492,3 @@ $template->assign_vars(array(
'TOTAL_USERS' => ($total_users == 1) ? $user->lang['VIEW_BET_USER'] : sprintf($user->lang['VIEW_BET_USERS'], $total_users),
)
);
?>

View File

@@ -508,8 +508,8 @@ $template->assign_vars(array(
'S_SIDENAME' => $sidename,
'BET_EXPLAIN' => $bet_explain,
'JOIN_LEAGUE' => ($link_rules == '') ? '' : sprintf($user->lang['JOIN_LEAGUE'], $link_rules),
'S_FORM_ACTION_BET' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'bet')),
'S_FORM_ACTION_JOIN' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'join')),
'S_FORM_ACTION_BET' => $this->helper->route('football_football_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'bet')),
'S_FORM_ACTION_JOIN' => $this->helper->route('football_football_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'join')),
'S_USER_IS_MEMBER' => $user_is_member,
'S_DATA_BET' => $data_bet,
'S_DATA_GROUP' => $data_group,

View File

@@ -43,8 +43,8 @@ $sql = "SELECT
LEFT JOIN " . FOOTB_EXTRA . " AS e ON (e.season = m.season AND e.league = m.league AND e.matchday = m.matchday AND e.extra_status = 0)
LEFT JOIN " . FOOTB_EXTRA_BETS . " AS eb ON (eb.season = m.season AND eb.league = m.league AND eb.extra_no = e.extra_no AND eb.user_id = $user_id)
WHERE m.status <= 0
GROUP BY delivery, m.league
ORDER BY delivery, m.league";
GROUP BY m.season, m.league, m.matchday, l.league_name_short, matchday_name, delivery
ORDER BY delivery, m.season, m.league";
$result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result) AND $index < 11)
@@ -55,7 +55,7 @@ while($row = $db->sql_fetchrow($result) AND $index < 11)
$template->assign_block_vars('delivery', array(
'ROW_CLASS' => $row_class,
'U_BET_LINK' => $this->helper->route('football_main_controller', array('side' => 'bet', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])),
'U_BET_LINK' => $this->helper->route('football_football_controller', array('side' => 'bet', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])),
'LEAGUE_SHORT' => $row['league_name_short'],
'MATCHDAY_NAME' => $row['matchday_name'],
'COLOR' => ($row['bets_count'] == $row['matches_count'] && $row['extra_bets_count'] == $row['extra_count']) ? 'green' : 'red',

View File

@@ -20,7 +20,7 @@ $action='';
if (!$season OR !$league)
{
redirect($this->helper->route('football_main_controller', array('side' => 'bank', 's' => $season, 'l' => $league)));
redirect($this->helper->route('football_football_controller', array('side' => 'bank', 's' => $season, 'l' => $league)));
}
else
{

View File

@@ -19,7 +19,7 @@ $action='';
if (!$season)
{
redirect($this->helper->route('football_main_controller', array('side' => 'bank', 's' => $season)));
redirect($this->helper->route('football_football_controller', array('side' => 'bank', 's' => $season)));
}
else
{

View File

@@ -17,7 +17,7 @@ $action='';
if (!$season OR !$league)
{
redirect($this->helper->route('football_main_controller', array('side' => 'bet')));
redirect($this->helper->route('football_football_controller', array('side' => 'bet')));
}
else
{
@@ -45,8 +45,6 @@ else
}
else
{
redirect($this->helper->route('football_main_controller', array('side' => 'bet')));
redirect($this->helper->route('football_football_controller', array('side' => 'bet')));
}
}
?>

View File

@@ -114,7 +114,7 @@ while($row = $db->sql_fetchrow($result))
$template->assign_block_vars('last_results', array(
'ROW_CLASS' => $row_class,
'U_RESULTS_LINK'=> $this->helper->route('football_main_controller', array('side' => 'results', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])),
'U_RESULTS_LINK'=> $this->helper->route('football_football_controller', array('side' => 'results', 's' => $row['season'], 'l' => $row['league'], 'm' => $row['matchday'])),
'MATCH_DATE' => $row['match_date'],
'MATCH_TIME' => $row['match_time'],
'LEAGUE_NAME' => $row['league_name'],

View File

@@ -113,7 +113,7 @@ $sql_start = $start * $count_matches;
$sql_limit = $config['football_users_per_page'] * $count_matches;
// handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday, 'u' => "$user_sel"));
$base_url = $this->helper->route('football_football_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday, 'u' => "$user_sel"));
$pagination = $phpbb_container->get('pagination');
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start);

View File

@@ -13,6 +13,8 @@ if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
}
$data_odds = false;
$userid = $user->data['user_id'];
$user_is_member = user_is_member($userid, $season, $league);
$matchnumber = 0;
$lang_dates = $user->lang['datetime'];
@@ -37,6 +39,8 @@ $sql = "SELECT
t2.team_name_short AS guest_name,
t1.team_id AS home_id,
t2.team_id AS guest_id,
b.goals_home AS bet_home,
b.goals_guest AS bet_guest,
m.goals_home,
m.goals_guest,
m.goals_overtime_home AS kogoals_home,
@@ -48,8 +52,10 @@ $sql = "SELECT
m.odd_1,
m.odd_x,
m.odd_2,
m.trend FROM " . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_TEAMS . ' AS t1 ON (t1.season = m.season AND t1.league = m.league AND t1.team_id = m.team_id_home)
m.trend
FROM " . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no AND b.user_id = $userid)
LEFT JOIN " . FOOTB_TEAMS . ' AS t1 ON (t1.season = m.season AND t1.league = m.league AND t1.team_id = m.team_id_home)
LEFT JOIN ' . FOOTB_TEAMS . " AS t2 ON (t2.season = m.season AND t2.league = m.league AND t2.team_id = m.team_id_guest)
WHERE m.season = $season
AND m.league = $league
@@ -137,6 +143,8 @@ foreach ($rows as $row)
$goals_guest = ($row['goals_guest'] == '') ? '&nbsp;' : $row['goals_guest'];
$kogoals_home = ($row['kogoals_home'] == '') ? '&nbsp;' : $row['kogoals_home'];
$kogoals_guest = ($row['kogoals_guest'] == '') ? '&nbsp;' : $row['kogoals_guest'];
$bet_home = ($row['bet_home'] == '') ? '&nbsp;' : $row['bet_home'];
$bet_guest = ($row['bet_guest'] == '') ? '&nbsp;' : $row['bet_guest'];
$template->assign_block_vars('odds', array(
'ROW_CLASS' => $row_class,
@@ -154,12 +162,15 @@ foreach ($rows as $row)
'tid' => $homeid, 'mode' => 'all')),
'U_PLAN_GUEST' => $this->helper->route('football_football_popup', array('popside' => 'viewplan_popup', 's' => $season, 'l' => $league,
'tid' => $guestid, 'mode' => 'all')),
'BET_HOME' => $bet_home,
'BET_GUEST' => $bet_guest,
'GOALS_HOME' => $goals_home,
'GOALS_GUEST' => $goals_guest,
'COLOR_STYLE' => '',
'KOGOALS_HOME' => $kogoals_home,
'KOGOALS_GUEST' => $kogoals_guest,
'S_KO_MATCH' => $ko_match,
'S_USER_IS_MEMBER' => $user_is_member,
'TREND' => $row['trend'],
'U_MATCH_STATS' => $this->helper->route('football_football_popup', array('popside' => 'hist_popup', 's' => $season, 'l' => $league,
'hid' => $homeid, 'gid' => $guestid, 'm' => $matchday,

View File

@@ -29,7 +29,7 @@ if ($league <> 0)
AND r.league = $league
AND r.matchday = $matchday
AND r.status IN (2,3)
ORDER BY rank ASC, LOWER(u.username) ASC";
ORDER BY r.rank ASC, LOWER(u.username) ASC";
$result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result))
@@ -69,4 +69,3 @@ if ($league <> 0)
'WIN_NAME' => $config['football_win_name'],
));
}
?>

View File

@@ -53,7 +53,7 @@ $sql = "SELECT
AND b.league = $league
AND m.status IN (2,3)
AND m.matchday = $matchday
GROUP BY user_id";
GROUP BY b.user_id";
$result = $db->sql_query($sql);
$usersstats = $db->sql_fetchrowset($result);
@@ -126,7 +126,7 @@ else
$sql_limit = $config['football_users_per_page'];
// handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday));
$base_url = $this->helper->route('football_football_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday));
$pagination = $phpbb_container->get('pagination');
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start);
$data_ranks = false;
@@ -224,8 +224,8 @@ while($row = $db->sql_fetchrow($result))
'ROW_CLASS' => $row_class,
'RANK' => $rankof[$row['user_id']],
'NO_CHANGES' => ($change_sign == '=') ? true : false,
'WORSENED' => ($change_sign == '-') ? true : false,
'IMPROVED' => ($change_sign == '+') ? true : false,
'WORSENED' => ($change_sign == '+') ? true : false,
'IMPROVED' => ($change_sign == '-') ? true : false,
'CHANGE_SIGN' => $change_sign,
'CHANGE_DIFFER' => $change_differ,
'USERID' => $row['user_id'],
@@ -257,5 +257,3 @@ $template->assign_vars(array(
'WIN_NAME' => $config['football_win_name'],
)
);
?>

View File

@@ -39,7 +39,7 @@ switch ($mode)
WHERE b.league = $league
AND ((b.season < $season) OR (b.season = $season AND m.matchday <= $matchday))
AND m.status IN (2,3)
GROUP BY user_id";
GROUP BY b.user_id";
$result = $db->sql_query($sql);
$rows = $db->sql_fetchrowset($result);
@@ -61,7 +61,7 @@ switch ($mode)
WHERE r.league = $league
AND ((r.season < $season AND r.matchday = l.matchdays) OR (r.season = $season AND r.matchday = $matchday))
AND r.status IN (2,3)
GROUP BY user_id
GROUP BY r.user_id
ORDER BY r.user_id ASC";
$result = $db->sql_query($sql);
@@ -89,7 +89,7 @@ switch ($mode)
WHERE r.league = $league
AND ((r.season < $season) OR (r.season = $season AND r.matchday <= $matchday))
AND r.status IN (2,3)
GROUP BY user_id
GROUP BY r.user_id
ORDER BY points_total DESC, LOWER(u.username) ASC";
$result = $db->sql_query($sql);
@@ -114,7 +114,7 @@ switch ($mode)
$index_end = $index_start + $config['football_users_per_page'] - 1;
// handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime'));
$base_url = $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime'));
$pagination = $phpbb_container->get('pagination');
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start);
@@ -171,9 +171,9 @@ switch ($mode)
'WIN_NAME' => $config['football_win_name'],
'S_SHOW_OTHER_LINKS' => true,
'S_HEADER' => sprintf($user->lang['RANKING_ALL_TIME']),
'S_LINK_RANKING' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LINK_RANKING' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LINK_ALL_TIME' => '',
'S_LINK_COMPARE' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare')),
'S_LINK_COMPARE' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare')),
)
);
break;
@@ -227,8 +227,8 @@ switch ($mode)
AND r.league = $league
AND r.matchday = $matchday
AND r.status IN (2,3)
GROUP BY season, user_id
ORDER BY r.user_id ASC, season ASC";
GROUP BY r.season, r.user_id
ORDER BY r.user_id ASC, r.season ASC";
$result = $db->sql_query($sql);
@@ -275,7 +275,7 @@ switch ($mode)
$index_end = $index_start + $config['football_users_per_page'] - 1;
// handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare'));
$base_url = $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare'));
$pagination = $phpbb_container->get('pagination');
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_users, $this->config['football_users_per_page'], $start);
@@ -334,8 +334,8 @@ switch ($mode)
'WIN_NAME' => $config['football_win_name'],
'S_SHOW_OTHER_LINKS' => true,
'S_HEADER' => sprintf($user->lang['RANKING_COMPARE']),
'S_LINK_RANKING' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LINK_ALL_TIME' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime')),
'S_LINK_RANKING' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_LINK_ALL_TIME' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime')),
'S_LINK_COMPARE' => '',
)
);
@@ -369,7 +369,7 @@ switch ($mode)
AND b.league = $league
AND m.status IN (2,3)
AND m.matchday <= $matchday
GROUP BY user_id";
GROUP BY b.user_id";
$result = $db->sql_query($sql);
$rows = $db->sql_fetchrowset($result);
@@ -423,7 +423,7 @@ switch ($mode)
AND r.league = $league
AND r.matchday = $matchday
AND r.status IN (2,3)
GROUP BY user_id
GROUP BY r.user_id
ORDER BY r.points_total DESC, LOWER(u.username) ASC";
$result = $db->sql_query($sql);
@@ -447,7 +447,7 @@ switch ($mode)
$index_end = $index_start + $config['football_users_per_page'] - 1;
// handle pagination.
$base_url = $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday));
$base_url = $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday));
$pagination = $phpbb_container->get('pagination');
if ($user->data['football_mobile'])
{
@@ -520,8 +520,8 @@ switch ($mode)
'ROW_CLASS' => $row_class,
'RANK' => $rank,
'NO_CHANGES' => ($change_sign == '=') ? true : false,
'WORSENED' => ($change_sign == '-') ? true : false,
'IMPROVED' => ($change_sign == '+') ? true : false,
'WORSENED' => ($change_sign == '+') ? true : false,
'IMPROVED' => ($change_sign == '-') ? true : false,
'CHANGE_SIGN' => $change_sign,
'CHANGE_DIFFER' => $change_differ,
'USERID' => $curr_rank['user_id'],
@@ -554,11 +554,9 @@ switch ($mode)
'WIN_NAME' => $config['football_win_name'],
'S_SHOW_OTHER_LINKS' => true,
'S_LINK_RANKING' => '',
'S_LINK_ALL_TIME' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime')),
'S_LINK_COMPARE' => $this->helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare')),
'S_LINK_ALL_TIME' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'alltime')),
'S_LINK_COMPARE' => $this->helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday, 'mode' => 'compare')),
)
);
break;
}
?>

View File

@@ -416,7 +416,7 @@ $template->assign_vars(array(
'S_SIDENAME' => $sidename,
'RESULT_EXPLAIN' => $result_explain,
'LABEL_FINALRESULT' => $label_finalresult,
'S_FORM_ACTION_RESULT' => $this->helper->route('football_main_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'result')),
'S_FORM_ACTION_RESULT' => $this->helper->route('football_football_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'result')),
'S_DATA_RESULTS' => $data_results,
'S_USER_IS_MEMBER' => $user_is_member,
'S_DISPLAY_GROUP' => $display_group,

View File

@@ -173,6 +173,7 @@ if ($data_rules)
'S_SIDENAME' => $sidename,
'S_DATA_RULES' => $data_rules,
'S_BET_IN_TIME' => $league_info['bet_in_time'],
'S_BET_POINTS' => true,
'S_RULES_POST_ID' => $league_info['rules_post_id'],
'S_ERROR_MESSAGE' => $error_message,
'S_FOOTBALL_COPY' => sprintf($user->lang['FOOTBALL_COPY'], $config['football_version'], $phpbb_root_path . 'football/'),
@@ -186,6 +187,7 @@ if ($data_rules)
'LINK_RULES' => sprintf($user->lang['LINK_RULES'], $link_rules),
'SEASONNAME' => $season_info['season_name'],
'LEAGUENAME' => $league_name,
'BET_POINTS' => $league_info['bet_points'],
)
);
@@ -198,6 +200,7 @@ else
'S_SIDENAME' => $sidename,
'S_DATA_RULES' => $data_rules,
'S_BET_IN_TIME' => false,
'S_BET_POINTS' => false,
'S_RULES_POST_ID' => 0,
'S_ERROR_MESSAGE' => $error_message,
'S_FOOTBALL_COPY' => sprintf($user->lang['FOOTBALL_COPY'], $config['football_version'], $phpbb_root_path . 'football/'),
@@ -223,5 +226,3 @@ $template->set_filenames(array(
// $template->display('popup');
page_footer();
?>

View File

@@ -4,21 +4,22 @@
"description" : "Football Prediction League",
"homepage" : "http://football.bplaced.net",
"version" : "0.9.9",
"time": "2017-09-09",
"time" : "2021-04-04",
"license" : "GPL-2.0",
"authors" : [{
"name" : "J. Helmke",
"email" : "phpBB3.football@gmx.de",
"homepage" : "http://football.bplaced.net",
"role" : "Lead Developer"
}],
}
],
"require" : {
"php" : ">=5.3.3"
},
"extra" : {
"display-name" : "Football Prediction League",
"soft-require" : {
"phpbb/phpbb": ">3.1.*"
"phpbb/phpbb" : ">=3.2.8,<3.4"
},
"version-check" : {
"host" : "football.bplaced.net",

View File

@@ -1,4 +1,4 @@
football_main_controller:
football_football_controller:
path: /football/{side}
defaults: { _controller: football.football.controller:handle }

View File

@@ -12,102 +12,102 @@ services:
football.football.controller:
class: football\football\controller\main
arguments:
- @auth
- @config
- @ext.manager
- @notification_manager
- @log
- @path_helper
- @dbal.conn
- @controller.helper
- @template
- @user
- @pagination
- %core.root_path%
- %core.php_ext%
- '@auth'
- '@config'
- '@ext.manager'
- '@notification_manager'
- '@log'
- '@path_helper'
- '@dbal.conn'
- '@controller.helper'
- '@template'
- '@user'
- '@pagination'
- '%core.root_path%'
- '%core.php_ext%'
football.football.controller_popup:
class: football\football\controller\popup
arguments:
- @auth
- @config
- @ext.manager
- @path_helper
- @dbal.conn
- @controller.helper
- @template
- @user
- @pagination
- %core.root_path%
- %core.php_ext%
- '@auth'
- '@config'
- '@ext.manager'
- '@path_helper'
- '@dbal.conn'
- '@controller.helper'
- '@template'
- '@user'
- '@pagination'
- '%core.root_path%'
- '%core.php_ext%'
football.football.controller_download:
class: football\football\controller\download
arguments:
- @auth
- @config
- @ext.manager
- @path_helper
- @dbal.conn
- @controller.helper
- @template
- @user
- %core.root_path%
- %core.php_ext%
- '@auth'
- '@config'
- '@ext.manager'
- '@path_helper'
- '@dbal.conn'
- '@controller.helper'
- '@template'
- '@user'
- '%core.root_path%'
- '%core.php_ext%'
football.football.version.check:
class: football\football\includes\version_check
scope: prototype
arguments:
- %football.version_data%
- @config
- @version_helper
- @template
- @user
- '%football.version_data%'
- '@config'
- '@version_helper'
- '@template'
- '@user'
football.football.controller_xml:
class: football\football\controller\xmlplan
arguments:
- @config
- @ext.manager
- @path_helper
- @dbal.conn
- @user
- %core.root_path%
- %core.php_ext%
- '@config'
- '@ext.manager'
- '@path_helper'
- '@dbal.conn'
- '@user'
- '%core.root_path%'
- '%core.php_ext%'
football.football.core.functions.points:
class: football\football\core\functions_points
arguments:
- @user
- @dbal.conn
- '@user'
- '@dbal.conn'
football.football.listener:
class: football\football\event\main_listener
arguments:
- @auth
- @config
- @controller.helper
- @template
- @path_helper
- @ext.manager
- @user
- %core.root_path%
- %core.php_ext%
- '@auth'
- '@config'
- '@controller.helper'
- '@template'
- '@path_helper'
- '@ext.manager'
- '@user'
- '%core.root_path%'
- '%core.php_ext%'
tags:
- { name: event.listener }
football.football.cron.task.football_remember:
class: football\football\cron\task\football_remember
arguments:
- %core.root_path%
- %core.php_ext%
- @ext.manager
- @path_helper
- @dbal.conn
- @config
- @log
- @user
- '%core.root_path%'
- '%core.php_ext%'
- '@ext.manager'
- '@path_helper'
- '@dbal.conn'
- '@config'
- '@log'
- '@user'
calls:
- [set_name, [football.football.cron.task.football_remember]]
tags:

View File

@@ -45,7 +45,7 @@ class main
/* @var \phpbb\user */
protected $user;
/** @var \phpbb\pagination */
/* @var \phpbb\pagination */
protected $pagination;
/* @var phpBB root path */
@@ -750,18 +750,18 @@ class main
INNER JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = s.season)
INNER JOIN ' . FOOTB_MATCHDAYS . ' AS sp ON (sp.season = s.season AND sp.league = l.league)
WHERE 1
ORDER BY season DESC';
ORDER BY s.season DESC';
$result = $db->sql_query($sql);
while( $row = $db->sql_fetchrow($result))
{
$selected = ($season && $row['season'] == $season) ? ' selected="selected"' : '';
if ($selected)
{
$season_name = htmlspecialchars($row['season_name_short']);
$season_name = utf8_htmlspecialchars($row['season_name_short']);
}
$template->assign_block_vars('form_season', array(
'S_SEASON' => htmlspecialchars($row['season']),
'S_SEASONNAME' => htmlspecialchars($row['season_name_short']),
'S_SEASON' => utf8_htmlspecialchars($row['season']),
'S_SEASONNAME' => utf8_htmlspecialchars($row['season_name_short']),
'S_SELECTED' => $selected));
}
$db->sql_freeresult($result);
@@ -945,9 +945,9 @@ class main
$print_start = ($start) ? "start=$start&amp;" : '';
$template->assign_vars(array(
'U_PRINT_FOOTBALL' => $this->helper->route('football_main_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday, 'view' => 'print')),
'U_MOBILE_SWITCH' => $this->helper->route('football_main_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'switch')),
'U_SIDE_LINK' => $this->helper->route('football_main_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_PRINT_FOOTBALL' => $this->helper->route('football_football_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday, 'view' => 'print')),
'U_MOBILE_SWITCH' => $this->helper->route('football_football_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday, 'action' => 'switch')),
'U_SIDE_LINK' => $this->helper->route('football_football_controller', array('side' => $side, 's' => $season, 'l' => $league, 'm' => $matchday)),
'L_TOP_RANKSP' => sprintf($user->lang['RANKING']) . ' ' . $matchday . '. ' . sprintf($user->lang['MATCHDAY']),
'L_TOP_RANKGESAMT' => sprintf($user->lang['TOTAL_RANKING']) . ' ' . $matchday . '. ' . sprintf($user->lang['MATCHDAY']),
'PHPBB_ROOT_PATH' => $this->phpbb_root_path,
@@ -966,13 +966,13 @@ class main
'S_SEASON_NAME' => $season_name,
'S_LEAGUE_NAME' => $league_name,
'S_MATCHDAY_NAME' => $matchday_name,
'S_FORMSELF' => $this->helper->route('football_main_controller', array('side' => $side)),
'S_FORMSELF' => $this->helper->route('football_football_controller', array('side' => $side)),
'S_DELIVERY' => delivery($season, $league, $matchday),
// For nav_delivery
'S_PREV_LINK' => $prev_link,
'S_PREV_CLASS' => $prev_class,
'S_PREV_DEADLINE' => $prev_deadline,
'S_CURR_LINK' => $this->helper->route('football_main_controller', array('side' => $side, 's' => $season, 'l' => $league)),
'S_CURR_LINK' => $this->helper->route('football_football_controller', array('side' => $side, 's' => $season, 'l' => $league)),
'S_CURR_MATCHDAY' => $curr_matchday,
'S_NEXT_LINK' => $next_link,
'S_NEXT_CLASS' => $next_class,

View File

@@ -39,7 +39,7 @@ class popup
/* @var \phpbb\user */
protected $user;
/** @var \phpbb\pagination */
/* @var \phpbb\pagination */
protected $pagination;
/* @var phpBB root path */

View File

@@ -42,7 +42,7 @@ class football_remember extends \phpbb\cron\task\base
* @param string $php_ext
* @param \phpbb\extension\manager $phpbb_extension_manager
* @param \phpbb\path_helper $phpbb_path_helper
* @param \phpbb\db\driver\driver_interfacer $db
* @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\config\config $config
* @param \phpbb\log\log_interface $log
* @param \phpbb\user $user

View File

@@ -129,7 +129,7 @@ class main_listener implements EventSubscriberInterface
}
else
{
$event['location_url'] = $this->controller_helper->route('football_main_controller', array_merge(array('side' => $url_parts['base']), $url_parts['params']));
$event['location_url'] = $this->controller_helper->route('football_football_controller', array_merge(array('side' => $url_parts['base']), $url_parts['params']));
}
$db->sql_freeresult($result);
}
@@ -137,7 +137,7 @@ class main_listener implements EventSubscriberInterface
{
$event['location'] = $this->user->lang('VIEWING_FOOTBALL' . (empty($url_parts['base']) ? '' : '_' . strtoupper ($url_parts['base'])));
}
$event['location_url'] = $this->controller_helper->route('football_main_controller', array_merge(array('side' => $url_parts['base']), $url_parts['params']));
$event['location_url'] = $this->controller_helper->route('football_football_controller', array_merge(array('side' => $url_parts['base']), $url_parts['params']));
}
}
@@ -217,19 +217,19 @@ class main_listener implements EventSubscriberInterface
'S_FOOTBALL_HEADER_LEAGUE' => $league,
'S_FOOTBALL_EXT_PATH' => $ext_path,
'S_FOOTBALL_HEADER_ENABLED' => $this->config['football_header_enable'] ? $in_football_ext : false,
'U_FOOTBALL' => $this->controller_helper->route('football_main_controller', array('side' => 'bet')),
'U_BET' => $this->controller_helper->route('football_main_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_ALL_BETS' => $this->controller_helper->route('football_main_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RESULTS' => $this->controller_helper->route('football_main_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_TABLE' => $this->controller_helper->route('football_main_controller', array('side' => 'table', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RANKS_TOTAL' => $this->controller_helper->route('football_main_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RANKS_MATCHDAY' => $this->controller_helper->route('football_main_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_DELIVERY_LIST' => $this->controller_helper->route('football_main_controller', array('side' => 'delivery', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_LAST_VISITORS' => $this->controller_helper->route('football_main_controller', array('side' => 'last_users', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_FOOTBALL_BANK' => $this->controller_helper->route('football_main_controller', array('side' => 'bank', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_FOOTBALL' => $this->controller_helper->route('football_football_controller', array('side' => 'bet')),
'U_BET' => $this->controller_helper->route('football_football_controller', array('side' => 'bet', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_ALL_BETS' => $this->controller_helper->route('football_football_controller', array('side' => 'all_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RESULTS' => $this->controller_helper->route('football_football_controller', array('side' => 'results', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_TABLE' => $this->controller_helper->route('football_football_controller', array('side' => 'table', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RANKS_TOTAL' => $this->controller_helper->route('football_football_controller', array('side' => 'ranks_total', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RANKS_MATCHDAY' => $this->controller_helper->route('football_football_controller', array('side' => 'ranks_matchday', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_DELIVERY_LIST' => $this->controller_helper->route('football_football_controller', array('side' => 'delivery', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_LAST_VISITORS' => $this->controller_helper->route('football_football_controller', array('side' => 'last_users', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_FOOTBALL_BANK' => $this->controller_helper->route('football_football_controller', array('side' => 'bank', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_RULES' => $this->controller_helper->route('football_football_popup', array('popside' => 'rules_popup', 's' => $season, 'l' => $league)),
'U_EXPORT' => $this->controller_helper->route('football_football_download', array('downside' => 'dload_export', 's' => $season, 'l' => $league)),
'U_ODDS' => $this->controller_helper->route('football_main_controller', array('side' => 'odds', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_ODDS' => $this->controller_helper->route('football_football_controller', array('side' => 'odds', 's' => $season, 'l' => $league, 'm' => $matchday)),
'S_MENU_LINK1' => (strlen($this->config['football_menu_link1']) > 4) ? true : false,
'U_MENU_LINK1' => $this->config['football_menu_link1'],
'MENU_DESC_LINK1' => $this->config['football_menu_desc1'],
@@ -239,14 +239,14 @@ class main_listener implements EventSubscriberInterface
'S_MENU_LINK3' => (strlen($this->config['football_menu_link3']) > 4) ? true : false,
'U_MENU_LINK3' => (strpos($this->config['football_menu_link3'], 'xml/league.php') === false) ? $this->config['football_menu_link3'] : $this->config['football_menu_link3'] . "&season=$season&league=$league",
'MENU_DESC_LINK3' => $this->config['football_menu_desc3'],
'U_MY_BETS' => $this->controller_helper->route('football_main_controller', array('side' => 'my_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_POINTS' => $this->controller_helper->route('football_main_controller', array('side' => 'my_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_TABLE' => $this->controller_helper->route('football_main_controller', array('side' => 'my_table', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_RANK' => $this->controller_helper->route('football_main_controller', array('side' => 'my_rank', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_CHART' => $this->controller_helper->route('football_main_controller', array('side' => 'my_chart', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_KOEFF' => $this->controller_helper->route('football_main_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_STAT_RESULTS' => $this->controller_helper->route('football_main_controller', array('side' => 'stat_results', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_STAT_POINTS' => $this->controller_helper->route('football_main_controller', array('side' => 'stat_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_BETS' => $this->controller_helper->route('football_football_controller', array('side' => 'my_bets', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_POINTS' => $this->controller_helper->route('football_football_controller', array('side' => 'my_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_TABLE' => $this->controller_helper->route('football_football_controller', array('side' => 'my_table', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_RANK' => $this->controller_helper->route('football_football_controller', array('side' => 'my_rank', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_CHART' => $this->controller_helper->route('football_football_controller', array('side' => 'my_chart', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_MY_KOEFF' => $this->controller_helper->route('football_football_controller', array('side' => 'my_koeff', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_STAT_RESULTS' => $this->controller_helper->route('football_football_controller', array('side' => 'stat_results', 's' => $season, 'l' => $league, 'm' => $matchday)),
'U_STAT_POINTS' => $this->controller_helper->route('football_football_controller', array('side' => 'stat_points', 's' => $season, 'l' => $league, 'm' => $matchday)),
));
}

View File

@@ -78,7 +78,7 @@ $sql_bets = "SELECT
FROM " . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_BETS . " AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
WHERE m.season = $season AND m.league = $league
ORDER BY matchday ASC, match_no ASC, user_id ASC";
ORDER BY m.matchday ASC, m.match_no ASC, b.user_id ASC";
if(!$result_users = $db->sql_query($sql_users))
{
@@ -268,4 +268,3 @@ else
echo utf8_decode($export);
exit;
}
?>

View File

@@ -170,8 +170,8 @@ function save_ranking_matchday($season, $league, $matchday, $cash = false)
INNER JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league AND b.match_no = m.match_no)
INNER JOIN ' . USERS_TABLE . " AS u ON (b.user_id = u.user_id)
WHERE m.season = $season AND m.league = $league AND m.matchday = $matchday AND m.status IN (2,3)
GROUP BY b.user_id
ORDER BY points DESC, nobet ASC, username ASC
GROUP BY u.user_id
ORDER BY points DESC, nobet ASC, u.username ASC
";
$result = $db->sql_query($sql);
@@ -838,7 +838,8 @@ function next_delivery($season, $league)
WHEN 6 THEN '" . $lang_dates['Sat'] . "'
ELSE 'Error' END,
DATE_FORMAT(delivery_date,' %d.%m.%Y %H:%i')
) AS deliverytime
) AS deliverytime,
matchday
FROM " . FOOTB_MATCHDAYS . "
WHERE season = $season AND league = $league AND status = 0
ORDER BY matchday ASC
@@ -999,7 +1000,7 @@ function first_league($season, $complete = true)
{
$join_matchday = 'INNER JOIN ' . FOOTB_MATCHDAYS . ' AS m ON (m.season = l.season AND m.league = l.league) ';
}
$sql = 'SELECT *
$sql = 'SELECT l.*
FROM ' . FOOTB_LEAGUES . ' AS l ' .
$join_matchday . "
WHERE l.season = $season
@@ -1030,12 +1031,12 @@ function current_league($season)
$curr_user = $user->data['user_id'];
$user_spec = 'AND b.user_id = ' . $curr_user;
}
$sql = 'SELECT DISTINCT m.league
$sql = 'SELECT DISTINCT m.league, m.match_datetime
FROM ' . FOOTB_MATCHES . ' AS m
INNER JOIN ' . FOOTB_BETS . ' AS b ON (b.season = m.season AND b.league = m.league ' . $user_spec . ")
WHERE m.season = $season
AND m.status in (0,1,2)
ORDER BY m.match_datetime ASC
ORDER BY m.match_datetime ASC, m.league ASC
LIMIT 1";
$result = $db->sql_query($sql);
@@ -2096,7 +2097,8 @@ function get_team($season, $league, $matchnumber, $field, $formula)
m.goals_overtime_home,
m.goals_overtime_guest,
m.goals_home,
m.goals_guest
m.goals_guest,
m.match_no
FROM ' . FOOTB_MATCHES . ' AS m
LEFT JOIN ' . FOOTB_TEAMS . ' AS t1 ON (t1.season = m.season AND t1.league = m.league AND t1.team_id = m.team_id_home)
LEFT JOIN ' . FOOTB_TEAMS . " AS t2 ON (t2.season = m.season AND t2.league = m.league AND t2.team_id = m.team_id_guest)
@@ -2316,7 +2318,7 @@ function ko_group_next_round($season, $league, $matchday_from, $matchday_to, $ma
LEFT JOIN ' . FOOTB_MATCHES . " AS m ON (m.season = t.season AND m.league = t.league AND (m.team_id_home = t.team_id OR m.team_id_guest = t.team_id) AND m.group_id = t.group_id)
WHERE t.season = $season AND t.league = $league AND m.matchday >= $matchday_from AND m.matchday <= $matchday_to AND m.status IN (3,6)
GROUP BY t.team_id
ORDER BY group_id ASC,points DESC, goal_diff DESC, goals DESC
ORDER BY t.group_id ASC, points DESC, goal_diff DESC, goals DESC
";
$result = $db->sql_query($sql);
@@ -2530,4 +2532,3 @@ function select_points($creator = 'm', $sum = false)
}
return $select_part;
}
?>

View File

@@ -346,6 +346,8 @@ $lang = array_merge($lang, array(
'SAMESAVED' => 'Deine %d OMA-Tipps wurden erfolgreich gespeichert. Ein Tipp wurde automatisch modifiziert. ',
'SAVE' => 'Speichern',
'SAVE_PREDICTION' => 'Tipps speichern',
'SAVE_RESULTS' => 'Ergebnisse speichern',
'SCORED' => 'Gepunktet',
'SEASON' => 'Saison',
'SEC_LEG_ERROR' => 'Rückspiel existiert nicht',
@@ -505,5 +507,3 @@ $lang = array_merge($lang, array(
*/
'FOOTBALL_COPY' => '<a href="http://football.bplaced.net/" title="Zur Demoseite">phpBB Extension - Football Prediction League</a> Version %1s'
));
?>

View File

@@ -528,4 +528,3 @@ Datenquelle erfolgen. Benötigt man innerhalb dieser Zeit trotzdem aktualisierte
Datenquelle zu erzwingen.'
),
)));
?>

View File

@@ -43,8 +43,6 @@ $lang = array_merge($lang, array(
'FOOTB_REM_F_EXPLAIN' => 'Send reminder to your first email address, if you should not have bet?',
'FOOTB_REM_S' => 'Send Prediction League reminder to second email adress',
'FOOTB_REM_S_EXPLAIN' => 'Send reminder to your second email address, if you should not have bet?',
'YES' => 'Ja',
'NO' => 'Nein',
'ADD_NEW_TEAM' => 'The team was added to the WebTip. ',
'ALL_BETS' => 'All bets',
@@ -225,6 +223,7 @@ $lang = array_merge($lang, array(
'NO_BETS_SAVED' => 'No bets saved!',
'NO_CHANGES' => 'No changes',
'NO_DATA' => 'No data available!',
'NO_GUEST_VIEW' => 'Guests are not allowed to view the prediction league. ',
'NO_GUESTTEAM' => 'The guest team chosen by you does not exist. ',
'NO_HIST' => 'No previous comparisons exist for these two teams in the database. ',
'NO_HOMEMATCHES_TEAM' => 'This team has not played at home this season yet. ',
@@ -330,6 +329,8 @@ $lang = array_merge($lang, array(
'RULES_EXPLAIN' => 'Here are only the technical basic conditions of this WebTip listed. ',
'SAMESAVED' => 'Your %d Granny-bets were saved successfully! A bet was automatically modified. ',
'SAVE' => 'Save',
'SAVE_PREDICTION' => 'Save prediction',
'SAVE_RESULTS' => 'Save results',
'SCORED' => 'Scored',
'SEASON' => 'Season',
'SEC_LEG_ERROR' => 'Second leg does not exist',

View File

@@ -500,4 +500,3 @@ Preliminary results from the update are not used. If these should be taken, this
updated data within that time anyway, you have to delete the cache to force a new download from the Source.'
),
)));
?>

View File

@@ -81,6 +81,7 @@ $lang = array_merge($lang, array(
'INSERT_TEAMS' => 'Insert new teams',
'LEAGUE_SHORTCUT' => 'League shortcut',
'LOAD' => 'load',
'LOG_FOOTB_UPDATE' => '<strong>Football Prediction League fixure list update</strong><br />» %s',
'MAP_TEAMS' => 'Map teams',
'MATCH_OF_GROUP' => 'Match on group',
'MATCHES' => 'Matches',

View File

@@ -8,6 +8,9 @@
<th>{L_GR}</th>
<!-- ENDIF -->
<th style="text-align: center;" colspan="5">{L_VS}</th>
<!-- IF S_USER_IS_MEMBER -->
<th style="text-align: center;" colspan="3">{L_BET_OF}</th>
<!-- ENDIF -->
<th style="text-align: center;" colspan="3">{L_RESULT} ({RESULT_EXPLAIN})</th>
<!-- IF S_DISPLAY_KO -->
<th style="text-align: center;" colspan="3">{LABEL_FINALRESULT}</th>
@@ -31,6 +34,11 @@
<td class="td_logo">{odds.LOGO_GUEST}</td>
<td class="td_team" style="cursor:pointer;" title="{L_SHOW_PLAYED}" onclick="popup('{odds.U_PLAN_GUEST}', 625,625);return false;">
{odds.GUEST_NAME}</td>
<!-- IF S_USER_IS_MEMBER -->
<td class="td_goals_home">{odds.BET_HOME}</td>
<td class="td_vs">:</td>
<td class="td_goals_guest">{odds.BET_GUEST}</td>
<!-- ENDIF -->
<td class="td_goals_home {odds.COLOR_STYLE}">{odds.GOALS_HOME}</td>
<td class="td_vs">:</td>
<td class="td_goals_guest {odds.COLOR_STYLE}">{odds.GOALS_GUEST}</td>

View File

@@ -145,6 +145,6 @@ function xml_table($season, $league, $table)
$xml_table .= " </" . strtolower($table) . ">" . "\n";
}
}
$db->sql_freeresult($result);
return $xml_table;
}
?>

View File

@@ -96,6 +96,6 @@ function xml_seasons()
}
$xml_seasons .= '</seasons-data>' . "\n";
}
$db->sql_freeresult($result);
return $xml_seasons;
}
?>