Merge remote-tracking branch 'football/master'

# Conflicts:
#	acp/matches_module.php
#	adm/style/acp_football_leagues.html
#	adm/style/acp_football_matches.html
#	block/all_bets.php
#	block/rank_matchday.php
#	block/ranks_total.php
#	config/services.yml
#	controller/main.php
#	event/main_listener.php
#	includes/constants.php
#	includes/functions.php
#	language/de/football.php
#	language/de/info_acp_leagues.php
#	language/de/info_acp_matches.php
#	styles/prosilver/template/all_bets.html
#	styles/prosilver/template/results.html
#	styles/prosilver/template/table.html
#	styles/prosilver/theme/football.css
This commit is contained in:
2023-06-07 20:40:33 +02:00
167 changed files with 12199 additions and 12181 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/

11
.idea/aws.xml generated Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="accountSettings">
<option name="activeRegion" value="us-east-1" />
<option name="recentlyUsedRegions">
<list>
<option value="us-east-1" />
</list>
</option>
</component>
</project>

4
.idea/php.xml generated Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpProjectSharedConfiguration" php_language_level="5.3.0" />
</project>

View File

@@ -56,7 +56,7 @@ class all_bets_module
$form_key = 'acp_football_all_bets';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$season = $this->request->variable('s', 0);
@@ -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

@@ -73,7 +73,7 @@ class bank_module
$form_key = 'acp_football_bank';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addmembers'])) ? 'addmembers' : $this->request->variable('action', ''));
@@ -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 . "&amp;s=$season&amp;l=$league",
'U_BACK' => $this->u_action. "&amp;s=$season&amp;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&amp;action=edit&amp;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

@@ -66,7 +66,7 @@ class bets_module
$form_key = 'acp_football_bets';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$action = (isset($_POST['bet'])) ? 'bet' : $this->request->variable('action', '');
@@ -586,7 +586,7 @@ class bets_module
)
);
}
$db->sql_freeresult($resultopen);
$db->sql_freeresult($result);
// Calculate extra bets of matchday
// Start select team
@@ -733,7 +733,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) : '',
@@ -753,4 +753,3 @@ class bets_module
);
}
}
?>

View File

@@ -56,7 +56,7 @@ class extra_module
$form_key = 'acp_football_extra';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['remove'])) ? 'remove' : $this->request->variable('action', ''));
@@ -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

@@ -56,7 +56,7 @@ class ko_module
$form_key = 'acp_football_ko';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$action = (isset($_POST['update'])) ? 'update' : $this->request->variable('action', '');
@@ -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

@@ -56,7 +56,7 @@ class leagues_module
$form_key = 'acp_football_leagues';
add_form_key($form_key);
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addmembers'])) ? 'addmembers' : $this->request->variable('action', ''));
@@ -693,7 +693,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,
@@ -711,8 +711,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);
@@ -751,4 +751,3 @@ class leagues_module
}
}
}
?>

View File

@@ -56,7 +56,7 @@ class matchdays_module
$form_key = 'acp_football_matchdays';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : '';
@@ -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

@@ -56,7 +56,7 @@ class matches_module
$form_key = 'acp_football_matches';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', '');
@@ -438,15 +438,6 @@ 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))
{
$sql_ary = array(
@@ -470,7 +461,6 @@ class matches_module
'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'] : '',
'show_table' => (int) $show_table,
);
@@ -639,16 +629,6 @@ 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(
@@ -670,7 +650,6 @@ class matches_module
'STATUS_OPTIONS' => $status_options,
'S_GROUP_CHECKED' => (strlen($match_row['group_id']) > 0) ? true : false,
'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'],
@@ -739,7 +718,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,
@@ -783,5 +762,3 @@ class matches_module
}
}
}
?>

View File

@@ -60,7 +60,7 @@ class results_module
$form_key = 'acp_football_results';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$action = (isset($_POST['edit'])) ? 'edit' : $this->request->variable('action', '');
@@ -796,7 +796,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) : '',
@@ -818,5 +818,3 @@ class results_module
);
}
}
?>

View File

@@ -56,7 +56,7 @@ class seasons_module
$form_key = 'acp_football_seasons';
add_form_key($form_key);
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', '');
@@ -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

@@ -56,7 +56,7 @@ class teams_module
$form_key = 'acp_football_teams';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : $this->request->variable('action', '');
@@ -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

@@ -107,7 +107,7 @@ class update_module
$form_key = 'acp_football_update';
add_form_key($form_key);
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
include_once($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
// Check and set some common vars
$action = (isset($_POST['load_xml_season'])) ? 'load_xml_season' : '';
@@ -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

@@ -33,7 +33,7 @@
</dl>
<dl>
<dt><label for="league_name">{L_LEAGUE_NAME}:</label></dt>
<dd><input name="league_name" type="text" id="league_name" size="25" maxlength="21" value="{LEAGUE_NAME}" /></dd>
<dd><input name="league_name" type="text" id="league_name" size="20" maxlength="20" value="{LEAGUE_NAME}" /></dd>
</dl>
<dl>
<dt><label for="league_short">{L_LEAGUE_SHORT}:</label><br /><span>{L_LEAGUE_SHORT_EXPLAIN}</span></dt>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -118,7 +118,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'])
{
@@ -565,4 +565,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

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Check Prediction League authorisation
if ( !$this->auth->acl_get('u_use_football') )
{
@@ -225,5 +230,3 @@ $template->assign_vars(array(
'POINTS' => $config['football_win_name'],
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -509,8 +509,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 && $user_is_allowed_to_bet,
'S_DATA_GROUP' => $data_group,
@@ -527,5 +527,3 @@ $template->assign_vars(array(
'S_DISPLAY_RATING' => $display_rating,
)
);
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Can this user view Prediction Leagues pages?
if (!$config['football_guest_view'])
{
@@ -389,4 +394,3 @@ $template->set_filenames(array(
);
page_footer();
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -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',
@@ -71,5 +71,3 @@ $template->assign_vars(array(
'S_DATA_DELIVERY' => $data_delivery,
)
);
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$this->user->add_lang_ext('football/football', 'info_acp_bank');
// Check Prediction League authorisation
@@ -20,7 +25,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
{
@@ -90,14 +95,10 @@ else
}
$user_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$export_file = $league_short . '_' . $season . '_bank.csv';
$newline = "\r\n";
header('Pragma: no-cache');
header("Content-Type: text/csv; name=\"$export_file\"");
header("Content-disposition: attachment; filename=$export_file");
$export= '';
$export .= $league_name . ' ' . sprintf($user->lang['SEASON']) . ' ' . $season. $newline;
$export .= sprintf($user->lang['NAME']) . ';' . $config['football_win_name'] . ';' . sprintf($user->lang['BET_POINTS']) . ';' .
$csv_data= '';
$csv_data .= $league_name . ' ' . sprintf($user->lang['SEASON']) . ' ' . $season. $newline;
$csv_data .= sprintf($user->lang['NAME']) . ';' . $config['football_win_name'] . ';' . sprintf($user->lang['BET_POINTS']) . ';' .
sprintf($user->lang['DEPOSITED']) . ';' . sprintf($user->lang['DEPOSIT']) . ';' . sprintf($user->lang['WINS']) . ';' .
sprintf($user->lang['PAID']) . ';' . sprintf($user->lang['PAYOUT']) . ';' . $newline;
@@ -118,7 +119,7 @@ else
$no_cash_wins = '';
$no_cash_paid = '';
}
$export .= str_replace("\"", "\"\"", $user_row['username']) . ';' .
$csv_data .= str_replace("\"", "\"\"", $user_row['username']) . ';' .
str_replace('.', ',', $user_row['user_points']) . ';' .
str_replace('.', ',', $user_row['bet_points']) . $no_cash_bet_points . ';' .
str_replace('.', ',', $user_row['deposit']) . $no_cash_deposit . ';' .
@@ -127,9 +128,24 @@ else
str_replace('.', ',', $user_row['paid']) . $no_cash_paid . ';' .
str_replace('.', ',', $user_row['new_pay']) . ';' . $newline;
}
echo utf8_decode($export);
exit;
// Output the csv file
$filename = $league_short . '_' . $season . '_bank.csv';
$fp = fopen('php://output', 'w');
header('Content-Type: application/octet-stream');
header("Content-disposition: attachment; filename=\"" . basename($filename) . "\"");
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
header('Pragma: public');
header('Content-Transfer-Encoding: binary');
fwrite($fp, "\xEF\xBB\xBF"); // UTF-8 BOM
fwrite($fp, utf8_decode($csv_data));
fclose($fp);
exit_handler();
}
}
}
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$this->user->add_lang_ext('football/football', 'info_acp_bank');
// Check Prediction League authorisation
@@ -19,7 +24,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
{
@@ -50,14 +55,10 @@ else
}
$user_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$export_file = $season. '_bank.csv';
$newline = "\r\n";
header('Pragma: no-cache');
header("Content-Type: text/csv; name=\"$export_file\"");
header("Content-disposition: attachment; filename=$export_file");
$export= '';
$export .= sprintf($user->lang['SEASON']) . ' ' . $season. $newline;
$export .= sprintf($user->lang['NAME']) . ';' . sprintf($user->lang['SEASON']) . ';' . sprintf($user->lang['LEAGUE']) . ';Saldo;' . $newline;
$csv_data= '';
$csv_data .= sprintf($user->lang['SEASON']) . ' ' . $season. $newline;
$csv_data .= sprintf($user->lang['NAME']) . ';' . sprintf($user->lang['SEASON']) . ';' . sprintf($user->lang['LEAGUE']) . ';Saldo;' . $newline;
$last_username = '';
$sum_saldo = 0.0;
@@ -65,11 +66,11 @@ else
{
if ($last_username != '' AND $last_username != $user_row['username'])
{
$export .= str_replace("\"", "\"\"", $last_username) . ';Summe;;' .
$csv_data .= str_replace("\"", "\"\"", $last_username) . ';Summe;;' .
str_replace('.', ',', $sum_saldo) . ';' . $newline;
$sum_saldo = 0.0;
}
$export .= str_replace("\"", "\"\"", $user_row['username']) . ';' .
$csv_data .= str_replace("\"", "\"\"", $user_row['username']) . ';' .
$user_row['season'] . ';' .
$user_row['league'] . ';' .
str_replace('.', ',', $user_row['saldo']) . ';' . $newline;
@@ -78,11 +79,25 @@ else
}
if ($last_username != '')
{
$export .= str_replace("\"", "\"\"", $last_username) . ';Summe;;' .
$csv_data .= str_replace("\"", "\"\"", $last_username) . ';Summe;;' .
str_replace('.', ',', $sum_saldo) . ';' . $newline;
}
echo utf8_decode($export);
exit;
// Output the csv file
$filename = $season. '_bank.csv';
$fp = fopen('php://output', 'w');
header('Content-Type: application/octet-stream');
header("Content-disposition: attachment; filename=\"" . basename($filename) . "\"");
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
header('Pragma: public');
header('Content-Transfer-Encoding: binary');
fwrite($fp, "\xEF\xBB\xBF"); // UTF-8 BOM
fwrite($fp, utf8_decode($csv_data));
fclose($fp);
exit_handler();
}
}
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Check Prediction League authorisation
if ( !$this->auth->acl_get('u_use_football') )
{
@@ -17,7 +22,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 +50,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

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$vert = 9;
$start = 22;
$end = 28;
@@ -1342,4 +1347,3 @@ $template->set_filenames(array(
);
page_footer();
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -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'],
@@ -146,5 +146,3 @@ $template->assign_vars(array(
'S_USER_IS_MEMBER' => $user_is_member,
)
);
?>

View File

@@ -62,5 +62,3 @@ $template->assign_vars(array(
'S_DISPLAY_LAST_USERS' => $display_last_users,
'S_LAST_USERS' => true,
));
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -320,5 +320,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -331,4 +331,3 @@ $template->assign_vars(array(
'USERNAME4' => $username4,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -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);
@@ -382,5 +382,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -195,4 +195,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -169,5 +169,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -426,5 +426,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,12 +7,14 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
$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,
@@ -201,5 +212,3 @@ $template->assign_vars(array(
'S_DATA_ODDS' => $data_odds,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -38,7 +38,7 @@ if ($league <> 0)
AND r.league = $league_corr
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))
@@ -78,4 +78,3 @@ if ($league <> 0)
'WIN_NAME' => $config['football_win_name'],
));
}
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -91,4 +91,3 @@ if ($league <> 0)
)
);
}
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -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

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -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'])
{
@@ -482,13 +482,13 @@ switch ($mode)
{
if ($rank > $prev_rank_of[$curr_rank['user_id']])
{
$change_sign = '-';
$differ = $prev_rank_of[$curr_rank['user_id']] - $rank;
$change_sign = '+';
$differ = $rank - $prev_rank_of[$curr_rank['user_id']];
$change_differ = ' (' . $differ . ')';
}
else
{
$change_sign = '+';
$change_sign = '-';
$differ = $prev_rank_of[$curr_rank['user_id']] - $rank;
$change_differ = ' (' . $differ . ')';
}
@@ -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,8 +554,8 @@ 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

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -408,15 +408,16 @@ switch ($league_info['bet_ko_type'])
$label_finalresult = sprintf($user->lang['EXTRATIME_SHORT']) . '/' . sprintf($user->lang['PENALTY_SHORT']);
break;
}
// set correct display for usage in menu template
if($side == 'results')
{
$display_results = true;
$display_results_tl = false;
$sidename = sprintf($user->lang['RESULTS']);
}
if($side == 'results_tl')
{
$display_results = false;
$display_results_tl = true;
$sidename = sprintf($user->lang['RESULTS']);
}
@@ -428,7 +429,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,
@@ -436,5 +437,3 @@ $template->assign_vars(array(
'S_EDIT_MODE' => $edit_mode,
)
);
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Can this user view Prediction Leagues pages?
if (!$config['football_guest_view'])
{
@@ -173,6 +178,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 +192,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 +205,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 +231,3 @@ $template->set_filenames(array(
// $template->display('popup');
page_footer();
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -142,4 +142,3 @@ else
)
);
}
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -160,5 +160,3 @@ $template->assign_vars(array(
'LEAGUE' => $league,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -136,5 +136,3 @@ $template->assign_vars(array(
'LEAGUE' => $league,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -458,9 +458,13 @@ if($league > 50)
{
// Activate bonus coloumn only for tippers.
$data_bns = true;
} else {
$data_bns = false;
}
if($side == 'table') {
$display_table_menu = true;
} else {
$display_table_menu = false;
}
$db->sql_freeresult($result);
$sidename = sprintf($user->lang['TABLE']);
@@ -476,5 +480,3 @@ $template->assign_vars(array(
'S_DATA_BNS' => $data_bns,
)
);
?>

View File

@@ -8,7 +8,7 @@
*
*/
if ( !defined('IN_PHPBB') OR !defined('IN_FOOTBALL') )
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -19,5 +19,3 @@ $template->assign_vars(array(
'S_DISPLAY_UNDER_CONSTRUCTION' => true,
)
);
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Can this user view Prediction Leagues pages?
if (!$config['football_guest_view'])
{
@@ -293,5 +298,3 @@ $template->set_filenames(array(
);
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",
"license": "GPL-2.0",
"time" : "2021-04-04",
"license" : "GPL-2.0-only",
"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

@@ -23,8 +23,8 @@ services:
- '@template'
- '@user'
- '@pagination'
- %core.root_path%
- %core.php_ext%
- '%core.root_path%'
- '%core.php_ext%'
football.football.controller_popup:
class: football\football\controller\popup
@@ -38,8 +38,8 @@ services:
- '@template'
- '@user'
- '@pagination'
- %core.root_path%
- %core.php_ext%
- '%core.root_path%'
- '%core.php_ext%'
football.football.controller_download:
class: football\football\controller\download
@@ -52,14 +52,14 @@ services:
- '@controller.helper'
- '@template'
- '@user'
- %core.root_path%
- %core.php_ext%
- '%core.root_path%'
- '%core.php_ext%'
football.football.version.check:
class: football\football\includes\version_check
scope: prototype
arguments:
- %football.version_data%
- '%football.version_data%'
- '@config'
- '@version_helper'
- '@template'
@@ -73,8 +73,8 @@ services:
- '@path_helper'
- '@dbal.conn'
- '@user'
- %core.root_path%
- %core.php_ext%
- '%core.root_path%'
- '%core.php_ext%'
football.football.core.functions.points:
class: football\football\core\functions_points
@@ -92,16 +92,16 @@ services:
- '@path_helper'
- '@ext.manager'
- '@user'
- %core.root_path%
- %core.php_ext%
- '%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%
- '%core.root_path%'
- '%core.php_ext%'
- '@ext.manager'
- '@path_helper'
- '@dbal.conn'

View File

@@ -122,7 +122,6 @@ class download
{
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message);
exit;
}
// Can this user view Prediction Leagues pages?

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 */
@@ -137,7 +137,6 @@ class main
{
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message);
exit;
}
// Can this user view Prediction Leagues pages?
@@ -753,18 +752,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);
@@ -977,9 +976,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,
@@ -998,13 +997,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 */
@@ -128,7 +128,6 @@ class popup
{
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message);
exit;
}
// Can this user view Prediction Leagues pages?

View File

@@ -105,7 +105,6 @@ class xmlplan
{
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message);
exit;
}

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
@@ -333,4 +333,3 @@ class football_remember extends \phpbb\cron\task\base
}
}
}
?>

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,20 +217,20 @@ 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_RESULTS_TL' => $this->controller_helper->route('football_main_controller', array('side' => 'results_tl', '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_RESULTS_TL' => $this->controller_helper->route('football_football_controller', array('side' => 'results_tl', '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'],
@@ -240,14 +240,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

@@ -9,6 +9,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$values1 = ( isset($_GET['v1']) ) ? $_GET['v1'] : 0;
$graphvalues1 = explode(",",$values1);
$matchdays = sizeof($graphvalues1);
@@ -63,4 +68,3 @@ for ($i = 0; $i < $count_values; $i++)
// Output graph and clear image from memory
imagepng($image);
imagedestroy($image);
?>

View File

@@ -8,6 +8,11 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$matchdays = ( isset($_GET['m']) ) ? intval($_GET['m']) : 0;
$values1 = ( isset($_GET['v1']) ) ? $_GET['v1'] : 0;
@@ -123,4 +128,3 @@ for ($i = 1; $i < $count_values; $i++)
// Output graph and clear image from memory
imagepng($image);
imagedestroy($image);
?>

View File

@@ -8,6 +8,11 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$numb_users = ( isset($_GET['t']) ) ? intval($_GET['t']) : 0;
$matchdays = ( isset($_GET['m']) ) ? intval($_GET['m']) : 0;
@@ -94,4 +99,3 @@ for ($i = 1; $i < $count_values; $i++)
// Output graph and clear image from memory
imagepng($image);
imagedestroy($image);
?>

View File

@@ -16,7 +16,6 @@ global $table_prefix;
// Config constants
define('FOOTB_BETS', $table_prefix . 'footb_bets');
define('FOOTB_CORR', $table_prefix . 'footb_corr');
define('FOOTB_EXTRA_BETS', $table_prefix . 'footb_extra_bets');
define('FOOTB_EXTRA', $table_prefix . 'footb_extra');
define('FOOTB_LEAGUES', $table_prefix . 'footb_leagues');
@@ -47,4 +46,3 @@ define('LEAGUE_KO', 2);
define('FOOTB_BONUS_DAY', $table_prefix . 'footb_bonuspoints_day');
define('FOOTB_CORR', $table_prefix . 'footb_corr');
?>

View File

@@ -22,25 +22,8 @@ if( !$result = $db->sql_query($sql) )
}
$league_short = $db->sql_fetchfield('league_name_short');
$db->sql_freeresult($result);
$export_file = $league_short . '_'. $season. '_Tipps.csv';
$path_attachment = './../../files/' . $export_file;
$newline = "\r\n";
if (!isset($_POST['send']))
{
header('Pragma: no-cache');
header("Content-Type: text/csv; name=\"$export_file\"");
header("Content-disposition: attachment; filename=$export_file");
// header('Content-Type: text/x-csv');
// header('Expires: ' . gmdate('D, d M Y H:i:m') . ' GMT');
// header('Content-Disposition: attachment; filename='. $export_file);
$phpbb_root_path = './../';
}
else
{
$phpbb_root_path = './../../';
}
$sql_users = 'SELECT DISTINCT
b.user_id,
@@ -78,7 +61,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))
{
@@ -96,16 +79,16 @@ foreach ($rows_users as $row_user)
$bet_column[$row_user['user_id']] = $lastcolumn;
$j++;
}
$export_row_users = "\"\";\"\";\"\";\"\";\"\";\"\";";
$csv_data_row_users = "\"\";\"\";\"\";\"\";\"\";\"\";";
for($j = 8; $j <= $lastcolumn; $j = $j + 3)
{
$export_row_users .= "\"\";\"\";\"" . $column[$j] . "\"";
$csv_data_row_users .= "\"\";\"\";\"" . $column[$j] . "\"";
if($j != $lastcolumn)
{
$export_row_users .= ';';
$csv_data_row_users .= ';';
}
}
$export_row_users .= $newline;
$csv_data_row_users .= $newline;
if( !$result_results = $db->sql_query($sql_results) )
{
@@ -138,16 +121,16 @@ foreach ($rows_bets as $row_bet)
{
if ($lastcolumn > 0)
{
$export_bets[$last_match_num] = '';
$csv_data_bets[$last_match_num] = '';
for($j=8; $j<=$lastcolumn; $j++)
{
$export_bets[$last_match_num] .= "\"" . $column[$j] . "\"";
$csv_data_bets[$last_match_num] .= "\"" . $column[$j] . "\"";
if($j!=$lastcolumn)
{
$export_bets[$last_match_num] .= ';';
$csv_data_bets[$last_match_num] .= ';';
}
}
$export_bets[$last_match_num] .= $newline;
$csv_data_bets[$last_match_num] .= $newline;
}
$column = array();
$last_match_num = $row_bet['match_no'];
@@ -157,21 +140,21 @@ foreach ($rows_bets as $row_bet)
$lastcolumn = $bet_column[$row_bet['user_id']] + 2;
}
}
$export_bets[$last_match_num] = '';
$csv_data_bets[$last_match_num] = '';
for($j = 8; $j <= $lastcolumn; $j++)
{
$export_bets[$last_match_num] .= "\"" . $column[$j] . "\"";
$csv_data_bets[$last_match_num] .= "\"" . $column[$j] . "\"";
if($j != $lastcolumn)
{
$export_bets[$last_match_num] .= ';';
$csv_data_bets[$last_match_num] .= ';';
}
}
$export_bets[$last_match_num] .= $newline;
$csv_data_bets[$last_match_num] .= $newline;
$last_matchday = 0;
$export= '';
$export .= 'CSV;'. $league. ';'. $season. $newline;
$csv_data= '';
$csv_data .= 'CSV;'. $league. ';'. $season. $newline;
$i = 0;
foreach ($rows_results as $row_result)
@@ -180,32 +163,32 @@ foreach ($rows_results as $row_result)
{
if ($last_matchday != 0)
{
$export .= $newline;
$export .= $newline;
$export .= $newline;
$export .= $newline;
$export .= $newline;
$export .= $newline;
$export .= ";;". str_replace("\"", "\"\"", $row_result['match_time']). $newline;
$export .= $newline;
$export .= $newline;
$export .= $newline;
$export .= $newline;
$export .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= ";;". str_replace("\"", "\"\"", $row_result['match_time']). $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
}
else
{
$export .= $newline;
$export .= $newline;
$export .= $newline;
$export .= ";;". str_replace("\"", "\"\"", $row_result['match_time']). $newline;
$export .= $newline;
$export .= $newline;
$export .= $newline;
$export .= $newline;
$export .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= ";;". str_replace("\"", "\"\"", $row_result['match_time']). $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
$csv_data .= $newline;
}
$export .= $export_row_users;
$csv_data .= $csv_data_row_users;
$column = array();
$last_matchday = $row_result['matchday'];
}
@@ -242,30 +225,31 @@ foreach ($rows_results as $row_result)
$column[2] = '';
$column[4] = '';
}
$export .= "\"" . $column[0] . "\";\"" . $column[1] . "\";\"" . $column[2] . "\";\"\";\"" . $column[4] . "\";\"\";\"\";\"\";";
if ($export_bets[$row_result['match_no']] == '')
$csv_data .= "\"" . $column[0] . "\";\"" . $column[1] . "\";\"" . $column[2] . "\";\"\";\"" . $column[4] . "\";\"\";\"\";\"\";";
if ($csv_data_bets[$row_result['match_no']] == '')
{
$export .= $newline;
$csv_data .= $newline;
}
else
{
$export .= $export_bets[$row_result['match_no']];
$csv_data .= $csv_data_bets[$row_result['match_no']];
}
$column = array();
$i++;
}
if (isset($_POST['send']))
{
$fp = fopen($path_attachment , "b");
ftruncate ($fp, 0);
rewind($fp);
fwrite ($fp, $export);
// Output the csv file
$filename = $league_short . '_'. $season. '_Tipps.csv';
$fp = fopen('php://output', 'w');
header('Content-Type: application/octet-stream');
header("Content-disposition: attachment; filename=\"" . basename($filename) . "\"");
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
header('Pragma: public');
header('Content-Transfer-Encoding: binary');
fwrite($fp, "\xEF\xBB\xBF"); // UTF-8 BOM
fwrite($fp, $csv_data);
fclose($fp);
}
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);
@@ -893,7 +893,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
@@ -1054,7 +1055,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
@@ -1085,13 +1086,13 @@ 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.league < 51
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);
@@ -2156,7 +2157,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)
@@ -2376,7 +2378,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);
@@ -2820,4 +2822,3 @@ function chart($season, $league, $matchday)
$i++;
}
}
?>

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

@@ -31,7 +31,7 @@
onclick="popup('{total.U_PLAN_TEAM}',625,625);return false;">
<td class="td_rank">{total.RANK}</td>
<td class="td_logo">{total.LOGO}</td>
<td class="td_team">{total.TEAM}</td>
<td class="td_team">{total.TEAM_SHORT}</td>
<td class="td_hits">{total.GAMES}</td>
<td class="td_hits">{total.WIN}</td>
<td class="td_hits">{total.DRAW}</td>
@@ -85,7 +85,7 @@
onclick="popup('{form.U_PLAN_TEAM}',625,625);return false;">
<td class="td_rank">{form.RANK}</td>
<td class="td_logo">{form.LOGO}</td>
<td class="td_team">{form.TEAM}</td>
<td class="td_team">{form.TEAM_SHORT}</td>
<td class="td_hits">{form.GAMES}</td>
<td class="td_hits">{form.WIN}</td>
<td class="td_hits">{form.DRAW}</td>
@@ -145,7 +145,7 @@
onclick="popup('{home.U_PLAN_TEAM}',625,625);return false;">
<td class="td_rank">{home.RANK}</td>
<td class="td_logo">{home.LOGO}</td>
<td class="td_team">{home.TEAM}</td>
<td class="td_team">{home.TEAM_SHORT}</td>
<td class="td_hits">{home.GAMES}</td>
<td class="td_hits">{home.WIN}</td>
<td class="td_hits">{home.DRAW}</td>
@@ -196,7 +196,7 @@
onclick="popup('{away.U_PLAN_TEAM}',625,625);return false;">
<td class="td_rank">{away.RANK}</td>
<td class="td_logo">{away.LOGO}</td>
<td class="td_team">{away.TEAM}</td>
<td class="td_team">{away.TEAM_SHORT}</td>
<td class="td_hits">{away.GAMES}</td>
<td class="td_hits">{away.WIN}</td>
<td class="td_hits">{away.DRAW}</td>

View File

@@ -14,7 +14,7 @@ ul.dropdown-contents i.icon {
}
.football-table-scroll {
overflow-x:visible;
overflow-x:auto;
overflow-y:visible;
width: 100%;
}
@@ -195,7 +195,6 @@ table.football td.td_pts_total { text-align: right; padding: 4px 4px 0 2px; }
table.football td.td_rank { text-align: right; }
table.football td.td_group { text-align: center; }
table.football td.td_hits { text-align: center; }
table.football td.td_bonus { text-align: center; }
table.football td.td_wins { text-align: right; padding: 0 2px 0 4px; }
table.football td.td_match_no { text-align: right; }
table.football td.td_logo { text-align: center; }

View File

@@ -11,8 +11,6 @@
* Automatically write the league as XML-file
*/
if (!defined('IN_PHPBB'))
{
// Stuff required to work with phpBB3
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../../../../';
@@ -36,30 +34,40 @@ if (!defined('IN_PHPBB'))
$league = $request->variable('league', 0);
if (!$season or !$league)
{
exit;
trigger_error('Keine gültige Saison oder Liga gewählt.');
}
$download = $request->variable('d', false);
$string = xml_data($season, $league);
$xml_string = xml_data($season, $league);
if ( $string == '')
if ( $xml_string == '')
{
trigger_error('Fehler! Die XML-Datei konnte nicht erzeugt werden.');
}
if ($download)
{
// Download header
// Download XML-File
$filename = 'league_' . $season . '_' . $league . '.xml';
$fp = fopen('php://output', 'w');
header('Pragma: no-cache');
header('Content-Type: application/xml name=\"league_' . $season . '_' . $league . '.xml');
header('Content-disposition: attachment; filename=league_' . $season . '_' . $league . '.xml');
header("Content-Type: application/xml name=\"" . basename($filename) . "\"");
header("Content-disposition: attachment; filename=\"" . basename($filename) . "\"");
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
header('Pragma: public');
fwrite($fp, $xml_string);
fclose($fp);
exit_handler();
}
else
{
// XML header
header ("content-type: text/xml");
}
echo $string;
echo $xml_string;
}
function xml_data($season, $league)
@@ -145,6 +153,6 @@ function xml_table($season, $league, $table)
$xml_table .= " </" . strtolower($table) . ">" . "\n";
}
}
$db->sql_freeresult($result);
return $xml_table;
}
?>

View File

@@ -11,8 +11,6 @@
* Automatically write the seasons and leagues as XML-file
*/
if (!defined('IN_PHPBB'))
{
// Stuff required to work with phpBB3
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../../../../';
@@ -49,7 +47,6 @@ if (!defined('IN_PHPBB'))
header ("content-type: text/xml");
echo $string;
}
function xml_seasons()
{
@@ -96,6 +93,6 @@ function xml_seasons()
}
$xml_seasons .= '</seasons-data>' . "\n";
}
$db->sql_freeresult($result);
return $xml_seasons;
}
?>